You taught the locator on a clean label — the top face of a tall part — and now the finished part sits in the fixture and the score collapses. Nothing moved. The label just sits tens of millimetres closer to the camera than it did at teach, so it appears larger and no longer correlates with the model. This guide shows you how to compute that scale error before it costs a day of tuning, and how to teach the model at the height the camera will actually see. It is written for anyone setting up locate on smart cameras or PC-based lines built on area scan cameras.
Why the score drops when the part is taller than the teach target
A pattern match tool reports similarity as a percentage of the taught model: it slides the model across the image and computes the cross-correlation between model and image at the scale it was taught. The tool knows nothing about your part's height. If the label sits closer to the lens at run time than it did at teach, every feature in it grows, edges land where the model expects background, and the score falls.
Acceptance thresholds sit high on purpose. A model that taught at 92 and runs at 55 is not a weak match, it is no match, and the coarse-search stage may never hand it a candidate at all — the pattern match score threshold guide walks through how that gating works. Scale-invariant search modes stretch the model across a size range, but the tolerance is narrow: the scale invariance guide puts the break near 5%. A wrong teach height is rarely that small.
The geometry: scale error is height change over distance
Apparent size follows the thin-lens estimate m ≈ f / d, with f the focal length and d the distance from lens to the feature you matched. Matching does not care about m itself, only how much it changed between teach and run:
At the working distances a label station uses, the estimate is tight: with an 8 mm lens at 320 mm, the exact thin-lens form f / (d − f) moves a 2% error to 2.09%, about 0.1 percentage points.
Two consequences follow. Short working distances punish height error harder: 10 mm of height change is 2.5% scale error at 400 mm working distance and 5% at 200 mm. And mounting height is part of the model — move the camera 15 mm up after teaching and you have rescaled the image by 15 / d even though nothing about the part changed.
The same geometry sets the field of view at the part-top plane, which the field of view at a given mounting height guide works through in full.
Sizing the lens itself is the same division. The focal length calculator below does it and hands the result to the lens finder.
Worked example: 80 mm part under a camera at 400 mm working distance
The inputs, and where each comes from:
- Working distance, lens to fixture plane: 400 mm — a typical bench value for a label station; read yours off the stand's scale.
- Final part height: 80 mm — the tall-object case this guide started from.
- Teach surrogate: the same label artwork on a 2 mm blank, lying on the fixture plane.
- Lens: 8 mm, as carried by the smart camera featured below.
- Label width: 30 mm.
- Working tolerance: ±2% scale — a deliberately conservative band; the scale invariance guide shows matching already failing near 5%.
The rule in words: apparent size scales with 1/distance, so compute the lens-to-label distance at teach and at run, then divide one magnification by the other.
- Teach distance: d_t = 400 − 2 = 398 mm (the blank lifts the label 2 mm off the plane)
- Run distance: d_r = 400 − 80 = 320 mm
- Teach magnification: m_t = 8 / 398 = 0.0201
- Run magnification: m_r = 8 / 320 = 0.0250
- Scale error: m_r / m_t − 1 = 0.0250 / 0.0201 − 1 = 0.244, about 24%
The label comes back about 24% larger than taught. A 30 mm label reappears as 30 × 1.244 = 37.3 mm wide, so every edge sits up to (37.3 − 30) / 2 = 3.7 mm from where the model expects it. Against a threshold the model passed at 90-plus at teach, a 24% rescale puts the score in the fail band: the locate drops out or, worse, wanders.
The decision: fix the height, not the threshold. Teach the same label on a block of final height — 80 mm — so d = 320 mm at teach and at run and the scale error is 0%. What remains is height wander, and the formula sizes it: allowed Δd ≈ 320 × 0.02 = 6.4 mm, so ±6 mm of part-height variation stays inside the 2% band. Beyond that, fixture the height or add a small, written-down scale range.
What you need
- The camera that runs the locate: a smart camera if the inspection lives on the device, or an area scan camera with a PC if grading runs elsewhere.
- The finished part, or a surrogate block machined to final height with the same label artwork applied at 1:1.
- A height-locking mount — the camera stands page lists slide-table stands, brackets and stages.
- The production fixture, so teach happens where the part actually sits.
For a label locate plus grading in one box, an on-device locator such as the MV-SC3050XC-16M-ATN-H does the job without a PC. Both of these cover the common label-station range.
The MV-SC3050XC-16M-ATN-H is a 5 MP colour vision sensor with a global shutter and M12 mount; the MV-SC5060XM-08M-WBN pairs a 6 MP mono sensor with an 8 mm M12-mount lens.
- Interface
- Fast Ethernet
- Resolution
- 5 MP
- Interface
- GigE
- Resolution
- 6-10 MP
A stand that locks height is the cheapest insurance in this guide. The LS-MNT-0040 slide-table stand has a 700 mm column and a 400 x 450 mm base.
- Type
- Camera stands
Teach the model at part height, step by step
- Lock the geometry first. Mount the camera at the production working distance on the stand's slide, and write the distance on the fixture plate.
- Make the surrogate. Apply the same label artwork at 1:1 to a block of the final part height — 80 mm in the worked example. A finished part with a fresh label is better still, because print and wear are identical.
- Teach in the production fixture. Put the surrogate where the part sits and teach the planar model on the label face only: strong contrast, background masked, side walls excluded. Record the teach height beside the model name.
- Set the acceptance threshold from the teach score, with margin below it. The template matching score threshold guide explains what the reported percentage does and does not promise.
- Run the full object for the steps after locate. The scan, OCR or grading steps use the whole part; only the locate model needs the planar surrogate.
- Walk the height extremes. Five surrogates or parts at minimum stack height, five at maximum, through the real cycle, and read the locate score at both ends.
- Convert any drift before it surprises you: scale error ≈ height change ÷ 320 mm in the worked example, so 6 mm of wander stays inside 2%. If your extremes exceed the band, tighten the fixture or enable a small scale range with the limits recorded.
- Re-teach after any mechanical change: camera height, lens swap, fixture plate, stand move. The model stores teach-day geometry, not a part.
Before you teach a part family for the first time, the vision locate feasibility checklist screens for the harder blockers — contrast, overlap, presentation — before you invest a day in models.
Verify before you go live
Run 20 to 30 parts through the real cycle and log the locate score for each. A healthy station holds scores within a few points of teach; a slow downward drift across a shift points at geometry — a settling fixture, a loose stand lock, a warming bracket — not at the algorithm. Metrology teams hold gauges to the same rule, that height gauge agreement requires checks at part height, and a taught model is no different: it is valid at the height it was checked at. Then fault-inject on purpose: a part 10 mm low, a label rotated 5°, a smudged print. The locate should reject those fast, not pass them just above threshold.
Common mistakes
- Teaching on a label mock lying on the fixture plane while the real label rides an 80 mm top face: the 24% error of the worked example, discovered on go-live day.
- Reaching for a wide scale range instead of re-teaching at the right height.
- Teaching at rig height and running at conveyor height. Same geometry, same error, different bench.
- Skipping the full-part trial because the surrogate scored well. Side walls and background change the fine-search stage even when scale is right.
- Treating a lens swap as free. Replacing an 8 mm lens with a 12 mm rescales the image outright; re-teach any optic change.
Some teach-time successes still fail at run time for reasons upstream of scale: the stream versus snapshot guide covers a locate that teaches on a live stream and runs on a trigger image.
When a standard lens is the wrong answer
If part height genuinely varies by tens of millimetres part to part, and no fixture can tame it, teach discipline stops being enough. Two escapes exist, one in software and one in optics.
Software compensation corrects the scale from a measured height signal: the scale compensation guide for part height variation in vision picking shows the method and what it needs — which is a height the cell actually knows. If nothing measures height, compensation has nothing to compute from.
In optics, a telecentric lens holds magnification constant across its depth range, so part height stops rescaling the image within that range. The cost is a front element roughly as large as the field of view and a finite depth band, which the diagram makes visible.
The decision, committed: fixture the height and teach at part height when variation is a few millimetres — about ±6 mm at 320 mm inside the worked example's 2% band. Move to telecentric optics when variation exceeds the band and the fixture cannot close it.
Next steps
Pick the camera and the stand together, because the stand carries half the accuracy. The camera finder filters smart cameras and area scan cameras by sensor, shutter and mount, and the accessories finder lists stands and slide stages. The configurator walks the whole station in order — start it at the camera step or the stand step. For the neighbouring decisions around a locate, the applications guides hub is the index, and the contact page reaches the applications team when your geometry does not fit a bench stand.
Questions
Does enabling scale-invariant search replace teaching at part height?
It covers drift, not a wrong teach height. Built-in scale handling degrades quickly past a few percent — the scale invariance guide puts the break near 5% — and a wide range slows the search and invites false accepts. Use it to absorb a few percent of part-height wander after you have taught at the correct height, never to bridge a 20% gap.
How much part-height variation can a taught pattern tolerate?
Convert height to scale: scale error ≈ height change ÷ camera distance to the feature. At 320 mm lens-to-label distance, each 3.2 mm of height change moves the image scale by 1%. Keep the whole band inside a few percent — about ±10 mm at that distance at 3% — or scores drift toward the acceptance threshold.
Would a telecentric lens remove the height-to-scale problem entirely?
Within its depth range, yes. A telecentric lens holds magnification constant as part height changes, so the label is not resized at all in that range. In exchange you give up some working clearance and pay for a larger, purpose-built optic with a limited depth band. For a label locate with fixtureable heights, teaching at part height on a standard lens is the cheaper fix.
Should I teach on the bare label or on the full assembled part?
Teach the planar model on the label or top-face artwork, but hold that artwork at the height it occupies on the finished part — a surrogate block or the finished part itself. Keep the full object for the scan and grading steps after the locate. The model then stays free of side walls and background while its scale stays true.
What acceptance score should I set after teaching at part height?
Start from the score the tool reports on good parts at teach and set acceptance with real margin below it; many locate stations set the bar near 70-80 on a clean template. Then walk five parts through the lowest and highest expected heights and read the scores. If the spread eats the margin, tighten the height tolerance or add a small scale range.


