Measuring distances on pictures

I have an assignment to do for med university and I am a little bit lost with the ImageJ program.
I took pictures of hooves of horses and I have to measure certain points on these pictures.
First of all I need to have those distances in cm and not in whatever scale ImageJ uses and the second problem that occurred is that the program only allows me to draw one line or one point and I would like to have the opportunity to have more points so I can standardize the distance between those points.
Then my second problem is that I need (x/y) coordinates, but also in cm? I manage to draw the lines I want on the pictures but only one at a time and I would need to have several at once so I can again standardize the distance between them.
I would really appreciate if somebody could help me with my problems.

Best regards,

Welcome to the forum.
Could you maybe post a picture? Then maybe we can show you how to do the things you are interested in.

Hi Praveen,
Thank you so much for your reply.
I am uploading two of the pictures right now where I tried to indicate the distances I am trying to measure.
On the first picture I want to measure the distance in cm from the coronary band (where the hoof meets the skin) to the ground.
On the second picture I wanna measure the width of the hoof wall in cm.

Hi @SophieElena

Cool images :slight_smile:

Ok, first you would have to set the scale for your picture. You can do this with the ‘Set scale’ tab in Fiji (its under Analyse>>Set ScaleScreenshot) below. If you plan to use the small scaling for all your images, please also check ‘Global’ in this tab. Once you have set the scale you should see the dimensions of your image on the top right of the file you opened. The scale for your images 22.5 pixels = 1cm (based on the measuring tape right next to the horse foot)

Once you have set the scale you can a single line to get there length. First draw a line then press Ctrl+M and you will see the length of that line. You may then do the same to get different line lengths.

Now if you want the co-ordinates, you have to choose a segmented line (right on the line tool and choose segmented line) then draw the line. After drawing the line, you can save the co-ordinates under File>>Save as>>XY co-ordinates. The text file will give your the XY co-ordinates of each point in your segmented line.

Hope this helps.

Thank you so much for your immediate reply!
I am not sure if I can use 22,5 pixels for all my pictures because the hooves have different sizes so I had to zoom more or less depending on its size.
But I have the scale on all my pictures, which I can measure first. Could you maybe also tell me how you measured 1cm in pixels?

Hi @SophieElena,

if you want to get a more or less accurate indication of real units you need to make sure, that your reference measuring tape is rather at the front of the hoove (which in your first image is already behind the hoove) or make sure that the position of the measureing tape is always consistent.
Second, it needs to be exactly perpendicular to the axis between hoove and camera.
Otherwhise you introduce already alterations.
The camera distance to the hoove should also be standardized to minimize the measurement inaccuracies.
You need to include that measuring tape in all images and set the scale in all images separately if you apply different zoom etc. (while consistent imaging setting would be preferrable e.g. always the same zoom and distance to the object)

The vertical measurement line you want to draw should best be also straight. You can achieve this by pressing Shift while you draw a line selection.
To keep all the lines you want to draw, you best use the ROI Manager. Therefore, after drawing a new line just press T on the keybord and the line will be added to the ROI Manager. Thus you can first draw all the lines and adjust them if necessary (therefore, you need to select them in the ROI Manager, adjust size and/or position and press Update in the ROI manager)
Finally, You can press Measurein the ROI Manager to get all the length in the scaled units in a results table (this will be the last column in the table).

Besides the necessity of a consistent imaging setup, also the measurement lines drwn manually will have different distances which introduces variation. There is surely a more automatic way to do that, but for the moment this might help you in getting started.


To set up the scale just draw a line over the measuring scale. (like below)

The width of that line (in pixels) will give you the scale of your image (here it is 1cm). Now you may go to analyse>>set scale and input how many pixels corresponds to 1cm

1 Like

Thank you so much for your reply. The distance of the camera to the object was always the same but I did not consider placing the measuring tape on the same spot.
So it would be better to re-doe the pictures with some alterations before measuring?

If you want to get consistent measurements, yes then it would be best to standardize as much as you can in your setup before taking images.
Since we are talking about cm and I guess that you will anyway measure several samples with some biological variation, very small abberations might be neglectable (and potentially also not perfectly controlable).
But there is anyway a bunch of things, as the ones I mentioned as well as curvature of the hoove or the paper sheet under it which might influence where you stop measuring with your lines, the distance between the measurement lines, …, and surely some other things I forget to mention at the moment, which all influence the final result.

1 Like


can you help in this image… how to measure distance on x axis if 1 small box corresponds to 40 millisec

which distances?

i want to calculate t peak to t end distance