How to calibrate a USB microscope for accurate measurements

Updated

A USB microscope only sees pixels. To get millimetres or micrometres out of it, you have to tell the software how many pixels make up a known length. That step is calibration. It takes a couple of minutes, and every measurement you take afterwards depends on it.

This guide uses MeasureLab, which runs in the browser, but the method is the same in any measuring software.

What you need

  • A stage micrometer (calibration slide). This is a glass slide with a precise scale, most often 1 mm divided into 100 steps of 0.01 mm (10 µm). It is the most accurate reference and costs little.
  • A steel ruler with millimetre marks. Good enough at low magnification, when the field of view is several millimetres wide.
  • The calibration target that came with the microscope, if there was one. Many USB microscopes ship with a small printed ruler or dot grid.

Step 1: Set the zoom and focus you will measure at

A calibration is only valid for one magnification. Set the zoom to where you will work, focus, and leave it there. On most USB microscopes the distance between the lens and the subject changes the magnification too, so keep the stand at the same height.

Step 2: Capture the reference

Lay the micrometer or ruler flat, in the same plane as the objects you will measure, and line it up roughly with the edge of the picture. In MeasureLab, click Start Microscope Camera, then Freeze (or press F) to capture a still frame.

Step 3: Draw the calibration line

Pick the calibration tool (Calibrate, shortcut K) and drag a line from one mark of the scale to another. Use the longest span you can: if each end of the line is off by one pixel, that error matters far less on a 600-pixel line than on a 60-pixel one. Zoom in on the image to place the ends exactly on the marks.

Step 4: Enter the real length

Type the length of the span you drew, for example 1 mm or 500 µm, and choose the unit. The software divides the line length in pixels by that value and stores the result as pixels per unit. From then on, every measurement on that image shows in real units.

Step 5: Check the calibration

Measure a different span of the same scale, ideally in another part of the picture. If it reads what the scale says, within the tolerance you need, you are done. If not, redraw the calibration line more carefully or use a longer span.

How accurate can a USB microscope be?

The main sources of error are:

  • Pixel size. At 150 pixels per millimetre, one pixel is about 6.7 µm. You cannot measure much more finely than a few pixels, so increase the magnification for small features.
  • Line placement. A one-pixel slip at each end of a 600-pixel line is about 0.3 %. Long reference lines and zooming in keep this small.
  • Height differences. Cheap USB microscopes have a short working distance, so a subject that sits higher or lower than the scale is magnified differently. Keep the reference and the subject in the same plane.
  • Lens distortion. The edges of the picture are often slightly distorted. Measure near the centre when accuracy matters.
  • Resolution changes. If the camera switches resolution, for example from 1920 × 1080 to 640 × 480, the pixels per millimetre change with it.

When to calibrate again

  • After changing the zoom or the height of the microscope
  • After switching to another microscope or camera resolution
  • When you measure an image that was resized or cropped and scaled

If you switch between a few fixed magnifications, MeasureLab Pro can save each one as a calibration profile, so you pick the right one instead of calibrating again. See pricing for details.

Practise on a sample image

No micrometer at hand? Open the calibrated sample image of a circuit board. It has a 2 mm scale bar in the corner: draw a calibration line along the bar, enter 2 mm, and then check yourself on the parts. The small resistors are 1.60 mm long and the chip's pins are 1.27 mm apart.

Next, read how to measure with a USB microscope online.

More guides