Height measurement

  • What is the image about? Provide some background and/or a description of the image. Try to avoid field-specific “jargon”.sam3.for imageJ.tif (66.2 KB)
    Hello Everyone,
    I hope you all will be healthy. I have a question regarding length and height measurement (Please see the attached file).
    The image got from the textile product and contains a lot of protruding fibers.
    I want to measure the length and height of protruding fibers. Length, I have already measured via the “Ridge detection” technique. but am not able to measure the height (how high the fibers are from the surface).

is there any way to measure the fiber height automatically via any plugin. Because manually can do it for every individualö fibers but want to measure via plugin similar as did via “Ridge detection”. (perpendicular distance from the surface).
I will be very thankful if anyone of you can help me in this regard. Many Thanks


I think it can be done. Here my suggestion:

You need two components.
A) the objects of your fibers which you might have already if you detected them with the ridge detection.

B) a measure of distance from the surface. This can be easily implemented using an euclidean distance map. It just needs a definition of where this surface is.
Based on the image you provided you can generate for instance a white empty image. The surface would be at the bottom. So you create a background stripe at the bottom. Then you generate an euclidian distance map.
Now you can measure the distance of each pixel of the objects from A) from the surface on this EDM. Take the largest value thats your height.

Here a macro for generating the EDM:

setForegroundColor(0, 0, 0);
run("Options...", "iterations=1 count=1 black edm=32-bit");

newImage("Untitled", "8-bit white", 777, 87, 1);
makeRectangle(0, 77, 777, 10);
run("Fill", "slice");
run("Distance Map");

Easiest is if your surface definition stays the same or you have a way of locating the surface automatically. Otherwise it is of course possible to define the rectangle manually.

1 Like

Agree with @schmiedc about the approach.

Keep in mind when analyzing the data that your fibers do seem to be closer or farther away from where the image is being taken, which will change their apparent size. A sample with more fibers close to the camera (like the large one in the center) will appear to be larger than a sample with larger actual fibers that are farther away (and maybe more in focus).

1 Like