12-20-2018 11:35 PM
I tried to use the merge function of xfopencv to combine A,R,G,B channels.
I used the example channelcombine from Xilinx Github
I build the example and run it on a zcu104 board with revision platform
But the result was wrong, I can only get a full black picture which had only a single channel.
Some test files are attached,
R/G/B/Ahls_out.jpg are the input. out_ocv.jpg is the output of OpenCV. hls_out.jpg is the output of xfopencv.
Can anybody help?
Besides, these four test files in the data directory of channelcombine example are all rgb files, this may be misleading
12-21-2018 01:28 AM
12-23-2018 07:03 PM - edited 12-23-2018 07:05 PM
I got the correct output image by copying the output data from xf::Mat to cv::Mat;
//this will get the full black output image
//this can get the correct output image
out_img.create(in_gray1.rows, in_gray1.cols, CV_8UC4); out_img.data = imgOutput.copyFrom(); cv::imwrite("cpy_out.jpg", out_img);
UG1233 says xf::imwrite support XF_8UC4, why can't I get the correct output by this?