Machine learning parcel sorting projects rarely fail at the model; they fail at the pixels. A classifier can only separate classes that the camera and light actually distinguish, so the imaging chain sets the ceiling on accuracy before the first image is labeled. Work the chain in the order that matters: pick line scan or area scan for the belt, compute the line rate from belt speed and ground resolution, then spend the remaining effort on contrast and training data. The worked example below sizes a 2K camera on a 600 mm lane at 0.6 m/s and ends with three decisions: below about 3 m/s the camera is never the bottleneck, the line light must be strobed per line through the controller, and 500-1000 labeled images per class is the budget to plan around.
Why the hardware bounds the model
A sorter sees kraft cartons, white poly bags, bubble mailers, rigid tubs and padded envelopes, often heaped and overlapping. No training algorithm recovers contrast the sensor never recorded: if the light lets a shadow swallow the flap of a poly bag, that information is gone from every image, and the model learns to guess. Guessing is how parcels misroute.
So treat the project as an imaging problem first. The camera decides resolution and rate, the line scan lights decide what contrast exists at all, and the dataset decides how reliably the model maps that contrast to a routing decision. Teams that start at the network architecture usually redo both ends later; the AI retrofit guide for existing cameras shows what a model can and cannot rescue.
Line scan or area scan for a parcel belt
Choose line scan when parcels arrive continuously, overlap, or vary in length without limit: the camera builds an arbitrarily long image at a constant millimetres-per-pixel scale, whatever the belt does. Choose an area camera with a flash when parcels are singulated, of known maximum size and spaced apart — then one exposure captures one parcel and the optics get simpler.
Most sorter infeeds and any belt running continuously under the camera are line scan territory, which is why cross-belt sorters use it. If you are weighing the two on a moving web, the area scan camera in line scan mode guide covers the middle ground, and the sorting conveyor camera selection guide works the pixel-speed-blur triangle for sorter belts. The rest of this article assumes line scan.
Worked example: a 2K camera on a 600 mm lane at 0.6 m/s
Inputs, and where each comes from:
- Belt speed 0.6 m/s (600 mm/s): a typical induction or infeed belt; the closing section sizes faster belts.
- Lane width 600 mm: one parcel lane with margin for overhang.
- Along-track target about 1 mm per pixel: enough for parcel shape, packaging material and label position; readable barcodes would want nearer 0.2 mm per pixel.
- Camera 2048 pixels at 7 μm: a 2K-class line scan camera sensor, mono 8-bit.
Two rules drive everything. Cross-track resolution is field of view divided by pixel count, and the required line rate is belt speed divided by ground resolution:
Lens and resolution. Sensor width is 2048 × 7 μm = 14.3 mm. At a 600 mm working distance a 12 mm lens gives magnification m = 12/(600 − 12) = 0.0204, so the field of view is 14.3/0.0204 ≈ 700 mm — the lane plus margin. Cross-track resolution is 700/2048 = 0.34 mm per pixel. Check the focal length on the lens focal length calculator.
Line rate. 600 mm/s ÷ 0.34 mm ≈ 1760 lines per second, about 1.8 kHz. The 1 mm per pixel target is oversampled roughly threefold, which costs nothing at this speed and buys margin for smaller items.
Exposure and blur. Free-running at 1.8 kHz gives 1/1760 = 0.57 ms per line. Motion blur is 600 mm/s × 0.57 ms = 0.34 mm, about one pixel — acceptable for classification. Encoder-triggered acquisition, covered in the encoder ticks per pixel guide, replaces free-run timing and holds the scale fixed as the belt slows.
Bandwidth. 2048 pixels × 1760 lines/s × 1 byte = 3.6 MB/s, about 29 Mbit/s — under 3% of a GigE link. Even a 4K camera at 4 kHz streams only about 134 Mbit/s.
Result and decision. The example needs roughly 1.8 kHz and 0.57 ms of light per line. Against the camera's maximum line rate that is more than 30-fold headroom: below about 3 m/s, camera speed is never the bottleneck and the constraint moves to light and training data. If light runs short, 2× binning halves the line rate demand to about 880 Hz at unchanged speed — the pixel binning guide shows the trade. At 3 m/s the same optics need 8.8 kHz and 0.11 ms per line, five times more light per pixel, which is where fast sorters get hard. Run your own belt speed through the line rate calculator:
The camera class that fits this example on paper: 2K resolution at 7 μm pixels, a 58 kHz maximum line rate, TDI, an M42 mount and a GigE interface.
- Lens mount
- M42
- Interface
- GigE
- Line length
- 2K
- Pixel size
- 7 μm
Light: the contrast budget, not the lumen count
Kraft cartons reflect diffusely, poly film glares, bubble wrap scatters, black mailers absorb. One bright-field line light straight above the belt separates shape, print and tears, which covers most parcel classes. Oblique or double-angle lights rake across the belt and return flaps, gaps and edge relief that bright field flattens — exactly what heaped parcels need.
At 1.8 kHz each line integrates for 0.57 ms, so the light must deliver its output inside that window. This is a brightness-per-millimetre calculation, not a wattage label, and the line scan light power guide works it properly. Keep the light roughly a third longer than the field of view and mount it high enough that a heaped parcel cannot clip it.
The lane needs a light longer than the 700 mm field. The light that fits: a 975 × 22 mm line scan light on 24 V with a WS20 4-pin connector.
- Size
- 400 mm +
- Voltage
- 24 V
- Connector
- WS20 4-pin
Trigger and strobe: freeze the line, reject the hall lights
A warehouse is bright: high-bay fixtures and daylight raise the black level and flicker with the mains at 100/120 Hz. The fix is per-line strobe. The light controller fires the LED line for a pulse matched to each camera line, so the strobe swamps whatever ambient lands inside the 0.57 ms window — ambient stops moving your pixel values between images, which is what keeps one training set valid all week. The line scan lighting controller guide lists what such a controller fixes, and the ambient light rejection acceptance guide turns it into a testable number.
Size the controller for the light, not the reverse. The controller that drives that pulse: 2 channels, 400 W, digital control, 24 V constant-voltage output, high-power class.
- Channels
- 2 channels
- Control
- Digital
- Feature
- High power
- Output
- Constant voltage 24 V
The sorter PLC closes the loop: a discrete output announces a parcel zone, vision returns the routing result, and the handoff has to hold while the belt moves. If strobed images come back black, the pulse and the camera line are mistimed — the black strobed-image fix walks the delay from PLC through camera to light. Wiring and timing of that PLC-to-vision handoff are covered in the PLC I/O triggering guide for machine vision hardware. When belt speed changes across a shift, drive the line trigger from the conveyor encoder; the runtime speed-following guide shows the camera holding its scale under variable speed.
The training budget: 500-1000 images per class, captured like production
Budget 500-1000 labeled images per class before the model work starts. A class is a routing decision — poly bag, carton, mailer, rigid tub, damaged item — not a product code, so one label scheme covers the whole stream. Capture with the production camera, light and belt speed: images shot on a lab bench under a different light teach the model a distribution it will never see again.
Vary what production varies. Spread parcel positions across the lane, rotations, overlaps of two and three parcels, label placements, and the seasonal packaging your customer base actually ships. Below roughly 200 images per class, models tend to memorise the set instead of the class; synthetic augmentation stretches a base set, but it cannot invent a material or a shadow the rig never captured. Label polygons consistently — a flap marked as parcel in one image and background in the next poisons the set faster than a small set does.
Colour or mono
Mono wins on sensitivity per millisecond of light and costs one data stream. Colour earns its place when a route decision is a colour boundary: printed film versus plain kraft, tinted versus clear poly, or a coloured tub class. A colour option at this class of camera: a 4K colour line scan with 7 μm pixels on GigE, an M42 mount, a 29 mm image circle and an isolated version.
- Lens mount
- M42
- Interface
- GigE
- Line length
- 4K
- Pixel size
- 7 μm
Colour doubles the data per line and usually spends some spatial resolution on interpolation, so confirm hue actually separates your classes — the wire colour classification walkthrough shows a set-up built exactly on colour boundaries. For parcel routing, most teams ship mono.
When the usual answer is wrong
- Belts above about 3 m/s. Per-line exposure falls under 0.2 ms and the light, not the camera, becomes the limit. Moving to 4K at the same field of view halves the millimetres per pixel, doubles the required line rate and halves the photons per pixel — usually the wrong direction. Fix it with brighter light or TDI first.
- Glossy black poly bags. Bright field returns a void, so that class needs oblique light or a second angle; no label volume teaches bright field to see a black bag on a black belt.
- Parcels overhanging the lane. Widen the field to the belt edge and recompute: at 900 mm field the same 2K sensor gives 900/2048 = 0.44 mm per pixel and 600/0.44 = 1360 Hz — still trivial for the camera, but the light must then cover 900 mm plus margin.
- Fully singulated, known-size parcels. An area camera with a flash is the simpler build; line scan earns its keep on continuous, overlapping flow.
Checks before you order
- Line rate computed from belt speed and ground resolution, with the camera's maximum line rate at least 3× above it.
- Field of view against the widest parcel plus overhang, and light length against field plus a third.
- Per-line exposure against the light's brightness in that window, and controller channel power against the light's draw.
- Strobe delay chain from PLC or encoder into camera and controller, timed before installation day.
- Training capture rig identical to production: same camera, same light, same speed, same mounting height.
- Label scheme written down as routing decisions and reviewed against a week of real parcels.
The decisions, per belt
- Induction belt up to 1 m/s, lane up to 800 mm: 2K mono line scan at 1.8-2.9 kHz, a 12 mm lens near 600 mm working distance, a 975 mm white line light strobed per line through a 400 W-class controller, and 500-1000 labels per class.
- Belt 1-3 m/s: same camera family; recompute the line rate from your field of view and move the budget into light brightness.
- Cross-belt and sorter belts above 3 m/s: 4K-8K with TDI and a fan-cooled high-brightness light; treat photons per pixel as the specification.
- Singulated known-size parcels: a flashing area camera instead of line scan.
Size the whole chain in the camera configurator, browse the lights finder or the light controller finder, or send belt speed, lane width and class list through the quote form and we will size it with you. For ejector timing and view alignment downstream of the camera, the free fall optical sorting guide covers the next stage, and the applications topic page collects the sorter-adjacent set-ups.
Questions
What line rate does a parcel sorting camera actually need?
Belt speed divided by ground resolution. At 0.6 m/s with 0.34 mm per pixel the requirement is about 1.8 kHz; at 1 m/s the same optics need about 2.9 kHz. Both sit far below the ceiling of a modern 2K GigE line scan camera, which is why camera speed almost never decides a parcel sorting build below 3 m/s — light and labels do.
Do I need a colour camera for machine learning parcel sorting?
Usually not. Parcel classes separate on shape, size and texture, and mono sensors give more signal per millisecond of light. Choose colour only when a routing decision is a colour boundary — printed film versus plain kraft, tinted versus clear poly. Colour doubles the data per line and spends resolution on interpolation, so confirm hue separates the classes before paying for it.
How many training images are enough per parcel class?
Plan 500-1000 labeled images per class, captured on the production camera, light and belt speed. Treat a class as a routing decision — poly bag, carton, mailer, tub, damaged — not a product code. Below roughly 200 per class, models tend to memorise the set; augmentation stretches a base set but cannot invent a material the rig never photographed.
Can the classifier learn to ignore shadows from stacked parcels?
No. A model works only with contrast the pixels recorded, so overlap shadows belong to the lighting design, not the training set. Strobe the line light per line, mount it high enough to soften shadow edges, and use oblique angles for flaps and gaps. Training on shadow-swallowed images teaches the network to guess, and guesses misroute parcels.
Should the line rate follow belt speed during operation?
Yes, whenever belt speed varies. Triggering the camera from the conveyor encoder holds the ground scale in millimetres per pixel constant, so one trained model stays valid across speeds and shifts. A fixed line rate instead stretches or compresses the along-track axis every time the belt slows, quietly distorting the images the classifier was trained on.



