Clustering of 1's in the binary 3-D matrix and find the coordinate of center of the clusters
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Walter Roberson
el 28 de En. de 2021
Editada: Walter Roberson
el 28 de En. de 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 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!