%load rgb image
src = 'C:\rainbow.jpg';
rgbI = imread(src);
%convert to lab
labTransformation = makecform('srgb2lab');
labI = applycform(rgbI,labTransformation);
%seperate l,a,b
l = labI(:,:,1);
a = labI(:,:,2);
b = labI(:,:,3);
figure, imshow(l) , title('l');
figure, imshow(a) , title('a');
figure, imshow(b) , title('b');
The input image
and the output
image courtesy : Ashraful Alam
This code is not working.
ReplyDeleteNo output is shown.
it's okay for me. thanks for yr information
ReplyDelete