# Adding Scale Bars to Images

A while back I posted the method I use to make scale bars onto a Journal post. However, it feels like something which fits better here.

Fundamentally scale bars are pretty simple. Take a picture of a standard length such as a calibration slide, measure to get the mm/pixel, and add it to a photo.

To make my first scale bar I measured a photo of the calibration slide in Photoshop by going to Image > Analysis > Ruler Tool . That gave me the width of the scale bar in pixels. With the length of the 1 mm scale in pixels I was able to calculate the width of a single pixel.

In Photoshop I could measure any dimension in correct microns by going to Image> Analysis; Set Measurement Scale> Custom and setting it so one pixel was the correct number of microns. Then by going to Image> Analysis> Place Scale Marker I could make a 1mm scale bar. Unfortunately it gave a scale bar with a ridiculous number of significant digits and units in microns. Luckily with the text edit I was able to set it to 1mm.

Once you learn to make a scale bar you learn there are two big problems which must be overcome:

1. You need to know what scale the photo is at.
2. You need a method of adding scale bars quickly.

I solved the first problem two ways. The first is the traditional solution, use a microscope objective. There is no focus so the scale is always the same. The second was when using my macro lens to always focus to the minimum focus distance when I want to add a scale bar. This does require some discipline either remembering what photos were at minimum focus distance, or simply not taking photos at any other distance. However I found that on a 1X lens I was able to do 95% of my insect or lichen photography at minimum focus distance. This is nice because I just had to make a scale bar for 1X magnification and I was good to go.

An alternate solution to the first problem is to photograph a scale right after the photo, before you adjust the focus. This seemed like too much work to me though.

The second problem was solved with Photoshop actions. By making a new action and by pressing record when I made the scale bar I was able to turn the process of making a scale bar, saving the file, and closing the file into pushing one button. By going to File > Automate > Batch I can run the action on every file in a folder to add a scale bar, change the significant figures, save the file to a folder, and close the file.

Today my workflow is to put all the photos at minimum focus distance into a folder. Then I run the batch from Photoshop on every file in the folder and in a minute or so I have scale bars on all of them.

7 Likes

Somewhat related to this, including a scale object in the observation photo is often recommended or suggested. This might be a pen or coin, ie a common object that others will have access to and can measure directly themselves. I have seen a lens cap used, which is variable in terms of lens diameter, but not hugely so. For large things, like trees, having someone stand alongside is a good indicator of size, but again quite variable!

I gave a bit of thought to this, and it occurs to me that a pen, for instance, could be at a slight angle to the camera, and thus appear shorter than it really is. This would have the effect of making the subject appear larger than it is. Still considering the pen, if you angle it sideways (ie rotating in line with the barrel) then it doesnâ€™t distort. This is true of any circular object, that no matter which way it is tipped, the apparent longest diameter will still be true. So it follows that the best â€śscale objectsâ€ť are those that are circular, as well as readily available or familiar to others. Coins of course are country specific, and in the age of plastic are less likely to be at hand when needed, but are able to be sized even if you donâ€™t have them handy, as you can google and find information on the coins of most countries!

1 Like

I saw something about an app that does this. It was marketed to academics, and of course (sigh) I did not record the name. If I can find out more Iâ€™ll post it here.

My fallback for a scale object, especially w/ moths, is the Lightning Powder 6"/15cm rule. It lives in my field bag w/ my camera. Advantages include flat grey color (useful for photo editing/white balance), and quartered circles, to indicate if the rule is distorted. They can be used to correct for the distortion (I forget the formulas, but theyâ€™re available online.)

Or, of course, any rule, and Iâ€™m certainly not trying to sell people on this particular one, just let folks know of one among many that Iâ€™ve found useful.

1 Like

It would be cool if cameras could just figure this out on their own and overlay an accurate virtual reticle on the image. But they donâ€™t, so when Iâ€™m in the field I just carry a small ruler around. Nothing fancy, just a 6-inch clear plastic ruler with black numbers printed on it, like from a kidâ€™s math set. Will set you back about \$1-2. I tweak it by adding yellow electric tape to the back so the numbers show up better (example: https://inaturalist.ca/observations/2829077).

A grid background can work great too. Any school supply place/site should have rolls of the stuff, in metric or imperial. One application: I cover the wall by my moth light with panels covered in grid paper (example: https://inaturalist.ca/observations/14028334). Another application: tape some to your clipboard or a smaller board for field useâ€¦

2 Likes