how to find the length and width of connected components
    5 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
hi everyone.
i want to know how to find the length and width of connected components as i already label the connected components using bwlabel and draw the boundries using regionprops and boundry but now the only thing i need to know is how to find the length and width of that drawn boundries(connected components). as i want to seprate those regions that have length and width equall to humans.
2 Commenti
Risposte (2)
  darova
      
      
 il 26 Mar 2020
        Use regionprops
If you used bwlabel, can't you just separate?
[L,n] = bwlabel(image);
data = regionprops(L,'area');
area = cat(1,data.Area);
[~,ix] = sort(area,'descend');
imshow(L==ix(1))                % show biggest region
pause(1)
imshow(L==ix(2))                % show second biggest region
7 Commenti
Vedere anche
Categorie
				Scopri di più su Live Scripts and Functions in Help Center e File Exchange
			
	Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!