%convert to RgbI image in RGB to XYZ
XYZTransformation = makecform('srgb2xyz'); XyzI = applycform(RgbI,XYZTransformation);%seperate X,Y,Z
X = XyzI(:,:,1);Y = XyzI(:,:,2);Z = XyzI(:,:,3);figure, imshow(X) , title('X');figure, imshow(Y) , title('Y');figure, imshow(Z) , title('Z');xyz = cat(3, X,Y,Z);figure, imshow(xyz) , title('xyz');%convert to XYZ
labTransformation = makecform('xyz2uvl');luvI = applycform(xyz,labTransformation);%seperate X,Y,Zu = luvI(:,:,1);v = luvI(:,:,2);l = luvI(:,:,3);figure, imshow(l) , title('l');figure, imshow(u) , title('u');figure, imshow(v) , title('v');
MATLAB: Need to Convert RGB color space to L*U*V* color space , Please tell am i correct with this code
color spaceconverting rgb to l*u*v* color spaceImage Processing Toolbox
Best Answer