MATLAB Answers


coding for color based segmentation

Asked by vibhu sharma on 28 Nov 2011

i want to do matlab coding for segmenting the object on the basis of color based segmentation and the proposed color space is LAb color space...can anyone plsss help me out with this plsss...its really very urgent

  1 Comment

duplicate from:

Vibhu, you can edit your original question rather than make a new one with the same topic. Also, please show us what you've done so far. Or show an image you want to segment. Or read this post (

Log in to comment.


No products are associated with this question.

1 Answer

Answer by Image Analyst
on 28 Nov 2011

MATLAB's demo of k-means clustering in LAB color space:

My color segmentation demos in RGB space, HSV space, and LAB space:

If Sven is right about you wanting to find hands/skin, hsv color space would be best for segmenting skin gamut. LAB or RGB color space would be no good. Even with HSV you can't simply go on hue, though that's the major component. You have to put in some curves to make the gamut "bow out" in the middle and come back in at the top and bottom so that you get the boomerang-shaped gamut characteristic of skin.


Log in to comment.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!