How to fill a gap between line segments in an image

6 ビュー (過去 30 日間)
Abdul Hannan Qureshi
Abdul Hannan Qureshi 2022 年 6 月 4 日
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.

採用された回答

Matt J
Matt J 2022 年 6 月 4 日
編集済み: Matt J 2022 年 6 月 4 日
load gap
Irasterl=imclose(Irasterl,ones(3));
imshow(Irasterl,[])

その他の回答 (1 件)

Image Analyst
Image Analyst 2022 年 6 月 4 日
For single pixel gaps you can also use bwmorph with the 'bridge' option.
Irasterl = bwmorph(Irasterl, 'bridge');
  1 件のコメント
Abdul Hannan Qureshi
Abdul Hannan Qureshi 2022 年 6 月 5 日
Thank you, I will try this as well.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by