Measuring object width at a percentage of height

Hello, this is my first post! I’ve been so impressed by ImageJ and this community.

I am working on an exciting archaeological project involving carvings on stonehenge. I am trying to gather a number of different image metrics and then show image similarity to bronze age axeheads (which the carvings supposedly represent).

F597-aligned.tif (197.0 KB) F596-aligned.tif (196.0 KB) F595-aligned.tif (185.5 KB)

I’ve uploaded some images of the carvings. What I’m trying to do is measure the width of the stem of the carving so I can compare it to the maximum width. I’m trying to do this in a semi-automated consistent manner. So, I was thinking I could measure the object width at a percentage of the height – e.g., the width at 20% of the image height.

I have a set of other questions like this, but hopefully this is an easy one.

Thanks in advance!

With you images this is quite easy (even if you have several objects in one image correctly aligned).

The following macro converts the image to a binary, sets a rectangular ROI (with 1 px height) at 20% of the image height and then measures the bounding rectangle of the selection only with a particle analysis.

run("Set Measurements...", "min bounding redirect=None decimal=8");
setOption("BlackBackground", false);
run("Convert to Mask");
makeRectangle(0, mHeight, mWidth, 1);
run("Analyze Particles...", "  show=Outlines display");

This macro itself can be applied to a folder of images with the default Batch Gui of ImageJ, see:

However there is so much more you can measure to compare the different artifacts.

With ImageJ plugins (see: MorphoLibJ - ImageJ) or in combination with R packages (see Morphometrics with R | Julien Claude | Springer)

1 Like

The only thing I was going to throw in to my less complete version was creating a bounding box for the object and basing the height off of that, since the objects do not always seem to reach the bottom of the image.

Unless Image.height is based on the Bounding, which I see you calculated?

Yes, right, the bounding rectangle would be necessary if the images are not cropped correctly.
I assumed a cropped image for the whole object that’s why I used the Image.height.

Note from my viewpoint: Since I have several methods to transfer image data/ROI data directly to R in Bio7 I could easily use the before cited books R package for Shape Analysis and their comparision using PCA, etc., see also (R related):