# Circularity measure in ParticleSizer plug-in

I used the ParticleSizer plug-in to analyze an image of soft latex particles embedded in vitreous ice and imaged by cryoTEM. The image after filtering prior to segmentation is shown below.

This segmented very nicely

As you can see, the spheroidal particles are nicely segmented and detected. I analyzed the size distribution using R and also plotted the circularity. This really confused me because the reported values were all near 12. I am used to the circularity being defined as

\frac{4 \pi A}{P^2}

Wikipedia

and ranging from 0 to 1

The reported values were all close to 12. Since I have access to all the data, I plotted the relationship between the two measures.

Can someone explain the circularity measurement in ParticleSizer?

The size distribution was interesting

Just one guess without the sourcecode. Did you set the braces correctly?

Here at plugin for the circularity measurement as reference:

https://imagej.nih.gov/ij/plugins/circularity.html

Perhaps particle sizer uses a different formula?
It also matters how you measure perimeter and area. There are different ways to do this, and in the discrete domain you fill find many unexpected results, specially when the regions are small.
I do not understand any of your plots. What is ecd? what is the x axis of the middle plot?
If you post a binary image of your picture I can try and see what values I get with the particles8 plugin
I think your circularity of >1.0 cannot be right. In 2D discrete space is not possible to get a circularity of 1.0 either.

Gabriel, you are correct. The ParticleSizer plugin does use a different formula for circularity. I would note as, Bio7 pointed out, that ImageJ uses the formula I was expecting. That is why I asked the question.

I should have been more explicit in my plot, writing out Equivalent Circular Diameter.

The ParticleSizer plug-in does all the segmenting “under the hood.” Happily, there is a an option to save the binary image. I am uploading it here:

Regarding the plots, the middle plot is a box plot and has always helped me understand the distribution. The outliers at each end are interesting. The final plot is a quantile-quantile plot comparing to a normal distribution, showing a tail at the small end. Thank you again for your helpful comments and suggestions.

Here is what I get

with this piece of code

run("Multiply...", "value=255");
run("Particles8 ", "white morphology show=Particles display");
run("Distribution...", "parameter=Circ or=50 and=0.3-1.1");


Note that particles 8 uses the perimeter measured from centre of pixels (8-connected) and the “area” is the area inside that polygon, not the number of pixels.
Hope it helps!

Thank you, Gabriel. That makes sense…

I did some more digging and found the answer to my question about the circularity definition in the ParticleSizer Plugin.The answer is in lines 996-1012 in
Blob.java which is a helper function in another plugin (ij-blob) that supports ParticleSizer. Here is the code:


/**
* Method name of getCircularity (for filtering).
*/
public final static String GETCIRCULARITY = "getCircularity";
/**
* Calculates the circularity of the outer contour: (perimeter*perimeter) / (enclosed area). If the value approaches 0.0, it indicates that the polygon is increasingly elongated.
* @return Circularity (perimeter*perimeter) / (enclosed area)
*/
public double getCircularity() {
if(circularity!=-1){
return circularity;
}
double perimeter = getPerimeter();
double size = getEnclosedArea();
circularity = (perimeter*perimeter) / size;
return circularity;
}


This is different from the definition Wayne (and I) have used…

Well 4pi is about 12, and in the formula we use, it makes the parameter to be between 0 and 1.

Back end processing it is… And here is the result: