Clustering of 1's in the binary 3-D matrix and find the coordinate of center of the clusters
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have this attached 256x256x512 logical matrix (comprised of only 0's and 1's). I want to cluster the 1's and then determine the coordinate of these clusters as (m,n,p); 1<m<256, 1<n<256, 1<p<512. It can be assumed that two different clusters are at least 4 pixels away from each other. Thanks in advance!
0 Kommentare
Antworten (1)
Walter Roberson
am 28 Jan. 2021
Bearbeitet: Walter Roberson
am 28 Jan. 2021
regionprops() and ask for 'Centroid' -- using one possible meaning for the "center" of the clusters, and keeping in mind that the centroid is not necessarily going to be an integer at all.
Or perhaps you will want to ask for the bounding box, and then use half way through the bounding box, which is a different meaning of "center", but would be integer or half-integer
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!