Largest possible circle inside outline

Hello everyone,

I have a binary image with several objects (minerals).
Similarly to a bounding box which yields width and height I would like to have the diameter of the largest circle that could fit inside these objects for each object. It would be great if the center of these circles or the objects get X and Y coordinates assigned. I would like to do laser ablation with a spot size of ~50 µm. Since the minerals have weird geometries it is not enough to filter them by area, circularity or fitting geometries. Furthermore some have inclusions which limit “clean” spots further.

It would be great if someone has a solution.
I am also a bit firm with matlab if it would work there.

You could try using the Euclidean Distance Map of your binary image (Process > Binary > Distance Map or Plugins > Process > Exact Euclidean Distance Transform) and look at its local maxima. Their value will be the radius of the largest circle that you’re looking for.


Also, MorphoLibJ offers a command (Plugins > MorphoLibJ > Max. Inscribed Circle) that will create an image overlay with the largest circle for a given binary or label image.

5 Likes