A dot-printed code can look readable while its camera image contains merged dots, washed-out modules or motion blur. For engineers setting up packaging inspection, the useful question is not which light looks brightest, but which arrangement preserves code structure across acceptable products. The procedure below separates illumination, sampling, motion and printing faults. It gives you a repeatable comparison method before you commit to lighting hardware or decoder settings.
1. Define the code and the acceptance samples
Start with the smallest printed module, the complete symbol size and the permitted position variation. A module is one logical cell of the code; it is not necessarily one ink droplet. Inkjet printing may form a module from several dots, with visible spaces between them.
Build a labeled sample set before adjusting the light:
- Collect acceptable examples from every substrate color, finish and package shape.
- Include acceptable weak print, normal dot spread and the largest permitted position variation.
- Keep confirmed defective examples separately, including missing print and damaged symbol borders.
- Record the maximum line speed and how products rotate or shift during presentation.
Preserve the unprocessed camera images alongside decoded text. A successful decode alone does not show whether the setup has useful operating margin or merely recovered a difficult symbol once.
Inspect existing images before replacing hardware. The guide to camera barcode decoding and data validation explains why image capture, decoding and downstream acceptance should remain separate checks.
Set a specific trial objective, such as reading every acceptable sample throughout its allowed position range while correctly flagging the defective set. Production acceptance still needs a larger, representative validation run.
2. Establish focus and pixel coverage before comparing lights
Fix the camera position, focus, aperture, exposure and gain for the first lighting comparison. Disable automatic adjustments where the equipment allows it. Otherwise, automatic exposure can conceal a weak lighting arrangement by increasing exposure until moving products blur.
Estimate the sampling at the code plane:
For a hypothetical image width of 2400 pixels covering 120 mm:
- Sampling = 2400 / 120 = 20 pixels/mm.
- A 0.40 mm module spans 20 × 0.40 = 8 pixels.
- A symbol measuring 30 modules across occupies 30 × 0.40 = 12 mm, excluding its surrounding clear area.
These values illustrate the calculation, not a universal decoding requirement. Dot size, optical sharpness, code type and decoder behavior determine the practical minimum. Check the smallest module at the farthest working position, not just at the image center.
Focus on the actual print plane. Confirm that nearby modules remain distinguishable and that individual print gaps have not disappeared through defocus. Do not use sharpening to compensate for inadequate optical resolution.
If you are selecting integrated hardware, compare fixed code readers through the camera and reader finder. Confirm field coverage, focus range and image-export access before choosing a reader.
A candidate for that evaluation is LS-CRD-0028. Check its documentation for the external illumination and timing arrangements your test requires.
- Interface
- Fast Ethernet
- Resolution
- 5 MP
- Sensor format
- 1/1.7"
- Shutter
- Global
3. Measure ink contrast instead of judging brightness
Compare illumination colors using the actual ink and packaging. A background that looks bright under white light may become dark under another color. The ink can change too, reducing rather than improving separation.
Begin with white and a suitable single-color sample where available. Hold geometry and camera settings constant during the initial comparison. If exposure must change to avoid clipping, record it and later compare each candidate at the production exposure limit.
For dark ink on a brighter substrate, measure small regions inside printed marks and adjacent unprinted material. Avoid averaging the whole symbol, because that mixes ink coverage with background appearance.
With background intensity 180 and ink intensity 60, contrast is:
If another arrangement gives background 220 and ink 140, contrast becomes 80 / 360, or about 0.22. The second image is brighter but separates ink from substrate less effectively.
Use this metric comparatively with a fixed image-processing pipeline. Clipped pixels, nonlinear processing and different region sizes can make the comparison misleading. Examine the weakest part of the code as well as the average.
Record exposure, gain, aperture, color, angle, light distance and sample identity for each image. The broader machine vision lighting stability test helps turn those settings into a repeatable deployment check.
4. Compare directional and diffuse geometry
Test geometry before increasing brightness. A reflection that crosses the code is a directional problem; simply adding output can make the saturated area larger.
| Surface or symptom | First arrangement to test | Evidence to look for | Main limitation |
|---|---|---|---|
| Flat, matte package | Oblique bar illumination | Distinct ink marks across the full symbol | Texture may create distracting shadows |
| Flat, glossy package | Bar moved outside the specular return | Highlight leaves the code region | Product tilt may bring glare back |
| Curved or wrinkled package | Diffuse dome illumination | Smaller brightness changes across the code | Dome opening and package position can remain visible |
| Glare persists after angle changes | Cross-polarized illumination trial | Reduced reflection without lost dot separation | Optical losses may prevent the required short exposure |
Bar lights let you move the source independently of the camera. Sweep the angle through the expected package positions, rather than selecting an angle from one stationary sample. Opposed bars can improve coverage, but can also create a second reflection.
A directional candidate to evaluate is LS-BAR-1276.
- Size
- 200-400 mm
- Type
- Diffused
- Voltage
- 24 V
For curved reflective surfaces, dome lights illuminate from many directions. They can reduce the abrupt highlights produced by a small source, but do not guarantee a featureless background.
A diffuse candidate to evaluate is LS-DOM-0085. Confirm the mechanical opening and usable coverage against the package envelope rather than relying on the outside dimensions alone.
- Size
- 100-200 mm
- Voltage
- 24 V
The guide to dome illumination for shiny and curved parts explains the camera opening and coverage limitations. For thin glossy packaging, the plastic lid print lighting guide provides a closely related reflection-control test.
If you trial crossed polarizers, compare images both with and without them at the final exposure. Their effectiveness depends on the reflection and material; they are not a universal cure for reflective packaging.
5. Set exposure from production motion
Once a geometry produces usable contrast, shorten exposure to the value required by motion. A stationary test can otherwise favor a diffuse arrangement that cannot deliver sufficient signal at line speed.
For translation parallel to the image plane, estimate blur using object-space sampling:
Using the earlier hypothetical field of view:
- Object scale = 120 mm / 2400 pixels = 0.05 mm/pixel.
- Maximum speed = 1.2 m/s = 1200 mm/s.
- Chosen trial blur allowance = 0.5 pixel.
- Maximum exposure = 0.5 × 0.05 / 1200 = 0.0000208 s, or about 21 microseconds.
At 20 microseconds, estimated blur is 1200 × 0.000020 / 0.05 = 0.48 pixel. This is a starting budget, not a guarantee of decoding. Test actual motion, including rotation and vibration.
If a short light pulse defines the effective exposure, ambient light must contribute little enough that it does not leave a blurred background image. Confirm that the pulse falls fully within the relevant camera exposure interval. Rolling-shutter acquisition needs particular timing checks; one short pulse may not illuminate every row equally.
For a hypothetical pulse duration of 10 microseconds at 200 triggers per second, duty cycle is 10 × 0.000001 × 200 = 0.002, or 0.2%. Low duty cycle alone does not establish a permissible peak current.
Use the high-speed barcode pulse-sizing guide for the next timing checks. If shortening exposure causes failure, improve collected signal within documented limits before increasing gain and accepting noisier dot edges.
6. Run a controlled packaging-variant trial
Repeat the selected lighting tests across the full sample set. First vary one parameter at a time to identify causes. Then combine realistic extremes, because dark packaging, weak print and maximum speed can occur together.
Use a trial sheet with these columns:
- Package variant and confirmed print condition.
- Code position and orientation.
- Light arrangement, color and distance.
- Exposure, gain and aperture.
- Background and ink measurements, including the weakest region.
- Decode outcome, returned content and processing time.
- Saved image identifier and observed failure mechanism.
As an example, test 4 substrate variants at 3 permitted positions and 2 speeds. That creates 4 × 3 × 2 = 24 conditions before adding print-quality variation. Capture repeated passes in each condition rather than treating one successful frame as validation.
Inspect the complete symbol and the clear area required around it. A tightly cropped image can hide a placement fault or remove information needed for localization. The guide to safe barcode cropping and quiet zones explains that boundary check.
Compare the weakest acceptable condition, not the highest average read rate. Prefer the arrangement that retains visible module structure through product movement and expected tilt. Record any condition that depends on a narrowly tuned angle.
A short trial ranks candidates; it does not establish a production failure rate. Validate the final setup over representative batches and operating conditions, keeping failure images for diagnosis.
7. Separate imaging failures from missing print
When a code fails, preserve the original image before changing decoder parameters. Then use a stationary sample and a controlled lighting change to identify what disappeared.
| Observation | Likely cause to test | Discriminating check | Next action |
|---|---|---|---|
| Bright patch moves when the light moves | Specular reflection | Change source angle while holding the package still | Reposition or diffuse illumination |
| Edges recover when motion stops | Motion blur | Compare stopped and moving captures at unchanged settings | Shorten effective exposure and verify timing |
| Dots sharpen when focus changes | Optical defocus | Inspect the print plane at full image scale | Correct focus, working range or mounting |
| Missing marks remain absent under several viewing conditions | Printing or surface damage | Inspect the physical sample under magnification | Check the printing process against its documentation |
| Structure is clear but decoding still fails | Code configuration, sampling or decoder issue | Check supported symbology, image input and symbol boundaries | Review reader configuration and code requirements |
Lighting cannot recover ink that was never deposited. Conversely, a saturated highlight can make present ink look absent. Confirm the physical condition before sending an adjustment request to the printing process.
Dot-printed modules do not need to look like solid squares to the human eye. Avoid aggressive smoothing or thresholding that joins neighboring modules merely to make the image look cleaner.
When the usual answer is wrong, keep the reason explicit. A dome may lose to a directional bar when it fills the ink and substrate with similar brightness. Polarization may lose when its optical losses force an unacceptable exposure. Decoder preprocessing may lose when the real fault is missing print.
8. Check the installation before ordering
Choose hardware from measured image requirements, not from the most attractive stationary capture. Review the following items against the selected components and their documentation:
- Coverage: the symbol and required surrounding area remain visible at every allowed position.
- Optical access: the light does not obstruct the lens, package travel or permitted adjustment range.
- Motion margin: contrast remains usable at the calculated exposure and maximum production speed.
- Electrical compatibility: supply, controller, connectors and triggering match the documented requirements.
- Thermal operation: continuous or pulsed operation stays within the documented limits.
- Reader access: production software can retrieve the images and status needed for fault diagnosis.
- Recipe control: exposure, gain, light settings and package-specific parameters are saved and versioned.
- Print disposition: unreadable, absent and incorrect-content codes have defined handling paths.
Use the lighting finder to compare candidates against the geometry you measured. Then start the lighting configurator, or send the sample matrix, saved images and motion calculation through application support for help selecting the next test.
Questions
Is red or white lighting better for 2D inkjet codes?
Neither color is automatically better. Compare the actual ink and substrate with fixed camera processing, then repeat at the exposure needed for production motion. Choose the illumination that preserves separation across acceptable packaging variants, rather than the one producing the brightest background.
When should a dome replace a bar light?
A dome is worth testing when package curvature or wrinkles make a directional reflection move across the symbol. Check the full permitted package position range. A bar may still perform better when one controlled angle avoids glare and supplies more usable signal at a short exposure.
Can better lighting fix missing inkjet dots?
No. Error correction may allow some damaged symbols to decode, but illumination cannot recreate missing printed information. Inspect the sample under multiple lighting directions and magnification to distinguish absent ink from glare. Keep print-process acceptance separate from the reader's ability to return text.
How do you choose exposure time for moving packaging?
Calculate object-space pixel size from field of view and image width. Divide the allowed movement distance during exposure by maximum product speed. Treat that result as an initial exposure limit, then verify moving images because rotation, vibration, optical sharpness and dot structure also affect decoding.
What should be checked before changing decoder settings?
Investigate whether the failure comes from reflection, blur, insufficient sampling or genuinely damaged print. Preserve full-resolution images and returned data for every failed condition. Correct the identified cause, then repeat the acceptable-sample matrix instead of tuning only against the last failed image.


