r/ImageJ • u/Simple_is_Simple • Oct 15 '26
Question Automatic Width Measurement Issues
Hello,
I would like to automate width measurements for segmented signals and I'm finding difficulty with the "bounding box" or "fit rectangle" resulting dimensions since I'm starting with diagonal signals. The longest dimension (length) matches my manual measures fine but the short dimension (width or height) doesn't match.
I tried duplicating a rotated-rectangle-ROI to make the signals horizontal but the binary image becomes grey scale due to resampling and I haven't found a way to keep my binary segmentation.
I followed this guide, https://www.youtube.com/watch?v=VJD36CY6aKE, to test "Local Thickness Analysis" and the average measure is at least closer to my 3 manual values.
selectImage("two segmented.tif");
run("Local Thickness (complete process)", "threshold=1");
roiManager("Select", 0);
run("Histogram", "bins=256 use x_min=0 x_max=4.47 y_max=Auto");
Table.showHistogramTable;Is there any way to reduce the sampling to just 3-10 sites using "Local Thickness"? I have 70+ 'objects' per 1 image I am analyzing so 255 the histogram contains (per <2 microns) seems overkill.
Are there any other methods to accurately pull out this height value?
https://drive.google.com/drive/folders/1RvHwRA6MtwVaZ_yrMoP0S2qdpywrBgGY?usp=sharing I included some additional files at different processing stages but the simplest ones to follow are at the bottom right of the image bellow.

Thanks in advance for your time and help.
•
u/AutoModerator Oct 15 '26
Notes on Quality Questions & Productive Participation
Several types of images will help:
Remember that "free help" costs those who help:
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Herbie500 Oct 15 '26 edited Oct 16 '26
In case you are happy with the two values, i.e. the greatest length and the greatest width of your object then, if I make a rectangular fit, I get the following:
Length: 15.81 pixels (about 1.64µm)
Width: 6.66 pixels (about 0.69µm)
These results conform with what is shown in the first row of your Results-table.
______________________________________
Below please find an ImageJ demo-macro that generates a test-image containing 49 particles and then creates a Results-table listing the greatest lengths and the greatest widths (in pixels) of all of them.
(You need an open internet connection to load the demo image.)