How to count average width



I would like to ask about solution how to count average width of object. I have a broken file on photo and after binary I’m using segmented line to get length value. It’s hard to do this same with width, because this broken file has many other widths so I want to get this average width.

Here is a sample and I would like to get a width of this white element in root.


Good day,

the problem is that with one sample image (of obscure origin and quality) it is difficult to suggest a solution that will work in general.

Here is an ImageJ-macro that works for the provided sample image and it assumes that there is a single object only of the described type in the image:

// imagej-macro "maximum" (Herbie G., 09. Jan. 2019)
requires( "1.52j" );
setOption("BlackBackground", true);
run("Set Measurements...", "feret's redirect=None decimal=2");
setAutoThreshold("Shanbhag dark");
run("Convert to Mask");
run("Analyze Particles...", "  circularity=0.00-0.20 display exclude clear add");
roiManager("Select", 0);
run("Clear Outside");
// imagej-macro "maximum" (Herbie G., 09. Jan. 2019)

Paste the above macro code to an empty macro window (Plugins >> New >> Macro) and run it with the image open in ImageJ.

In the Results table two measures are important:
Feret: Estimate of the object length (in pixels)
MinFeret: Estimate of the maximum object width (in pixels)

To get the mean width requires a more complicated approach.
The mean width of the object of your sample image is about 13pixels.

For details please study the ImageJ User Guide and especially Section 30.7.




Hello paatryk01,
This is a P.S. to Herbie reply. The mean width will be = (1/2*(Feret*MinFeret)/Feret)