TITLE: ArchaeoScale Protocol: Inserting digital scale bars into scientific images – Full step-by-step guideline for anthropological and archaeological specimen photography
AUTHORS: Dominik Göldner

[DESCRIPTION]
Geometric scale bars, also known as photography scales or photomacrographic rulers, are small but important details used in digital photography that allow for a quick visual understanding of size dimensions in images and should therefore be included in all scientific photographs. Scale bars exist in different sizes, shapes, and types, but they all aim to help the audience make proper connections between the presented photograph and the real subject. Inserting scale bars into pictures thus reduces interpretation biases and improves scientific readability, transparency, and quality. It should not be taken for granted that dimensions can be correctly understood based on mere intuition. However, scale bars are still often missing from many archaeological and anthropological publications, or their position tends to be inadequate. This protocol aims to change this by presenting a fast, step-by-step guideline for how to create digital scale bars in every photograph using the free and open-source image processing software ImageJ© (Schneider et al. 2012). Additionally, this protocol presents helpful tips regarding the type, size, creation, placement, and location of digital scale bars. The suggested workflow can easily be implemented in any photographic workflow as it does not require sophisticated and expensive equipment. Researchers that already work with scale bars on a regular basis might also find interest in this protocol, as there are certain aspects to the choice, type, position, and location of scale bars that are often not considered and that can reduce their effectiveness and usefulness.

[BEFORE_START]
General tips and useful recommendations: 

1) Scale bars must be included in all scientific images.

2) Purchase scale bars with high accuracy, i.e., ± 0.1 mm or higher, and a dull, resistant, non-reflective surface.

3) Other objects, such as coins or tools, should not be used as "scale bars." Always use metric scale bars.

4) Select a scale bar that fits the dimensions of the feature or subject it complements, i.e., scale bars should not be too small nor too large.

5) Scale bars must be readable, i.e., easily identifiable. Avoid thin, reflective, colored, and excessively small-scale bars. The scale bar should be fully visible in the image. Do not crop out parts of it.

6) With respect to color, scale bars with high contrast to the photographed subject are usually either white or black or a combination of both. If necessary, place the scale bar outside the image or within a box with a more distinct background color than the actual image color. Black and/or white scale bars will also ensure colorblind friendliness.

7) For reasons of consistency, add the scale bar in the lower right corner of the image, as this seems to be the preferred scale bar location among most publications.

8) When placing the physical scale bar next to the subject or feature of interest, ensure that it is aligned properly and parallel with the subject and photograph, i.e., the camera lens.

9) Annotate the metric dimensions of the scale bar on the image along with the bar. Do not just mention its length in the image legend or caption. Use simple length units such as 1 cm, 2 cm, 5 cm, or 10 cm.

10) Before final publication, carefully check the page and image proofs of the respective journal to see whether all scale bars are clearly visible.

11) When generating multiple photos in a row, make sure the scale bars are consistent with the same length and units to avoid confusion.

12) Keep scale bars in a protective cover when not in use to protect them from light and mechanical damage, such as surface scratches.

13) If made of plastic, their white color components can change and turn into a grayish-yellow hue. Changes in the dimension of the scale bar can also occur and, depending on the geometry and material properties of the scale bar, can be substantial after a few years (Ferrucci et al. 2016). Therefore, it should be considered to replace used scale bars after a few years or earlier when they are used extensively on a regular basis. More information on this is provided at the end of this protocol.

14) Scale bars should not include more information than necessary. In most anthropological or archaeological research, scale bars serve no purpose other than to provide a quick indication of the size of an object or subject. As mentioned, and further discussed in the supplementary information (link: https://zenodo.org/record/7495468, DOI: 10.5281/zenodo.7495468), no measurements should be taken from images, even if there is a scale bar inserted, unless the image has been specially calibrated (not further elaborated on here). As a result, a simple line with a length indication, such as that provided by ImageJ© software, may be sufficient.

15) If more complex scale bars are required, other image processing software can be used in addition to the presented protocol, along with special templates or models for digital scale bars. 


[GUIDELINES]
Texts written in italic refer to software functions.

This protocol was created using Windows 10 (version 21H2). Used and reported commands such as keyboard shortcuts may be different depending on your operating system.

[STEPS]
SECTION: Digital scale bar insertion using ImageJ
1. Take high-quality images according to your personal or project guidelines. For each session, take photos first with and then without the scale bar in the proper position and location. Make sure that you do not move the object before all the pictures have been taken.

Take images in RAW format and convert them afterward to high-quality JPEG or TIFF files using free and open-source software such as IrfanView© and its required plugins (available via https://www.fosshub.com/IrfanView.html). Always save the images at the highest possible quality. To save time, it is advised to take three photos per setting, whose quality can be checked during post-processing steps. Choose the visually best image.    
SECTION: Digital scale bar insertion using ImageJ
2. Open the ImageJ© software (fig. 1). 

  

SECTION: Digital scale bar insertion using ImageJ
3. Load the image, including the physical scale bar, into ImageJ© (fig. 2). Either drag and drop the image from the folder into the ImageJ© toolbar (blank gray bar beneath the icons toolbar) or via File\Open\navigateto the target folder and select image file\Open. Note to always use a copy of the original file and never the original file itself as a backup. 

   

SECTION: Digital scale bar insertion using ImageJ
4. Click on the Linear Selection Tool (also called the Line ROI [region of interest] or Straight Line Tool) from the icon toolbar (see the selected icon in fig. 1). 
SECTION: Digital scale bar insertion using ImageJ
5. With the line tool selected, trace a distance from the physical scale bar in the image (fig. 3).Note that any distance shown on the scale bar can be used. For convenience and consistency, try to always use the same measurement (e.g., 1 cm), which will help you to avoid confusion and errors. For more precision, zoom into the image to increase the scale bar. Place the endpoint of the straight line directly in the middle of the scale bar and its metric unit markers.

  

SECTION: Digital scale bar insertion using ImageJ
6. Click on Analyze in the top menu bar.
SECTION: Digital scale bar insertion using ImageJ
7. Within the Analyze menu, click on Set Scale... 
SECTION: Digital scale bar insertion using ImageJ
8. A new window called Set Scale will appear, showing different parameters (fig. 4). The first parameter shows the measured Distance in pixels as measured by the linear selection from step 5. The second parameter indicates the Known distance, which represents the distance that is measured on the physical scale bar with the Linear Selection Tool (i.e., 1 cm in the current example). By default, this value is set to 0.00. The third parameter indicates the Pixel aspect ratio, which by default is set to 1.0. The next parameter shows the Unit of length. The default is set to "pixel". Change it to either centimeters ("cm") or millimeters ("mm"). Note that you should only use the metric system in scientific contexts. Enable the Global option. Doing so will apply all the just defined parameters to any subsequently opened image in the current ImageJ© session. All settings will be reset upon closing and reopening the program or if new parameters are defined in the Set Scale... menu. Note that the Global option is only valid for pictures where the position of the scale bar has not been changed; otherwise, the scale bar will be off and false. To avoid this, it is recommended not to apply the Global option to other images than the actual pair.


SECTION: Digital scale bar insertion using ImageJ
9. Click on OK to apply the parameters.

  

SECTION: Digital scale bar insertion using ImageJ
10. Open the corresponding image without a physical scale bar into the current ImageJ© session (i.e., without closing the program) following the instructions for loading images into the software mentioned in step 3 (fig. 5). 

  

SECTION: Digital scale bar insertion using ImageJ
11. Click on the Analyze button in the top menu bar. 
SECTION: Digital scale bar insertion using ImageJ
12. Within the Analyze menu, click on Tools and then on Scale Bar…. A new window will open called Scale Bar where the digital scale bar can be specified (fig. 6). The first parameter indicates the width (i.e., length) of the bar in the previously defined unit (Width in cm). The scale bar width depends on the displayed feature. Here, a length of 5 cm was chosen. The second parameter defines the bar's Height in pixels. Good results with bar height can be achieved with a height of 25 pixels. In general, the bar should be neither too thick nor too thin. The third parameter will define the size of the text. A font size of 100 produces a label size that can be easily read. As Color choose either white or black depending on the background hue to achieve the greatest contrast. Leave Background on its default setting, i.e., None. For the Location, it is recommended to use the Lower Right corner. Beneath these parameters enable Bold Text and Overly to create an aesthetically pleasing result. 

  

SECTION: Digital scale bar insertion using ImageJ
13. Click on OK to apply the parameters. This will create a permanent digital scale bar in the input image (fig. 7). 

 

SECTION: Digital scale bar insertion using ImageJ
14. To save the final image with a digital scale bar, press on File in the top menu bar and then on Save As.
SECTION: Digital scale bar insertion using ImageJ
15. Select your desired file format, e.g., Jpeg… and click on it. 
SECTION: Digital scale bar insertion using ImageJ
16. Within the opened window, navigate to the target folder, name the file, and press the Save button. 
SECTION: Digital scale bar insertion using ImageJ
17. At this point, your image is essentially done. Follow the next steps if you want to improve the image, e.g., to further adjust the position of the digital scale bar or replace the image background.
As you might have noticed, the scale bar of the current example is slightly off and somewhat far away from the actual subject. This can cause difficulties in comparing the scale bar with the subject and its size. Alternatively, it is also possible to customize the ImageJ© scale bar using the Line Selection Tool before step 11. Simply draw a horizontal line with the cursor after selecting this tool at the intended position with the approximate length of the final digital scale bar, and then follow the subsequent steps as described above (steps 11 through 16).  
SECTION: Scale bar post-processing using Photoshop (or similar software)
18. Load the image with the digital scale bar into the illustration software of your choice, such as GIMP© or Adobe® Photoshop® (fig. 8). The latter software (Adobe® Photoshop® CS6 version 13.0 x64) installed on Windows 10 Pro was used in this protocol.  

  

SECTION: Scale bar post-processing using Photoshop (or similar software)
19. Use a selection tool such as the Quick Selection Tool to select the entire background (fig. 9). 

 
SECTION: Scale bar post-processing using Photoshop (or similar software)
20. Use the Paint Bucket Tool to fill out the selected background with black color (hex color code: #000000) (fig. 10).

  

SECTION: Scale bar post-processing using Photoshop (or similar software)
21. To begin, deselect the previously selected background (i.e., by pressing Ctrl + D in Adobe® Photoshop®). Then choose the Rectangular Selection Tool and select the digital scale bar (fig. 11).

  

SECTION: Scale bar post-processing using Photoshop (or similar software)
22. Press Ctrl + T to move the selected scale bar with the cursor to its final position (fig. 12).  

  

SECTION: Scale bar post-processing using Photoshop (or similar software)
23. To confirm the placement, press Enter on the keyboard, followed by Ctrl + D to deselect the selection. Then select the Crop Tool(fig. 13).  

  

SECTION: Scale bar post-processing using Photoshop (or similar software)
24. Crop the image to your desired dimensions (fig. 14). 

  

SECTION: Scale bar post-processing using Photoshop (or similar software)
25. Confirm your adjustment by pressing Enter on your keyboard (fig. 15).

 
SECTION: Scale bar post-processing using Photoshop (or similar software)
26. Save the final image in your desired image file format, such as TIFF or JPEG. In Adobe® Photoshop® click on File in the top menu bar, and then on Save as… Navigate to the target folder, select the file format, and name the file. (fig. 16). Done. 

  

SECTION: Additional information on scale bar position
27. At this point, your image with the digital scale bar is done. 

As mentioned before, the right position of the scale bar is important. To demonstrate the effect of mismatching scale bar positions, I carried out a brief, non-peer reviewed experiment alongside this protocol. This experiment's related PDF can be found on Zenodo.com (DOI: 10.5281/zenodo.7495468, link: https://zenodo.org/record/7495468).