Black dot-matrix print on a polished metal cylinder is one of the hardest OCR targets you will meet: the surface is a mirror in one direction and curved in the other, so light comes back as a moving band rather than a wash. The reflex fix — a coaxial light on the lens — burns out part of the string and starves the rest, and the image changes with every degree of part rotation. The answer is geometry: move the light off the camera axis and along the cylinder's long axis, all in one plane. This guide gives you the angles, sizes, distances and lens math to build that station, plus a spot-light variant for cramped spaces.
Why does coaxial lighting fail on a shiny cylinder?
Coaxial light fails because a curved specular surface returns the mirror image of the light as a narrow band, not a wash, and that band slides across the print with every degree of rotation, so part of the string burns out while the rest goes dark.
On a flat, matte part the coaxial set-up works because the surface scatters every incoming ray across a wide cone; some light reaches the lens from every point of the print, and camera, light and part normal share one axis. On a flat specular part it still works: the mirror sends the light straight back into the lens, which is why coaxial lights are the standard choice for engraved metal. The law of reflection is the whole story — see bright field vs dark field lighting: the law of reflection decides.
A cylinder breaks that geometry in one specific way. Walking around the circumference, the surface normal turns continuously, so only the narrow strip whose normal splits the camera and light directions reflects toward the sensor. Everywhere else, the metal shows the fixture, the ceiling and the room. With the light coaxial, camera and light sit on one axis and the set-up is effectively two-dimensional: there is no third direction to adjust. The strip lands on the middle of the print, saturates the characters under it, and slides onto new characters whenever the part stops a few degrees off. A readable image at one stop position is an unreadable one at the next.
An 80 x 80 mm narrow-angle head such as the LS-CXL-0019 is the right tool for flat engraved work; on a curved specular cylinder it is the wrong tool, for the reason above.
- Size
- 50-100 mm
- Voltage
- 24 V
Where do you move the light to fix it?
Move the light in two directions at once: away from the camera axis, and along the cylinder's long axis, keeping camera axis, light and cylinder axis in one plane; that double offset is what makes the image survive rotation.
The natural first attempt is half the fix. Slide the ring light off the camera axis but still in the direction of curvature — up or beside the print, aimed back at it. This changes the camera–light relationship, and the image improves a little: characters appear and the burnout moves aside. But the light still meets the cylinder square to the circumference, so the light–object geometry relative to the cylinder axes has not changed. The bright strip is still on the part, just offset, and it still sweeps across the print when the part rolls. Readable today, unreadable at ±10° of stop variation — not a production set-up.
The full fix adds the second, less obvious move. Keep the light in the plane that contains the camera axis and the long axis, and slide it along that axis, away from the print center. Two things happen. The direct reflection is steered along the cylinder axis, past the end of the print, instead of back into the lens across your characters. And seen end-on, down the cylinder axis, the light falls on the same line the camera views, so as far as the circumference is concerned you are back to the flat-part case: even brightness across the whole print band. Rotation slides the print under a uniform field, and the image stops depending on where the part halted.
The general framework behind this — camera, light and part positions as the three variables of contrast — is in lighting geometry for image contrast: camera, light and part positions. For picking a geometry from the surface and the feature, machine vision light geometry selection by surface and feature maps the same logic across part families.
What angle and light size should you start with?
Start at about 15° off the camera axis and walk the light out to 45°; on a polished cylinder the usable setting lands near 30–45°, with a lit length at least 1.5 times the long side of the print field.
The 15° figure is the conventional off-axis bright-field start on nearly flat targets. A curved specular surface needs more: the angle you are tuning is the one in the long-axis plane, and below about 20° the edges of the reflection strip clip the first and last characters. Past 45° the lit band narrows and the dot edges soften. Lock the light in the middle of the clean range, not at its edge, so rotation has room.
At a 150 mm working distance that offset is 150 × tan 15° = 40 mm, 150 × tan 30° = 87 mm, and 150 × tan 45° = 150 mm. The last number is the axial space the geometry consumes — plan the station around it.
For size, take the lit face of the light: 1.5× the print field on its long side is the working minimum, and more is better for uniformity. Ring lights used off-axis are the usual source because their flat face and 30°-class beam aim cleanly at the print from the side. The LS-RNG-0189 is a 120 x 80 mm ring light with a 30° beam angle. Against a 30 mm print string, 80 mm of lit face is 2.7× the string length, comfortably over the 1.5× minimum.
- Size
- 100-200 mm
- Type
- Standard
- Angle
- 30°
- Voltage
- 24 V
How do you set the station up, step by step?
Fix the camera perpendicular to the print, take one coaxial or ring-on-lens baseline image, then relocate the light in two moves while watching one metric — print-to-background contrast — and finish by rotating the part to prove the setting holds.
You need a camera and lens locked perpendicular to the print, one ring or flat light on an arm that both tilts and slides along the cylinder axis, a controller that can strobe, and the part in a fixture that rolls it a known amount.
- Mount the camera perpendicular to the print center at your planned working distance (150 mm in the example below) and focus.
- Capture the coaxial baseline with the light on the lens. Measure contrast: mean gray of the metal minus mean gray of the ink, along a line across the darkest characters. Record it — this is the number to beat.
- Move the light off the camera axis in the direction of curvature and re-check. Expect a small gain; the strip is still on the part. This step exists to show you the failure, not to fix it.
- Slide the light along the cylinder's long axis until light, camera axis and cylinder axis share one plane and the light looks at the print center from that side. Watch the burnout leave the string.
- Sweep the long-axis angle from 15° to 45° and set the light in the middle of the range where the strip stays clear of the print.
- Check end balance: mean background gray at the first and last characters must sit within 10 % of each other. A crooked plane shows up here first.
- Roll the part across its full allowed misalignment in 2° steps. The lowest contrast on the sweep must stay above 80 % of the centered value.
- Set the strobe for motion, if the part moves: exposure equals the blur budget divided by speed, worked out below.
- Lock everything, then re-run steps 6 and 7 on ten real parts, including the worst-case roll your handler produces.
A worked station: 30 mm housing, 24 mm string
Take a polished steel housing, 30 mm diameter, with a dot-matrix string 24 mm long along the axis, 3 mm characters and 0.5 mm dots. Give the string margin and the field of view is 30 x 10 mm. Use a 1/2-inch sensor, 6.4 x 4.6 mm with 1280 x 1024 pixels — 6.4 mm / 1280 = 5 µm pixels. Magnification is m = 6.4 / 30 = 0.21. With a 25 mm lens, the working distance is f × (1 + m) / m = 25 × 1.21 / 0.21 = 144 mm; call it 145 mm.
Scale on the object: 30 mm / 1280 = 23 µm per pixel. A 0.5 mm dot spans 0.5 / 0.023 = 22 pixels, seven times the 3-pixel floor a reader needs on a dot. For the light, at 35° in the long-axis plane the offset is 145 × tan 35° = 145 × 0.70 = 101 mm of axial space, with the ring's face aimed at the string.
If the part transfers at 150 mm/s, a one-pixel blur budget gives t = 23 µm / 150 mm/s = 153 µs. Set a 150 µs strobe and the blur is 150 mm/s × 150 µs = 22 µm — one pixel.
The lens, field and distance math is the same for any cylinder station; run your own numbers through the calculator.
How far back can the light sit when space is tight?
Put the spot light at twice the camera's working distance or more — 300 mm against a 150 mm camera — in the same off-axis plane; brightness, not geometry, is what you trade for the room, so use a high-luminance source.
The off-axis position eats the working envelope around the part: the light head and its arm sit exactly where the fixture, the ejector and the guard want to be. The way out is output. Keep the same angles and pull the light back along its own line of sight; spot lights hold a focused beam on the print from 2× the working distance and clear the near-part zone completely.
The trade is irradiance, which falls as the square of distance. At twice the standoff the print receives a quarter of the light, so you buy it back with source output: a high-luminance head, overdrive on the strobe, or both. The current budgeting for that is in LED overdrive and current control: stable machine vision lighting.
At 290 mm — twice the 145 mm above — a spot with a 21° lens covers 2 × 290 × tan 10.5° = 108 mm of surface, 3.6× the 30 mm print field, so the string sits mid-beam with margin.
Two spot heads suit this job: the LS-SPT-0175 is a 6 mm high-luminance spot light rated 5 W, and the 4 W LS-SPT-0133 is the third-generation equivalent.
| Specification | LS-SPT-0175 | LS-SPT-0133 |
|---|---|---|
| Emitting port dia. (mm) | 6 | 6.2 |
| Price | $229.00 | $259.00 |
All 2 share: Cable (mm) 500. Values as printed in each product's data sheet; open a part for its drawing and full specifications.
How do you verify the image is rotation-tolerant?
Roll the part through the worst rotation your fixture allows — ±10° is a realistic floor — and require print-to-background contrast to stay above 80 % of its centered value, with both ends of the print within 10 % of each other.
Three checks catch nearly every bad station:
- Rotation sweep. Step the part across its full allowed roll in 2° steps and log contrast at each stop. The minimum, not the average, is what the reader sees on the worst part.
- End balance. Compare mean background gray under the first and last characters. Above 10 % difference, your light plane is crooked: correct the slide along the long axis before touching exposure.
- Motion check. Capture at line speed and measure the edge width of a dot. One pixel is the budget — 23 µm at the scale of the worked example.
When the strobe is on but the frame comes back black, the timing is at fault: strobe light on but camera image is black: fix the timing walks the overlap. Once the image is stable, set the reader deliberately — OCR trains but fails at runtime: set every parameter — because a lighting change invalidates thresholds. Dot-matrix fonts on curved surfaces often need their own training; see training a custom OCR font for curved inner-cap text.
When is off-axis lighting the wrong answer?
Use coaxial light when the cylinder is matte, use a dome when the part is small and curved in both directions, and use two opposing off-axis lights when the print wraps more than about 120° of the circumference.
A matte, scattering cylinder returns light from everywhere, so the strip never forms and coaxial or on-lens ring light gives a uniform print image — the failure above belongs to specular surfaces. A small part curved in both directions, like a cap or a ball-end fitting, is a dome job: dome lights for shiny, curved and wrinkled parts covers sizing and standoff.
Two further cases. A string that wraps more than about 120° cannot be covered by one head: put two lights on opposite sides of the camera in the same long-axis plane and strobe them into alternating frames — the case for driving that from one box is in why use a machine vision lighting controller: five reasons. And do not reach for cross-polarization here: on polished metal, a crossed analyzer darkens the metal and the black ink together and contrast collapses — cross polarization machine vision: reduce surface glare explains where polarizers do pay off.
Engraved or laser-etched cylinders behave differently from ink: the mark is geometry, not absorption, and low-angle or 3D capture reads it better — see 3D OCR for engraved cylinders: capture and verify data.
What should you check before you order?
Check four things: lit length at least 1.5× the print field, a beam angle wide enough to cover that field at your standoff, 24 V input and a strobe rating if the part moves — then add the bracket reach to your station layout.
- Lit length ≥ 1.5 × print field. For a 30 mm string that is 45 mm of lit face minimum; 2.7× is the comfortable zone.
- Beam coverage at standoff. coverage = 2 × standoff × tan(beam / 2); require at least twice the print field so the string never rides the beam edge.
- 24 V input. Nearly every head across the ring, coaxial and spot ranges runs on 24 V, so one controller rail powers the station.
- Strobe and overdrive rating. If you use the 2× distance trick, budget four times the continuous output for the same image brightness.
- Bracket reach. The light lives working distance × tan(light angle) from the print — 101 mm in the worked example. Make sure the arm and the part handler are not fighting for the same volume.
Bring your cylinder diameter, string length and working distance to the light step of the configurator, scan the lights finder for heads with the lit length and beam you computed, or put the numbers in front of the applications team through the contact page.
Questions
Does a dome light work instead of the off-axis geometry?
Only for small parts. A dome gives the same glare-free help it gives any curved shiny surface, but a dome is coaxial in construction: the camera shoots through its aperture, so on a strongly specular cylinder some banding can return. The print zone must also fit under the dome's opening with the housing close to it. For housings of about 30 mm diameter and longer strings, the off-axis geometry outperforms a dome.
How many lights do I need if the print wraps around the cylinder?
Count one off-axis light per 120° of print arc. A single head in the long-axis plane covers roughly the third of the circumference facing the camera; a string that wraps half way needs two heads on opposite sides of the camera in that same plane, strobed one per frame; a full-circumference print is cheaper to inspect by rotating the part between two images than by adding a third light.
Should I add cross-polarization to kill the glare?
No. On polished metal, a crossed analyzer removes the specular return from the metal and leaves the black ink equally black: background and print both drop toward zero and contrast collapses. Cross-polarization earns its place on glare from glass and plastic, which is partially polarized by reflection; use the off-axis geometry here and save the polarizers for those dielectric surfaces.
Does moving the light off-axis change my exposure?
Yes — budget two to three stops. Off-axis you photograph light scattered by the ink and the surface, not the mirror return, and doubling the standoff costs another factor of four under the square law. That is ×4 to ×8 of electrical input: overdrive the strobed LED, or open the aperture three stops, f/8 to f/2.8, if depth of field allows.
What LED colour should I use for the print?
White for a colour camera. For a monochrome camera, pick the complement of the ink: black ink on bright metal is already high contrast in white, but red or blue inks read better under the colour that darkens them — red ink under green, blue ink under amber or red. Never match the light to the ink: red print under red light disappears. The full colour-to-contrast mapping is in light colour and monochrome camera contrast: bright vs dark.

