set X plane and Y plane value matlab
in
Processing with Other Languages
•
1 year ago
Hi,
i'm nuwb in image programming..
i have a image in rgb color space, then i want to show the cb vs cr plane.
of course i convert the image to YCBCR color space first.
then i get cb and cr value from ycbcr image,
but i don't know how to display image in cb cr plane,
so, the X axis is CR value and Y axis is Cb value.
this is my code,
clear
clc
%---- Global Variable
im = imread('tangan.jpg');
YCBCR = rgb2ycbcr(im);
% crop image
I2 = imcrop(im,[750 680 130 112]);
cb = I2;
%Y component
cb(:,:,1) = 0;
% CB Component
%cb(:,:,2) = 0;
% CR Component
cb(:,:,3) = 0;
cr = I2;
%Y component
cr(:,:,1) = 0;
% CB Component
cr(:,:,2) = 0;
% CR Component
%cb(:,:,3) = 0;
imshow(cb), figure, imshow(cr);
1