Cluster pixels in Binary Image from 2D-Histogram Data

3 ビュー (過去 30 日間)
Timo Schmid
Timo Schmid 2020 年 11 月 18 日
コメント済み: Timo Schmid 2020 年 11 月 23 日
What I am trying to achieve is to decompose a stl-model into sub-volumes based on the corresponding surface normals (or check if this is somehow possible or can be combined with other methods).
First I created a 2D-Histogram in Matlab based on the orientation of surface normals of a STL-File (Figure A, attached PNG).
For further processing I then transformed the Histogram data to a binary image. Now I am trying to cluster the binary data to achieve clusters like in figure C.
But best I can do for now is creating clusters based on the direct connectivity of the pixels (figure B) and I can't think of an approach to achieve this.
Maybe someone could give me a hint or algorithm to achieve the results like seen in figure C?
Thanks in advance!

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 11 月 18 日
You can use regionprops(): https://www.mathworks.com/help/images/ref/regionprops.html to get each white region in your image. Then you will need to check the difference between x and y coordinates of region-centers to get the type of clustering you want.
  1 件のコメント
Timo Schmid
Timo Schmid 2020 年 11 月 23 日
I managed to cluster another histogram using DBScan-Function (delivered the best results) which you can see on the right (attached picture). For the right histogram it works fine.
But I can't manage to cluster along x/y direction in the left one because of the intersections... Any ideas on how to approach this?

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

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by