-
-
Notifications
You must be signed in to change notification settings - Fork 55.7k
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
cvtColor for BGR to YUV 4:2:0 returns darker image #13066
Comments
In theory there are multiple color spaces and conversion formulas.
It is too old (>2 years). Many changes have been applied since this release including YUV calculation updates. |
I installed opencv 3.4.1 and problem still exists. |
It is funny that when we use COLOR_BGR2GRAY opencv uses |
There are multiple standards. https://en.wikipedia.org/wiki/Rec._601
https://en.wikipedia.org/wiki/Rec._709
https://en.wikipedia.org/wiki/Rec._2020
https://en.wikipedia.org/wiki/YUV defines |
Thanks a lot for your response. |
System information (version)
Detailed description
The grayscale image that comes from cvtColor function with COLOR_BGR2YUV_I420 (or COLOR_BGR2YUV_IYUV), which converts RGB to YUV 4:2:0 family, is darker than the grayscale image that comes from COLOR_BGR2GRAY. I think in theory they should be the same because the Y channel is actually the grayscale image. Here is a simple code that I used for testing:
Steps to reproduce
for reading the grayscale part I used the answer to the following question:
http://answers.opencv.org/question/100149/how-to-get-y-u-v-from-image/
The text was updated successfully, but these errors were encountered: