Intensity based clusters / centers of gravity in greyscale image
Show older comments
Hi,
I would like to find the two centers of gravity in the following greyscale image (color coded for easier visualization):

I have tried
kmeans(image(:), 3, 'start','uniform');
but this only finds one large cluster. kmeans is probably unsuitable for this task.

How can I find the two centers of gravity?
Answers (1)
Image Analyst
on 8 Feb 2014
0 votes
Split them apart first with watershed. Then simply threshold and call regionprops and ask for the WeightedCentroid. See my Image Analysis Tutorial http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 for an example of how to find centroids.
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!