MATLAB Answers

How to remove weak edges in a binary photo?

3 views (last 30 days)
Naim on 11 Jul 2017
Commented: Naim on 11 Jul 2017
See attached photos for reference.
I tried watershedding, it breaks apart the main body and doesn't even touch the part I want disconnected!
morphology is no good, the holes in the main body easily break in two before the edges I want disconnected come off.
imfill doesn't solve this, it fills the hole between the two trouble areas as well as the holes in the main body.
I have thousands of similar photos, so I need to come up with something robust.
I'd appreciate any help I could get!

Accepted Answer

Image Analyst
Image Analyst on 11 Jul 2017
It's not exactly clear where to separate the blobs. There are many, many thin parts where a separation could possibly be made. You might try filling in black islands in a certain size range and then trying watershed again. So invert the image, call bwareafilt(), then invert again.
Naim on 11 Jul 2017
good stuff Image Analyst, I'll check it out.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!