Guidance for a new ImageJ user-image analysis



I need to write a macro that can look for circular grains in a field of view on an agar plate. The dimpling on the plate is making it complicated to discern individual grains when they are clumped together. And the dimple in the agar is making things tricky. Can anyone help?

Typically I would try a macro like this:
run(“Subtract Background…”, “rolling=50 light”);
setOption(“BlackBackground”, false);
run(“Make Binary”);
run(“Analyze Particles…”, “size=1150-Infinity circularity=0.6-1.00 show=Overlay exclude clear summarize”);



Hi @Sara_Etter

Did you try and attach an image?? I see the text “Proxy_REP1_1_2_3_1” at the bottom of your message, but I can’t see an image or link.

If you can post the image I am sure people will have suggestions for you.


Hello Brian (and Sara) -

I was able to download and view Sara’s image. (This was yesterday,
9/7, prior to your (Brian’s) post.)

Using the Google Chrome browser running on ubuntu, I can right-click
“Proxy_REP1_1_2_3_1” or what displays for me as a broken-image
icon to its left, and either

Copy image address


Open image in new tab

Selecting “Open image in new tab” doesn’t (for me) actually open
it, but downloads it as a .tiff file that I can open and view (using
ubuntu’s built-in "Image Viewer app).

Here is the image address:

Just for fun, I opened this image in Fiji, and re-saved it as a .jpg file.

Here it is:


Maybe the .jpg file will be more browser-friendly.

(Note to Sara: I have no useful suggestions for how you might do
your image analysis.)

Thanks, mm


Hi Sara

This one is a pit difficult because it’s a contrast image, and the interior of the grains about the same level as the background.

I tried first splitting channels (there seemed to be three channels that were almost, but not quite the same), then running the variance filter (Process->Filter->Variance) on one channel, then filling in the holes. Then I thresholded, ran Analyze Particles, but set min. circularity to .5 (to avoid counting the elongated artifacts that sometimes occurred just outside the larger grains).

Not perfect, but perhaps it will give some ideas that you can tweak further…

run("Split Channels");
selectWindow("f7c56b20dd54e5d25b96a85df15d9a4eeffa2400.tiff (blue)");
run("Variance...", "radius=3");
run("Auto Threshold", "method=Li white");
run("Fill Holes");
run("Analyze Particles...");
run("Analyze Particles...", "  circularity=0.5-1.00 display clear add");



Hi @Sara_Etter,

Thanks for posting. We’ve put together a solution for you in MIPAR. Recipe attached.


The MIPAR Team