How to extract connected chains in canny edge image? Specifically asking, how would I extract connected chains when there are so many edges are available, so that I could come up with top 10 results (top 10 long edges).
    3 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    

0 Commenti
Risposta accettata
  Matthew Eicholtz
      
 il 21 Mar 2016
        ----
Read the image:
I = imread('cameraman.tif');
Compute edges and create label matrix:
J = edge(I,'canny');
L = bwlabel(J);
Extract properties for connected components:
s = regionprops(J,'PixelIdxList');
Sort based on number of pixels in each connected component:
d = cellfun('length',{s(:).PixelIdxList}); %total number of pixels in each region
[~,order] = sort(d,'descend');
Show top-10 connected components:
K = ismember(L,order(1:10)); %only show the top 10 edges
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Computer Vision with Simulink in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!