How can I do a conversion between RGB image to Lab Color Space in Matlab?
http://wildinformatics.blogspot.com/2010/10/rgb-to-lab-color-transformation-in.html
%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');
精彩评论