Is there any alternate method to extract individual Y, Cb and Cr components than this one?

3 views (last 30 days)
Hi,
I have converted an RGB image to YCbCr using rgb2ycbcr. Now I want to extract the individual Y, Cb and Cr components from it.
This is what I have done:
YCbCr = rgb2ycbcr(I);
figure(3);
Y = YCbCr(:,:,1)
Cb = YCbCr(:,:,2)
Cr = YCbCr(:,:,3)
imagesc(Y);
But I am not getting the expected Y component. Is there any other method for doing this?

Answers (1)

Image Analyst
Image Analyst on 21 Feb 2015
Why do you think it's wrong?
Alternatively you can use rgb2hsv() and take the v channel or rgb2lab and take the L channel. What do you want to do anyway? Why don't you attach your image and say what you want to do or measure?

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!