opencv-mobile
opencv-mobile copied to clipboard
the ios version cv::imread .png as rgb not bgr
I found that the ios version opencv read .png as rgb (but jpeg as bgr).
cv::Mat img = cv::imread("test.png");
cv::cvtColor(img, img, cv::COLOR_RGB2BGR);
cv::imwrite("new.png", img);
the code above generate correct new.png, but if I do not cvtColor for RGB to BGR, the result is not correct.
I use the opencv-mobile-4.5.4-ios.zip downloaded from: https://github.com/nihui/opencv-mobile/releases/download/v14/opencv-mobile-4.5.4-ios.zip