How to Read Damaged Barcodes:A Complete Guide to 1D, QR, PDF417 & Data Matrix Scanning

Jun 10, 2019 · Admin

Improving accuracy and decoding rate remains a top priority for developers working with barcode reading SDKs. While configuration tweaks and improvements in the algorithm can result in drastic improvements, end users can also play a significant role by improving the image resolution at the time the image is taken, ensuring an adequate quiet zone, and avoiding other defects. For more information, read this post on how to improve barcode recognition accuracy when using an application

In this post, we are going to talk about reading damaged barcodes.

Key Takeaways

  • 1D vs. 2D Tolerance: Linear barcodes require intact segments, while 2D barcodes (QR, Data Matrix) use error correction to recover data, even with significant physical damage.
  • Smart Reconstruction: Advanced barcode engines can reconstruct missing finder patterns and data regions that conventional scanners cannot process.
  • OCR as a Safety Net: When barcodes cannot be recovered, OCR reliably extracts the human-readable text printed alongside them.
  • Tunable Performance: Image preprocessing techniques such as deblurring, sharpening, and contrast enhancement significantly improve read rates.
  • Performance Comparison: Review how different engines process damaged codes in our QR Code reading benchmark and comparison.

How to Read Damaged 1D Barcodes (Code 128, Code 39, UPC, EAN)

Barcodes represented data by varying the widths and spacings of parallel lines.

1D Barcodes

If the lines are partly ripped or scribbled, as long as there is a valid part, we can still read them. 

partly ripped or scribbled barcode

crossed over barcodes

If the lines are severely damaged, but the human-readable text is still there. We can use OCR to read them. The Dynamsoft Label Recognizer is a good fit for this situation.

barcode with human readable interpreter

How to Read Damaged QR Codes: Error Correction Levels & Recovery Methods

2D barcodes, such as QR codes, are an evolution of 1D barcodes and are designed to be damage-resistant.

Error Correction Level Code Max Data Recovery
Low L ~7%
Medium M ~15%
Quartile Q ~25%
High H ~30%

Table: QR Code Error Correction Levels: How Much Damage Can Each Level Recover?

QR codes use Reed–Solomon error correction, allowing them to be read even if damaged. When generating QR codes, users can choose from four error correction levels: Low, Medium, High, and Quartile. The highest correction level can restore up to 30% of data bytes.

Damaged qr code

Dynamsoft Barcode Reader can utilize QR code error correction to read damaged QR codes. The code below is readable because the damaged area is less than 30%.

Damaged QR code example 

However, some QR codes are unreadable by certain barcode scanners, such as the one below, because its finder pattern is broken.

Unreadable QR code example

Dynamsoft Barcode Reader can make extra efforts to read damaged QR codes, even restoring those with broken finder patterns like the one above. Learn more in this post: DBR Auto-Restores Incomplete Parts of QR Codes and Data Matrix.

How to Read Damaged PDF417 Codes (Partial Data & Error Correction Handling)

PDF417 is a versatile 2D barcode format used widely in various applications, including identification cards, inventory management, and transportation. This barcode type is designed to withstand damage and still remain readable.

Error Correction Level Redundancy Damage Tolerance
0 Minimal Very low
2–3 Moderate Standard use
5–6 High Logistics/ID cards
8 Maximum Mission-critical

Table: PDF417 Error Correction Levels & Damage Tolerance

PDF417 utilizes error correction techniques to ensure data integrity, with levels ranging from 0 to 8. Higher levels offer greater redundancy, enhancing the ability to decode damaged barcodes.

Dynamsoft Barcode Reader leverages these error correction features to read damaged PDF417 codes. The example below demonstrates a code that remains readable because the damage is within the error correction limits.

damaged-pdf417

However, some PDF417 codes become unreadable when damage is too extensive or affects critical areas of the code, making them difficult for standard barcode scanners to interpret. Dynamsoft Barcode Reader employs advanced techniques to handle even significantly damaged PDF417 codes. This ensures that data can be recovered from barcodes that might otherwise be considered unreadable.

smudged-pdf417

How to Read Damaged Data Matrix Codes (Industrial DPM & Low-Quality Labels)

Data Matrix is a compact 2D barcode format commonly used for labeling small items, such as electronic components and medical devices. Its design ensures that it remains readable even when partially damaged. Data Matrix codes utilize Reed-Solomon error correction to maintain data integrity. The example below shows a code that remains readable despite partial damage.

damaged-data-matrix-code.jpg

In some cases, Data Matrix codes may become unreadable if the damage is too extensive or if the finder patterns of the code are missing. Dynamsoft Barcode Reader employs advanced algorithms to achieve high reliability even in challenging conditions.

data-matrix-code-finder-pattern.jpg

Licensing Options for Dynamsoft Barcode Reader SDK

Does Damaged Barcode Reading Require Extra Licensing?

No — all editions included! These capabilities are integrated into all editions of Dynamsoft Barcode Reader and require no extra licenses. Supported editions include Windows, Linux, iOS, Android, and JavaScript.

How Dynamsoft Barcode Reader Scans Damaged and Difficult-to-Read Barcodes?

Dynamsoft Barcode Reader can also read the following types of difficult-to-read barcodes:

  • Angled
  • Curved
  • Glare
  • Low contrast
  • Low light
  • Multiple
  • Shadow

common unreadable barcodes

Read Damaged Codes Online

Try the Damaged Barcode Scanner Online — Free Demo

Use our online demo to have a try on your own: https://demo.dynamsoft.com/barcode-reader/.

Getting Started with the Dynamsoft Barcode Reader SDK

If you have a barcode that you aren’t able to decode, send it to support@dynamsoft.com and we will recommend possible parameters you can use to solve the decoding issues.

Learn more about Dynamsoft Barcode Reader SDK and start a free 30-day trial.

For questions about Dynamsoft’s SDKs, please contact our support team.

Download Barcode Testing Sheet and Test Dynamsoft Barcode Reader on Damaged Barcodes

Frequently Asked Questions

Can a completely torn or destroyed barcode still be read?

No. If data modules are missing beyond the error correction limits, the barcode cannot be read. If the barcode includes human-readable text, OCR tools such as Dynamsoft Label Recognizer can still extract the value.

What percentage of a QR code can be damaged and still scan?

With the highest error correction level (H), a QR code can tolerate up to 30% data loss or damage. Lower levels allow for 7% to 25%. Dynamsoft Barcode Reader can restore broken finder patterns beyond standard limits.

How does PDF417 handle damage differently from QR codes?

PDF417 uses error correction levels 0 to 8, offering more granular control over redundancy than QR codes. Level 8 provides maximum data recovery, making PDF417 suitable for high-durability applications such as ID cards and logistics labels.

Do I need a special license to decode damaged barcodes with Dynamsoft?

No. Damaged barcode recovery, including QR finder pattern reconstruction, PDF417 error correction, and Data Matrix recovery, is included in all standard editions of Dynamsoft Barcode Reader at no additional cost.

What image issues make barcodes hardest to read?

Low contrast, motion blur, glare, shadows, and extreme angles are the most common issues. Dynamsoft Barcode Reader offers preprocessing options, such as deblurring, grayscale equalization, and contrast enhancement, to address these issues before decoding.