开发者

MATLAB: Algorithm to convert RGB image to Lab Color Space [closed]

开发者 https://www.devze.com 2023-03-06 15:25 出处:网络
开发者_如何转开发It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current for
开发者_如何转开发 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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');
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号