2011-05-16 2 views
-5

Matlab에서 RGB 이미지를 Lab 색 공간으로 변환하려면 어떻게해야합니까?MATLAB : RGB 이미지를 Lab 색 공간으로 변환하는 알고리즘

+6

당신은 그와 감자 튀김을 원한다? –

+3

말 그대로 우리에게 당신을 위해 일할 것을 요구하는 것은 [MATLAB에 내장되어 있습니다] (http://www.mathworks.com/help/toolbox/images/f8-20792.html) * 및 * 3rd - 파티 솔루션은 [google의 첫 번째 결과] (http://robotics.stanford.edu/~ruzon/software/rgblab.html)로 제공됩니다. –

+0

당신은 여기를 볼 수 있습니다 - http://stackoverflow.com/questions/6013139/matlab-algorithm-to-convert-rgb-image-to-lab-color-space/6013156#6013156 또한 당신은 그것을 내장했습니다. MATLAB 또는 파일 교환에서. – Royi

답변

15

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

사실 그는 실험실이 아닌 L * a * b *로 변환됩니다. –

관련 문제