Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
xutch opened this issue Mar 21, 2022 · 1 comment
Closed

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

xutch opened this issue Mar 21, 2022 · 1 comment

Comments

@xutch
Copy link

xutch commented Mar 21, 2022

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

@nihui
Copy link
Owner

nihui commented Aug 8, 2023

#53

@nihui nihui closed this as completed Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants