How can i change the connectivity in regionprops from 8 to 4?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
marco mendez
il 12 Set 2019
Commentato: marco mendez
il 13 Set 2019
I want regionprops to divide the regions with connectivity 4 instead 8. With 8 it mix two region i want separated into one.
0 Commenti
Risposta accettata
Walter Roberson
il 12 Set 2019
regionprops() itself always uses 8 connectivity for 2D arrays.
The way you get around this is to use bwlabel() or bwconncomp() to do the labeling for you, telling them which connectivity you want, and then pass the result to regionprops as a labeled image instead of as a binary image.
Più risposte (0)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!