opencv-mobile icon indicating copy to clipboard operation
opencv-mobile copied to clipboard

the ios version cv::imread .png as rgb not bgr

Open xutch opened this issue 2 years ago • 0 comments

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

xutch avatar Mar 21 '22 04:03 xutch