MATLAB: K-means clustering

color classificationdigital image processingk means clusteringStatistics and Machine Learning Toolbox

I'm using K-means clustering to segment the image that consists of a hand into three clusters. A cluster consists of only hand part and second the background and third cluster is remaining similar pixels. Every time I run the code it randomly chooses the contents of each cluster. Is there any method through which I can identify the cluster that contains the hand from the three since I need to use the clustered hand for further processing in my same code. Thank you.

Best Answer

Since k-means uses a random start, the clusters have no particular order they come out in. Therefore, you need to identify which cluster is a hand.
Surely there are features about a hand that make it different from the background? Color perhaps, or shape. You need to start thinking about what makes a hand a hand.