File Exchange

image thumbnail


version 1.0 (1.86 KB) by

Converts an image from the RGB color space to the CIELAB color space.



View License

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.

Comments and Ratings (10)

Thien Tran


Atanas (view profile)

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

Tim Zaman

This assumes an sRGB color profile, most certianly not always the case.

Faranak Sh

Thank You!

Tim Zaman

you can only successfully convert if you know what color profile [RGB] is used. I guess you took sRGB?

Abe Lau

I guess "makecform" is the native command Uwe was referencing to

Mark Ruzon

What native MATLAB implementation? I see lab2double but not the reverse.


Uwe (view profile)

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).

MATLAB Release
MATLAB 7.5 (R2007b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video