How to remove small circles from edge detected image?

I have an image on which I have applied edge detection.
The image, however, has small circles which I would like to remove. I have highlighted some in red below:
How could I do this?

Asked:

on 10 Nov 2020

Answered:

on 10 Nov 2020

Community Treasure Hunt

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

Start Hunting!