You have a camera, a lens and a coin, and the image gives you nothing but pixels. Calibration converts those pixels to millimetres with one scale factor, and the measurement itself is then two multiplications. The craft is in the error budget: where the hundredths of a millimetre go, and which lens keeps them. What follows is the formula, a worked station that measures a 25.0 mm coin to ±0.05 mm, the number that decides between a standard and a telecentric lens, and the checks to run before ordering parts. The general method is the same one behind measure object size from a camera image; here it is driven to a defensible tolerance on one part.
The decision, up front
For a coin that sits on the same plane you calibrated on, use a standard lens and a single scale factor: diameter = pixel span × (known length ÷ its pixel span). At 0.0100 mm/px, a 2500 px span is 25.00 mm, and the repeatability of a subpixel circle fit, ±0.4 px, is ±0.004 mm — noise, not a limit.
The term that decides the lens is height. A coin 4 mm off the calibration plane reads 1.8% large at a 224 mm working distance: 0.45 mm on this coin, a hundred times the edge noise. If you can hold the part within ±0.4 mm of the plane, stay with a standard lens. If you cannot, fit a 0.5x telecentric lens: over the same 4 mm its error is about 0.007 mm. And if the goal is sorting coins rather than gauging one, coin size sorting with a single camera covers the classification side.
Pixels to millimetres: the scale factor
Put a length you trust on the object plane: a certified rule, a glass scale, a machined gauge or a printed checkerboard. Measure its span in pixels, subpixel, and divide. In the station below, a 20.00 mm reference spans 2000 px, so scale = 20.00 ÷ 2000 = 0.0100 mm/px, and a coin whose fitted diameter is 2500 px measures 2500 × 0.0100 = 25.00 mm.
Calibration error divides by span. The same ±1 px endpoint uncertainty is 0.05% over a 2000 px span and 0.5% over a 200 px span, so calibrate on the longest length the frame allows.
A full checkerboard calibration returns the focal length in pixels and the distortion coefficients, so you can undistort and measure anywhere in the frame rather than near the centre. Run it when the part's position wanders or the lens is wide-angle; for a centred, fronto-parallel coin the single factor gives the same answer. When you read distortion off a lens datasheet, note whether it is stated geometrically or as TV distortion — geometric vs TV distortion explains the difference and why it matters at this tolerance.
The station: camera, lens, field of view
Start from the field of view and work back to the optics. This station frames 40 × 30 mm — a 25 mm coin plus placement margin — and on a 4000-pixel-wide frame that is 40 ÷ 4000 = 0.0100 mm/px before any target is placed.
The LS-CMR-0166 is a 12 MP USB3 camera with a 1/1.7" rolling-shutter sensor and a 4000 × 3000 output:
- Sensor format
- 1/1.7"
- Interface
- USB3
- Resolution
- 12 MP
- Shutter
- Rolling
Rolling shutter is acceptable because the coin is static. If the part moves, filter the camera finder for global shutter and add a strobe. Choose mono over colour for gauging: Bayer interpolation on a colour sensor spreads an edge across roughly a pixel, which at this scale is 0.010 mm of bias.
The LS-FFL-0679 is a 35 mm, 2/3", 6 MP C-mount lens, and its image circle covers the smaller sensor:
- Type
- Machine vision fixed
- Sensor format
- 2/3"
- Mount
- C-mount
- Resolution
- 6-10 MP
A 1/1.7" sensor is about 7.4 mm wide. For the 40 mm field of view, m = 7.4 ÷ 40 = 0.185x, so WD = 35 mm × 1.185 ÷ 0.185 ≈ 224 mm. Run your own numbers through the lens focal length calculator; the same working distance and field of view arithmetic is worked through for blister inspection fields of view.
Cross-check the scale from the optics: object-space pixel size = pixel pitch ÷ magnification. At 1.85 µm pixels and 0.185x that is 1.85 ÷ 0.185 = 10 µm, the same 0.0100 mm/px. The two routes must agree; when they do not, the working distance or the target is not where you think. Object space pixel size from magnification covers the conversion from the lens side.
One caveat on this pairing: the lens is specified to a lower pixel count than the sensor carries. Edge-position measurement tolerates that; texture inspection would not. For the last word in sharpness, matching lens resolution to pixel size sets out the budget.
How many pixels are enough? Span the gauged dimension with at least 1000 px, and the smallest tolerance with at least 5 px. This station gives the coin 2500 px and a ±0.05 mm tolerance 5 px — the comfortable limit. A ±0.02 mm tolerance would need the field of view brought down to about 20 mm at the same 4000 px:
Calibrate, then measure: the procedure
- Set the working distance, focus wide open, then stop down one or two stops and lock focus and iris. Every refocus moves the scale.
- Lay the reference on the plane the coin's face will occupy, not beside it.
- Measure the known span subpixel — fit the two edge transitions rather than reading pixels off a zoomed view — and divide: 20.00 mm ÷ 2000 px = 0.0100 mm/px.
- Light the coin evenly. A dome or a coaxial source keeps both edge gradients symmetric; a single off-axis spot shifts them in opposite directions, and shiny coins take in-line illumination particularly well.
- Threshold the silhouette, then refine the boundary to subpixel along the local gradient.
- Resist clicking two points. The caliper formula is correct but sensitive to which pixels you pick:
Clicked extremes at (760, 1466) and (3252, 1534) give dx = 2492 and dy = 68, so d_px = √(2492² + 68²) = 2492.9 px and d = 24.93 mm — 0.07 mm of pure point-picking bias.
- Fit a least-squares circle to every edge point instead. The fit returns 2500 px → 25.00 mm, and its residual tells you how round the coin image is.
- Repeat over 10 placements. The spread, here ±0.4 px or ±0.004 mm, is your repeatability.
- Validate with a second known length, a gauge block, treated as a part. Scale and validation must agree inside your tolerance, or the calibration is not trustworthy.
Where the error actually comes from
| Source | Size at this station | Cost on a 25 mm coin | Control |
|---|---|---|---|
| Edge repeatability | ±0.2 px per edge | ±0.004 mm | circle fit over all edge points |
| Reference length | ±0.01 mm over 20.00 mm | 0.013 mm | certified target, longest span |
| Distortion, uncorrected | ~0.3% at the frame corner | up to 0.075 mm | centre the part, or undistort |
| Height offset | 4 mm at 224 mm | +0.45 mm | fixture the plane, or telecentric |
| Working distance drift | 1 mm | 0.11 mm | lock focus, daily gauge check |
Height offsets decide the lens
Apparent size scales with distance from the pupil. A coin 4 mm nearer the camera than the calibration plane grows by 4 ÷ 224 = 1.8%: 25.00 mm reads 25.45 mm. Solve the formula backwards for your tolerance: to hold ±0.05 mm on this coin at 224 mm, height must stay within ±0.4 mm. A longer working distance buys height tolerance linearly — the same ±0.4 mm at 500 mm costs 0.02 mm — but the term never disappears.
A telecentric lens puts the pupil effectively at infinity: chief rays arrive parallel, magnification holds over the depth of field, and the residual error is displacement × tan(telecentricity). At a typical 0.1°, a 4 mm offset contributes 4 × 0.0017 = 0.007 mm.
The LS-TCL-2194 is a 0.5x, WD 110 mm, 1", C-mount telecentric lens with a built-in coaxial port:
- Sensor format
- 1"
- Mount
- C-mount
- Image circle
- 11-16 mm
- Type
- Object-side telecentric
On a Type-1 sensor, about 12.8 mm wide, 0.5x frames 12.8 ÷ 0.5 = 25.6 mm — a 25.0 mm coin fills 98% of the width. That works on a fixed stage and is tight everywhere else; tilt or vibration clips edges. A lower magnification buys placement margin, and note the trade unique to this lens type: the field of view is set by the front optic diameter, so a bigger field means a bigger lens — telecentric front optic diameter quantifies it. Match magnification, image circle and working distance as described in telecentric lens selection, and confirm the depth over which the scale holds with telecentric depth of field.
Two magnifications to compare, at 0.5x and 0.166x:
| Specification | LS-TCL-2194 | LS-TCL-1422 |
|---|---|---|
| Magnification (x) | 0.5 | 0.166 |
| Working distance (mm) | 110 | 258 |
| Max sensor size (dia. mm) | 16.0 | 16.6 |
| Image-side F/# | 8 | 6.5 |
| Price | $1,539.00 | $3,099.00 |
All 2 share: Mount C-mount; Sensor format 1". Values as printed in each product's data sheet; open a part for its drawing and full specifications.
The 0.166x option frames 12.8 ÷ 0.166 ≈ 77 mm — several coins or larger turned parts, at a longer working distance.
Which to order, by case
| Your situation | Order |
|---|---|
| Coin fixtured, plane held within ±0.4 mm, tolerance ±0.05 mm or looser | 35 mm-class standard lens, single scale factor |
| Height varies, or tolerance tighter than ±0.05 mm | 0.5x telecentric with coaxial port |
| Field of 60-80 mm, several parts | 0.166x telecentric |
| Part moves on a conveyor | global-shutter camera and strobe; telecentric if it runs in-line |
Whatever the case: keep the sensor format inside the lens image circle, choose mono, and put 1000 px or more across the dimension you gauge. The same budgeting, applied part by part, runs through small-part dimensional measurement and a production example in inline brass-part measurement.
Checks before you order
- Sensor format inside the lens image circle — here 1/1.7" under a 2/3" lens.
- Mono sensor; global shutter if the part moves.
- Field of view 1.3-1.6× the largest part: 1000 px across the gauged span, plus placement margin.
- Lockable focus and iris; a set-screw collar holds better than friction.
- Telecentric: front optic at least the field of view plus 10%.
- Shiny faces: coaxial or dome light, symmetric about the axis.
- A certified reference length whose tolerance is a decade smaller than what you must gauge.
When the usual answer is wrong
A moving part on a rolling-shutter sensor reads its leading edge later than its trailing edge, so the diameter along travel stretches. Use a global shutter or a strobe. A colour sensor adds the Bayer edge bias of about a pixel, 0.010 mm here. A tilted coin shortens one axis by 1 − cos 10° = 1.5%, so 25.0 mm reads 24.6 mm across that axis; seat the part flat. Calibration done at one working distance and measurement at another — refocusing or remounting rescales everything, the failure mode traced in calibration reference pose changes and the recalibration triggers in camera calibration depth range and accuracy.
Two more, less obvious. A coin filling 98% of a telecentric field has no margin: any tilt or bounce clips the fit. And vision measures the silhouette it can see — when the diameter you need sits under insulation with no optical path, it becomes a job for measuring a pipe diameter behind insulation, not a camera.
Commissioning checklist
- Reference length on the coin's own plane, spanning as much of the field as possible.
- Scale logged with date, working distance, lens serial and f-number.
- Ten repeats on the coin; spread recorded, not assumed.
- Gauge-block validation inside tolerance.
- Part centred, or distortion corrected.
- Re-check the scale after any focus, iris or mount change, and daily in production.
With the parts chosen, configure the station, or compare options in the lens finder and across telecentric lenses. Free expert support comes with every order: if your tolerance is tighter than this budget, raise it with the applications team before you buy.
Questions
How many pixels should span the coin diameter?
Plan on at least 1000 px across any dimension you gauge, and 2000-2500 px when you want a 0.1% class result. At 2500 px, ±0.2 px subpixel edges give ±0.4 px on the diameter, about ±0.004 mm at 0.0100 mm/px. Below roughly 500 px, edge noise, distortion and calibration terms start to dominate, and the tolerance you can defend shrinks quickly.
Can the coin's stated diameter serve as the calibration reference?
Only if you accept that the system then reports deviation from that stated value rather than true diameter, because reference error passes straight into every result. Mint tolerances on circulating coins run to a tenth of a millimetre or so, twice the whole budget in this example. Use the stated diameter for sorting; use a certified length, with a tolerance a decade smaller than your gauge tolerance, for measurement.
Is a full checkerboard calibration needed, or just one scale factor?
One scale factor is enough when the part lies fronto-parallel, stays near the frame centre, and lens distortion there is small — the centred coin case. Run the checkerboard, which returns focal length in pixels and distortion coefficients, when measurements move around the frame, the lens is wide-angle, or you also need part pose. Sanity rule: the single factor and the undistorted pipeline must agree to about 0.1% on the same part.
How often should the scale factor be re-checked?
After anything that can move the image scale: refocus, iris change, lens remount, sensor exchange. Then on a schedule — a two-minute daily check against a fixed gauge catches drift before it ships bad parts. Scale tracks working distance, so 1 mm of drift at 224 mm is 0.45%, which is 0.11 mm on a 25 mm coin. Log the scale next to the working distance and f-number it was taken at.
Does a telecentric lens remove the need for calibration?
No. Telecentricity removes the perspective error from height offset; it says nothing about absolute magnification, which carries manufacturing tolerance, or the pixel pitch, which is nominal. You still measure a known length to fix the scale. What you gain is that the one scale factor stays valid across the depth of field instead of across a single plane.


