www.gusucode.com > images 案例代码 matlab源码程序 > images/ConvertRGBImageToLabAndDisplayLComponentExample.m

    %% Convert RGB Image to L*a*b* and Display L* Component
% 
%%
% Read RGB image into the workspace.
rgb = imread('peppers.png');
%%
% Convert the RGB image to the L*a*b* color space.
lab = rgb2lab(rgb);
%%
% Display the L* component of the L*a*b* image.
imshow(lab(:,:,1),[0 100])