1
$\begingroup$

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 anistropic 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?

Thanks

$\endgroup$
2
$\begingroup$

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

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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