Real-World Barcodes ZXing and ZBar Missed — But Dynamsoft Got Right

Jun 26, 2025 · Desmond

ZXing and ZBar Are Great—But Not Bulletproof

Open-source libraries like ZXing and ZBar are popular choices for barcode scanning—but how well do they hold up under real-world conditions?

One of our coworkers at Dynamsoft recently ran a controlled test comparing open-source barcode readers with Dynamsoft Barcode Reader (DBR). The results, including all test steps, dataset links, and decoding outcomes, are documented here:

Comparing Python Barcode Libraries: ZXing, ZBar, and Dynamsoft >

Out of 162 images of retail product barcodes, 22 images failed to decode using both ZXing and ZBar. Dynamsoft Barcode Reader, however, decoded all 22 correctly.

Why These 22 Barcodes Are Challenging

All images in the dataset contain 1D retail barcodes like EAN-13 or UPC-A. Decoding them could be difficult in the real-world scenarios due to several factors:

Failure Type Count
Blurry / Low Focus8
Curved Surface5
Crumpled or Damaged4
Uneven Lighting3
Other (e.g., skew, noise)2

Case-by-Case Review

Below, we’ve grouped the 22 failure cases based on their likely causes and included sample images for each.

These issues are common when scanning barcodes from phones, printed packaging, or consumer-submitted photos.

Blurry / Low Focus (8 images)

2294875026113_1.jpg
2952211005443_1.jpg
3275461001775_1.jpg
3389090003342_2.jpg
4250665325581_4.jpg
4250665325581_5.jpg
8410672000406.jpg
8697431460361_1.jpg

Curved Surface (5 images)

2609928041263_1.jpg
3540860029713_2.jpg
3580281813034_2.jpg
4020943134224_1.jpg
3276555858145_1.jpg (also glare)

Crumpled or Damaged (4 images)

2431628035293_1.jpg
3770006361418_1.jpg
5411361332504_2.jpg
8934563107161_1.jpg

Uneven Lighting (3 images)

2152663000991_1.jpg
3532820000092_2.jpg
5411761278457_1.jpg

Other (e.g., skew, noise, quiet zone) (2 images)

2275104045655_1.jpg
3760098453825_2.jpg

Why Dynamsoft Barcode Reader Succeeds

DBR is designed for reliability in difficult conditions where basic libraries struggle. Here’s what sets it apart:

  • Adaptive image binarization handles low contrast and shadow.
  • Blur tolerance using gradient detection and enhancement.
  • Perspective correction helps with curved or skewed barcodes.
  • Robust quiet-zone handling allows decoding from tight packaging.
  • Built-in error correction salvages partial or damaged codes.

Try It Yourself

This wasn’t a synthetic benchmark. It was a practical test using messy, real-world retail barcode photos. You can download or test the full set of images from our GitHub repository:
View Image Folder

Or test your own images using our live tool:
Dynamsoft Barcode Reader Demo