System designExplainer

Parametric part teaching by shape: faster locating without scanning

How parametric part teaching by shape locates parts in 1.5–2 s per cycle, why a fixed lighting setting speeds every locate and how accurate the fitted pick is.

LumaSpec Vision11 min read Share on LinkedIn

On this page 9 sections
  1. 01What is parametric part teaching by shape?
  2. 02How does a vision system find a taught circle or rectangle in the image?
  3. 03How fast is locating with a taught shape?
  4. 04Why does a fixed lighting setting cut cycle time?
  5. 05How accurate is a shape-fitted pick?
  6. 06Which parts suit shape teaching, and which do not?
  7. 07What hardware holds the image and illumination steady?
  8. 08How high can you mount the camera for a larger field of view?
  9. 09Questions

Parts with few distinctive features — washers, rings, discs, plain plates — are the ones pattern matching handles worst and the ones production wants located fastest. Parametric part teaching by shape fixes that: you enter the outline and its dimensions, the vision system finds that outline in the image, and no scan of a golden sample is ever made. This guide covers how the fit works, what a locate should cost in time (plan on 1.5–2 s per part, trigger to gripper-ready), why a fixed lighting setting removes seconds from every cycle, and how accurate the fitted pick is once calibration and robot repeatability are counted. It is written for anyone building a vision-guided pick-and-place cell around a smart camera or an area scan camera.

What is parametric part teaching by shape?

Parametric part teaching means you type the part's 2D outline — a circle, square, rectangle or ring — together with its real dimensions, and the vision system then finds that outline in each image to return the part's position and angle, with no scan of a sample part.

Scanned teaching stores pixels instead: you place a sample part, capture, and the system keeps a grey-scale template to correlate against. That template degrades when brightness, angle or surface finish shifts, and it needs a golden part on the bench before you can program anything.

Parametric teaching stores geometry. You pick a shape class, type the dimensions — for a washer, a 40 mm outer and 20 mm inner diameter — and the tool fits that outline to the edges it finds. Three consequences follow:

  • Teaching drops from a capture session to typing four numbers.
  • The fit keys on edges, so a brightness change does not move the result.
  • Parts with almost no internal features locate as reliably as detailed ones, because the outline is the feature.

Dimensions also discriminate. A 40 mm ring and a 38 mm ring are two entries in a model list, not one template that confuses them.

How does a vision system find a taught circle or rectangle in the image?

The system extracts part edges, groups them into contours and least-squares fits the taught model — a circle needs a centre and a diameter, a rectangle a centre, length, width and angle — then reports the pose in pixels and converts it through the calibration.

Each stage feeds the next:

  1. Acquire one frame under fixed settings; the lighting section below shows why fixed.
  2. Extract edges with a gradient filter or threshold; on a clean, high-contrast edge, sub-pixel interpolation repeats to about 0.1 pixels.
  3. Fit the model: a least-squares circle through the edge points, a minimum-area rectangle, or two concentric fits for a ring.
  4. Report pose — centre X and Y, angle, and the found diameter, gated against the taught one.

The taught dimensions double as a self-check, because the expected image size follows from the scale:

s = FOV width / horizontal pixels (mm per pixel) D_px = D / s (expected diameter in pixels)

At the worked scale further down — a 178 mm field across 4,000 pixels — s comes to 0.045 mm per pixel, so the 40 mm ring must appear at 40 / 0.045 ≈ 890 pixels. A hit at 620 pixels is a different part, not a bad fit.

Angle needs asymmetry. A circle returns no angle at all, and a rectangle or plain ring returns it only modulo 180°, so teach a hole, flat or notch whenever the gripper cares about orientation; the guide on rotation tolerance for symmetric parts works through that ambiguity.

Search the whole frame once, then stop. Restrict the tool to an ROI around the presentation point and the fit runs in tens of milliseconds — the same shrink-the-search method that lifts pattern-matching update rates.

How fast is locating with a taught shape?

Count on roughly 1.5–2 s from trigger to gripper-ready pose per part, of which the shape fit itself is only 20–200 ms; the rest is capture, transfer, handshaking and robot motion, and the budget below adds the stages up.

Stage Time
Trigger to finished exposure (camera free-runs at 30 fps) 0–33 ms
Frame transfer over USB3 (a 12 MB frame) ≈ 50 ms
Shape fit inside a restricted ROI 20–200 ms
Result handshake to the robot controller 100–500 ms
Robot move from photo pose to the part 500–1,000 ms
Total, trigger to gripper at the part ≈ 0.7–1.8 s

Add the approach from the previous drop and per-part cycles of 1.5–2 s are the planning number for cells built this way. The table also shows where the time really is: vision contributes under 300 ms, so the quick wins are overlap and motion, not more image processing. Capture while the robot is still settling, and let the program structure do it — the drop-target layout shows one way, and the pick-and-place cycle walkthrough maps every stage end to end.

Against scanned teaching, the saving has two parts: no teach-capture session for each part revision, and — the bigger per-cycle cut — no light adjustment before each locate.

Why does a fixed lighting setting cut cycle time?

A fixed lighting setting locks exposure, gain and light intensity once, so the vision system skips the auto-exposure or light-retry step that otherwise adds 2–5 settling frames — about 66–166 ms at 30 fps — to every locate, and it holds your fitted edges at a constant grey level.

Auto exposure is iterative: expose, measure, correct, expose again, before the image settles. Some stacks also re-tune light intensity on every cycle, and a tuning oscillation adds seconds. With fixed settings the first frame is already correct.

Lock three values once, at commissioning:

  1. Camera exposure and gain — 2 ms and fixed gain are a sane start under a shrouded light.
  2. Light intensity, held by a light controller rather than by the camera.
  3. The grey threshold the fit uses, since the edges now land at one constant level.

Ambient light is then the only thing that moves grey levels. Enclose the station or strobe over it: the ambient-light control playbook lists the options, overdrive strobing hides the flash from operators, and when brightness still creeps the auto-mode-off diagnosis is the first stop. Where the process cannot hold intensity at all, close the loop in software — the closed-loop lighting method trades a short measurement pass for repeatability.

How accurate is a shape-fitted pick?

The fit contributes surprisingly little: at 0.045 mm per pixel a sub-pixel edge fit repeats to about 5 µm in the image, so plan end-to-end pick accuracy around calibration and robot repeatability instead — 0.1–0.5 mm is the working range over a 180° reorientation of the part.

At that worked scale the error stack reads:

  • Fit repeatability: 0.1 pixels ≈ 0.005 mm — negligible.
  • Hand-eye calibration: 0.05–0.2 mm of residual is normal practice for a wrist-mounted camera mapping image coordinates to the flange.
  • Robot repeatability: motion systems in the 0.02–0.1 mm class.
  • Presentation height: the quiet one. A part 5 mm closer at a 300 mm working distance magnifies by 5 / 288 ≈ 1.7 %, so the 40 mm ring reads about 40.7 mm; the centre barely moves, but a tight scale gate rejects the hit and the gripper still needs the true height.

Sum the fixed terms and 0.1–0.5 mm end-to-end is the working expectation, with the part rotated 180° as the worst case and errors growing toward the edge of the calibrated region. Quote accuracy for the system — camera plus robot plus calibration — never for the camera alone.

Calibration drift announces itself as a consistent offset: when picks land uniformly to one side, look at the reference frame first, and the origin-fix procedure covers the usual cause.

Which parts suit shape teaching, and which do not?

Shape teaching suits parts with clean, high-contrast outlines and few distinctive features — washers, rings, discs, gaskets, rectangular plates, square nuts — and it struggles on soft outlines, natural surface variability and overlapping bulk parts, which need template matching, color tools or a 3D approach instead.

Fit-friendly means a stable, machined or molded outline, contrast against the background, and parts presented one at a time: brackets, washers, gaskets, caps, plates, nut blanks.

Swap tools when the part breaks those conditions:

Situation Why the fit fails Use instead
Overlapping parts in a bin Outlines interrupt each other A 3D approach — start at flat-part bin picking
Edge and background at one grey level No edge to fit Edge-based matching, or a backlight
The difference is color, not geometry A grey-level fit ignores it Color pattern matching
Natural surface variability No stable outline exists The rule-based versus AI comparison

One more limit to respect: shape fitting locates, it does not inspect. A ring in the correct pose with a missing chamfer still fits perfectly, so keep locate and defect checks as separate tools.

What hardware holds the image and illumination steady?

You need three things held steady: a camera with a shape-fitting tool, a light at a constant, known intensity, and a part that presents at a repeatable height — a smart camera with an integrated light covers the first two in one housing.

On a smart camera the tool, lens and light live in one housing, which removes whole classes of drift; the smart camera finder filters by resolution, shutter and integrated light:

Smart cameras & vision sensors1.6 MP smart camera, 60 fps, 16 mm lens, white light (polarized, transparent light) (LS-SMC-0063)LS-SMC-0063
Interface
GigE
Resolution
Up to 3 MP
$1,110.00View part
Smart cameras & vision sensorsHikrobot MV-SC5060XM-08M-WBN SC5000X series Smart Camera, 6 MP, Mono, 8 mm focal length, M12-mountMV-SC5060XM-08M-WBN
Interface
GigE
Resolution
6-10 MP
$1,629.00View part
Smart cameras & vision sensorsHikrobot HK-TD032-12-WBN 1.6 MP mono vision sensorHK-TD032-12-WBN
Interface
Fast Ethernet
Resolution
Up to 3 MP
$1,699.00View part

The LS-SMC-0063 ships its white light and 16 mm lens integrated, so illumination is fixed by design. The MV-SC5060XM-08M-WBN adds 6 MP of mono resolution over GigE for finer edges. The HK-TD032-12-WBN is the compact vision sensor option, on a 1/2.9" sensor, for fields that do not demand high resolution.

When the fit needs more pixel density than a vision sensor class offers — the worked example below runs on 12 MP — step up to the area scan camera range and run the fit on a controller or PC.

The light side needs a controller that holds its own output, because a ring light wired straight to a supply drifts with temperature and line voltage. The light controller finder filters by channels, strobe and control type; a four-channel, 200 W digital controller with strobe and RS-232 holds each channel at a set intensity for every shot:

Light controllersDigital control box, 4 ch, 200 W, RS232 (LS-CTL-0070)LS-CTL-0070
Output
Constant voltage 24 V
Channels
4 channels
Control
Digital
Feature
Strobe
$549.00View partBuild a system with it

How high can you mount the camera for a larger field of view?

Geometrically there is no height limit — field of view grows with working distance — but resolution sets the practical ceiling: keep the smallest feature you must fit at 3 pixels or more, which at 4,000 pixels across means staying under 0.2 mm per pixel, or 800 mm of field.

Depth of field is the second limit. The focal length follows from the field you want:

m = sensor width / FOV width f = WD × m / (1 + m)

Worked example: a ring part of 40 mm outer and 20 mm inner diameter needs gripping clearance, so the target field is about 200 mm wide. The camera is the 12 MP model featured below — 4,000 × 3,000 pixels on a 1/1.7" sensor, about 7.4 mm wide. Set the working distance to 300 mm.

  • m = 7.4 / 200 = 0.037, so f = 300 × 0.037 / 1.037 ≈ 10.7 mm; the nearest standard focal length is 12 mm.
  • With 12 mm: m = 12 / (300 − 12) = 0.0417, so the field becomes 7.4 / 0.0417 ≈ 178 mm.
  • Scale: s = 178 / 4,000 = 0.045 mm per pixel, so the 40 mm outline must appear at 40 / 0.045 ≈ 890 px and the 20 mm bore at ≈ 445 px.
  • Smallest feature to resolve, a 0.5 mm chamfer: 0.5 / 0.045 ≈ 11 px, well above the 3 px floor.
Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

Mount the same camera at 600 mm: m = 12 / (600 − 12) = 0.0204, so the field grows to 7.4 / 0.0204 ≈ 363 mm with s ≈ 0.091 mm per pixel. The ring now spans ≈ 440 px, still comfortable, but the chamfer falls to ≈ 5.5 px and a 0.2 mm feature would drop below the floor. That is the ceiling in practice: keep s no more than a third of the smallest feature, and the mounting height follows. Then check focus: depth of field at 300 mm depends on the f-number you can afford, so run the lens and aperture through the depth of field calculator before drilling the mount.

How sensor width, working distance and field of view set the focal length Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.CameraField of view (FOV)Working distance (WD)≈ fsensor width slensm = s / FOVf = WD × m / (1 + m)
How sensor width, working distance and field of view set the focal length. Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.
Area scan cameras12 MP USB3 area scan camera, IMX226, 1/1.7" rolling shutter, 30 fps, 4000 × 3000 resolution (LS-CMR-0166)LS-CMR-0166
Sensor format
1/1.7"
Interface
USB3
Resolution
12 MP
Shutter
Rolling
$560.00View partBuild a system with it

The LS-CMR-0166 supplies the 4000 × 3000 resolution at 30 fps over USB3 used in this example, on a 1/1.7" sensor.

If these numbers sit near your part, the path is short: set the focal length with the calculator above, choose the camera in the camera configurator, and browse the systems guides for the calibration and program-structure steps that come after the fit.

Questions

Does a taught rectangle still find the part's angle after a 180-degree rotation?

A rectangle and a ring look identical rotated 180°, so a shape fit returns the angle modulo 180° and the robot can approach with the gripper turned around. Add an asymmetric feature — one hole, a flat or a notch — to the taught model, or make the gripper symmetric, and the ambiguity disappears without slowing the locate.

Can one taught shape tell two similar parts apart?

Only by size. Gate the found dimensions to about ±5 % and two parts count as different when any taught dimension differs by more than that — a 40 mm ring against a 38 mm one passes, for example. Look-alikes with equal dimensions need a second feature: a hole pattern, a flat or a code.

Is strobing the light required, or is a constant-on setting enough?

Constant-on at a fixed intensity is enough when the part stops for the photo. Strobe earns its place when the part is still moving: a 1 ms flash inside a 0.5 ms exposure freezes motion that constant-on light would smear, and it swamps shop lighting so the fixed setting survives a bright plant floor.

What calibration does a wrist-mounted camera need before shape fitting?

A hand-eye calibration that ties image coordinates to the robot flange: you capture a calibration target at several robot poses and the solver produces that transform. Every pick error you measure afterwards includes the robot's own repeatability, so quote accuracy for the whole cell rather than for the camera alone.