Code covered by the BSD License  

Highlights from
RGB2Lab

2.66667
2.7 | 3 ratings Rate this file 133 Downloads (last 30 days) File Size: 1.86 KB File ID: #24009

RGB2Lab

by

Mark Ruzon

 

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

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
15 Jul 2014 surachet jurakurd

surachet jurakurd

 
12 May 2013 Atanas

Atanas

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

06 Dec 2012 Hyunsung

Hyunsung

This file is actually sRGB to Lab? sorry i am confused

Comment only
22 Oct 2012 Tim Zaman

Tim Zaman

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

13 Dec 2011 Faranak Sh

Faranak Sh

Thank You!

Comment only
06 Apr 2011 Tim Zaman

Tim Zaman

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

Comment only
07 Jan 2010 Abe Lau

Abe Lau

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

Comment only
08 May 2009 Mark Ruzon

Mark Ruzon

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

Comment only
07 May 2009 Uwe

Uwe

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

Comment only

Contact us