How to connect broken lines, but no enlarge line width?
Mostrar comentarios más antiguos
I need to fill rectangle(run fill holes), but the broken lines in rectangle stop me to do this. due to the high density rectangles in figure, so I want to connect broken lines, but no enlarge line width. Could you help me?
I have tryed to do dilate/erode/open/close mask operations, but they all can't meet my request.
Before After


Respuesta aceptada
Más respuestas (1)
Image Analyst
el 25 de En. de 2025
Try this to completely fill the rectangle as you asked (untested - post before image separately if you want me to test it):
after = bwconvhull(before, 'union');
Categorías
Más información sobre Region and Image Properties en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
