Problem drawing a polygon on data clusters in MATLAB

Posted by Hossein on Stack Overflow See other posts from Stack Overflow or by Hossein
Published on 2010-06-01T18:17:59Z Indexed on 2010/06/01 18:43 UTC
Read the original article Hit count: 292

Filed under:
|

Hi, I have some data points which I have devided into them into some clusters with some clustering algorithms as the picture below:(it might takes some time for the image to appear) alt text

Each color represents different cluster. I have to draw polygons around each cluster. I use convhull for this reason. But as you can see the polygon for the red cluster is very big and covers a lot of areas, which is not the one I am looking for. I need to draw lines(ploygons) exactly around my data sets. For example in the picture above I want a polygon that is drawn exactly the same(and around) as the red cluster with the 3 branches. In other words, in this case I need a polygon with 3 branches to cover my red clusters not that big polygon that covers the whole area. Can anyone help me with this? Please Note that the solution should be general, because the clusters will change in each run of the algorithm, so it needs to be in a way that is general.

© Stack Overflow or respective owner

Related posts about matlab

Related posts about polygon