Jump to content
  • Advertisement
Sign in to follow this  
fs1

Contours and Cluster Algorithm

This topic is 1164 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Dear All

 

I am trying to figure out any algorithm that can identify a group of 2D points and draw the contour around them (or a polygon that includes them. I did one manually so as to explain what I need to achieve)

 

Also I need to isolate potential groups of points that are close enough, and define them as part of the same group or cluster.

 

Any ideas will be highly appreciated.

 

Thanks!

Edited by fs1

Share this post


Link to post
Share on other sites
Advertisement

Thanks Randy.

 

Do you have a working snippet or something where I can start with? I'll code it in C or C++

Edited by fs1

Share this post


Link to post
Share on other sites

thanks Randy again.

 

I have an additional question, does it worth to explore doing a non-convex hull for this? Any code for this as well ?

Share this post


Link to post
Share on other sites

Well if you have a set of points and want a non-convex shape, then you have to define what "non-convex" means. Usually there are many candidate representatives of a point cloud that are "non-convex", so you'd have to somehow pick one. The convex hull is simpler to think about since it is unique for a given point set.

Share this post


Link to post
Share on other sites
Thanks. I'll think of the non convex hull approach later.

I have a last question: what happens if you don't know on beforehand the number of clusters? What is the best approach for determining them?

Share this post


Link to post
Share on other sites
I have been researching and my clusters are very well defined.

You can isolate and differentiate one to each other very easily at least visually.

Is there a way to determine the number of clusters as they seem to be apart one of each other very clearly?

K-means could work but my problem seems to be more simple. Maybe detecting clusters by a certain radial and distance from a plane center point?

Also, if I go ahead and use the Elbow (or other algorithm), how fast are they?

Thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!