Find continuous elements in matrix
Mostra commenti meno recenti
Hi everyone,
my problem is the following: i've one matrix made of two possible values (i.e. 1 and 0). I also have the coordinates of one "starting point". I would like to select all the ones that are connected to this point without selecting the ones that are separeted by zeros. I can't figure out a way to solve the problem... can you help me?
Thanks in advance, Fabio
1 Commento
Walter Roberson
il 18 Giu 2012
Do you have the Image Processing Toolbox?
Risposta accettata
Più risposte (1)
Sean de Wolski
il 18 Giu 2012
CC = bwconncomp(a);
CC.PixelIdxList{:}
Categorie
Scopri di più su Spline Postprocessing in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!