I've got (in a x and y vector) some locations which form small clusters, about 10~15 point per cluster. They aren't ordered in any way. And there are multiple clusters per 'image'. How can I determine the center of such a cluster?
Background info: I've got a picture of a few (2 in my case) beads and i'm trying to get the exact location (center) of these beads. With find() I'm getting some points (a cluster) in every bead. But i need just one x,y location per bead.

1 件のコメント

Arjen
Arjen 2012 年 5 月 16 日
I'm thinking of dividing the image into clusters and them just taking the mean per cluster. How can i divide it into clusters? I dont know the amount of beads.

サインインしてコメントする。

 採用された回答

Allison Bradley
Allison Bradley 2012 年 5 月 18 日

0 投票

I'm working on a very similar problem right now. You can use hierarchical clustering (clusterdata) if you don't know the number of clusters in advance - it's actually pretty straightforward. The only tricky part is setting the cutoff criterion. I'm setting a maximum distance (using the 'single' option for the shortest distance) between clusters as the criterion, which might also make sense for you seeing as your clusters should be pretty tight for the beads. The only problem I see is if you have two beads touching....

3 件のコメント

Image Analyst
Image Analyst 2012 年 5 月 18 日
Please say what toolbox it's in.
Arjen
Arjen 2012 年 5 月 21 日
Thanks Allison! Im using cutoff value around 1.6
Im not exactly sure what it does but it normally finds the right number of clusters.
Also it's about one million trillion thousand times faster then kmeans
Dark Dragon
Dark Dragon 2016 年 1 月 19 日
It is in the stats toolbox as well: http://www.mathworks.com/help/stats/clusterdata.html

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2012 年 5 月 16 日

0 投票

If you know how many clusters there should be, then you can use k-means (it's in the stats toolbox). For related questions, see <http://www.mathworks.com/searchresults/?q=%22k-means%22&q1=&q2=%22k-means%22&q3=&notq=&c[]=support>

1 件のコメント

Arjen
Arjen 2012 年 5 月 16 日
yeah it works nice, but you need to specify the number of clusters you'd like to distinguish. And if there are over 100 beads I dont want to count them. Is there an option where it searches for very close points and makes them a cluster?

サインインしてコメントする。

質問済み:

2012 年 5 月 16 日

コメント済み:

2016 年 1 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by