Undefined components in YCbCr color space

1 回表示 (過去 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.
  1 件のコメント
Toma Sh
Toma Sh 2021 年 11 月 29 日
Thank you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage 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