System designHow-to

Camera locate on a big table: divide zones and loop until empty

Cover a big table with camera locate: split it into zones the size of one snapshot, loop each zone until no parts are found, and fix weak detection.

LumaSpec Vision12 min read Share on LinkedIn

On this page 9 sections
  1. 01Why one snapshot cannot cover the whole table
  2. 02Size the zones with the arithmetic
  3. 03One calibration and one snapshot height for every zone
  4. 04Program the loop until empty
  5. 05Make zone two detect as well as zone one
  6. 06When to add cameras instead of zones
  7. 07Checks before the first full sweep
  8. 08Where the zone-and-loop answer stops
  9. 09Questions

A camera that finds every part in one corner of the table and then reports nothing is the standard big-table picking problem. The fix is not ten hand-tuned snapshot points. It is one calibration, a zone grid sized to a single snapshot, and a loop that runs camera locate in each zone until it comes back empty. This guide gives you the zone arithmetic for a 1200 × 800 mm table, the loop structure that survives zone two, the lighting fix for aluminium parts on a black mat, and the point at which adding cameras beats adding zones.

Why one snapshot cannot cover the whole table

A vision sensor returns a fixed number of pixels, so coverage and detail trade against each other. A 5 MP sensor reads about 2448 × 2048 pixels. Spread across a 400 mm wide snapshot, that works out to 400 / 2448 ≈ 0.16 mm per pixel, and a 40 mm part spans roughly 245 pixels — plenty of edge for the matcher to hold. Spread the same sensor across a 1200 mm table and each pixel grows to about 0.49 mm. Edges that were three pixels wide become one, and locate starts missing parts it previously found.

The second limit is the workplane. The calibration board teaches the camera the height and scale of one plane, and the size-and-position math only holds at that height. Raising the camera changes the scale of everything beneath it.

So keep the snapshot at calibration-board size and tile the table. Zones are not a workaround here; they are how the camera keeps the resolution and the scale it was calibrated for.

Size the zones with the arithmetic

Two inputs decide the layout: the snapshot footprint and the overlap between zones.

step_x = fov_x × (1 - overlap) columns = ceil((table_width - fov_x) / step_x) + 1 rows = ceil((table_height - fov_y) / step_y) + 1

Worked example. Say the snapshot area is exactly the calibration board — 400 × 300 mm — with the camera 400 mm above the table, and the table measures 1200 × 800 mm. With 20% overlap:

  • step_x = 400 × 0.8 = 320 mm and step_y = 300 × 0.8 = 240 mm
  • columns = ceil((1200 − 400) / 320) + 1 = ceil(2.5) + 1 = 4
  • rows = ceil((800 − 300) / 240) + 1 = ceil(2.08) + 1 = 4
  • Total: 4 × 4 = 16 snapshot positions

Zero overlap would tile the table in 3 × 3 = 9 shots, but a part centred on a boundary is cut in half in both frames — two picks or none. The 20% overlap guarantees every part sits fully inside at least one frame, which is what the seven extra positions buy.

Check the lens while you are here. For a 2/3" sensor 8.8 mm wide, magnification m = 8.8 / 400 = 0.022, so f = WD × m / (1 + m) = 400 × 0.022 / 1.022 ≈ 8.6 mm — the 8 mm lens class. The lens focal length calculator runs the same numbers from your own sensor and working distance.

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

Height discipline closes the layout: position error grows as error ≈ r × Δh / WD, where r is how far the part sits off the image centre and Δh is its height above the calibrated plane. A part 10 mm proud and 150 mm off-centre lands 150 × 10 / 400 ≈ 3.8 mm from its computed position. Level the table so the part plane stays within about 2 mm of the calibration plane, and the same part drifts 0.75 mm.

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.

Shutter type matters once the robot carries the camera. The MV-SC5060XM-08M-WBN is a 6 MP mono smart camera with an 8 mm M12-mount lens on GigE, and its rolling shutter is fine here because the robot is fully stopped for every snapshot. The MV-SC3050XC-16M-ATN-H beside it is the 5 MP global-shutter alternative on Fast Ethernet for arms that still settle when the frame fires.

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 MV-SC3050XC-16M-ATN-H 5 MP color vision sensorMV-SC3050XC-16M-ATN-H
Interface
Fast Ethernet
Resolution
5 MP
$1,809.00View part

A longer lens shrinks each snapshot and raises the zone count, trading sweep time for edge detail on small parts. The MV-SCB007EC-12S-WBN ships with a 12 mm lens and manual focus for exactly that trade.

Smart cameras & vision sensorsHikrobot MV-SCB007EC-12S-WBN SCB vision sensor, 1.6 MP, Color, 12 mm lens, Manual focusMV-SCB007EC-12S-WBN
Interface
Fast Ethernet
Resolution
Up to 3 MP
Sensor format
1/2.9"
Shutter
Global
$1,989.00 · quotedView and quote

One calibration and one snapshot height for every zone

Calibrate once, at the first zone. Because every zone sits on the same workplane at the same height, that single calibration covers the table. Re-teach only when the camera, the lens, the focus or the plane height changes.

Then teach one approach waypoint per zone: directly above the zone centre, at the calibrated height, camera looking straight down, with the same in-plane rotation every time. Sixteen zones means sixteen approach poses; keep them in an indexed list so the loop can step through them.

Two snapshot-position settings confuse this build, and neither belongs in it:

  • The snapshot_position_offset parameter shifts the taught snapshot along Z. It exists for workplanes at different heights, which a single flat table does not have.
  • The ignore_snapshot_position=True script flag releases the node's built-in move to its taught snapshot pose, so the node shoots from wherever the robot already stands. Use it only when the pose you arrive at is already at the calibrated height and square to the table — which is exactly what the per-zone approach waypoints guarantee.

Orientation entering the zone matters as much as position. Locate tolerates a few degrees of in-plane rotation, but a wrist that arrives twisted relative to the table degrades detection enough to miss parts. Always enter through the taught approach waypoint; never come into a zone from wherever the previous pick left the arm.

Program the loop until empty

  1. Enter the 16 approach poses from the worked example as an indexed waypoint list.
  2. Initialize the counters in a script line before the loop starts: zone_index = 0, picks = 0. A while condition that reads an undefined variable is what throws "while is not defined"; the variables must exist before the loop reads them.
  3. Move to the approach waypoint for zone_index.
  4. Run locate from there and read one of two results: parts found in this frame, or none.
  5. On parts found, pick each located part in the order returned. Run the place and machine-handshake subprograms — door interlocks, the M-code that starts the CNC cycle — after the place, then loop back to step 4 in the same zone.
  6. On no parts found, the zone is empty. Increment zone_index and travel to the next approach waypoint.
  7. After the last zone, report the pick count and stop. Re-running the sweep over the emptied table — sixteen zones, sixteen "no parts", zero errors — is the proof that the logic closes.

Two structural rules keep the loop alive through a full shift. First, give the exit of every pick its own clear waypoint: an arm that leaves a pick twisted through the middle of the next zone's field enters that zone in a pose the matcher has never seen. Return to the current zone's approach waypoint first, then travel. Second, keep handshake subprograms at fixed points in the pick sequence, never between the snapshot and the read of its result, so a door cycle cannot interrupt a frame in progress.

The same loop runs a tray: loop vision locate until no parts are found applies the identical pattern at tray scale.

Illustrative cycle estimate: a zone visit costs about 1.5 s of travel plus 1.0 s of snapshot and detection, and each zone is visited once per pick batch plus once to confirm it is empty — call it two visits, so 32 visits × 2.5 s ≈ 80 s of scanning overhead per sweep. Forty picks at 3.5 s each add 140 s, putting the sweep near 220 s, of which scanning is 80 / 220 ≈ 36%.

Make zone two detect as well as zone one

The classic failure: zone one finds parts all shift, zone two reports none while parts sit in plain sight. The program is innocent — the two frames differ. Test in this order.

  1. Lighting differs between zones. Overhead fixtures reflect in the aluminium as bright blobs, and the robot's own body shades part of the far zone at its snapshot pose. Watch the live view in the installation menu while the program runs, save a frame from each zone and compare brightness and edge contrast side by side.
  2. The background is not uniform. A rubber mat with any sheen changes grey level where it is worn or stretched; a matte dark felt holds one tone across the table.
  3. Only then the match threshold. Lower it in steps of about 10% while watching the live view; the moment wrong detections appear on the empty mat, you have passed the useful floor.

Aluminium is the harder half of that pairing. It is specular: a hard overhead light creates hot spots and edges whose contrast shifts with every robot pose. Diffuse the light and the same part reads as an even mid-grey on a near-black background, the strongest contrast you can hand the matcher. Shade the bright ceiling fixtures, add a diffuse dome or flat-diffuse source, and keep the result identical in every zone. The ambient light control guide covers the room-light half of that job, and lighting shiny metal without glare covers the part.

The MV-SC6050C-08M-XBN carries an integrated multi-color light source alongside its 8 mm M12-mount lens, so every zone is lit by the same controlled source instead of the room.

Smart cameras & vision sensorsHikrobot MV-SC6050C-08M-XBN SC6000 Series Smart Camera, 5 MP, Color, 8 mm focal length, M12-mount, Multi-color light sourceMV-SC6050C-08M-XBN
Interface
GigE
Resolution
5 MP
Sensor format
1/1.45"
Shutter
Global
$3,449.00 · quotedView and quote

When to add cameras instead of zones

The worked example put scanning at 36% of the cycle. If the takt tolerates a four-minute sweep, one moving camera is the cheapest build and you are done. If the part flow cannot wait, or the table must keep receiving parts while the arm scans, stop adding zones and split the coverage instead.

Two to four fixed cameras, each owning a strip of the table, remove the zone travel entirely and run their locate calls in parallel. The same multi-position logic works from a wrist-mounted camera when a fixed mount cannot see the whole table — see multiple wrist camera snapshot positions. A smart camera runs single-camera locate on the device; the multi-camera build wants a controller with the LAN ports, PoE and light-channel budget to match, which the vision controllers page filters by port count.

Specification MV-VC2140-128G40-1T MV-VC3301H-128G66 MV-VC5525-256G70-NN
CPU Intel® Processor N97 Intel® Core i3-8100 Intel® Core i5-12400
Memory 8 GB 8 GB 32 GB
Storage 128 GB SSD + 1 TB HDD 128G SSD 256 GB SSD
GPU Intel® UHD Graphics Intel® HD Graphics 630 Intel® UHD Graphics 730
Operating system Unactivated 64-bit Windows 10 LTSC 21H2 Windows 10 64-bit, Not activated Unactivated Windows 10
Encryption method Not support VM6200Pro license key –
Video output HDMI interface × 1, VGA interface × 1; Supports independent display outputs at the same time; Max. resolution 1920 × 1080 @ 60 Hz HDMI interface × 1, VGA interface × 1; Supports independent display output at the same time; Max. resolution 1920 × 1080 @ 60 Hz HDMI interface × 1, VGA interface × 1; Supports independent display output at the same time; Max. resolution 1920 × 1080 @ 60 Hz
Digital I/O Opto-isolated input × 8; Opto-isolated output × 8 8 digital isolated inputs supported; 16 opto-isolated outputs supported (NPN/PNP switchable) Opto-isolated input × 8; Opto-isolated output × 12 ( supports NPN/PNP switching), digital-isolated low-side driver output × 8; Non-isolated bi-directional differential I/O × 4
Light interface Light interface with 24 VDC constant voltage × 4; (Brightness is adjustable. Max. current 3 A for single light interface, and total max. power consumption 80 W. Supports light mode switching between strobe and solid via external control) 4-channel 24 V constant-voltage light drive, Max. power per channel: 72 W, Max. power (4 channels): 150 W 24 VDC constant voltage × 8; (Max. power consumption of single channel is 72 W, total max. power consumption 190 W)
Network interface GigE interface × 4 6× Gigabit Ethernet ports GigE interface × 7, including interface for PoE × 4
USB Interface USB 2.0 × 2; USB 3.0 × 2 USB 2.0 × 4; USB 3.0 × 4; Built-in USB 2.0 × 1 USB 2.0 × 4, USB 3.0 × 4, built-in USB 2.0 × 1
Serial Port RS-232 × 1, supports switching to RS-485 or RS-422 2× full-function RS-232, RS-485/RS-422 switchable RS-232 × 2 by default, supports switching to RS-485 and RS-422
Price $1,679.00 $2,419.00 $4,479.00 · quoted

All 3 share: Certification CE, KC. Values as printed in each product's data sheet; open a part for its drawing and full specifications.

A controller with three or four LAN ports covers one or two cameras plus the plant network; a five-plus-LAN controller takes four cameras without an external switch, and built-in light channels keep the wiring off the table.

Checks before the first full sweep

  • Empty-table run: every zone returns no parts, the count reads zero and no pop-ups fire. That is the proof the loop logic closes.
  • One part per zone: place one part in each of the 16 zones and expect 16 finds and 16 picks.
  • A boundary part: lay a part across a zone edge inside the overlap band; it must be found exactly once.
  • Plane height: gauge the part plane at the four table corners and keep it within about 2 mm of the calibration plane — the 0.75 mm drift figure from the layout math.
  • Pose: enter every zone through its taught approach waypoint with the camera square to the table.
  • Margin: after a full production shift, every zone still finds its parts and the empty mat still returns nothing.

Where the zone-and-loop answer stops

Stacked or touching parts defeat a top-down frame, which cannot count a second layer — that is a bin-picking problem, and choosing a vision approach for flat parts covers the move to height data. Parts at mixed heights across the table need per-zone height offsets or a per-zone calibration, because a single-plane loop computes wrong positions for anything off the plane. Deeply curved or mirror-finish parts can exhaust even diffuse lighting; dome lights for shiny, curved and wrinkled parts is the next tool up. And when a program that passes in teach starts failing at run time, check the stream-versus-snapshot settings described in why locate works in teach but fails at run time.

For a one-camera cell, start from the camera finder and size the zones with the formulas above. For the multi-camera build, configure a vision system around the port count, or send table size and a part drawing through the quote page. More patterns like this live on the systems topic page.

Questions

How much overlap do I need between camera locate zones?

Plan 15-25% of the snapshot width. A 400 mm snapshot with 20% overlap steps 320 mm per column. The overlap exists so a part lying across a boundary is fully visible in at least one frame; with zero overlap, two zones can each see half of the same part and both trigger a pick.

Does every zone need its own calibration?

No. One calibration covers the table as long as every zone sits on the same workplane and the camera returns to the calibrated height. Re-teach only after a lens, camera, focus or plane-height change. Prove it by picking at the farthest corner and measuring the placed position against a known reference.

Why does locate find parts in zone one but not in zone two?

Usually the far zone is shaded by the robot at its snapshot pose, or an overhead light reflects in the aluminium there, so the frame the matcher sees differs from the taught one. Compare saved frames from both zones in the live view, then fix the lighting before adjusting the threshold.

Can I just raise the camera to cover more table per snapshot?

You can, and you pay in resolution. Millimetres per pixel scale with the field width: the same 5 MP sensor that resolves 0.16 mm per pixel over a 400 mm snapshot reaches only about 0.49 mm per pixel over 1200 mm, and thin edges drop below the two or three pixels the matcher needs.

What is the difference between a snapshot-position offset and ignoring the snapshot position?

An offset shifts the taught snapshot along Z, which matters when workplanes sit at different heights. Ignoring the snapshot position removes the automatic move to the taught pose, so the node photographs from wherever the robot already stands. On one flat table you use neither: teach a per-zone approach waypoint at the calibrated height and shoot from there.

When do several fixed cameras beat one moving camera?

When scanning time starts to compete with the takt. If zone travel and snapshots take more than roughly a quarter of the cycle, or the table must keep receiving parts during a sweep, split the area between two to four fixed cameras on a controller with PoE camera ports and run one locate per camera in parallel.