YUV and YCrCb Colorspace values [closed]

asked 2015-03-01 15:05:09 -0600

tschnz gravatar image

Hey folks,

I'm currently working on a realtime application where I need to process the luminance channel. Source and destination are BGR frames, so I need 2 colorspace conversions in total. Since BGR-Lab and BGR-Luv conversion (and back) are about 40% slower than BGR-YCrCb and BGR-YUV, I need to use one of the latter ones.

Now here it gets confusing. The official documentation states, BGR-YCrCb uses JPEG conversion, using full range values. But using the minMaxLoc method gives me a range of [16-236] for the Y channel and some values around 128 for both chrominance channels. So the conversion seems to operate like the ITU-R BT.601 standard (Y'CrCb) would do. Rather confusing is the BGR-YUV conversion that, according to the source code, should operate like Y'CrCb says, but really gives me values around [11-243].

tl;dr: YCrCb-JPEG behaves like Y'CrCb, while YUV should behave like Y'CrCb but really does something else. (Tested with 32FC3 and 8UC3 type)

Hope you can clear some things up, because I'd like to use values in full range.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-11 14:34:28.490370