CIELAB is a nonlinear transformation of RGB where the Euclidean distance between two colors is equal to their perceptual distances (for distances less than ~10 units). Algorithms that process color images often produce better results in CIELAB.
The equations implemented here come from Charles Poynton's Colour FAQ.
Mark Ruzon (2021). RGB2Lab (https://www.mathworks.com/matlabcentral/fileexchange/24009-rgb2lab), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Is there a guide on how to use this?
找了好久终于找到了LAB代码
how exactly to use this file (to check if it works with some pic), sry for the question, but I am new in this and I need color space segmentation with Lab color space
This file is actually sRGB to Lab? sorry i am confused
This assumes an sRGB color profile, most certianly not always the case.
Thank You!
you can only successfully convert if you know what color profile [RGB] is used. I guess you took sRGB?
I guess "makecform" is the native command Uwe was referencing to
What native MATLAB implementation? I see lab2double but not the reverse.
I don't see the advantage over the native Matlab implementation.
To make it nicer, you should make the whitepoint and the colorspace selectable. (now it is D65 and sRGB).