Detecting Spheroid Contours in Images with Little Contrast


I would like to create an ImageJ macro that will detect the spheroids (the circular shapes), on images similar to these, in order to determine their areas.
PHASE_E9_1_00d00h00m.tif (16.5 MB)
PHASE_F11_1_00d00h00m.tif (16.5 MB)
PHASE_G10_1_00d00h00m.tif (16.5 MB)

So far, I was able to use a series of plugins in order to detect some of the spheroids: I convert the image to grayscale, then use Find Edges, apply a Median Filter followed by a Threshold, make the lines thinner with Erode, then use Find Contours (from IJ-OpenCV), and finally I filter the results to only have the spheroid contours (and a few other contours that have a similar size) left in my roiManager. It works better on some images than others. The results looked like this:
image image image

However, I’m having a hard time with the ones that are touching the Petri dish border or that are connected together. I am unable to get separate ROIs for each of them and the ROIs often contain part of the border along with the spheroids.

I was wondering if there was some way or another to get separate contours for each spheroid, even the ones along the edge of the Petri dish and the ones close together. I’ve tried playing around a bit with Watershed and the results were not very good.

Thank you for your input,


Hi Emmanuelle,

Maybe you could first segment you petri dish. You could then substract the box to your detections. It seems also that you have uneven illumination ? maybe a background correction may help to detect the ones at the Petri dish borders.
To separate the ROIs, have you tried the marker controlled Watershed (in MorphoLibJ>Segmentation). You could use ultimate Points (From Process>Binary used on filled shapes of your detections) as markers.