Code readingApplication note

Golf ball logo OCR: multiple views for curved text

One view covers under 7% of a golf ball. Get the coverage math, view layouts, pixel and lens sizing, glare control and the deskew steps for logo OCR.

LumaSpec Vision11 min read Share on LinkedIn

On this page 10 sections
  1. 01Why can't one camera read a golf ball logo in one shot?
  2. 02How many fixed views cover the whole ball?
  3. 03How do you get those views: spin, drop or roll the ball?
  4. 04How many pixels does curved logo OCR need?
  5. 05Which focal length and working distance fit a tunnel station?
  6. 06How do you light a shiny ball without glare?
  7. 07How do you deskew text that curves in two directions?
  8. 08Which hardware fits each approach?
  9. 09What stops a golf ball sorter in practice?
  10. 10Questions

A golf ball puts its brand and model on a sphere about 43 mm across, and that text can face any direction when the ball arrives. If you are sorting balls by make and model with OCR, coverage comes before reading: decide how many views each ball needs, then make each view legible. This guide works the numbers a build needs — the surface one camera covers, the view count that guarantees full coverage, the pixel budget, the lens and working distance for a tunnel station, and the deskew steps that make curved text readable — then matches hardware to three build approaches and ends with the checks that keep a sorter honest.

Why can't one camera read a golf ball logo in one shot?

Because a legible view covers too little of the surface: with text usable out to about 30° off the camera axis, one frame sees (1 − cos 30°)/2 ≈ 6.7% of the ball, so a randomly placed logo misses the frame about 14 times in 15.

The readable patch is a spherical cap, and its area has a closed form. For a ball of radius r with a legible half-angle θ:

A_cap = 2πr²(1 − cos θ) C = (1 − cos θ) / 2

Worked example, with r from a conforming ball's 42.67 mm minimum diameter and θ = 30°:

  • r = 42.67 mm / 2 = 21.34 mm
  • A_cap = 2π × (21.34 mm)² × (1 − 0.8660) = 2π × 455.4 × 0.1340 ≈ 383 mm²
  • Whole surface: 4πr² = 4π × 455.4 ≈ 5,723 mm²
  • C = 383 / 5,723 ≈ 6.7% of the ball in one view

The 30° limit is foreshortening, not taste: at θ off-axis, text squashes by cos θ, so 30° leaves 87% of the letter height while 45° leaves 71%, where most fixed fonts misread. For fine serif marks tighten to 15° and coverage falls to (1 − 0.9659)/2 ≈ 1.7% — one view in about sixty. Coverage, not optics, is the wall.

How many fixed views cover the whole ball?

Eight fixed cameras at the corners of a cube around the ball guarantee it: the worst logo direction then sits 29.5° from the nearest camera axis, arccos(5/√33), just inside the 30° legible half-angle.

A view reads its own cap, so covering the sphere means every surface direction lies within θ of at least one camera axis. The layouts worth comparing:

Layout Views Worst-case logo angle Verdict at θ = 30°
Six cameras on the equator 6 90° at the poles Never sees polar marks
Octahedron: ±x, ±y, ±z 6 54.7° Fails
Cube corners: (±1, ±1, ±1) 8 29.5° Passes
Spin + cameras at 0°, 60°, 120°, 180° from the axis 4 + one turn 30° at band edges Passes

The cube-corner figure comes from the point farthest from all eight axes: camera directions are (1,1,1)/√3 and the worst surface direction is (3,1,1)/√11, so arccos[(3+1+1)/(√11·√3)] = arccos(5/√33) = 29.5°. The octahedron fails the same test: its worst direction sits arccos(1/√3) = 54.7° from every camera. You also do not need a stitched map of the whole ball — a sort decision needs one readable view per mark, not the full surface unwrapped.

How do you get those views: spin, drop or roll the ball?

Spin wins for sorting: a spinning cup or drop tube presents every longitude to a ring of cameras, while a single camera that shoots the ball between rotations suits only tray work with partly known orientation.

Set the spin axis vertical and put four cameras at 0°, 60°, 120° and 180° from it. Each reads the ±30° band around its own axis, and the four bands tile the sphere pole to pole: 0-30°, 30-90°, 90-150°, 150-180°. One full revolution sweeps every longitude through every band, so every mark is read inside one turn.

  • Spin cup. The ball sits in a matched cup at 1 rev/s. Rim speed v = 2π × 21.34 mm × 1 rev/s ≈ 134 mm/s, and the lane clears one ball per second per cup.
  • Drop tube. The ball falls through a white semi-opaque diffuser cylinder lit from outside, so it sees the wall as one large, near-shadowless source. After a 200 mm fall it moves √(2 × 9.81 × 0.20) ≈ 1.98 m/s, which sets the strobe (FAQ below). Keep the small shadows from the camera apertures out of the text bands.
  • Roll on rails. Cheapest mechanics, least controlled orientation; expect duplicate reads per ball and de-duplicate in software.

For tray work — new balls in a known set of orientations — one camera that shoots, turns the fixture and shoots again is enough, and the trigger-at-each-pose method carries straight over. If the fixture measures how the ball sits first, the orientation-angle trick tells the stage which way to turn.

How many pixels does curved logo OCR need?

About 20 pixels across the smallest character: a 4 mm letter sets a 5 px/mm scale, so a 30 mm field needs only 150 pixels across — every industrial camera clears that, which is why coverage, not resolution, drives this design.

The basis is stroke sampling: at 20 px of character height a letter's strokes run 4-6 px wide, where OCR segmentation behaves; below about 15 px the strokes alias.

Example with a 4 mm letter (example input — measure your smallest marking):

  • Scale: 20 px / 4 mm = 5 px/mm
  • Minimum: 30 mm field × 5 px/mm = 150 px across
  • Comfortable: 40 px per character → 10 px/mm → 300 px across

A 640 × 480 sensor already clears the minimum, so resolution is not what makes this job hard; coverage and light are. Set the pixel scale from the characters you actually have:

Camera resolution for the smallest feature
Units
Pixels needed
–
Sensor size
– MP
Smallest sensor that fits
–
Pixel on the part
– mm
Pixels across the feature, that sensor
–

Pixels needed = field / feature × pixels per feature on each axis (field incl. margin). The lens must resolve the pixels too: Nyquist = 1000 / (2 × pixel µm) lp/mm.

Find cameras with enough pixels Open the full calculator

Which focal length and working distance fit a tunnel station?

Size the field from the readable patch, not the ball: at a 30° half-angle the patch is 2r sin 30° ≈ 21.3 mm wide, and with a 9 mm margin a 30 mm field at 120 mm working distance needs a focal length near 22 mm.

The camera images one patch through the tunnel wall, so the field follows the patch: 2r sin θ = 2 × 21.34 mm × 0.500 = 21.3 mm at θ = 30°. Add about 9 mm for ball wander and design to a 30 mm field.

FOV = 2r·sin θ + margin f = sensor width × WD / FOV

Example: a 1/2.9-class imager runs about 5.6 mm wide. At a 120 mm working distance — tunnel wall plus clearance — f = 5.6 mm × 120 mm / 30 mm ≈ 22 mm. The nearest standard lens, 25 mm, gives 5.6 × 120 / 25 ≈ 27 mm, still clear of the 21.3 mm patch as long as the cup centres the ball within ±3 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.
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

How do you light a shiny ball without glare?

Kill the specular highlight with diffusion first and polarization second: a semi-opaque white tunnel lit from outside wraps the ball in near-shadowless light, and a polarizer at the lens cuts the sheen the diffuser leaves on the urethane.

A curved, glossy part turns every discrete lamp into a hot spot, so wrap it. The lit tunnel does this mechanically: the ball sees the whole wall as one source, and only the camera apertures shadow it. Then cut the residue:

  • Put polarizing film on the lens: the sheen keeps its polarization while diffuser-scattered light does not, so the analyzer preferentially blocks the highlight.
  • Expose for the text pixels, not the white coat.
  • Strobe on trigger to freeze motion — 134 mm/s at the rim, or 1.98 m/s in the tube.

For a close single-station view, the factory polarizer does this for you: the MV-IDB005EXI-05NRP is a polarized reader with a 4.63 mm focal length and a 70 mm focus distance.

Fixed code readersHikrobot MV-IDB005EXI-05NRP Fully isolated version, 1.3 MP resolution, 4.63 mm focal length, 70 mm focus distance, Polarized industrial code readerMV-IDB005EXI-05NRP
Interface
Fast Ethernet
Resolution
Up to 3 MP
Shutter
Global
Lens mount
M5.8
$719.00 · quotedView and quote

The preprocessing moves for rotation, blur and glare transfer to logos unchanged: contrast first, geometry second, read last.

How do you deskew text that curves in two directions?

Undo the known geometry before you OCR: with the ball radius and station layout fixed, remap each cap to a flat rectangle or unwrap it as an annulus, then read with a font trained on curved samples rather than hoping the engine tolerates the tilt.

Three routes, cheapest first:

  1. Geometric remap. You know r to a hundredth of a millimetre and you know the station geometry, so warp the cap to a flat rectangle before OCR — one transform that fixes both curve directions at once.
  2. Annulus unwrap. Wordmarks that ring a pole straighten under a polar transform; the annulus method for curved text walks through it.
  3. Deskew and constrain. Estimate each text line's angle, rotate it flat, and constrain the engine to one line; the curved-cap deskew and vertical-text reading guides cover the two halves.

Whichever route you pick, tune the font on images from your own tunnel: fonts trained on flat samples misread the 87%-foreshortened letters near band edges, and training a custom OCR font for curved inner-cap text is the fix. If the read runs on an HMI or SCADA screen rather than a vision library, its image text recognition options set the tilt and font tolerance you get — match them against the ±30° band before you commit a station. The code-reading topic page gathers the rest of the text-reading methods on this site.

Which hardware fits each approach?

Match the hardware to the approach: a compact Fast Ethernet reader per tunnel station for pass sorting, a color smart camera where the decision runs on the device, and GigE area scan cameras for the fixed eight-view ring built around a PC.

Decision per case:

  • New balls, few models, tray or cup presentation: one polarized reader plus a rotation fixture with two to four stops; a 640 × 480-class reader carries the 150-px requirement easily.
  • Mixed recovered balls, full-surface search: the spin-and-band rig — four cameras at 0°, 60°, 120°, 180° from the spin axis — or the eight-camera cube-corner tunnel when the ball cannot be spun. Give the unreadable path real capacity from day one.
  • One model, high rate, pass/fail: a pass-through reader lane at one shot per ball.

For tunnel stations, the MV-ID3013PM-12M-WBN pairs a 12 mm focal length with a 1.3 MP sensor on Fast Ethernet and an M12 mount — one reader per station, images and decision on one cable.

Fixed code readersHikrobot MV-ID3013PM-12M-WBN 12mm focal length 1.3 MP Compact Industrial Code ReaderMV-ID3013PM-12M-WBN
Interface
Fast Ethernet
Resolution
Up to 3 MP
Shutter
Global
Lens mount
M12
$1,979.00View part

Camera-side options for tunnel and ring stations:

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
Area scan camerasHikrobot MV-CU020-90GC 2.5 MP Area Scan Camera, GigE, GMAX4002, ColorMV-CU020-90GC
Sensor format
1/1.7"
Lens mount
C-mount
$309.00View part
Fixed code readers2560 x 2048 fixed code reader, 30 fps, 60 codes/s, 8 mm lens (LS-CRD-0028)LS-CRD-0028
Interface
Fast Ethernet
Resolution
5 MP
$920.00View part

The MV-CU020-90GC is a 2.5 MP color camera on GigE with a global shutter and a C-mount, the shape you want at each ring position. Color matters where brands separate models by wordmark colors: the MV-SC3050XC-16M-ATN-H is a 5 MP color vision sensor on a 1/1.45-inch global-shutter imager with Fast Ethernet. For the pass-through lane, the LS-CRD-0028 reads up to 60 codes/s at 30 fps through an 8 mm lens. All three part families sit in the shop: fixed code readers, smart cameras and area scan cameras; the camera finder and the camera step of the configurator narrow them by mount, resolution and interface.

What stops a golf ball sorter in practice?

Variety, wear and extra marks stop more sorter projects than optics does: recovered balls carry scraped logos plus sponsor and player marks that must not drive the sort, so design the reject path and the class-list update before you mount a camera.

Work this list before ordering parts:

  • Measure the smallest lettering on your worst samples. The 20 px rule and the whole pixel budget hang on that one measurement.
  • Fix the ball's centre with a cup, v-groove or tube, and state the wander margin in millimetres; every field size above assumes it.
  • Freeze-test at the worst speed: 134 mm/s rim speed or 1.98 m/s fall are the numbers the strobe has to beat.
  • Build a labeled image set that includes scuffed, sponsor-printed and custom-marked balls, and set confidence thresholds on it.
  • Make the unreadable path the default when brand and model marks disagree; reject bin or second look, never nearest-match.
  • Plan the class list to grow — new models arrive every season, and adding a class must not mean a rebuild.
  • Audit the reject bin weekly: a rising reject rate is how a drifting lamp or dirty diffuser shows up.

If you want a second set of eyes on the layout, send ball samples and your model list through the quote form and we will spec the stations with you.

Questions

How fast can a spin-and-shoot lane run?

One ball per second per lane at 1 rev/s: the rim moves 2π × 21.34 mm × 1 rev/s ≈ 134 mm/s, and holding blur to 0.2 mm (1 px at 5 px/mm) allows exposures up to about 1.5 ms, which every industrial sensor reaches. Scale by adding lanes; spinning faster scales blur with rim speed.

What exposure freezes a ball in a drop tunnel?

After a 200 mm fall the ball moves √(2 × 9.81 m/s² × 0.20 m) ≈ 1.98 m/s. Keeping blur within 0.2 mm needs 0.2 mm ÷ 1,981 mm/s ≈ 100 µs, so fire an LED strobe on the trigger rather than relying on a short shutter alone.

What happens when a logo is scraped or unreadable?

It goes to a reject or manual bin, never to the nearest class. Require two independent marks — brand wordmark and model number — to agree before a ball is classed, and set the confidence threshold from a labeled set of worn balls imaged in your own tunnel.

Do the stations need color cameras?

Read black-on-white marks in mono and go color when brands separate models by wordmark colors or metallic ink. A common compromise is color at the two views that see the wordmark poles and mono elsewhere, which trims bandwidth without touching the read rate.