Public Lab Research note

Sizing particles in microscope images at Portland Science Hackday

by mathew | October 07, 2016 19:00 07 Oct 19:00 | #13533 | #13533

Image @SimonPyle

Tonight and tomorrow (October 8th) the Portland Science Hack Day will be running, and I’ll be joining Jenny Malloy with my OpenFlexure microscope to work on image analysis for sizing particles with ImageJ. In this note, I’ll provide some background, purpose and activities for getting started at analysing particle size under a microscope.


Sizing particles is the first step towards measuring airborne particles optically to bring accountability to the emissions of sand miners and other industrial operations. Read more on background research with the tag #passive-pm. Here is an example of a research study using passive particle monitors and visible light microscopy of particles.

ImageJ has capabilities accessible in its menus for doing particle sizing. It is also scriptable by using the script recording capabilities, or using a variety of languages including Python.

Goals & Resources

My primary goal is for Image J’s measurement of particle diameter to correspond with the known diameter of standardized spheres (2.07 um polystyrene latex spheres).

My secondary goal is to figure out whether microscope calibration requires standardized spheres or if it can be done with a stage micrometer— a small ruler visible under a microscope.

Here are a series of scripts to try out:

@SimonPyle's Python script

Two more macros created with ImageJ's macro recording functions:

Image set of particles to practice with

for use in calibrating a microscope.


Flatfield and scale images:



Reply to this comment...

Hi, @mathew and @SimonPyle -

Terrific work! After seeing the demonstration mathew gave at the barnraising in November '16, and then looking at Cambridge's design, a question comes to mind. The Cambridge site says they use a white LED from below to illuminate the object you're viewing. Would a laser LED, rather than white light, give better image quality and get rid of chromatic aberration? As you're viewing it on a screen rather than peering through a lens, then, no worries about retinal damage. It might make visualizing the particles easier. If you're interested in the refractive properties of silica, this paper is useful:

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

That is an interesting question. I think the laser would get rid of chromatic aberration-- its a single frequency of light-- but I'm not sure that would improve image quality.

We are a ways away from silica-specific analysis but thanks for the paper recommendation I'll work it into the bibiliography

Reply to this comment...

Hello, "Cambridge" here (though I've actually moved now). You're right, a laser diode would certainly get rid of the chromatic issues. I suspect aligning the condenser better (v5.16, now in beta, makes it possible to adjust the condenser alignment) would also go a long way to fixing that. The trouble with using a laser is that coherent light imaging comes with other problems - any stray light, or any dirt on the optics, tends to cause "speckle" that makes the image look nasty and causes trouble for a lot of image analysis methods. A single-colour LED (I recommend green) would reduce chromatic aberration without giving you speckle. On the other hand, if you're careful about dirt, and you do the right holographic reconstruction, a laser diode illumination (which amounts to in-line holography of your sample) should give you lots of nice information about your sample, particularly if you know beforehand that it's silica. Better than a laser diode would be a slightly broken (i.e. not entirely coherent) laser diode. These are often called "superluminescent diodes" and sold for ~100x the price of laser diodes, and essentially they are narrow bandwidth (1-10nm spectral width) partially coherent sources. If somebody can work out how to do that cheaply (e.g. by hacking the electronics for a laser diode) it would be an awesome tool for all sorts of microscopy.

Reply to this comment...

Login to comment.