A locate that passed on the white bench top fails the moment the part rides a textured belt: scores dip, matches wander onto weave lines, and the robot idles. This is the everyday case when a team adds smart cameras or a wrist camera to a conveyor pick, and the fix is rarely a better algorithm. Teach on the right background, then beat the texture optically — light color, geometry, strobe timing — and numerically, with a threshold that carries margin. The numbers that decide it are below: a 40-gray-level separation rule, light angles and distances, a 0.33 ms exposure example, and the acceptance run that keeps the locate holding through a full shift.
Why does the locate pass on the bench but fail on the belt?
The bench image contained nothing but part edges, while a textured belt adds thousands of weave edges at the same scale as the part's own features, so the matcher's score drops below the accept threshold and false matches start appearing on the weave.
The symptoms arrive in a familiar order: score dips that come and go as the belt drifts, matches snapping to weave lines a few millimetres from the true part, and a locate that passes while the belt is stopped but fails while it runs.
Rank the causes before touching software. First, directional light: a small panel high above the belt casts a miniature shadow behind every bump, so texture contrast rivals the part's own edge contrast. Second, teach data: if any template or training image carries belt background, the matcher demands it back. Third, ambient mixing: hall light adds a shifting gray floor on top of the strobed image, moving the belt's brightness between teach and run; the ambient-light guide for pick and place covers that drift.
The fast test is a score histogram: capture 30 images on the running belt under production light and plot the locate scores. Two clusters, high and low, point at lighting; one tight low cluster points at a template that never really matched.
Bare steel judged against bare steel is a different problem; metal part on metal background lighting handles the reflective case. A textured belt is a busy diffuse background, and it yields to different levers.
Should you teach the model on the textured belt?
No. Teach the part on a uniform background such as a matte white sheet, using the same camera, distance, angle and light you will run in production, because a template taught on the belt carries texture edges that wear, scuff and shift shade within weeks.
A pattern-match template bakes its strongest gradients into the model. Taught on the belt, the weave becomes part of what the matcher demands, and the belt scuffs, polishes and gets re-dressed, so those gradients quietly disappear. Taught on a uniform sheet, the model contains only part edges, and any background that stays under the threshold works. That is the whole trick: the belt's only job is to stay below the line, not to look like teach day.
The teach routine: lay a matte white or mid-gray sheet across the lane, light it exactly as production will, place the part at the production distance and angle, and teach across several rotations so the model survives part yaw; the rotation-survival setup for robot picking shows why the rotations matter. Keep the sheet with the cell for re-teaches. Before teaching anything, run the checks in the vision locate feasibility checklist; if a bench-taught locate already misbehaves live, the teach-versus-run-time guide sorts out the stream and snapshot causes.
What makes the belt texture show up in the image?
Texture appears because a small light source casts a miniature shadow behind every bump: a 0.5 mm high weave ridge lit at 60 degrees from vertical casts a 0.9 mm shadow, and those shadows land in the image as edges the matcher can false-match.
For that 0.5 mm ridge: 45 degrees from vertical casts 0.5 × 1.00 = 0.5 mm of shadow; 60 degrees casts 0.5 × 1.73 = 0.9 mm; 75 degrees casts 0.5 × 3.73 = 1.9 mm. Grazing light quadruples texture contrast, which is why it is the right tool for scratches and the wrong one for hiding a belt.
Two levers shrink the shadows: widen the source so light arrives from many angles at once (diffusion), and steepen the angle so each shadow shortens. A woven belt also carries an albedo pattern — strands of different reflectance — which no angle removes; threshold margin handles that one, in the next section. Both levers fit the general framework in lighting geometry for image contrast, and the rest of the geometry recipes sit on the lighting topic page.
How much gray-level separation does the threshold need?
Aim for at least 40 gray levels between the dimmest pixel on the part and the brightest pixel of the belt texture in an 8-bit image, about 16% of full scale, then set the locate threshold midway; a smaller gap loses to texture as the belt ages.
Measure on the running belt, not on the bench. Capture 30 frames under the production light and read two numbers off the histogram: the brightest texture pixel anywhere in the frames, and the dimmest pixel inside the part.
Worked example: under steep, diffused red light, the belt texture never exceeds 108 and the brushed steel part never drops below 148. The gap is 148 - 108 = 40 levels, right at the rule, and 40 / 255 is about 16% of the 8-bit range. Set the threshold midway: 108 + (148 - 108) / 2 = 128. That holds 20 levels of margin to the texture and 20 to the part. With a strobed, narrowband light, frame-to-frame drift runs a few levels, because both drift sources — LED drive and ambient — are pinned.
What eats the gap: an oil sheen lifts the brightest texture pixels, wear shifts the belt's albedo, and unblocked ambient spreads every frame a little. Re-measure at maintenance stops.
If the gap measures under 40, change the light — the next two sections — before touching the threshold. Software comes last: a local variance filter can rank texture out of uniform regions, but treat it as margin, never as the cure for a 15-level gap.
Which light color keeps the steel bright and the belt flat?
Default to a red diffused light on a monochrome camera: steel reflects red strongly, a matching red bandpass filter on the lens blocks ambient light completely, and red LEDs deliver the most photons per milliamp, so the belt settles to a flat mid-gray under a stable exposure.
Monochrome is the point: one gray value per pixel, no color filter array interpolating across the texture. 1.6 MP on a mono, global-shutter sensor is ample at the sampling this guide uses:
- Interface
- Fast Ethernet
- Resolution
- Up to 3 MP
- Sensor format
- 1/2.9"
- Shutter
- Global
Pair the red light with a red bandpass filter on the lens. Hall light and daylight carry almost no energy inside a narrow red passband, so the belt's gray level stops drifting between day and night shift; the pairing is worked through in bandpass filter with red LED light to block ambient light, and the bright-versus-dark mechanics in light color and monochrome camera contrast.
If the belt itself is colored, choose the color it absorbs. Steel reflects across the whole visible band, so it stays bright under any of them; the belt goes where its albedo sends it — the per-color logic is tabulated in part and lighting color to maximize grayscale contrast.
| Belt surface | Light color | Belt turns | Steel part |
|---|---|---|---|
| gray rubber or PVC | red + bandpass | flat mid-gray | bright |
| yellow PVC | blue | dark | bright |
| green PVC | red | dark | bright |
| blue rubber | green | dark | bright |
For a wide lane, one long diffused red bar covers the field from a single side:
- Size
- 400 mm +
- Type
- Diffused
- Voltage
- 24 V
Infrared bars — 850 nm and 940 nm are the common bands — do the same job without lighting up the workcell.
A printed pattern — colored flecks, logos, scuff paint — is the exception no light angle fixes, because the contrast lives in the belt's own reflectance. That is the one case where a color camera and hue segmentation beat gray-level thresholding:
- Interface
- Fast Ethernet
- Resolution
- 5 MP
- Sensor format
- 1/1.45"
- Shutter
- Global
The same hue-separation logic, worked step by step on colored cup rims, is laid out in a colored-rim locate built from scratch.
Where should the lights sit to flatten the texture?
Mount two diffused bar lights opposite each other, aimed so light lands 30 to 45 degrees from the belt's vertical, 100 to 200 mm above the surface: steep, wide and close fills the micro-shadows that a single distant panel casts.
Start with the bars 150 mm above the belt, then swing them between 30 and 45 degrees from vertical while watching the belt's peak-to-peak spread in a live histogram; stop when the spread stops shrinking. Closeness beats brightness: halving the mounting distance doubles the angular spread over the field and quadruples the illumination, with no extra current.
Grazing is the opposite geometry with the opposite goal: below about 20 degrees from the surface, light exaggerates every relief mark — exactly what low angle bar lights for scratch detection exploits on purpose. The figure shows the two geometries; hiding texture wants the bright-field side.
Keep the bars out of the camera's field and angled so no direct specular path reaches the lens; a sheet-metal shroud over the lane beats any amount of stray-light repair in software. If the belt is translucent PVC, invert the problem entirely: a diffuse panel below the belt turns the part into a black silhouette on a bright field, and the texture becomes nearly irrelevant.
Size the lit length to the lane, not the part — it should span the field of view plus wander. Filter the lights finder by diffused type and lit length, or start from these:
- Size
- 200-400 mm
- Type
- Diffused
- Size
- 200-400 mm
- Type
- Standard
- Size
- 200-400 mm
- Type
- Standard
Pick diffused when one bar must work alone; pair standard bars opposite each other when the lane allows two; use high luminance when pulses drop under a millisecond.
How big should the field of view and the pixels be?
Size the field of view at about twice the part's longest dimension to absorb belt wander, and sample at 3 to 5 pixels per millimetre: an 80 mm part then needs a 160 mm field and 0.2 mm per pixel, which 800 pixels across the narrow direction covers.
Five pixels per millimetre resolves everything a locator uses — corners, hole edges, a stamp — without resolving the weave. Finer sampling does not locate better; it sharpens the texture and multiplies the false edges, which is exactly what this setup is trying to starve.
Worked sizing: an 80 mm part, a 160 mm field (twice the part, to absorb wander), 0.2 mm per pixel. That is 160 / 0.2 = 800 pixels across, 600 in a 4:3 frame. A 1.6 MP sensor's 1440 × 1080 array covers 288 × 216 mm at the same sampling — a 1.8× width margin that absorbs lane sway without a re-teach.
Set your own part size and wander below; the calculator turns them into a pixel count and opens the camera finder filtered to sensors that have them:
How fast can the belt run before motion blur ruins the locate?
Keep blur under half a pixel: at 300 mm/s belt speed and 0.2 mm per pixel, that allows a 0.33 ms exposure, so either strobe the bar light for 0.33 ms or stop the belt under the camera for the shot.
Worked example: budget 0.5 px of blur. Allowed travel is 0.5 px × 0.2 mm/px = 0.1 mm during the frame. At 300 mm/s: 0.1 / 300 = 0.00033 s = 0.33 ms. At 150 mm/s the same budget allows 0.1 / 150 = 0.67 ms; double the speed halves the allowance.
A 0.33 ms pulse must deliver what a 10 ms exposure would — 10 / 0.33 is about 30× the irradiance — which is why short pulses want a high-luminance bar and a controller built for pulse current; the light configurator pairs lights and controllers by exactly that duty cycle. Or remove the budget: a stop-and-clamp station turns the shot into a comfortable 10-30 ms exposure. Continuous light holds only when the belt stops for each shot, or crawls — at 20 mm/s, 0.1 / 20 = 5 ms, workable with gain to spare.
What settings keep the locate holding through a full shift?
Set the threshold at the measured midpoint, prove it on 100 parts across the full speed range, and alarm when the score margin over the threshold halves — that turns belt wear into a maintenance ticket instead of a stopped line.
The acceptance run: 100 parts, belt at minimum and maximum speed, light at production current, hall lights on for half the run and off for the other half. Every part must locate; log every score. Set the maintenance alarm at the low tail of that distribution rather than at the threshold itself, so you hear about wear while margin remains.
Prevention, in the order it pays back:
- Re-measure the part-versus-texture histogram at every maintenance stop; belt polish and dressing move the texture peak first.
- Keep the bandpass filter mounted; removing it quietly re-admits ambient drift.
- Shroud the lane so hall light and sun never reach the belt under the camera.
- Re-teach only on the uniform sheet, even when the belt looks clean.
- After a splice or a belt change, rerun the 100-part acceptance before releasing the cell.
If the gap still measures under 40 levels after the optical changes, send the teach image, a close-up of the belt and the histogram through the contact page — with those three artifacts, the lighting answer usually lands in one exchange.
Questions
Does a polarizing filter remove belt texture?
No. Crossed polarizers, on the light and on the lens, strip specular sheen from a glazed or oily belt, but relief shading is diffuse reflection and survives. Budget the light loss too: a polarizer pair passes roughly half the photons, so exposure lengthens about one stop or pulse current rises.
Can image processing replace the lighting fix?
Only as margin. Downsampling 2-4x or a smoothing pass merges texture speckle, and variance filters can rank uniform regions, but a 15-level optical gap stays a 15-level gap after smoothing. Apply software only after the light meets the 40-level rule, then rerun the 100-part acceptance on the smoothed pipeline.
Can I use the belt texture itself as a locating feature?
For belt tracking, sometimes: texture correlation can report belt slip between encoder ticks. For part locate, never, because the pattern shifts with wear, tension and every splice. Keep texture out of the model, and treat a splice passage as the trigger to re-check the histogram gap.
Will a higher resolution camera beat the texture?
No. More pixels resolve the weave more sharply and multiply the false edges a matcher can latch onto. Sampling at 3-5 pixels per millimetre already captures every feature a locator uses; spend the budget on diffusion, a steeper angle or a narrower passband instead.
How often should the light and threshold be re-checked?
Measure the histogram gap at every maintenance stop and at least quarterly. The brightest texture pixel moves first as polish, dressing and oil film change; when the gap drops under 40 levels, clean or re-dress the belt before adjusting the threshold, then rerun the 100-part acceptance.





