Undefined components in YCbCr color space
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Toma Sh
el 13 de Nov. de 2020
Comentada: Toma Sh
el 29 de Nov. de 2021
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.
0 comentarios
Respuesta aceptada
DGM
el 27 de Nov. de 2021
Editada: DGM
el 28 de Nov. de 2021
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)
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Processing and Computer Vision en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!