I am working on building detection from aerial images using Image Processing in MATLAB.

I am doing an image segmentation based on the local homogeneity of image. I want to apply K Means Clustering in CIE LAB Color Space with some clusters on the anisotropic diffused image for color quantization and generate the image for further processing.
My RGB image is of 877 X 454 dimension.

How do I do that?



1 Answer 1


You should use makecform to create a color transfer structure.
You should use srgb2lab to create a structure which will convert you to LAB.
To apply the color transformation use applycform.
Then, as a result you'll have an image in the LAB domain.

Then use kmeans to cluster the image colors on the AB channels.

Good Luck...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.