Camera Calibration and Why It Drifts
A camera does not measure millimetres. It measures pixels, and the conversion only exists because somebody established it once with a target and wrote the result down. That conversion is a physical relationship between a lens, a sensor, a mounting bracket and a part plane, and every one of those is a mechanical object that moves a little over months and a lot over a maintenance intervention. Calibration is therefore not a commissioning step that can be ticked off; it is a state that has to be re-verified on a cadence, and the cadence has to be written down.
Key takeaways
- Calibration ties pixels to millimetres and corrects lens distortion and perspective.
- Two lenses of the same model are not interchangeable; each has its own principal distance and distortion.
- Thermal expansion, vibration and bracket settling all move the mapping without anything appearing broken.
- Keep a reference artefact at the station and check it on a defined cadence.
A camera does not measure millimetres. It measures pixels, and the conversion between them exists only because somebody established it once by imaging a target of known dimensions and solving for the mapping. That mapping is not a property of the software. It is a physical relationship between a lens, a sensor, a mounting bracket and the plane the part sits in, and every one of those is a mechanical object that shifts a little over months and can shift a lot in a single maintenance intervention.
What a calibration actually establishes
- Scale. How many millimetres correspond to one pixel at the part plane. This is the number that turns a measured 340 pixels into a dimension.
- Lens distortion. Real lenses bend straight lines, most visibly at the edges of the field. A calibration models this and unwinds it, and without it a dimension is accurate at the centre and progressively wrong towards the corner.
- Perspective and the optical axis. Unless the camera looks exactly perpendicular to the part plane, there is a projective relationship between the image and the plane. Calibration recovers it, which is what allows a measurement anywhere in the frame to be meaningful.
- The working distance reference. The calibration is valid at one distance. A part sitting closer or further away is imaged at a different magnification — this is the effect telecentric lenses exist to remove.
Why a calibration drifts
Drift is not a software event. It is the accumulation of small mechanical and thermal movements, each individually negligible, that together move the mapping by more than the tolerance allows. A workshop that is cool in the morning and warm by mid-afternoon expands the bracket, the camera body and the part fixture by different amounts, because they are different materials. Vibration gradually loosens a fastener that was torqued correctly on installation. A camera bracket that was rigid enough for a static test flexes slightly when a heavy cable is dressed differently after a repair.
The intervention that catches people out is the lens. When a lens is damaged, the natural response is to order the same model and fit it, expecting the calibration to hold. It will not. Two units of the same lens model differ in principal distance and in the exact form of their distortion, and the mounting introduces a fresh tilt and a fresh working distance. A same-model swap is a new optical system. It requires a fresh calibration and, just as importantly, a fresh acceptance run, because the images it produces are not the images the model was validated on.
| Cause | Timescale | Visible from outside? |
|---|---|---|
| Thermal expansion over a shift | Hours | No — nothing looks different, the numbers simply move |
| Vibration loosening fasteners | Weeks to months | Sometimes, if you inspect the bracket |
| Bracket or fixture settling | Days to weeks after installation | No |
| Lens replacement or refocusing | Instant | Only if the change is recorded |
| Cleaning the lens or the window | Instant | No, but it can shift focus if the retaining ring moves |
Writing the re-verification cadence into acceptance
A cadence that lives only in the integrator head is not a cadence. It belongs in the acceptance document, with the reference artefact identified, the measurement procedure written down, the limit stated as a number, and the action defined for exceeding it. A practical starting set of triggers is: at every production start, after any mechanical intervention on the camera, the lens, the bracket or the fixture, after any temperature excursion the workshop would consider unusual, and otherwise on a monthly interval. For dimensional work, tighten all of those; for presence and absence checks, most of them can be relaxed.
The criterion itself needs to be chosen with the same care as the inspection tolerance, and it must be tighter. If the part is judged against a tolerance of plus or minus 0.1 mm, a calibration that is allowed to drift by 0.1 mm has consumed the entire budget before the part is measured. A common and defensible convention is to hold the calibration within one tenth of the inspection tolerance. This is the same reasoning that governs how acceptance criteria for the whole station should be worded, which is covered in acceptance criteria; the drift limit is simply the part of that document that outlives commissioning. Model drift on the algorithm side is a separate line that also has to be monitored, described in model drift and recalibration.
Common questions about calibration
How often should a calibration target be re-imaged?
A full recalibration with the target is typically an annual or post-intervention activity. The shift-level check uses the reference artefact, which is far quicker. The distinction matters because confusing the two leads either to over-maintaining the station or to never checking it at all.
Does replacing a camera body require recalibration?
Yes, always. Even an identical model has its own sensor alignment within the housing, and the mounting introduces a new tilt. Any change of camera, lens, bracket or fixture invalidates the calibration, and the rule is easier to remember as a single sentence than as a list.
Can drift be detected automatically?
Partly. The reference artefact check can be automated and logged, and an alarm raised when the reading approaches its limit. What cannot be automated is recognising that a maintenance intervention happened; that still depends on somebody recording the event, which is why the intervention log and the calibration record should be the same document.
How would you know if your station had drifted?
Tell us what you measure and to what tolerance, and we will propose a reference artefact, a check cadence and a limit that fits the tolerance.
Related articles
-
Alarm Fatigue: Why the Floor Turns the System Off
Many visual SOP systems are not beaten by technical problems — they are muted by…
Read more → -
Visual SOP Camera Selection and Mounting
Camera selection for visual SOP is not the same as for product inspection. The s…
Read more → -
Vision Monitoring at the Semiconductor Die Bonder
Semiconductor packaging stations are characterised by high precision, fast cycle…
Read more → -
Wrong-Assembly Alarms Without the False Alarms
The most common reason a visual SOP project fails is not poor recognition — it i…
Read more →
Need specific advice for your production line?
Our engineers can share practical approaches to process error prevention and SOP compliance inspection for your scenario.
Request a free trial plan