Borrar filtros
Borrar filtros

how can i get the pixel values of L , a, b in Lab space?

6 visualizaciones (últimos 30 días)
mandana
mandana el 29 de Dic. de 2017
Comentada: mandana el 13 de En. de 2018
i write this code data(m,n).color= impixel(imlab,m,n); imlab is an image in lab space and the result of running the code has 3 number i dont know is it correct? if yes which one is a ? and how can i use this value to calculate the difference between 2 pixels color? and do you suggest using DELTA E?

Respuesta aceptada

Image Analyst
Image Analyst el 29 de Dic. de 2017
Editada: Image Analyst el 29 de Dic. de 2017
L is plane 1, a is 2, and b is 3.
labImage = rgb2lab(rgbImage);
lImage = labImage(:, :, 1);
aImage = labImage(:, :, 2);
bImage = labImage(:, :, 3);
imshow(labImage);
hp = impixelinfo();
Yes you should use delta E to determine color difference.
deltaEImage = sqrt((lImage - lRef) .^ 2 + ...
(aImage - aRef) .^ 2 + ...
(bImage - bRef) .^ 2);
imshow(deltaEImage, []);
hp = impixelinfo();
Note, these are not TRUE CIELAB values like you'd get from a spectrophotometer and simply use the "book formula". If you change the exposure of your camera, you will get new RGB values, and hence new LAB values even though your sample did not change at all. To avoid that, you'd need to take the much more complicated step of doing a color calibration of your system with known standards like the X-Rite Color Checker Chart.
  5 comentarios
Image Analyst
Image Analyst el 10 de En. de 2018
Your comment tells me you did not look at the link to Westland's toolbox that I recommended. If you had looked at it, you would have found the function.
function [de,dl,dc,dh] = cie00de(lab1,lab2,sl,sc,sh)
By the way, I'm sure you've heard the expression "garbage in, garbage out". So, it's OK to use in some circumstances but you can't use delta E to compare colors across images, or expect to get out the same delta E like you'd get from a real spectrophotometer, unless you have calibrated your colors. Otherwise you're just getting "book formulas". If you have a color in one image taken with one camera or exposure conditions and another image from a different camera or exposure conditions, then even using the book formula is meaningless.
mandana
mandana el 13 de En. de 2018
thanks so much for your help

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Image Processing Toolbox 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