Undefined components in YCbCr color space

조회 수: 2 (최근 30일)
Toma Sh
Toma Sh 2020년 11월 13일
댓글: Toma Sh 2021년 11월 29일
Is there any componen in the YCbCr color space undefined in some cases?
Like in HSV, the Hue plane is undefined when Saturation equals 0. Also, the Hue and Saturation are undefined when Value equals 0 'Black'.
Please help me.

채택된 답변

DGM
DGM 2021년 11월 27일
편집: DGM 2021년 11월 28일
I know this is dead, but I'm bored on a slow Saturday.
No, not in the same way. YCbCr is just a simple linear transformation of the color values.
% transformation matrix
A = [0.299 0.587 0.114;-0.1687 -0.3313 0.5;0.5 -0.4187 -0.08131];
Asc = [219; 224; 224]; % scaling for uint8
os = [16; 128; 128]; % offset
% convert to 8-bit YCbCr
RGB = uint8([100 100 100]); % a single uint8 color tuple
YCC = uint8((A.*Asc)*im2double(RGB(:)) + os)
YCC = 3×1
102 128 128
While in practice, you could use rgb2ycbcr(), the above demonstrates that the conversion is simple arithmetic. It's all just scaling and translation, no funny stuff.
In HSV or similar, you run into issues due to the polar model. What is the hue angle of a zero-length vector (when S = 0)? If saturation (S) is a normalized metric and the normalizing value is zero at the neutral corners, the meaningfulness of S collapses there since (e.g.) 50% of the distance from 0 to 0 is still 0. Does black lie on the neutral axis where S is 0, or does it lie on the surface of the cube, where S = 1?
There's nothing special about YCbCr in that sense. You can just as easily express YCbCr or LAB in polar coordinates and you'll have the same problem with hue ambiguity at the neutral axis. If you normalize the chroma axis, you'll have to make the same decision about how to handle the neutral corners.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by