Add a scale bar to SEM and TEM images (Beta)

Burn a correctly sized scale bar into microscope pictures using the pixel size stored in the file, and cut off the SEM info bar.

Opens: EMD (Velox), EMD (Berkeley), DM3, DM4, SER/EMI, SEM TIFF, BCF, SPX, H5OINA, SPD/SPC, JEOL ASW/IMG/MAP/PTS, MRC, MIB, ELID, MSA
Saves: PNG, JPEG, TIFF (ImageJ), CSV, EMD (HDF5), TXT, JSON

Convert

Microscope files
Choose files… or drop them here
.emd, .dm3, .dm4, .ser, .emi, .tif, .tiff, .txt, .hdr, .bmp, .jpg, .jpeg, .png, .bcf, .spx, .h5oina, .h5, .hdf5, .spd, .lsd, .spc, .ipr, .asw, .img, .map, .pts, .eds, .mrc, .mrcs, .mib, .elid, .msa, .ems, .emsa, .zip · up to 4096 MB each, 200 files max
    Add more files

    Velox or Berkeley .emd, .dm3/.dm4, TIA .emi with its .ser files, SEM/TEM .tif (with the .txt or .hdr file Hitachi, JEOL and TESCAN save next to it), Bruker .bcf/.spx, AZtec .h5oina, EDAX .spd with .spc/.ipr, JEOL .asw/.img/.map/.pts/.eds, .mrc, .mib, Phenom .elid or .msa. Several files or a .zip of a folder are converted together.

    Options
    Picture format

    PNG keeps every grey level; JPEG files are smaller.

    Where the scale bar is drawn. Its length is a round number (200 nm, 2 µm, 5 1/nm for diffraction) chosen from the pixel size in the file.

    Automatic picks white or black from the brightness behind the bar.

    Scale bar size

    Removes the strip with the instrument settings at the bottom of SEM pictures (Thermo Fisher/FEI, TESCAN, Zeiss, Hitachi, JEOL) before the scale bar is added. The calibrated TIFF is cut the same way.

    Automatic stretches the grey levels between the 0.5 % darkest and brightest pixels (8-bit pictures stay as recorded; diffraction patterns use a log scale). The TIFF always keeps the original values.

    For drift-corrected frames, image series and STEM scans with several frames. The TIFF always holds every frame.

    For EDS spectrum images: element symbols separated by commas, for example Fe, Ni, O. A line can be named (Au M, Cu L). Leave empty to use the elements stored in the file.

    More options

    Averages neighbouring pixels in the element map pictures so sparse X-ray counts read as areas. The TIFF and CSV files keep the unsmoothed counts.

    A fixed length such as 500 nm, 2 µm or 5 1/nm. Leave empty for an automatic round length.

    For pictures without a calibration, for example 2.5 nm or 0.31 µm per pixel.

    ImageJ-compatible keeps 8-bit and 16-bit data as they are and stores everything else as 32-bit float.

    Also save the whole spectrum image (every pixel's spectrum, as y, x, energy) as a Berkeley EMD (HDF5) file for ncempy, HyperSpy or your own scripts, when it is under 1.5 GB.

    Your files are deleted after processing.

    The scale bar in an SEM or TEM picture should come from the pixel size the microscope recorded, not from a ruler drawn by eye. Most instruments store that pixel size inside the file or in a small text file next to it. This page reads it and burns a bar with a round length (1, 2 or 5 times a power of ten, such as 200 nm or 5 µm) into the picture.

    How to add the scale bar

    1. Upload the pictures as saved by the microscope, with their .txt or .hdr file if the instrument writes one. A .zip of a folder works too.
    2. Choose the corner, the colour (automatic, white, black, or on a contrasting box) and the size of the bar. Under More options you can fix the length, for example 500 nm.
    3. Download the PNG or JPEG. A calibrated TIFF for ImageJ and Fiji comes with each picture.

    Where the pixel size comes from

    • Thermo Fisher and FEI (Quanta, Helios, Scios, Apreo...): the settings stored in the TIFF.
    • Zeiss SmartSEM and Zeiss ORION: the instrument tags in the TIFF.
    • TESCAN: the TIFF tags, or the .hdr file saved next to the picture.
    • Hitachi and JEOL: the .txt file with the same name, which must be uploaded too.
    • JEOL SightX, Fibics, TVIPS, ImageJ and DigitalMicrograph TIFFs, and every TEM format the converter reads (Velox, DM3/DM4, TIA): the calibration in the file.

    The info bar

    Many SEMs add a strip with the voltage, magnification and their own bar at the bottom of the picture. With "Cut off the instrument's info bar" on (the default), that strip is removed before the new bar is drawn. For Thermo Fisher/FEI and TESCAN its height is stored in the file; for Zeiss, Hitachi and JEOL it is recognised in the picture itself.

    Pitfalls

    • A screenshot, or a picture resized or re-saved in another program, has lost its calibration. Type the pixel size under More options (for example 2.5 nm) to add a bar.
    • Very small pictures are enlarged pixel by pixel before the bar is drawn, so the label stays readable; no detail is added.
    • The automatic contrast stretch only changes the picture. To measure grey levels, use the TIFF, which keeps the recorded values.

    For EDS maps with a bar see Bruker BCF files.

    More about what this tool reads and writes: Electron Microscopy File Converter (EMD, DM3, DM4, SER, TIFF).