Batch measuring artefacts

I have never used ImageJ before and have a couple of thousand images similar to the example attached. The original images are in colour and quite detailed taken at various magnifications between 15x-25x.
I am wondering if it is possible to batch measure a number of features in the image, such as:

  1. x and y axis measurements (white area, the artefact)
  2. surface area of artefact (non-black area)
  3. best fit for a circle centred on central black hole.

As I have yet to start using ImageJ I was not sure how to search the forum for this info.


Threshold the image, see:

Set the measurements you are interested in:

Then use the Particle Analyze function in ImageJ to measure the different areas, etc. Seperate the different areas with the options to measure only particle with, e.g., roundness x and size y:

Record your analyzing steps in the Macro recorder:

Apply your macro on a bunch of images with the Batch macro:

Here as an example a small macro which measures the circle area and shows an elliptical fit (for simplification I convert the image to 8-bit) :

run("Set Measurements...", "area fit redirect=None decimal=3");
run("Analyze Particles...", "size=400-Infinity circularity=0.60-1.00 show=Ellipses display");

Create your own macro to include all other measurements!


Hi Bio7

Thanks for the response. I’ll read the links and see if I can get an understanding of it all.
I appreciate the time you have taken to respond.


Hello Tim,

you will also find some useful tutorials on the ImageJ site:

and YouTube:

1 Like

To fit the Circle, see also:

1 Like

Thanks Bio7,

Do you think many of these processes can be done in batches (automated as it were), or will they need to be applied separately to individual images?

I will begin to read through all the links you gave me, they look to be very helpful.


You can create one macro (use the macro recorder do get the commands easily) with all your measurements.

Threshold, measure circle, threshold again, measure the white area, theshold and measure the grey area (artefacts).

The artefacts (in the white area) could also be measured if necessary by substracting the circle+white area from the white area+including the holes (see the Analyze Particles dialog).

You can even save the results or single results with the macro to get a control for the measurements.

Then try to apply it to all images (if all images are similar then it should work for all images)

1 Like

In addition to the excellent comments by @Bio7, I can recommend using KNIME to process large datasets, as it makes batch processing really easy.


Thanks Jan,

What a helpful forum, I will have a look at KNIME, as the datasets are quite large. There are over 2500 samples and multiple views to measure, with various parameters to deal with.
My background is in CAD and Graphics on Mac, so I’m not familiar these programs or the coding.

I am asking the questions for my daughter who is studying the artefacts (archaeological samples).
Thanks again to yourself and Bio7 for the input.