How to convert RGB to CIE Lab color space?

조회 수: 14 (최근 30일)
Sabarinathan Vadivelu
Sabarinathan Vadivelu 2012년 9월 7일
댓글: Image Analyst 2019년 7월 10일
How to convert RGB to CIE Lab color space?

채택된 답변

Image Analyst
Image Analyst 2012년 9월 7일
Convert the image to L*a*b* color space using makecform and applycform.
colorTransform = makecform('srgb2lab');
lab = applycform(rgbImage, colorTransform);
  댓글 수: 7
Adam
Adam 2017년 1월 4일
편집: Adam 2017년 1월 4일
doc rgb2lab
if you have >= R2014b and Image Processing Toolbox which you need for the above anyway (the toolbox)
Image Analyst
Image Analyst 2017년 1월 4일
zee, you can also use rgb2lab(). But, what output are you expecting? You get an image. And to see that image you can use imshow(), or you can just look at its values in the variable editor in the workspace. But no output will get "shown" unless you do one of those two things. Otherwise all you get is a new variable.
If you want to see the 3-D color gamut, you can use colorcloud() (R2016b and later).

댓글을 달려면 로그인하십시오.

추가 답변 (3개)

Deepak Panda
Deepak Panda 2015년 10월 13일
How can I transfer rgb to Lab color space with luminance [0 100], a [-86.18 98.23] and b [-107.86 94.47]
  댓글 수: 5
Image Analyst
Image Analyst 2015년 10월 14일
I wouldn't think so. Try it and see.
Kondal Rao J
Kondal Rao J 2017년 6월 16일
If you have higher version than 2014....just rgb2lab is sufficient to convert the image to lab color space

댓글을 달려면 로그인하십시오.


Yoon ThiriZaw
Yoon ThiriZaw 2019년 6월 14일
Can we calculate rgb to lab without matlab code using hand calculation?
  댓글 수: 3
Image Analyst
Image Analyst 2019년 6월 14일
Try here: easyrgb.com
0001 Screenshot.png
First go from RGB to XYZ, then XYZ to LAB.
Or you could try Bruce Lindbloom's site
0000 Screenshot.png
The above are just images so you can't click on them. But click on the link and go to the site and click on the formula you want and it will be there.
Just be aware that your LAB values will NOT be the same as what you get from a spectrophotometer, unless you do a calibration.
Yoon ThiriZaw
Yoon ThiriZaw 2019년 7월 1일
Thanks all!!!

댓글을 달려면 로그인하십시오.


kasthuri c
kasthuri c 2019년 7월 10일
how to find the values of L paramete a parameter b parameter in Lab conversion method.
  댓글 수: 1
Image Analyst
Image Analyst 2019년 7월 10일
labImage = rgb2lab(rgbImage);
LImage = labImage(:, :, 1);
aImage = labImage(:, :, 2);
bImage = labImage(:, :, 3);

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by