Code covered by the BSD License  

Highlights from
Color segmentation by Delta E color difference


4.4 | 5 ratings Rate this file 125 Downloads (last 30 days) File Size: 356 KB File ID: #31118
image thumbnail

Color segmentation by Delta E color difference



User draws region and this finds pixels in the image with a similar color, using Delta E.

| Watch this File

File Information

Demo to perform very, very simple color detection in LAB color space. The RGB image is converted to LAB color space and then the user draws some freehand-drawn irregularly shaped region to identify a color. The Delta E (the color difference in LAB color space) is then calculated for every pixel in the image between that pixel's color and the average LAB color of the drawn region. The user can then specify a number that says how close to that color would they like to be. The software will then find all pixels within that specified Delta E of the color of the drawn region.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.12 (R2011a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (15)
28 Feb 2014 Buddy

great work bro... Thanks for sharing this code.. Is it possible to do in the HSV colorspace?

02 Jan 2014 Kumar

I am a research student. I would like to use your methodology (Color segmentation by Delta E color difference) for shade matching.
I just want to find where the reference shades (from a standard color chart)are located in the chosen image? Is it possible?
Plz help me

03 Jun 2013 Atanas

Hello, may I ask how can I segment every color object in separate picture, I mean for example on the next picture to segment only red object (red colored off course), on the next blue object and so on. Thank you in advance for the help :)

02 Feb 2013 uvan siya

Image Analyst >> Please send me the base paper for this "Color segmentation by Delta E color difference" . my mail is

20 Sep 2012 Image Analyst

ajit, if there is a brightness change, there is a color change. If you want to detect a hue, regardless of it's brightness, then you can use my HSV color segmentation demo and just threshold on the hue value. However skin is a boomerang-shaped gamut and can't be gotten by any simple carving up of the gamut in any 3D color space, no matter which one you pick. You'd need to carve out the boomerang shape, not just a hue sector or a delta-E ball shape.

28 Aug 2012 ajit sarode

works very accurate if said to choose any color however if there is brightness change for same color in rest of the picture than selected, then it does not detect(skin color with different brightness),can u please help?

Well commented/explained.

16 Aug 2012 Karthik MSwamy

Works quite well. Well commented.
Can you add the reference to the paper or the math/theory behind this work?

13 Aug 2012 Anselm Griffin

Well commented/explained.

25 May 2012 Image Analyst

Marium: I don't recall getting anything from you.

29 Mar 2012 pratibha  
29 Mar 2012 Marium Malik

Have messaged you the error

05 Nov 2011 Image Analyst

arman: How did you run it? What was the exact error message? I just downloaded it and ran it, and it was fine. Click my name above and then click the "Contact Author" link to send me this information.

03 Nov 2011 arman Yaraee

It doesn't work. Whenever I draw a region it gives error of too many output arguments!!

18 Oct 2011 Image Analyst

You can use it for indexed images if you convert the indexed image into an RGB image with ind2rgb().

18 Oct 2011 dion

can i use it for index image???

Contact us