Borrar filtros
Borrar filtros

How to convert RGB to CIE Lab color space?

10 visualizaciones (últimos 30 días)
Sabarinathan Vadivelu
Sabarinathan Vadivelu el 7 de Sept. de 2012
Comentada: Image Analyst el 10 de Jul. de 2019
How to convert RGB to CIE Lab color space?

Respuesta aceptada

Image Analyst
Image Analyst el 7 de Sept. de 2012
Convert the image to L*a*b* color space using makecform and applycform.
colorTransform = makecform('srgb2lab');
lab = applycform(rgbImage, colorTransform);
  7 comentarios
Adam
Adam el 4 de En. de 2017
Editada: Adam el 4 de En. de 2017
doc rgb2lab
if you have >= R2014b and Image Processing Toolbox which you need for the above anyway (the toolbox)
Image Analyst
Image Analyst el 4 de En. de 2017
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).

Iniciar sesión para comentar.

Más respuestas (3)

Deepak Panda
Deepak Panda el 13 de Oct. de 2015
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 comentarios
Image Analyst
Image Analyst el 14 de Oct. de 2015
I wouldn't think so. Try it and see.
Kondal Rao J
Kondal Rao J el 16 de Jun. de 2017
If you have higher version than 2014....just rgb2lab is sufficient to convert the image to lab color space

Iniciar sesión para comentar.


Yoon ThiriZaw
Yoon ThiriZaw el 14 de Jun. de 2019
Can we calculate rgb to lab without matlab code using hand calculation?
  3 comentarios
Image Analyst
Image Analyst el 14 de Jun. de 2019
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 el 1 de Jul. de 2019
Thanks all!!!

Iniciar sesión para comentar.


kasthuri c
kasthuri c el 10 de Jul. de 2019
how to find the values of L paramete a parameter b parameter in Lab conversion method.
  1 comentario
Image Analyst
Image Analyst el 10 de Jul. de 2019
labImage = rgb2lab(rgbImage);
LImage = labImage(:, :, 1);
aImage = labImage(:, :, 2);
bImage = labImage(:, :, 3);

Iniciar sesión para comentar.

Categorías

Más información sobre Modify Image Colors en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by