Ask Your Question

Revision history [back]

Hi everyone, i am having the same problem described above using the OpenCV version 3.4.3. In my c++ application I am using the function cvtColor (with code CV_BayerRG2RGB) to convert a Bayer RG image to an RGB image. The image I get in output is displayed correctly using cv::imshow but, using the viewer in my app or any other third party viewer (for example ImageJ), I observe that the image channels are swapped compared to what is expected (in other words the image is BGR). Conversely, using the conversion code CV_BayerRG2BGR, I display the image correctly in my RGB Viewer. Can you explain me why??