How can I extract each connected object in a 3D array?
Afficher commentaires plus anciens
I have a 3D array (attached as Y.mat) and I find the connected components using bwconncomp. I used the following coding to extract each component but X is a zero array with the same size as Y. Please, help me to solve this problem.
Thanks
May
CC = bwconncomp(Y, 26); % Y is the 3D array
L = labelmatrix(CC);
for i=1:length(CC.PixelIdxList)
X = (L==i);
imshow3D(a); % use existing function to show 3D
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Region and Image Properties dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!