MATLAB Answers

Is there a way to fill up defects in a stripe image?

44 views (last 30 days)
Hoyong Yie
Hoyong Yie on 22 Jan 2021
Commented: Hoyong Yie on 23 Feb 2021 at 6:19
I have some images that look like the attached sample.
Is there a way to fill the white holes to make them into a clearer stripe image?
I have used imdilate, imclose, imfill but when I use them the tend to merge the stripes into one bulk. Is this because I'm using them in a wrong way?
Thanks for your help.


Show 3 older comments
Hoyong Yie
Hoyong Yie on 21 Feb 2021 at 23:14
If you compair the two images, the white dots/defects inside the top right side of the top image is filled in the second image. I want to know if there is a way to do that for the whole image.
Walter Roberson
Walter Roberson on 21 Feb 2021 at 23:36
bwareafilt() could get rid of most of the disconnected white regions. It would not, however, get rid of the case like the middle right of the second image where there is a 2 x 2 square that happens to be touching the adjacent run of lines.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!