Retrieve circle from image

2 views (last 30 days)
Rudy
Rudy on 21 Oct 2014
Edited: Image Analyst on 21 Oct 2014
Hi there!
I have created a black and white image from a droplet. This droplet has a few smaller droplets very close to it, these smaller droplets appear in the black and white image as if they are connected with the larger one. See image:
Now, I want to retrieve the largest droplet by erasing the smaller ones. I have tried routines such as bwareaopen and imfill, but with no success. Any ideas?
Thanks for your help!
Kind regards, Rudy

Answers (1)

Image Analyst
Image Analyst on 21 Oct 2014
Edited: Image Analyst on 21 Oct 2014
You can treat the two small blobs just barely touching at the corner by using 4-connectivity instead of 8 connectivity. That won't help with the ones that are more connected though. You could use watershed() though that often gives way too many divisions. You could also try imfindcircles as Mohammad suggested, or try this
  1. invert the image
  2. call imerode() to shrink all the blobs.
  3. call bwareaopen() to remove small blobs
  4. call imdilate to enlarge the image back to close to its original size.
This approach, like the others will alter the perimeter of the blob.

Community Treasure Hunt

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

Start Hunting!