How to remove unclosed lines in a boundary image
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, everyone. I met a problem when I fused two boundary images from different sources (one is from the function "boundarymask" based on a binary image and another is from canny edge detection). When focusing on one closed polygon, there may exist multiple lines (closed or not closed) internally. So is anyone know how to remove isolated lines within a closed ploygon? Like the following red rectangle region:
there may exist multiple isolated lines in a closed polygon. How to remove it while keeping closed lines which connect to th outer boundary. Please help me. Thanks a lot
3 Commenti
Akira Agata
il 8 Apr 2019
Thank you for the clarification!
OK, then, how about the second possible solution?
> (2) Calculate Euler number for each region using regionprops function, and then, remove the region whose Euler number = 1 (= region w/o hole = should be isolated line).
Risposte (0)
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox 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!