How to fill a gap between line segments in an image

I am working on raster images. How I can fill up this gap between line segments, as shown in figure below.
the raster image file is enclosed. Kindly advice.

 Accepted Answer

More Answers (1)

For single pixel gaps you can also use bwmorph with the 'bridge' option.
Irasterl = bwmorph(Irasterl, 'bridge');

Categories

Products

Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!