Measuring spore size: is there a quicker way (or macro) for measuring?


Hi there,

I’m quite new to imagej and don’t know much but I’m currently measuring spore length via imagej using the straight line tool/setting my scale etc. Each spore takes two clicks (one at start of spore and one at end). As i have 20,000+ spores to count, is there a quicker way? Or a macro i can run that i could do a single click for the program to recognize the size/shape and take the measurement?

Hopefully this makes sense and i’ve explained it enough. This is for my honours so any help will be much appreciated!



Hello Jade

It sounds a little bit involved, so I think you’ll need to provide a sample image. It is quite possible somebody can help though.



Sample image of the spores?

Thanks for your reply


Yes, a sample image of the spores. This gives us an idea of the sort of images you are looking at. Not everybody on this list is an expert in spores and providing a typical example (not the most perfect image) will help us to help you.
Preferably you upload a png or tiff (although with uploading tiff there were some difficulties in the past; please report difficulties if you encounter them).


Hopefully this has uploaded properly?

Thankyou :slight_smile:


Yes, much better. Next question from a spore-newbie: what do you click? There is a lot to see and to segment in this image.
How do you classify manually what is of interest and what is not. E.g. do you click every object, exclude below or above a certain size, the figure 8, include or exclude those with a tail, the circular ones, the ones that touch?
If the figure-8: where do you click; the centers of the circles that make up the 8, the waist or the longer axis? If (only) those with a ‘tail’ are to be measured, what do you click in those?
What do you do with the lump shown near coordinate (1656,417)?
And the one near (1131,1218)?

A lot of information that is known to you but unknown to many of us. An annotated/analysed image may tell more than a thousand words. If you use the ROI Manager, add the line ROIs to the manager, tick the Show All and save as tif, this will generate an image with the ROIs visible for us.


Sorry i don’t know what the ROI manager is ( i literally only know how to do one thing on here) :frowning:

I basically click on the “straight line” tool and measure the “top and bottom” of the spore eg. Capture

and only on clear spores that have a top and bottom, if they’re too blurred i will ignore, if they have a tail i will measure like this -

I will measure anything that has a clear enough “top and bottom”, including those that touch. ( i would ignore 1656, 417 and 1131, 1218) as they are covered by something else (hyphae maybe). I would like to measure the area of each spore (the inside “shape” but not sure if this is possible either.

Sorry this is long winded. Thankyou again for your responses.


With your latest posting you give enough information to get us going.

Some loos ends:
The roiManager() is a collection of routines that store one or more Regions Of Interest. You can save them in a zip file for later retrieval and you can use the macro language refering to the stored rois.

Did you notice that your image SAYS it is 8.53x6.40 inches? Your measurements will be more accurate if you calibrate your image proper. Draw a line across your 100 µm scale bar and perform Analyse>Set Scale. Rather than having the known distance at 3.81 inch, set the 1143 pixels (that value is probably already there) as a known distance of 100, unit of length 100µm. Your spores will then report lengths around 15 µm.