How to convert RGB to CIE Lab color space?
显示 更早的评论
采纳的回答
更多回答(3 个)
Deepak Panda
2015-10-13
0 个投票
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
2015-10-13
Try this:
rgb2lab([1 1 1])
rgb2lab(uint8([255, 255, 255]))
rgb2lab(uint8([255, 0, 0]))
rgb2lab(uint8([0, 255, 0]))
rgb2lab(uint8([0, 0, 255]))
ans = 100 0.017536 -0.0061222
ans = 100 0.017536 -0.0061222
ans = 53.233 80.119 67.221
ans = 87.737 -86.176 83.183
ans = 32.303 79.204 -107.86
So a seems to go from about -86 to +80 and b seems to go from about -107 to +83. Why do you want something different? How will it help you?
Deepak Panda
2015-10-14
I am following this paper.
Onur Kucuktunc, Ugur Gudukbay, and Ozgur Ulusoy. Fuzzy Color Histogram-based Video Segmentation. Computer Vision and Image Understanding, 114(1):125–134, 2010.
The authors have used L [0 100], a [-86.18 98.23] and b [-107.86 94.47].
Deepak Panda
2015-10-14
编辑:Walter Roberson
2015-10-14
Is there any difference between these two procedures of rgb to lab conversion
1. colorTransform = makecform('srgb2lab');
lab = applycform(rgbImage, colorTransform);
2. rgb2lab
Image Analyst
2015-10-14
I wouldn't think so. Try it and see.
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
2019-6-14
0 个投票
Can we calculate rgb to lab without matlab code using hand calculation?
3 个评论
Adam
2019-6-14
Of course. There are formulae. I don't know where, offhand, but it's just maths and I'm sure you are as able as me at doing an internet search to find it.
Image Analyst
2019-6-14
Try here: easyrgb.com

First go from RGB to XYZ, then XYZ to LAB.
Or you could try Bruce Lindbloom's site

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
2019-7-1
Thanks all!!!
kasthuri c
2019-7-10
0 个投票
how to find the values of L paramete a parameter b parameter in Lab conversion method.
1 个评论
Image Analyst
2019-7-10
labImage = rgb2lab(rgbImage);
LImage = labImage(:, :, 1);
aImage = labImage(:, :, 2);
bImage = labImage(:, :, 3);
类别
在 帮助中心 和 File Exchange 中查找有关 Color 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!