# Measure inscribed and circumscribed diameter

#1

I need to find the largest and smallest diameters of an irregular forms, some similar like inscribed and circumscribed diameter.
I compared results obtained by major and minor (fitted ellipse), and Feret’s max and min with particle dimensions measured with a pachymeter and the deviations was high.

#2

Hi,
there is a Largest inscribed circle plugin in the MorphoLibJ library, it should fir your need.

For circumscribed diameter, I don’t know… But it should not be very different from max Feret Diameter?

#3

Hi dlegland,
Using irregular shapes with known dimensions, I compared these measured values with the results obtained by the Max Feret diameter and the Major and Minor of a fitted ellipse. And the deviations were very high!
I reviewed this option from the Morpholibj / Analyze / Max Inscribed Circle plugin has another purpose.

#4

Good day Alex,

are you sure that a pachymeter is a suited instrument to measure both widths of the objects shown in your sample image.

I think it would be quite helpful if you indicate both widths in this sample image in order to effectively help you with a reasonable approach.

Regards

Herbie

#5

You’re right, Herbie. Sorry!
The particles have the following dimensions in mm (in colors I present the greatest deviations, being the highest red and the lowest pink.):

#6

Alex,

thanks for the tabulated widths!

Obviously, there is a scale set for the image that didn’t make it with the PNG-image (scale factors are only conserved with images in TIF-format). I.e. the values in the table are not given in pixels.

Could you please provide the scale factor between the tabulated values and pixels?

You may take this factor either from the “Set Scale”-window (Analyze >> Set Scale…) or from the “Properties”-window (Image >> Properties…).

Regards

Herbie

#7

Thank you, Herbie, for information about image formats.
The real situation is as follows, I have many particles (a few millimeters to several centimeters), hundreds of them, I need to measure their area and their inscribed and circumscribed diameter.
Then I’m going to scan them, and the file generated by the scanner is the file I’m using with ImageJ.
I’m scanning in PNG format at 300 dpi, and I use a scanned image of a pachimeter to establish the scale in Analyze / Set Scale…

#8

Sorry Alex,

Could you please provide the scale factor between the tabulated values and pixels?

Regards

Herbie

#9

You’re right, Herbie. Sorry
The scale is 11,7684 pixels/mm

#10

Alex,

if the first entry to your table are the desired widths of “item 1” then there is something completely wrong with either your measurements or the scaling.

With 11,7684 pixels/mm I get for the binarized “item 1” of your sample image:

maximum diameter: 15.79 mm (measured by hand-drawing with the line tool)
Feret: 15.83 mm (measured automatically)

Please investigate all possible sources of error.

Regards

Herbie

#12

Could you please tell me why it wrong?
Look at this, Herbie:

Regards,
Alex

#13

Alex,

i don’t know what’s going wrong on your side.

I’ve stated:

[…] something completely wrong with either your measurements or the scaling.

Therefore it need not be the scaling, it may also be your measurements that are listed in the table.

Both of my measurements of “item 1” of your sample image are consistent and that’s all I can do, because I don’t have the physical objects available for measurement.

How do you image the objects and what scale-factor is involved in the optical imaging process?

Regards

Herbie

#14

Herbie,
But looking at the following image of the data table provided by the ImageJ,
Using that scale, 11.7017 pixels / mm, the program is estimating a Feret (max) diameter of 64.563 mm and MinFeret of 14.343 mm.
For ‘item 1’, according to the table above the values measured with the pachymeter, it has a maximum measurement of 64.35 mm and minimum of 13.5 mm.
The deviation is 0.3% and 6.2%, respectively.
I think the measurements taken with the caliper have a close proximity to the values obtained by the program, right?
The problem is in the values obtained for the rectangular forms with little thickness.
And the formatting of the particle material I’m working on are mostly thin, elongated rectangles.
For this reason I’m looking for a plugin that uses another process to estimate this type of dimensions.

Regards,
Alex

#15

Good day Alex,

I can’t confirm the values you get.

Here is what I did with the following image open:

It should have the dimensions 481x526 pixels. Please confirm!

Run the ImageJ macro:

``````run("Set Measurements...", "feret's redirect=None decimal=2");
run("8-bit");
run("Set Scale...", "distance=11.7017 known=1 unit=mm");
setOption("BlackBackground", true);
run("Make Binary");
run("Analyze Particles...", "  show=Outlines display");
``````

(Paste the above macro code to an empty macro window (Plugins >> New >> Macro) and run it.)

This is the resulting outline image

and the corresponding Results table:

Regards

Herbie

#16

Hi @alexramqui,
if you are posting the images from cropped screenshots the size of the image we receive does not match the real size of your image.
This is probably why your numbers and @Herbie 's don’t match!

Best,
Anna

#17

Hi Herbie,
I have to accept and warn you that I am a newbie in ImageJ. For this reason, once again thank you very much for your attention, and for explaining me step by step.
I think the question that Ana comments is true, thank Anna to participate.
Sorry Herbie, I did it.

This is the image that I took with the scanner of a type of particles with irregular shapes as the particles that I work.
I used your code for this other image, Herbie, many points appear due to distortion of the image (so I tried to work the image, which was sent at the beginning of the conversation). How could I introduce a filter in the (size) code to ignore these points?

#18

Good day Alex,

what I did is apply a median-operator of radius two. See my macro code. But be warned, applying such operators or filters will generally alter the size of you objects too.

I’d recommend that you set the minimum size in “Analyze Particles…” accordingly.

And please, the first step when using a new software is study the manual/userguide:
https://imagej.nih.gov/ij/docs/guide/index.html

Good luck

Herbie

#19

Herbie, I’ve been using 4-Infinity into the size box. Because I don’t want to select any particles whose sizes are less than 4 nm^2, but really I would use larges values, maybe 0,05 mm.

#20

Alex,

the decision is yours.

The entry denotes the sizes of the object areas that are analyzed.

If you enter

4-Infinity

then particles smaller than 4mm^2 are not included in the analyses.
(Please note the indicated unit which here is mm^2.)

HTH

Herbie