29 #include "../include/xf_gammacorrection_config.h"
39 xf::cv::Mat<OUT_TYPE, HEIGHT, WIDTH, NPC1>& imgOutput,
41 xf::cv::gammacorrection<IN_TYPE, OUT_TYPE, HEIGHT, WIDTH, NPC1>(imgInput1, imgOutput, gammaval);
54 ap_uint<INPUT_PTR_WIDTH>* img_inp, ap_uint<OUTPUT_PTR_WIDTH>* img_out,
int rows,
int cols,
int threshold,
int k) {
67 const int pCOLS =
WIDTH;
68 const int pNPC1 =
NPIX;
70 xf::cv::Mat<XF_8UC1, HEIGHT, WIDTH, NPIX> in_mat(
rows,
cols);
72 #pragma HLS stream variable=in_mat.data depth=2
75 xf::cv::Mat<XF_8UC1, HEIGHT, WIDTH, NPIX> out_mat(
rows,
cols);
77 #pragma HLS stream variable=out_mat.data depth=2
83 xf::cv::Array2xfMat<INPUT_PTR_WIDTH, IN_TYPE, HEIGHT, WIDTH, NPIX>(img_inp, in_mat);
85 xf::cv::gammacorrection<IN_TYPE, OUT_TYPE, HEIGHT, WIDTH, NPC1>(in_mat, out_mat, gammaval);
86 xf::cv::xfMat2Array<OUTPUT_PTR_WIDTH, OUT_TYPE, HEIGHT, WIDTH, NPIX>(out_mat, img_out);
100 hls::stream<ap_axiu<INPUT_PTR_WIDTH, 0, 0, 0> >& img_in_axi_stream,
101 hls::stream<ap_axiu<OUTPUT_PTR_WIDTH, 0, 0, 0> >& img_out_axi_stream,
102 int rows,
int cols,
int threshold,
int k) {
106 const int pCOLS =
WIDTH;
107 const int pNPC1 =
NPIX;
109 xf::cv::Mat<IN_TYPE, HEIGHT, WIDTH, NPIX> in_mat(
rows,
cols);
111 #pragma HLS stream variable=in_mat.data depth=2
114 xf::cv::Mat<OUT_TYPE, HEIGHT, WIDTH, NPIX> out_mat(
rows,
cols);
116 #pragma HLS stream variable=out_mat.data depth=2
123 xf::cv::axiStrm2xfMat<INPUT_PTR_WIDTH, IN_TYPE, HEIGHT, WIDTH, NPIX>(
124 img_in_axi_stream, in_mat);
125 float gammaval = 0.2;
126 xf::cv::gammacorrection<IN_TYPE, OUT_TYPE, HEIGHT, WIDTH, NPC1>(in_mat, out_mat, gammaval);
127 xf::cv::xfMat2axiStrm<OUTPUT_PTR_WIDTH, OUT_TYPE, HEIGHT, WIDTH, NPIX>(
128 out_mat, img_out_axi_stream);
void gammacorrection_accel(xf::cv::Mat< XF_8UC1, 256, 256, XF_NPPC1 > &imgInput1, xf::cv::Mat< XF_8UC1, 256, 256, XF_NPPC1 > &imgOutput, float gammaval)
Top-level accelerated function of the Gammacorrection Application with xf::cv I/F.
void GammacorrectionAccelArray(ap_uint< 64 > *img_inp, ap_uint< 64 > *img_out, int rows, int cols, int threshold, int k)
Top-level accelerated function of the Gammacorrection Application with array I/F.
void GammacorrectionAccelStream(hls::stream< ap_axiu< 64, 0, 0, 0 > > &img_in_axi_stream, hls::stream< ap_axiu< 64, 0, 0, 0 > > &img_out_axi_stream, int rows, int cols, int threshold, int k)
Top-level accelerated function of the Gammacorrection Application with array I/F.