barcode-grader and open-source decoders on the same corpus
The other tools here are decoders, not graders: they say what a code contains, and none of them measures its size, quiet zones, contrast or print quality; barcode-grader itself reads with one of them (zxing-cpp). So this page shows two things only: what drawing a page several ways and looking again adds over handing one picture to a decoder once, and, in the capability table, that the checking and grading is the part the decoders do not do.
Generated by npm run bench:compare (node bench/compare/run.mjs); every number, list and version below is written by that script. 387 files, one code each: 253 PDFs and 134 PNGs from bench/corpus.
How it was run
- Pictures: each PDF page drawn once with pdf.js (pdfjs-dist 5.4.394, @napi-rs/canvas 0.1.97), whole page on white, at 150 and at 300 dpi; the 134 PNGs as they are. Every decoder gets the same pixels.
- One pass per picture, each decoder's default or "try harder" settings (the exact call is under each tool). Nothing is inverted, cropped, rescaled or retried for them.
- barcode-grader gets the original file, as it is used: it draws the page itself, several times. Its numbers are the same in every dpi column.
- "Read" means a result at the code's place (boxes overlapping by more than 15% of the smaller one, the test
bench/run.mjsuses) carrying the code's data. Values are compared after removing GS1 separators and the brackets round Application Identifiers; a UPC-A reported as an EAN-13 with a leading zero is read, so is a UPC-E reported in its long form, and a DataBar with or without its "01". The symbology name is not compared.bench/compare/lib/match.mjsis the rule. - "Its symbologies" are the corpus symbologies a tool's documentation says it reads; codes in the others are still shown to it, and counted as not read in the "of all 387" figures.
- Node v26.4.0, darwin arm64, Python 3.12.8 for the Python tools.
Codes found and read
| tool | version | codes in its symbologies | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) |
|---|---|---|---|---|---|
| barcode-grader | barcode-grader 0.1.0 (dist/ built from this checkout) | 387 of 387 | 381 (98% of its 387, 98% of all 387) | same (own renderings) | same (own renderings) |
| zxing-cpp | zxing-wasm 3.1.8, zxing-cpp commit f66b8ab490 | 387 of 387 | 283 (73% of its 387, 73% of all 387) | 352 (91% of its 387, 91% of all 387) | 352 (91% of its 387, 91% of all 387) |
| zxing-cpp, keeping check-digit errors | zxing-wasm 3.1.8, zxing-cpp commit f66b8ab490 | 387 of 387 | 287 (74% of its 387, 74% of all 387) | 359 (93% of its 387, 93% of all 387) | 359 (93% of its 387, 93% of all 387) |
| ZBar | @undecaf/zbar-wasm 0.11.0 | 374 of 387 | 328 (88% of its 374, 85% of all 387) | 334 (89% of its 374, 86% of all 387) | 341 (91% of its 374, 88% of all 387) |
| Quagga2 | @ericblade/quagga2 1.14.0 | 340 of 387 | 249 (73% of its 340, 64% of all 387) | 287 (84% of its 340, 74% of all 387) | 294 (86% of its 340, 76% of all 387) |
| jsQR | jsqr 1.4.0 | 26 of 387 | 22 (85% of its 26, 6% of all 387) | 23 (88% of its 26, 6% of all 387) | 23 (88% of its 26, 6% of all 387) |
| rxing | rxing-wasm 0.5.9 | 386 of 387 | 301 (78% of its 386, 78% of all 387) | 346 (90% of its 386, 89% of all 387) | 351 (91% of its 386, 91% of all 387) |
| OpenCV | opencv-python-headless 5.1.0, Python 3.12.8 | 310 of 387 | 230 (74% of its 310, 59% of all 387) | 216 (70% of its 310, 56% of all 387) | 242 (78% of its 310, 63% of all 387) |
barcode-grader: 381 of 387 codes found at their place (the "code found and read" line of npm run bench, which tests the place only), 381 of them with the right data by the rule above.
By symbology
PDFs at 150 dpi, PNGs as they are. A dash is a symbology the tool does not read.
| symbology | codes | barcode-grader | zxing-cpp | zxing-cpp, keeping check-digit errors | ZBar | Quagga2 | jsQR | rxing | OpenCV |
|---|---|---|---|---|---|---|---|---|---|
| EAN-13 | 160 | 159 | 86 | 87 | 141 | 114 | – | 107 | 131 |
| UPC-A | 96 | 94 | 81 | 83 | 87 | 83 | – | 84 | 74 |
| EAN-8 | 15 | 15 | 13 | 14 | 13 | 9 | – | 13 | 10 |
| UPC-E | 13 | 13 | 10 | 10 | 11 | 9 | – | 10 | 0 |
| ITF-14 | 26 | 25 | 25 | 25 | 24 | 5 | – | 22 | – |
| Code 128 / GS1-128 | 30 | 30 | 30 | 30 | 30 | 29 | – | 30 | – |
| GS1 DataBar | 5 | 5 | 2 | 2 | 4 | – | – | 2 | – |
| GS1 DataBar Expanded | 3 | 3 | 1 | 1 | 2 | – | – | 1 | – |
| GS1 DataBar Limited | 1 | 1 | 1 | 1 | – | – | – | – | – |
| QR Code | 26 | 25 | 24 | 24 | 16 | – | 22 | 22 | 15 |
| Data Matrix | 12 | 11 | 10 | 10 | – | – | – | 10 | – |
| all | 387 | 381 | 283 | 287 | 328 | 249 | 22 | 301 | 230 |
PDFs at 300 dpi, PNGs as they are. A dash is a symbology the tool does not read.
| symbology | codes | barcode-grader | zxing-cpp | zxing-cpp, keeping check-digit errors | ZBar | Quagga2 | jsQR | rxing | OpenCV |
|---|---|---|---|---|---|---|---|---|---|
| EAN-13 | 160 | 159 | 140 | 143 | 143 | 143 | – | 140 | 123 |
| UPC-A | 96 | 94 | 86 | 88 | 88 | 89 | – | 88 | 62 |
| EAN-8 | 15 | 15 | 14 | 15 | 14 | 10 | – | 14 | 11 |
| UPC-E | 13 | 13 | 12 | 13 | 12 | 11 | – | 12 | 0 |
| ITF-14 | 26 | 25 | 25 | 25 | 25 | 5 | – | 23 | – |
| Code 128 / GS1-128 | 30 | 30 | 30 | 30 | 30 | 29 | – | 30 | – |
| GS1 DataBar | 5 | 5 | 5 | 5 | 5 | – | – | 5 | – |
| GS1 DataBar Expanded | 3 | 3 | 3 | 3 | 2 | – | – | 1 | – |
| GS1 DataBar Limited | 1 | 1 | 1 | 1 | – | – | – | – | – |
| QR Code | 26 | 25 | 25 | 25 | 15 | – | 23 | 22 | 20 |
| Data Matrix | 12 | 11 | 11 | 11 | – | – | – | 11 | – |
| all | 387 | 381 | 352 | 359 | 334 | 287 | 23 | 346 | 216 |
either (150 or 300 dpi): read in at least one of the two pictures. A dash is a symbology the tool does not read.
| symbology | codes | barcode-grader | zxing-cpp | zxing-cpp, keeping check-digit errors | ZBar | Quagga2 | jsQR | rxing | OpenCV |
|---|---|---|---|---|---|---|---|---|---|
| EAN-13 | 160 | 159 | 140 | 143 | 143 | 145 | – | 142 | 134 |
| UPC-A | 96 | 94 | 86 | 88 | 88 | 89 | – | 90 | 76 |
| EAN-8 | 15 | 15 | 14 | 15 | 14 | 12 | – | 14 | 11 |
| UPC-E | 13 | 13 | 12 | 13 | 12 | 12 | – | 12 | 0 |
| ITF-14 | 26 | 25 | 25 | 25 | 25 | 7 | – | 24 | – |
| Code 128 / GS1-128 | 30 | 30 | 30 | 30 | 30 | 29 | – | 30 | – |
| GS1 DataBar | 5 | 5 | 5 | 5 | 5 | – | – | 5 | – |
| GS1 DataBar Expanded | 3 | 3 | 3 | 3 | 2 | – | – | 1 | – |
| GS1 DataBar Limited | 1 | 1 | 1 | 1 | – | – | – | – | – |
| QR Code | 26 | 25 | 25 | 25 | 22 | – | 23 | 22 | 21 |
| Data Matrix | 12 | 11 | 11 | 11 | – | – | – | 11 | – |
| all | 387 | 381 | 352 | 359 | 341 | 294 | 23 | 351 | 242 |
By corpus category
PDFs at 150 dpi. Each cell is codes read / codes in the tool's symbologies in that category.
| category | codes | barcode-grader | zxing-cpp | zxing-cpp, keeping check-digit errors | ZBar | Quagga2 | jsQR | rxing | OpenCV |
|---|---|---|---|---|---|---|---|---|---|
| 2d-size | 20 | 20 / 20 | 19 / 20 | 19 / 20 | 10 / 13 | – | 12 / 13 | 19 / 20 | 7 / 13 |
| carton | 12 | 12 / 12 | 9 / 12 | 9 / 12 | 12 / 12 | 8 / 10 | 2 / 2 | 9 / 12 | 10 / 12 |
| checkdigit | 12 | 12 / 12 | 5 / 12 | 9 / 12 | 4 / 11 | 2 / 10 | 1 / 1 | 5 / 12 | 1 / 8 |
| colour | 41 | 41 / 41 | 16 / 41 | 16 / 41 | 29 / 41 | 17 / 36 | 3 / 5 | 20 / 41 | 33 / 39 |
| databar | 9 | 9 / 9 | 4 / 9 | 4 / 9 | 6 / 8 | – | – | 3 / 8 | – |
| defects | 91 | 88 / 91 | 72 / 91 | 72 / 91 | 87 / 91 | 70 / 91 | – | 72 / 91 | 69 / 77 |
| hri | 11 | 11 / 11 | 7 / 11 | 7 / 11 | 11 / 11 | 10 / 11 | – | 8 / 11 | 8 / 9 |
| placement | 6 | 6 / 6 | 4 / 6 | 4 / 6 | 6 / 6 | 3 / 6 | – | 6 / 6 | 6 / 6 |
| png | 36 | 36 / 36 | 36 / 36 | 36 / 36 | 36 / 36 | 35 / 36 | – | 36 / 36 | 21 / 36 |
| quiet | 38 | 35 / 38 | 15 / 38 | 15 / 38 | 22 / 36 | 24 / 32 | 3 / 4 | 29 / 38 | 25 / 33 |
| rotation | 4 | 4 / 4 | 3 / 4 | 3 / 4 | 4 / 4 | 4 / 4 | – | 2 / 4 | 3 / 4 |
| size | 52 | 52 / 52 | 44 / 52 | 44 / 52 | 48 / 52 | 39 / 52 | – | 45 / 52 | 29 / 48 |
| symbology | 26 | 26 / 26 | 26 / 26 | 26 / 26 | 24 / 24 | 11 / 23 | 1 / 1 | 24 / 26 | 1 / 1 |
| truncation | 29 | 29 / 29 | 23 / 29 | 23 / 29 | 29 / 29 | 26 / 29 | – | 23 / 29 | 17 / 24 |
PDFs at 300 dpi. Each cell is codes read / codes in the tool's symbologies in that category.
| category | codes | barcode-grader | zxing-cpp | zxing-cpp, keeping check-digit errors | ZBar | Quagga2 | jsQR | rxing | OpenCV |
|---|---|---|---|---|---|---|---|---|---|
| 2d-size | 20 | 20 / 20 | 20 / 20 | 20 / 20 | 12 / 13 | – | 13 / 13 | 20 / 20 | 10 / 13 |
| carton | 12 | 12 / 12 | 12 / 12 | 12 / 12 | 10 / 12 | 9 / 10 | 2 / 2 | 12 / 12 | 12 / 12 |
| checkdigit | 12 | 12 / 12 | 5 / 12 | 12 / 12 | 3 / 11 | 2 / 10 | 1 / 1 | 5 / 12 | 1 / 8 |
| colour | 41 | 41 / 41 | 32 / 41 | 32 / 41 | 27 / 41 | 32 / 36 | 3 / 5 | 29 / 41 | 29 / 39 |
| databar | 9 | 9 / 9 | 9 / 9 | 9 / 9 | 7 / 8 | – | – | 6 / 8 | – |
| defects | 91 | 88 / 91 | 85 / 91 | 85 / 91 | 88 / 91 | 82 / 91 | – | 86 / 91 | 69 / 77 |
| hri | 11 | 11 / 11 | 11 / 11 | 11 / 11 | 11 / 11 | 10 / 11 | – | 11 / 11 | 8 / 9 |
| placement | 6 | 6 / 6 | 6 / 6 | 6 / 6 | 6 / 6 | 6 / 6 | – | 6 / 6 | 5 / 6 |
| png | 36 | 36 / 36 | 36 / 36 | 36 / 36 | 36 / 36 | 35 / 36 | – | 36 / 36 | 21 / 36 |
| quiet | 38 | 35 / 38 | 25 / 38 | 25 / 38 | 26 / 36 | 24 / 32 | 3 / 4 | 25 / 38 | 16 / 33 |
| rotation | 4 | 4 / 4 | 4 / 4 | 4 / 4 | 4 / 4 | 4 / 4 | – | 4 / 4 | 4 / 4 |
| size | 52 | 52 / 52 | 52 / 52 | 52 / 52 | 52 / 52 | 46 / 52 | – | 51 / 52 | 28 / 48 |
| symbology | 26 | 26 / 26 | 26 / 26 | 26 / 26 | 23 / 24 | 11 / 23 | 1 / 1 | 26 / 26 | 1 / 1 |
| truncation | 29 | 29 / 29 | 29 / 29 | 29 / 29 | 29 / 29 | 26 / 29 | – | 29 / 29 | 12 / 24 |
either (150 or 300 dpi). Each cell is codes read / codes in the tool's symbologies in that category.
| category | codes | barcode-grader | zxing-cpp | zxing-cpp, keeping check-digit errors | ZBar | Quagga2 | jsQR | rxing | OpenCV |
|---|---|---|---|---|---|---|---|---|---|
| 2d-size | 20 | 20 / 20 | 20 / 20 | 20 / 20 | 13 / 13 | – | 13 / 13 | 20 / 20 | 10 / 13 |
| carton | 12 | 12 / 12 | 12 / 12 | 12 / 12 | 12 / 12 | 9 / 10 | 2 / 2 | 12 / 12 | 12 / 12 |
| checkdigit | 12 | 12 / 12 | 5 / 12 | 12 / 12 | 4 / 11 | 2 / 10 | 1 / 1 | 5 / 12 | 1 / 8 |
| colour | 41 | 41 / 41 | 32 / 41 | 32 / 41 | 29 / 41 | 32 / 36 | 3 / 5 | 29 / 41 | 34 / 39 |
| databar | 9 | 9 / 9 | 9 / 9 | 9 / 9 | 7 / 8 | – | – | 6 / 8 | – |
| defects | 91 | 88 / 91 | 85 / 91 | 85 / 91 | 88 / 91 | 82 / 91 | – | 86 / 91 | 70 / 77 |
| hri | 11 | 11 / 11 | 11 / 11 | 11 / 11 | 11 / 11 | 10 / 11 | – | 11 / 11 | 8 / 9 |
| placement | 6 | 6 / 6 | 6 / 6 | 6 / 6 | 6 / 6 | 6 / 6 | – | 6 / 6 | 6 / 6 |
| png | 36 | 36 / 36 | 36 / 36 | 36 / 36 | 36 / 36 | 35 / 36 | – | 36 / 36 | 21 / 36 |
| quiet | 38 | 35 / 38 | 25 / 38 | 25 / 38 | 26 / 36 | 26 / 32 | 3 / 4 | 29 / 38 | 26 / 33 |
| rotation | 4 | 4 / 4 | 4 / 4 | 4 / 4 | 4 / 4 | 4 / 4 | – | 4 / 4 | 4 / 4 |
| size | 52 | 52 / 52 | 52 / 52 | 52 / 52 | 52 / 52 | 49 / 52 | – | 52 / 52 | 32 / 48 |
| symbology | 26 | 26 / 26 | 26 / 26 | 26 / 26 | 24 / 24 | 13 / 23 | 1 / 1 | 26 / 26 | 1 / 1 |
| truncation | 29 | 29 / 29 | 29 / 29 | 29 / 29 | 29 / 29 | 26 / 29 | – | 29 / 29 | 17 / 24 |
What the extra renderings add
barcode-grader against zxing-cpp, keeping check-digit errors (the same decoder with the same error setting, one pass over one picture), on all 387 codes.
| PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | |
|---|---|---|---|
| read by both | 287 | 359 | 359 |
| only by barcode-grader | 94 | 22 | 22 |
| only by the single pass | 0 | 0 | 0 |
| by neither | 6 | 6 | 6 |
Codes only barcode-grader reads, by category (PDFs at 150 dpi · PDFs at 300 dpi · either (150 or 300 dpi)):
- 2d-size: 1 · 0 · 0
- carton: 3 · 0 · 0
- checkdigit: 3 · 0 · 0
- colour: 25 · 9 · 9
- databar: 5 · 0 · 0
- defects: 16 · 3 · 3
- hri: 4 · 0 · 0
- placement: 2 · 0 · 0
- quiet: 20 · 10 · 10
- rotation: 1 · 0 · 0
- size: 8 · 0 · 0
- truncation: 6 · 0 · 0
Where a decoder reads what barcode-grader does not
No category: on the codes in its own symbologies, no decoder reads more than barcode-grader in any category at any setting.
Files barcode-grader does not read and at least one decoder does (2). Each is a lead for the finder:
| file | category | symbology | barcode-grader | read by |
|---|---|---|---|---|
defect-ean13-gain50-1200.png | defects | EAN-13 | not found | ZBar (PNG) |
defect-upca-gain50-1200.png | defects | UPC-A | not found | ZBar (PNG) |
Files barcode-grader does not read and no decoder reads either (4):
defect-upca-gain50.pdf(defects, UPC-A)quiet-gs1dm-0.pdf(quiet, Data Matrix)quiet-itf14-02.pdf(quiet, ITF-14)quiet-qr-0.pdf(quiet, QR Code)
Each tool
barcode-grader
- Version: barcode-grader 0.1.0 (dist/ built from this checkout)
- Call:
gradeFile(file) // the original PDF or PNG; it draws the page itself (four renderings, then other looks at the picture, then a close-up of each code) - Its symbologies cover 387 of the 387 corpus codes: EAN-13, UPC-A, EAN-8, UPC-E, ITF-14, Code 128 / GS1-128, GS1 DataBar, GS1 DataBar Expanded, GS1 DataBar Limited, QR Code, Data Matrix.
- Other results (a different value at the code's place, or anything elsewhere on the picture): 0 at 150 dpi, 0 at 300 dpi.
| symbology | codes | read |
|---|---|---|
| EAN-13 | 160 | 159 |
| UPC-A | 96 | 94 |
| EAN-8 | 15 | 15 |
| UPC-E | 13 | 13 |
| ITF-14 | 26 | 25 |
| Code 128 / GS1-128 | 30 | 30 |
| GS1 DataBar | 5 | 5 |
| GS1 DataBar Expanded | 3 | 3 |
| GS1 DataBar Limited | 1 | 1 |
| QR Code | 26 | 25 |
| Data Matrix | 12 | 11 |
| its symbologies | 387 | 381 |
| all, including symbologies it does not read | 387 | 381 |
| category | codes | read |
|---|---|---|
| 2d-size | 20 | 20 |
| carton | 12 | 12 |
| checkdigit | 12 | 12 |
| colour | 41 | 41 |
| databar | 9 | 9 |
| defects | 91 | 88 |
| hri | 11 | 11 |
| placement | 6 | 6 |
| png | 36 | 36 |
| quiet | 38 | 35 |
| rotation | 4 | 4 |
| size | 52 | 52 |
| symbology | 26 | 26 |
| truncation | 29 | 29 |
zxing-cpp
- Version: zxing-wasm 3.1.8, zxing-cpp commit f66b8ab490 · licence Apache-2.0 (zxing-wasm: MIT) · https://github.com/zxing-cpp/zxing-cpp
- Call:
readBarcodes(imageData, {}) // zxing-wasm defaults: every format, tryHarder, tryRotate, tryInvert, tryDownscale, LocalAverage binarizer - Its symbologies cover 387 of the 387 corpus codes: EAN-13, UPC-A, EAN-8, UPC-E, ITF-14, Code 128 / GS1-128, GS1 DataBar, GS1 DataBar Expanded, GS1 DataBar Limited, QR Code, Data Matrix.
- Other results (a different value at the code's place, or anything elsewhere on the picture): 0 at 150 dpi, 0 at 300 dpi.
| symbology | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| EAN-13 | 160 | 86 | 140 | 140 | 159 |
| UPC-A | 96 | 81 | 86 | 86 | 94 |
| EAN-8 | 15 | 13 | 14 | 14 | 15 |
| UPC-E | 13 | 10 | 12 | 12 | 13 |
| ITF-14 | 26 | 25 | 25 | 25 | 25 |
| Code 128 / GS1-128 | 30 | 30 | 30 | 30 | 30 |
| GS1 DataBar | 5 | 2 | 5 | 5 | 5 |
| GS1 DataBar Expanded | 3 | 1 | 3 | 3 | 3 |
| GS1 DataBar Limited | 1 | 1 | 1 | 1 | 1 |
| QR Code | 26 | 24 | 25 | 25 | 25 |
| Data Matrix | 12 | 10 | 11 | 11 | 11 |
| its symbologies | 387 | 283 | 352 | 352 | 381 |
| all, including symbologies it does not read | 387 | 283 | 352 | 352 | 381 |
| category | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| 2d-size | 20 | 19 | 20 | 20 | 20 |
| carton | 12 | 9 | 12 | 12 | 12 |
| checkdigit | 12 | 5 | 5 | 5 | 12 |
| colour | 41 | 16 | 32 | 32 | 41 |
| databar | 9 | 4 | 9 | 9 | 9 |
| defects | 91 | 72 | 85 | 85 | 88 |
| hri | 11 | 7 | 11 | 11 | 11 |
| placement | 6 | 4 | 6 | 6 | 6 |
| png | 36 | 36 | 36 | 36 | 36 |
| quiet | 38 | 15 | 25 | 25 | 35 |
| rotation | 4 | 3 | 4 | 4 | 4 |
| size | 52 | 44 | 52 | 52 | 52 |
| symbology | 26 | 26 | 26 | 26 | 26 |
| truncation | 29 | 23 | 29 | 29 | 29 |
zxing-cpp, keeping check-digit errors
- Version: zxing-wasm 3.1.8, zxing-cpp commit f66b8ab490 · licence Apache-2.0 (zxing-wasm: MIT) · https://github.com/zxing-cpp/zxing-cpp
- Call:
readBarcodes(imageData, { returnErrors: true }) // as above, and a symbol whose only fault is its check digit (ChecksumError) counts as read - Its symbologies cover 387 of the 387 corpus codes: EAN-13, UPC-A, EAN-8, UPC-E, ITF-14, Code 128 / GS1-128, GS1 DataBar, GS1 DataBar Expanded, GS1 DataBar Limited, QR Code, Data Matrix.
- The same single pass with
returnErrors, which is how barcode-grader calls it: an EAN/UPC/ITF whose bars read but whose check digit is wrong is kept, because that is a finding. This row is the like-for-like baseline for what the extra renderings add. - Other results (a different value at the code's place, or anything elsewhere on the picture): 4 at 150 dpi, 4 at 300 dpi.
| symbology | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| EAN-13 | 160 | 87 | 143 | 143 | 159 |
| UPC-A | 96 | 83 | 88 | 88 | 94 |
| EAN-8 | 15 | 14 | 15 | 15 | 15 |
| UPC-E | 13 | 10 | 13 | 13 | 13 |
| ITF-14 | 26 | 25 | 25 | 25 | 25 |
| Code 128 / GS1-128 | 30 | 30 | 30 | 30 | 30 |
| GS1 DataBar | 5 | 2 | 5 | 5 | 5 |
| GS1 DataBar Expanded | 3 | 1 | 3 | 3 | 3 |
| GS1 DataBar Limited | 1 | 1 | 1 | 1 | 1 |
| QR Code | 26 | 24 | 25 | 25 | 25 |
| Data Matrix | 12 | 10 | 11 | 11 | 11 |
| its symbologies | 387 | 287 | 359 | 359 | 381 |
| all, including symbologies it does not read | 387 | 287 | 359 | 359 | 381 |
| category | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| 2d-size | 20 | 19 | 20 | 20 | 20 |
| carton | 12 | 9 | 12 | 12 | 12 |
| checkdigit | 12 | 9 | 12 | 12 | 12 |
| colour | 41 | 16 | 32 | 32 | 41 |
| databar | 9 | 4 | 9 | 9 | 9 |
| defects | 91 | 72 | 85 | 85 | 88 |
| hri | 11 | 7 | 11 | 11 | 11 |
| placement | 6 | 4 | 6 | 6 | 6 |
| png | 36 | 36 | 36 | 36 | 36 |
| quiet | 38 | 15 | 25 | 25 | 35 |
| rotation | 4 | 3 | 4 | 4 | 4 |
| size | 52 | 44 | 52 | 52 | 52 |
| symbology | 26 | 26 | 26 | 26 | 26 |
| truncation | 29 | 23 | 29 | 29 | 29 |
Other results in full (10):
defect-ean13-combo2.pdfat 150 dpi: EAN130567167369023(ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-139501101369023defect-upca-gain20.pdfat 150 dpi: EAN130614141276549(ChecksumError @ ODMultiUPCEANReader.cpp:289), code is UPC-A614141876549gs1dm-300.pdfat 150 dpi: DataMatrix `` (ChecksumError @ DMDecoder.cpp:424), code is Data Matrix(01)09501101530003(17)271231(10)AB12size-upca-075.pdfat 150 dpi: EAN130614147000036(ChecksumError @ ODMultiUPCEANReader.cpp:289), code is UPC-A614141000036cd-ean13-0.pdfat 300 dpi: EAN133855411705101(ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-139501101214579cd-upce-0.pdfat 300 dpi: UPCE0067100001324(ChecksumError @ ODMultiUPCEANReader.cpp:289), code is UPC-E06543211defect-ean13-combo2.pdfat 300 dpi: EAN130588181369023(ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-139501101369023defect-ean13-combo2.pdfat 300 dpi: EAN134428863401101(ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-139501101369023defect-ean13-gain40.pdfat 300 dpi: EAN130568181369023(ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-139501101369023defect-ean13-gain40.pdfat 300 dpi: EAN134428863401101(ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-139501101369023
ZBar
- Version: @undecaf/zbar-wasm 0.11.0 · licence LGPL-2.1-or-later · https://github.com/undecaf/zbar-wasm
- Call:
scanImageData(imageData) // the default scanner, every symbology ZBar enables by default - Its symbologies cover 374 of the 387 corpus codes: EAN-13, UPC-A, EAN-8, UPC-E, ITF-14, Code 128 / GS1-128, GS1 DataBar, GS1 DataBar Expanded, QR Code.
- Other results (a different value at the code's place, or anything elsewhere on the picture): 1 at 150 dpi, 1 at 300 dpi.
| symbology | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| EAN-13 | 160 | 141 | 143 | 143 | 159 |
| UPC-A | 96 | 87 | 88 | 88 | 94 |
| EAN-8 | 15 | 13 | 14 | 14 | 15 |
| UPC-E | 13 | 11 | 12 | 12 | 13 |
| ITF-14 | 26 | 24 | 25 | 25 | 25 |
| Code 128 / GS1-128 | 30 | 30 | 30 | 30 | 30 |
| GS1 DataBar | 5 | 4 | 5 | 5 | 5 |
| GS1 DataBar Expanded | 3 | 2 | 2 | 2 | 3 |
| QR Code | 26 | 16 | 15 | 22 | 25 |
| its symbologies | 374 | 328 | 334 | 341 | 369 |
| all, including symbologies it does not read | 387 | 328 | 334 | 341 | 381 |
| category | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| 2d-size | 13 | 10 | 12 | 13 | 13 |
| carton | 12 | 12 | 10 | 12 | 12 |
| checkdigit | 11 | 4 | 3 | 4 | 11 |
| colour | 41 | 29 | 27 | 29 | 41 |
| databar | 8 | 6 | 7 | 7 | 8 |
| defects | 91 | 87 | 88 | 88 | 88 |
| hri | 11 | 11 | 11 | 11 | 11 |
| placement | 6 | 6 | 6 | 6 | 6 |
| png | 36 | 36 | 36 | 36 | 36 |
| quiet | 36 | 22 | 26 | 26 | 34 |
| rotation | 4 | 4 | 4 | 4 | 4 |
| size | 52 | 48 | 52 | 52 | 52 |
| symbology | 24 | 24 | 23 | 24 | 24 |
| truncation | 29 | 29 | 29 | 29 | 29 |
Other results in full (1):
defect-ean13-voids3-1200.png: EAN135501167369023, code is EAN-139501101369023
Quagga2
- Version: @ericblade/quagga2 1.14.0 · licence MIT · https://github.com/ericblade/quagga2
- Call:
Quagga.decodeSingle({ src: file, locate: true, numOfWorkers: 0, inputStream: { size: <longer side of the picture> }, decoder: { readers: ["ean_reader", "ean_8_reader", "upc_reader", "upc_e_reader", "code_128_reader", "i2of5_reader"] } }) - Its symbologies cover 340 of the 387 corpus codes: EAN-13, UPC-A, EAN-8, UPC-E, ITF-14, Code 128 / GS1-128.
- 1D only, and one result per picture. Quagga2 has no default set of readers that covers the corpus (its default is Code 128 alone), so the six that match corpus symbologies are switched on;
inputStream.sizeis set to the picture's longer side so it is not scaled down to the default 800 px. Everything else is the default (medium patches, half-sampling). - Other results (a different value at the code's place, or anything elsewhere on the picture): 9 at 150 dpi, 4 at 300 dpi.
| symbology | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| EAN-13 | 160 | 114 | 143 | 145 | 159 |
| UPC-A | 96 | 83 | 89 | 89 | 94 |
| EAN-8 | 15 | 9 | 10 | 12 | 15 |
| UPC-E | 13 | 9 | 11 | 12 | 13 |
| ITF-14 | 26 | 5 | 5 | 7 | 25 |
| Code 128 / GS1-128 | 30 | 29 | 29 | 29 | 30 |
| its symbologies | 340 | 249 | 287 | 294 | 336 |
| all, including symbologies it does not read | 387 | 249 | 287 | 294 | 381 |
| category | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| carton | 10 | 8 | 9 | 9 | 10 |
| checkdigit | 10 | 2 | 2 | 2 | 10 |
| colour | 36 | 17 | 32 | 32 | 36 |
| defects | 91 | 70 | 82 | 82 | 88 |
| hri | 11 | 10 | 10 | 10 | 11 |
| placement | 6 | 3 | 6 | 6 | 6 |
| png | 36 | 35 | 35 | 35 | 36 |
| quiet | 32 | 24 | 24 | 26 | 31 |
| rotation | 4 | 4 | 4 | 4 | 4 |
| size | 52 | 39 | 46 | 49 | 52 |
| symbology | 23 | 11 | 11 | 13 | 23 |
| truncation | 29 | 26 | 26 | 26 | 29 |
Other results in full (11):
cd-upce-0.pdfat 150 dpi: upc_e11179641, code is UPC-E06543211databar-databarexpandedstacked-330.pdfat 150 dpi: ean_817383370, code is GS1 DataBar Expanded0109501101530003310300015010ABC123defect-upca-contrast25.pdfat 150 dpi: upc_e11901174, code is UPC-A614141876549defect-upca-gain50.pdfat 150 dpi: ean_861410121, code is UPC-A614141876549itf14-nobearer-495.pdfat 150 dpi: i2of530528767104315, code is ITF-1419501101214573itf14-nobearer-635-300.png: i2of530598767104315, code is ITF-1419501101214573itf14-tb-495.pdfat 150 dpi: i2of530528767104315, code is ITF-1419501101214573itf14-tb-635-300.png: i2of530598767104315, code is ITF-1419501101214573size-ean8-085.pdfat 150 dpi: ean_814752452, code is EAN-895001234itf14-nobearer-635.pdfat 300 dpi: i2of530598767104315, code is ITF-1419501101214573itf14-tb-635.pdfat 300 dpi: i2of530598767104315, code is ITF-1419501101214573
jsQR
- Version: jsqr 1.4.0 · licence Apache-2.0 · https://github.com/cozmo/jsQR
- Call:
jsQR(imageData.data, width, height) // defaults: inversionAttempts "attemptBoth" - Its symbologies cover 26 of the 387 corpus codes: QR Code.
- QR only, and one result per picture.
- Other results (a different value at the code's place, or anything elsewhere on the picture): 0 at 150 dpi, 0 at 300 dpi.
| symbology | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| QR Code | 26 | 22 | 23 | 23 | 25 |
| its symbologies | 26 | 22 | 23 | 23 | 25 |
| all, including symbologies it does not read | 387 | 22 | 23 | 23 | 381 |
| category | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| 2d-size | 13 | 12 | 13 | 13 | 13 |
| carton | 2 | 2 | 2 | 2 | 2 |
| checkdigit | 1 | 1 | 1 | 1 | 1 |
| colour | 5 | 3 | 3 | 3 | 5 |
| quiet | 4 | 3 | 3 | 3 | 3 |
| symbology | 1 | 1 | 1 | 1 | 1 |
rxing
- Version: rxing-wasm 0.5.9 · licence Apache-2.0 · https://github.com/rxing-core/rxing-wasm
- Call:
decode_multi(luma8, width, height, hints) // hints: TryHarder = true; luma = (306 R + 601 G + 117 B) >> 10 - Its symbologies cover 386 of the 387 corpus codes: EAN-13, UPC-A, EAN-8, UPC-E, ITF-14, Code 128 / GS1-128, GS1 DataBar, GS1 DataBar Expanded, QR Code, Data Matrix.
- A Rust port of ZXing (the Java library). Its format list has RSS-14 and RSS Expanded but no DataBar Limited.
- Other results (a different value at the code's place, or anything elsewhere on the picture): 0 at 150 dpi, 2 at 300 dpi.
| symbology | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| EAN-13 | 160 | 107 | 140 | 142 | 159 |
| UPC-A | 96 | 84 | 88 | 90 | 94 |
| EAN-8 | 15 | 13 | 14 | 14 | 15 |
| UPC-E | 13 | 10 | 12 | 12 | 13 |
| ITF-14 | 26 | 22 | 23 | 24 | 25 |
| Code 128 / GS1-128 | 30 | 30 | 30 | 30 | 30 |
| GS1 DataBar | 5 | 2 | 5 | 5 | 5 |
| GS1 DataBar Expanded | 3 | 1 | 1 | 1 | 3 |
| QR Code | 26 | 22 | 22 | 22 | 25 |
| Data Matrix | 12 | 10 | 11 | 11 | 11 |
| its symbologies | 386 | 301 | 346 | 351 | 380 |
| all, including symbologies it does not read | 387 | 301 | 346 | 351 | 381 |
| category | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| 2d-size | 20 | 19 | 20 | 20 | 20 |
| carton | 12 | 9 | 12 | 12 | 12 |
| checkdigit | 12 | 5 | 5 | 5 | 12 |
| colour | 41 | 20 | 29 | 29 | 41 |
| databar | 8 | 3 | 6 | 6 | 8 |
| defects | 91 | 72 | 86 | 86 | 88 |
| hri | 11 | 8 | 11 | 11 | 11 |
| placement | 6 | 6 | 6 | 6 | 6 |
| png | 36 | 36 | 36 | 36 | 36 |
| quiet | 38 | 29 | 25 | 29 | 35 |
| rotation | 4 | 2 | 4 | 4 | 4 |
| size | 52 | 45 | 51 | 52 | 52 |
| symbology | 26 | 24 | 26 | 26 | 26 |
| truncation | 29 | 23 | 29 | 29 | 29 |
Other results in full (2):
size-upca-085.pdfat 300 dpi: UpcE06745752, code is UPC-A614141000036trunc-ean13-100-30.pdfat 300 dpi: UpcE10711774, code is EAN-139501101678958
OpenCV
- Version: opencv-python-headless 5.1.0, Python 3.12.8 · licence Apache-2.0 · https://github.com/opencv/opencv
- Call:
cv2.barcode.BarcodeDetector().detectAndDecodeWithType(bgr) and cv2.QRCodeDetector().detectAndDecodeMulti(bgr) - Its symbologies cover 310 of the 387 corpus codes: EAN-13, UPC-A, EAN-8, UPC-E, QR Code.
- The barcode detector reads EAN-13, EAN-8, UPC-A and UPC-E only; QR comes from the separate QR detector. Both are run on every picture.
- Other results (a different value at the code's place, or anything elsewhere on the picture): 2 at 150 dpi, 1 at 300 dpi.
| symbology | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| EAN-13 | 160 | 131 | 123 | 134 | 159 |
| UPC-A | 96 | 74 | 62 | 76 | 94 |
| EAN-8 | 15 | 10 | 11 | 11 | 15 |
| UPC-E | 13 | 0 | 0 | 0 | 13 |
| QR Code | 26 | 15 | 20 | 21 | 25 |
| its symbologies | 310 | 230 | 216 | 242 | 306 |
| all, including symbologies it does not read | 387 | 230 | 216 | 242 | 381 |
| category | codes | PDFs at 150 dpi | PDFs at 300 dpi | either (150 or 300 dpi) | barcode-grader, same codes |
|---|---|---|---|---|---|
| 2d-size | 13 | 7 | 10 | 10 | 13 |
| carton | 12 | 10 | 12 | 12 | 12 |
| checkdigit | 8 | 1 | 1 | 1 | 8 |
| colour | 39 | 33 | 29 | 34 | 39 |
| defects | 77 | 69 | 69 | 70 | 74 |
| hri | 9 | 8 | 8 | 8 | 9 |
| placement | 6 | 6 | 5 | 6 | 6 |
| png | 36 | 21 | 21 | 21 | 36 |
| quiet | 33 | 25 | 16 | 26 | 32 |
| rotation | 4 | 3 | 4 | 4 | 4 |
| size | 48 | 29 | 28 | 32 | 48 |
| symbology | 1 | 1 | 1 | 1 | 1 |
| truncation | 24 | 17 | 12 | 17 | 24 |
Other results in full (2):
defect-ean13-gain50-1200.png: EAN_847661011, code is EAN-139501101369023itf14-tb-635.pdfat 150 dpi: EAN_133215942570284, code is ITF-1419501101214573
Tools that could not run here
- pyzbar (native ZBar) (pyzbar; pyzbar 0.1.9, libzbar 0.23): the Python process was killed by SIGSEGV inside the native library while decoding.
What each tool does
From each tool's documented interface, not measured here. "Position" is where the symbol is in the picture, in pixels.
| barcode-grader | zxing-cpp | ZBar | Quagga2 | jsQR | rxing | OpenCV | pyzbar (native ZBar) | |
|---|---|---|---|---|---|---|---|---|
| decodes the data | yes | yes | yes | yes | yes | yes | yes | yes |
| reports position | yes | yes | yes | yes | yes | yes | yes | yes |
| reads a PDF directly | yes | no (needs a picture) | no (needs a picture) | no (needs a picture) | no (needs a picture) | no (needs a picture) | no (needs a picture) | no (needs a picture) |
| reports size in mm (X-dimension) | yes | no | no | no | no | no | no | no |
| checks size against GS1's magnification range | yes | no | no | no | no | no | no | no |
| checks quiet zones | yes | no | no | no | no | no | no | no |
| checks bar height | yes | no | no | no | no | no | no | no |
| checks contrast in red light | yes | no | no | no | no | no | no | no |
| checks GS1 data (Application Identifiers, Digital Link) | yes | no | no | no | no | no | no | no |
| predicts an ISO/IEC 15416 / 15415 grade | yes | no | no | no | no | no | no | no |
Notes: zxing-cpp and rxing flag whether a symbol carries GS1 data (and zxing-cpp can print it with its Application Identifiers) but do not validate it. ZBar gives each result a "quality" number (a relative figure for how confidently it decoded), which is not a print-quality grade. A caller who knows a picture's resolution can turn a decoder's pixel position into a width; none of the decoders does that or compares it with a specification.
Other open-source projects that do grade (student and hobby implementations of ISO/IEC 15416 or 15415 on photos of printed codes) are listed in bench/compare/README.md; they were not run here.