How to remove thin lines in binary image

How to remove thin horizontal or verticle lines - image attached
line thinkness < 3 -- remove
lines thinkness > 5-- stay
small objects -- remove

Antworten (2)

Matt J
Matt J am 30 Okt. 2023
Bearbeitet: Matt J am 30 Okt. 2023

1 Stimme

Image=imopen(Image,ones(3));
Image Analyst
Image Analyst am 30 Okt. 2023

0 Stimmen

Like Matt said, use imopen to get rid of thin lines.
outputImage = imopen(binaryImage, ones(3, 3));
To get rid of small objects, of any shape, use bwareaopen or bwareafilt.

Gefragt:

Az
am 30 Okt. 2023

Beantwortet:

am 30 Okt. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by