How to Cluster Image Colors Using K Means Clustering in CIE a*b Domain?
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...