An empty barcode result does not tell you whether the decoder rejected the image, missed the symbol, or could not recover its payload. This troubleshooting procedure is for engineers receiving no decoded text, format, or location from an otherwise successful function call. Start with a known-good Aztec image, confirm the decoder configuration, and inspect the actual pixels supplied to it. Then test sampling, focus, contrast, and cropping before changing hardware or adding preprocessing.
1. Separate unsupported formats from unreadable images
First confirm that your installed decoder version explicitly supports Aztec. Support for other two-dimensional formats does not establish Aztec support. Check the documentation for the deployed version, including accepted image types and any format-selection setting.
Use two control images: a known-good Aztec symbol with a known payload, and the failing production image. Run both through the same loading and decoding path. Keep the original images unchanged so later comparisons remain meaningful.
| Observation | First suspect | Discriminating test |
|---|---|---|
| Neither image decodes | Configuration, format support, or input representation | Check documented Aztec support and inspect the submitted array |
| Control decodes; production image does not | Sampling, optical quality, symbol damage, or cropping | Compare native-resolution symbol crops |
| Saved image decodes; live frame does not | Acquisition or conversion path | Compare dimensions, pixel values, and layout before decoding |
| Full image fails; complete symbol crop decodes | Search area or distracting content | Test a stable region of interest |
| Text appears but is unexpected | Data interpretation or acceptance logic | Compare against the known payload and permitted values |
If the decoder allows an explicit symbology selection, test Aztec alone using its documented identifier. Do not assume a broad format-family setting enables every supported format.
Empty location output is not proof that the decoder never saw the symbol. Some interfaces return location information only after successful decoding. Treat the output according to the documented API contract, not an assumed internal processing sequence.
2. Inspect image representation, especially indexed images
A picture that displays correctly can still supply unsuitable data to a decoder. An indexed image contains palette indices, not direct brightness measurements. A viewer can apply its palette automatically while the decoding function receives only the index array.
Load both the index array and its color map when the file uses indexed storage. Apply the map to obtain actual colors, then convert to a documented grayscale representation if required. Simply treating indices as gray levels can reverse or scramble the intended contrast.
Check these properties immediately before the decode call:
- Image width and height match the intended frame or crop.
- The array has a supported channel count, data type, and value range.
- Grayscale values represent brightness rather than palette positions.
- Floating-point values use the range expected by the decoder.
- Alpha channels, channel order, strides, and buffer lifetime follow the API requirements.
For example, casting floating-point brightness values between 0 and 1 directly to an integer type can leave almost all pixels at 0 or 1. Use a documented conversion that preserves the intended range instead.
The guide to barcode decoder image compatibility covers this boundary in more detail. If your input begins as a compressed file buffer, first distinguish encoded image bytes from pixel data.
Save a lossless diagnostic image from the exact array submitted to the decoder. Inspect that image, not just a separately loaded preview.
3. Calculate module sampling before resizing
The smallest module is the basic light or dark element of the symbol. Measure its width in the original image, preferably along a clear section of the outer data pattern. A large image can still contain an undersampled barcode if the field of view is wide.
Use approximately 4–6 original-image pixels per smallest module as an initial evaluation target, not a universal decoder requirement. Actual tolerance depends on optics, contrast, perspective, print quality, and the decoding implementation.
For a roughly front-facing symbol, estimate sampling from the field width:
Suppose the field width is 120 mm, the image contains 1920 horizontal pixels, and the module width is 0.25 mm:
- Object-space pixel size = 120 / 1920 = 0.0625 mm/pixel.
- Sampling = 0.25 / 0.0625 = 4 pixels/module.
- For 6 pixels/module across the same field, the estimate is 6 × 120 / 0.25 = 2880 horizontal pixels.
- Alternatively, reducing the field width to 80 mm gives 0.25 × 1920 / 80 = 6 pixels/module.
These calculations assume approximately uniform scale at the symbol plane. Perspective can leave the far side of a tilted symbol with fewer pixels per module.
The field of view is the physical area imaged by the sensor and lens. Narrowing it can improve sampling, provided the complete symbol remains visible throughout its position tolerance.
Enlarging an undersampled image does not recover missing detail. It may change how a particular decoder behaves, but it is not equivalent to capturing more original pixels. When testing resampling, follow the guidance on antialiasing during image downsampling and warping.
4. Test focus, motion blur, and contrast separately
Inspect the symbol at native resolution. Sharp module boundaries should remain distinguishable across the symbol, including its central finder pattern. If the center is sharp but one edge is soft, check symbol tilt, surface curvature, and focus across the field.
Start with a stationary target. If it decodes while the moving target fails, calculate motion during exposure before applying sharpening.
Using the previous sampling example, a speed of 600 mm/s and an exposure of 100 microseconds produce:
- Motion during exposure = 600 × 0.0001 = 0.06 mm.
- Estimated blur = 0.06 / 0.0625 = 0.96 pixels.
That is already approximately one quarter of a module at 4 pixels/module. Shorter exposure may help, but sufficient illumination is needed to avoid replacing blur with excessive noise.
Next inspect contrast. Look for bright reflections crossing dark modules, shadows obscuring light modules, and saturated regions with no remaining texture. Change lighting angle or exposure and compare the original grayscale images. A threshold cannot restore module boundaries that glare has erased.
For repeatable focus adjustment, use an image region containing the symbol rather than unrelated background texture. The guide to choosing an image sharpness metric explains why a higher score alone does not establish better decoding.
5. Test a complete, stable region of interest
A region of interest can reduce unrelated content and help isolate search behavior. However, a tight crop can remove outer data modules, especially when the symbol rotates or shifts between frames.
For diagnosis, draw a crop that includes the entire symbol and visible surrounding background. Compare this crop with the full image using otherwise identical decoder settings. Do not import another symbology's quiet-zone requirement as an Aztec rule; the immediate goal is to avoid clipping useful structure.
If cropping helps, enlarge the production region to cover the complete position and rotation envelope. Test the corners of that envelope, not only the nominal position. Review safe barcode cropping for handling crop boundaries without cutting away relevant pixels.
If the symbol is strongly tilted, first try a straighter acquisition angle. Image rectification requires interpolation and reliable geometry; it should not be the first response to an unclear symbol.
6. Apply conservative preprocessing as controlled tests
Keep an untouched grayscale baseline. Change one operation at a time and record which images improve or regress. A single successful sample is not enough to justify a production preprocessing chain.
Use this order:
- Correct interpretation. Resolve palette mapping, value range, and channel conversion before modifying image content.
- Restrict the search area. Test a complete symbol crop without changing its pixel scale.
- Adjust contrast gently. Try a limited remapping when useful grayscale separation exists. Check that neither module class becomes clipped.
- Test thresholding only if supported. Compare grayscale decoding with a binary image. Uneven illumination may make a single global threshold unsuitable.
- Test mild denoising or sharpening separately. Reject settings that merge neighboring modules, erase small features, or create halos.
Avoid choosing a threshold solely because the display looks cleaner. A visually attractive binary image may have lost narrow features needed for decoding. Likewise, morphological opening or closing can change the encoded pattern when the operation approaches module size.
Very large modules can occasionally expose scale-dependent search behavior. Only after checking native sampling should you consider the controlled experiments in downscaling before barcode decoding. Do not downscale a symbol already short of pixels.
7. Verify the fix across a representative image set
Build a small diagnostic set before tuning further. As an initial test, collect 24 images: 3 positions × 2 orientations × 2 exposure settings × 2 label conditions. This is a troubleshooting set, not a statistical qualification plan.
Record the following for every attempt:
- Image identifier and expected payload.
- Decoder version, enabled format, and input representation.
- Exposure, crop coordinates, and estimated pixels per module.
- Processing operation and its parameters.
- Decoded payload, reported format, and elapsed time.
Distinguish correct reads, no-reads, and incorrect accepted values. If a processing change converts a no-read into the wrong payload, it has not solved the inspection task.
Once decoding works, apply the acceptance checks described in judging barcode read confidence. Successful decoding and permission to act on the decoded data are separate decisions.
If the clean control still fails after documented configuration and input checks, retain the smallest reproducible image and configuration for vendor support. Obtain updates and documentation through the manufacturer or its authorized distribution channels.
8. Choose hardware only after locating the failure
Compare fixed code readers when you want a dedicated reading device, and area scan cameras when acquisition and host-side decoding need separate control. Use the camera finder to narrow acquisition candidates after establishing the required field width, sampling, and exposure.
The LS-CRD-0028 is a fixed-reader candidate for evaluation. Its listed catalog information does not establish Aztec support, so confirm documented symbology support and test representative labels before selecting it.
- Interface
- Fast Ethernet
- Resolution
- 5 MP
- Sensor format
- 1/1.7"
- Shutter
- Global
The LS-CMR-0166 is an acquisition candidate for a host-decoded approach. Its rolling shutter warrants evaluation with the actual motion and lighting conditions; camera selection alone does not supply decoding capability.
- Sensor format
- 1/1.7"
- Interface
- USB3
- Resolution
- 12 MP
- Shutter
- Rolling
For a separate-camera system, select machine vision lenses according to sensor coverage, mount, working distance, and the required field of view. The lens finder helps narrow the optical choices, while the lens configuration step organizes the system selection.
Do not replace hardware when the known-good control fails because Aztec is disabled or the image array contains palette indices. Conversely, repeated software processing is the wrong remedy for unresolved optical detail or motion blur.
9. Final checks before changing the production station
Use this short release checklist:
- Support confirmed: the deployed decoder version explicitly supports and enables Aztec.
- Input validated: the submitted array has the documented layout, type, and range.
- Sampling measured: the smallest modules remain resolved at the worst symbol position.
- Acquisition checked: focus, motion, and glare have been tested independently.
- Crop validated: the full symbol remains inside the region throughout normal variation.
- Processing justified: each operation improves representative images without introducing incorrect accepted values.
- Failure behavior defined: no-reads follow the documented application response rather than silently reusing an earlier payload.
Bring the original failing image, a known-good control, module dimensions, field width, and motion conditions to applications support. If acquisition is the limiting factor, start the camera configuration with those measurements rather than a resolution guess.
Questions
Why does an Aztec decoder return empty output without an error?
An empty result usually means the call completed without returning a successful decode, but it does not identify the failed stage. Confirm Aztec support, enabled formats, and accepted image representation first. Then compare a known-good control with the failing image to separate configuration problems from image-quality limitations.
Can an indexed image look correct but still fail to decode?
A viewer can display palette indices using an associated color map, while a decoder receives only the indices. Those numbers do not necessarily represent brightness. Apply the palette to recover actual colors, then convert to a grayscale representation and value range accepted by the decoding interface.
How many pixels per module should an Aztec image have?
Approximately 4–6 original-image pixels per smallest module is a useful starting target for evaluation, not a guaranteed requirement. Blur, perspective, print quality, and decoder behavior affect the margin. Measure the least-resolved area of the symbol and validate representative labels under actual acquisition conditions.
Should I threshold every Aztec image before decoding?
Not necessarily. A supported decoder may perform better with grayscale information than with a binary image that has lost small features. Compare both representations on the same diagnostic set. Correct glare, focus, and sampling first, and retain the original image so processing changes remain reversible.
When should I change the camera or reader instead of preprocessing?
Consider acquisition changes when the image cannot resolve the smallest modules, maintain focus, or limit motion blur across normal variation. Change decoder configuration instead when a clean control fails because of unsupported formats or incorrect input handling. Confirm Aztec support separately for any fixed reader being considered.

