Automate radius measurement

I have many pictures similar to the one attached. I would like to obtain a value for the average radius of each egg in the image. Thus far I’ve been doing it by eye (set scale using background grid, then draw two lines representing long and short axis), but I would prefer the process to be automated to eliminate bias. Any way to do this? I’ve experimented a little bit with thresholding but one issue is that some eggs touch and get recognized as one entity. Still, I’m very new at this so maybe there’s a way.

Thanks!

Run the following macro on your test image:

selectWindow("801ca0197417d1ffbf91a9ef47c6f3262ad595cf.jpeg");
makeRectangle(472, 1152, 2600, 2712);
run("Crop");
run("Make Composite");
run("Stack to Images");
selectWindow("Red");
close();
selectWindow("Blue");
close();
selectWindow("Green");
setAutoThreshold("Default dark");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Invert");
run("Fill Holes");
run("Watershed");
run("Set Measurements...", "area centroid perimeter fit shape redirect=None decimal=3");
run("Analyze Particles...", "size=1000-Infinity circularity=0.60-1.00 display clear include add");

The macro separates the objects using the Watershed algorithm.
The Particle Analyzer selects only the ‘big’ and nearly round objects.
For each of this objects the ellipse parameters (see columns ‘Major’ and ‘Minor’ in the ResultTable) gives you an approximation of the radius.

Check also the definition of the other available features in
https://imagej.nih.gov/ij/docs/guide/146-30.html

1 Like

Thank you very much, I’m still having some issues where it doesn’t recognize touching eggs as separate objects, but this is a very good jumping off point for me, I appreciate the help.