1 | initial version |
OpenCV uses BGR Color Space. In your code md2 is in RGB Color Space but you are expecting to display this using imshow directly without any RGB to BGR conversion. So the correct way is to convert the Mat to BGR color space before imshow. i.e like this
cvtColor(md2, md2, COLOR_RGB2BGR );
imshow("MD2", md2);