Intensity based clusters / centers of gravity in greyscale image

5 views (last 30 days)
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
Image Analyst on 8 Feb 2014
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 Agriculture in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!