ApplicationsApplication note

Teach objects on an inclined work plane: calibrate at part-top height

Calibrate the camera on the inclined plane at bottle-top height and teach a stand-in top face, so the vision system finds every bottle in the carton.

LumaSpec Vision10 min read Share on LinkedIn

On this page 9 sections
  1. 01Can a vision system locate parts on an inclined work plane?
  2. 02Why do bottles taller than the calibration plane mislocate?
  3. 03How do you calibrate at the height of the bottle tops?
  4. 04What do you teach when the real part is too tall?
  5. 05Which camera and lens cover an inclined carton opening?
  6. 06How does the robot pick accurately on the inclined plane?
  7. 07How do you verify the teach before production?
  8. 08When does the part-top workaround fail?
  9. 09Questions

Bottles standing loose in an inclined carton are a classic first vision job: the robot must find each cap, pick it with a suction cup, and leave its neighbours alone. The catch is geometry. A camera taught at the carton bottom mislocates every cap, because the caps sit tens of millimetres above the taught plane and the projection error grows with that gap. The fix used in working de-packing cells is to calibrate on the inclined plane at cap height, then teach a stand-in of the top face. This page works the set-up through with numbers: the parallax budget, the field of view and lens choice, the robot frame, and the bench checks that decide go or no-go before a bottle is ever picked.

Can a vision system locate parts on an inclined work plane?

Yes — the work plane can have any orientation: lay the calibration board flat on the inclined plane itself, calibrate there, and every position the vision system returns is expressed in that tilted plane's coordinates.

The board, not gravity, defines the frame. The calibration maps camera pixels to board coordinates across the board's plane, so a 30° carton tilt is no harder than a flat bench. The constraint is mechanical: the robot must hold one saved snapshot pose that sees the whole opening and can also be reached with the board in place. On a wrist-mounted sensor that is a single robot position; on a fixed camera it is simply the mount. Choosing good poses for a camera the robot carries is its own craft — the eye-in-hand pose selection guide covers it. Teaching the plane itself, rather than expecting a level table, is the same principle behind the hanging robot vision calibration guide.

Why do bottles taller than the calibration plane mislocate?

A bottle top standing 40 mm above the calibrated plane is projected onto that plane along the camera axis, so with the camera 35° off the plane normal the found position shifts by 40 × tan(35°) ≈ 28 mm — several times a suction cup's lateral tolerance.

The calibrated mapping projects every image point onto the board's plane. A cap above the plane is projected along the camera axis, so its reported position is displaced by cap height times the tangent of the angle between camera axis and plane normal. With the carton inclined 35° from horizontal and the camera looking straight down, that angle is 35°.

Cap height above the plane Shift at 10° off-normal Shift at 20° Shift at 35°
15 mm 2.6 mm 5.5 mm 10.5 mm
40 mm 7.1 mm 14.6 mm 28.0 mm

A bellows suction cup forgives roughly ±5 mm of lateral offset, so 28 mm is a miss or a crushed neighbour. Two levers shrink the error: view close to the plane normal, and calibrate at cap height so the gap collapses to the scatter between caps. The geometry in the lens section sets the angle; the calibration steps below set the height.

How do you calibrate at the height of the bottle tops?

Save the snapshot position first, then run the calibration with the board lying flat on the inclined plane at the height of the bottle tops — resting on the caps themselves or on a spacer frame of the same height, kept within 3 mm of it.

  1. Save the snapshot position: robot pose, focus and exposure, exactly as production will run.
  2. Lay the calibration board flat on the inclined plane at cap height, supported by the caps or a rigid spacer frame of the same height.
  3. Run the calibration from the saved snapshot position.
  4. Gauge the board height against cap height at three spots; correct any gap above 3 mm.

Board height sets the depth reference. A board sitting 10 mm low shifts every found position by 10 mm along the view direction, but it shifts all of them equally, so a one-time offset in the robot frame absorbs it. What no offset absorbs is a board tilted relative to the caps, so seat the board on the caps where you can.

What do you teach when the real part is too tall?

Teach a stand-in of the top face: cut the bottom 10 mm off a spare bottle and teach that short piece on the calibrated plane, or lay a flat background across the carton and teach a paper disc the diameter of the cap.

The model the system stores is an image of the top face at the calibrated height, so anything presenting the same face at the same height teaches identically. Production bottles are then found by that face. The paper-disc route swaps the part for a printed circle, handy when caps change often: you print a new disc instead of cutting up stock bottles.

Contrast does the work. Keep the background uniform and far from the cap colour, keep the disc diameter within a millimetre or two of the cap, and matte the surface so lamp glare cannot reshape the circle. Teaching the identifying feature rather than the whole part is a general trick — the teach-by-feature guide applies it to long, thin parts.

Which camera and lens cover an inclined carton opening?

Size the field to the carton opening plus 15% margin and aim for 6 px/mm: a 320 × 220 mm opening at 550 mm working distance needs a 368 × 253 mm field and puts 390 px across a 65 mm cap.

m = sensor width / field of view f = WD × m / (1 + m) DOF ≈ 2 × f-number × allowed blur / 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.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.

Worked example, assumptions in the open: 320 × 220 mm opening, 550 mm working distance, a 1/2-inch-class sensor 6.4 × 4.8 mm with 2,592 × 1,944 pixels (5 MP in the 4:3 layout), a 65 mm cap, and ±15 mm of cap-height scatter.

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

An 8 mm M12-mount lens is a standard part, so a compact smart camera covers this geometry. The MV-SC5060XM-08M-WBN is a 6 MP mono smart camera with an 8 mm M12-mount lens. At the 550 mm working distance of the example, an 8 mm lens frames 434 × 325 mm at 6.0 px/mm.

Colour helps when the teach uses a paper disc: the disc can be a colour the caps never show. The MV-SC3050XC-16M-ATN-H is a 5 MP colour vision sensor with a global shutter and M12 mount, and the MV-SC6050C-08M-XBN pairs 5 MP colour with an 8 mm focal length and a built-in multi-colour light source. Side by side, the series choices are:

Specification MV-SC3050XC-16M-ATN-H MV-SC6050C-08M-XBN MV-SC5060XM-08M-WBN
Communication protocol RS-232, TCP, UDP, FTP, PROFINET, Modbus, EtherNet/IP, MELSEC/SLMP, FINS, Keyence KV TCP, UDP, MODBUS, Serial Port, PROFINET, EtherNet/IP, Fins, MC, FTP, etc. TCP, UDP, Modbus, Serial Port, PROFINET, EtherNet/IP, Fins, MC, FTP, etc.
Sensor type CMOS, global shutter CMOS, global shutter CMOS, rolling shutter
Pixel size 3.45 μm × 3.45 μm 3.45 μm × 3.45 μm 2 μm × 2 μm
Sensor size 1/1.45" 1/1.45" 1/2.4"
Resolution 2432 × 2048 2432 × 2048 3200 × 1920
Max. frame rate 40 fps 80 fps 15 fps
Gain 0 dB ~ 15 dB 0 dB to 18 dB 0 dB to 34 dB
Exposure time 6 μs ~ 1 sec 16 μs to 1 sec 72 μs to 150 ms
Pixel format RGB 8, Mono 8 Mono 8, RGB 8 Mono 8
Mono/color Color Color Mono
Data interface Fast Ethernet (100 Mbit/s) Gigabit Ethernet (1000 Mbit/s) Gigabit Ethernet (1000 Mbit/s)
Digital I/O 12-pin M12 connector for power and I/O: 3 opto-isolated inputs (LINE0/1/2 input), 3 opto-isolated outputs (LINE3/4/5 output), 1× RS-232 interface; Device trigger via top button supported 17-pin M12 connector provides power and I/O, including opto-isolated input × 2 (Line 0/1), opto-isolated output × 2 (Line 4/5), configurable non-isolated input/output × 2 (Line 2/3), RS-232 × 1, and light source output (max. 30 W) × 1 12-pin M12 connector provides power and I/O, including opto-isolated input × 3 (Line 0/1/2), opto-isolated output × 3 (Line 3/4/5), RS-232 × 1
Price $1,809.00 $3,449.00 · quoted $1,629.00

All 3 share: Power supply 24 VDC; Humidity 20% RH to 95% RH (no condensation); Certification CE, KC. Values as printed in each product's data sheet; open a part for its drawing and full specifications.

How does the robot pick accurately on the inclined plane?

Give the robot a user frame whose XY plane coincides with the calibrated inclined plane and whose Z runs along its normal, then approach every pick along that normal from 30 mm of clearance so the suction cup lands square on the cap.

The vision system returns cap positions in the board's coordinates; a user frame laid on the same plane turns them straight into motion. Build the frame from the calibration result or from three touched points on the inclined plane, and write the found XY into it unchanged. Configuring an inclined plane as the working frame is a standard controller job — the robot user frame guide for an inclined pick plane walks the set-up. Approach each pick along the plane normal: descend from the 30 mm clearance point, apply vacuum, lift vertically, and only then clear the carton wall. The full image-to-gripper cycle, including handshake timing with the robot, is laid out in the 2D vision-guided pick and place cycle guide.

How do you verify the teach before production?

Before the first live pick, run a placed-bottle test: bottles on a grid across the opening, found-versus-actual error at or under 2 mm, and cap-height scatter measured so the parallax shift stays inside the suction cup's tolerance.

  • Found-versus-actual. Mark one cap, read the reported position, and measure the true cap centre in board coordinates; accept 2 mm or less, and re-check after any fixture change.
  • Height scatter. Depth-gauge cap heights at ten positions. Multiply the scatter by the tangent of your off-normal angle — at 10°, ±15 mm of scatter moves finds ±2.6 mm — and keep the result inside the cup's ±5 mm.
  • Worst-case tilt. Repeat the test at the shallowest tilt the cell will see. Each tilt angle is a different plane: save one snapshot position and calibration per angle rather than sharing one.
  • Ambient light. Run the test under the lights actually on at shift time, including daylight through doors; the ambient light control guide covers shielding and exposure discipline.

Build this test as a bench mock before it reaches the cell: the camera stands range includes the LS-MNT-0001 slope-angle slide, which holds a tilted mock-up at a set angle, and the LS-MNT-0040 stand, whose 700 mm column suits an overhead snapshot pose.

Camera standsSlope-angle slide, manual tilt stage (LS-MNT-0001)LS-MNT-0001
Type
CCD camera stand and positioning stage (LS-MNT-S01)
$339.00View part
Camera standsMachine vision camera stand, professional slide-table type, height 700 mm, 400 x 450 mm base (LS-MNT-0040)LS-MNT-0040
Type
Camera stands
$629.00View part

When does the part-top workaround fail?

The workaround fails when the caps stop behaving like one plane — height scatter beyond roughly 15 mm seen more than about 10° off-normal — or when the top face itself is unreliable: domed, glossy, open or missing.

  1. Caps at several heights. Mixed bottles or a half-empty carton scatter cap heights past one plane's budget. First move the camera onto the plane normal, so scatter costs defocus only; then save one snapshot position and calibration per height band, as the one snapshot per layer guide does for stacked trays. Past two bands, quote a 3D sensor — the 3D versus 2D decision guide sets out where the switch pays back.
  2. Unreliable top face. Domed caps, glossy shrink film and open bottles deny the model its circle. Polarized light removes cap glare; a smart camera with polarized white light such as the LS-SMC-0063 suits shiny targets.
  3. Carton distortion. Leaning bottles shift cap positions as picks empty the box. Empty rows first, or re-run the scatter test at half-empty, when neighbours lean furthest.

Decision: for a single-tilt carton of one bottle type with caps within ±15 mm of one height, this plan is the whole project — one calibration at cap height, one stand-in model, one user frame, one placed-bottle test. Beyond that, step up the sensor before complicating the teach.

Start with the smart cameras category or the camera configurator to match sensor, lens and mount to your carton; for a multi-tilt cell, use the contact page. The applications topic page gathers more worked cells like this one.

Questions

Why not calibrate on the carton floor and shift the found positions in software?

A fixed offset only relocates the plane; it cannot correct a projection error that changes with each part's height. Bottles stand at slightly different heights, so their errors differ by millimetres and one offset fixes none of them exactly. Calibrating on the cap-height plane removes the error at its source and leaves only the scatter between tops to manage.

Does the calibration board have to fill the whole image?

Yes. The board must reach the edges of the frame at the snapshot position, or the calibration has no reference points out there and the mapping stretches toward the borders. Use a board about 10% larger than the computed field in both directions, mount it flat, and retire any board that bows — a bowed board bends the calibrated plane with it.

Do I need a global shutter camera for parked snapshots?

Not for this set-up. The robot is parked when the image is taken, so a rolling shutter sees a still scene and adds no distortion. Global shutter becomes necessary when images are captured during robot or conveyor motion, so choose it only if you later move to on-the-fly picking.

Do I have to re-teach when the cap or bottle changes?

Re-teach the model, not the calibration. The calibration depends on the board, the snapshot pose and the plane height, none of which a new cap changes. Teach the new cap diameter as a fresh model, re-run the placed-bottle test, and re-calibrate only after a fixture, tilt or camera change.

What exposure should the snapshot use?

Start at 20 ms. The robot is parked, so speed costs nothing, and 20 ms spans two half-cycles of 50 Hz mains lighting, which suppresses the banding that overhead lamps cause. If found positions wander between identical scenes, halve the exposure and add light or strobe rather than lengthening it.