Skip to content

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.mjs uses) 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.mjs is 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 ​

toolversioncodes in its symbologiesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)
barcode-graderbarcode-grader 0.1.0 (dist/ built from this checkout)387 of 387381 (98% of its 387, 98% of all 387)same (own renderings)same (own renderings)
zxing-cppzxing-wasm 3.1.8, zxing-cpp commit f66b8ab490387 of 387283 (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 errorszxing-wasm 3.1.8, zxing-cpp commit f66b8ab490387 of 387287 (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.0374 of 387328 (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.0340 of 387249 (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)
jsQRjsqr 1.4.026 of 38722 (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)
rxingrxing-wasm 0.5.9386 of 387301 (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)
OpenCVopencv-python-headless 5.1.0, Python 3.12.8310 of 387230 (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.

symbologycodesbarcode-graderzxing-cppzxing-cpp, keeping check-digit errorsZBarQuagga2jsQRrxingOpenCV
EAN-131601598687141114–107131
UPC-A969481838783–8474
EAN-815151314139–1310
UPC-E13131010119–100
ITF-1426252525245–22–
Code 128 / GS1-128303030303029–30–
GS1 DataBar55224––2–
GS1 DataBar Expanded33112––1–
GS1 DataBar Limited1111–––––
QR Code2625242416–222215
Data Matrix12111010–––10–
all38738128328732824922301230

PDFs at 300 dpi, PNGs as they are. A dash is a symbology the tool does not read.

symbologycodesbarcode-graderzxing-cppzxing-cpp, keeping check-digit errorsZBarQuagga2jsQRrxingOpenCV
EAN-13160159140143143143–140123
UPC-A969486888889–8862
EAN-8151514151410–1411
UPC-E131312131211–120
ITF-1426252525255–23–
Code 128 / GS1-128303030303029–30–
GS1 DataBar55555––5–
GS1 DataBar Expanded33332––1–
GS1 DataBar Limited1111–––––
QR Code2625252515–232220
Data Matrix12111111–––11–
all38738135235933428723346216

either (150 or 300 dpi): read in at least one of the two pictures. A dash is a symbology the tool does not read.

symbologycodesbarcode-graderzxing-cppzxing-cpp, keeping check-digit errorsZBarQuagga2jsQRrxingOpenCV
EAN-13160159140143143145–142134
UPC-A969486888889–9076
EAN-8151514151412–1411
UPC-E131312131212–120
ITF-1426252525257–24–
Code 128 / GS1-128303030303029–30–
GS1 DataBar55555––5–
GS1 DataBar Expanded33332––1–
GS1 DataBar Limited1111–––––
QR Code2625252522–232221
Data Matrix12111111–––11–
all38738135235934129423351242

By corpus category ​

PDFs at 150 dpi. Each cell is codes read / codes in the tool's symbologies in that category.

categorycodesbarcode-graderzxing-cppzxing-cpp, keeping check-digit errorsZBarQuagga2jsQRrxingOpenCV
2d-size2020 / 2019 / 2019 / 2010 / 13–12 / 1319 / 207 / 13
carton1212 / 129 / 129 / 1212 / 128 / 102 / 29 / 1210 / 12
checkdigit1212 / 125 / 129 / 124 / 112 / 101 / 15 / 121 / 8
colour4141 / 4116 / 4116 / 4129 / 4117 / 363 / 520 / 4133 / 39
databar99 / 94 / 94 / 96 / 8––3 / 8–
defects9188 / 9172 / 9172 / 9187 / 9170 / 91–72 / 9169 / 77
hri1111 / 117 / 117 / 1111 / 1110 / 11–8 / 118 / 9
placement66 / 64 / 64 / 66 / 63 / 6–6 / 66 / 6
png3636 / 3636 / 3636 / 3636 / 3635 / 36–36 / 3621 / 36
quiet3835 / 3815 / 3815 / 3822 / 3624 / 323 / 429 / 3825 / 33
rotation44 / 43 / 43 / 44 / 44 / 4–2 / 43 / 4
size5252 / 5244 / 5244 / 5248 / 5239 / 52–45 / 5229 / 48
symbology2626 / 2626 / 2626 / 2624 / 2411 / 231 / 124 / 261 / 1
truncation2929 / 2923 / 2923 / 2929 / 2926 / 29–23 / 2917 / 24

PDFs at 300 dpi. Each cell is codes read / codes in the tool's symbologies in that category.

categorycodesbarcode-graderzxing-cppzxing-cpp, keeping check-digit errorsZBarQuagga2jsQRrxingOpenCV
2d-size2020 / 2020 / 2020 / 2012 / 13–13 / 1320 / 2010 / 13
carton1212 / 1212 / 1212 / 1210 / 129 / 102 / 212 / 1212 / 12
checkdigit1212 / 125 / 1212 / 123 / 112 / 101 / 15 / 121 / 8
colour4141 / 4132 / 4132 / 4127 / 4132 / 363 / 529 / 4129 / 39
databar99 / 99 / 99 / 97 / 8––6 / 8–
defects9188 / 9185 / 9185 / 9188 / 9182 / 91–86 / 9169 / 77
hri1111 / 1111 / 1111 / 1111 / 1110 / 11–11 / 118 / 9
placement66 / 66 / 66 / 66 / 66 / 6–6 / 65 / 6
png3636 / 3636 / 3636 / 3636 / 3635 / 36–36 / 3621 / 36
quiet3835 / 3825 / 3825 / 3826 / 3624 / 323 / 425 / 3816 / 33
rotation44 / 44 / 44 / 44 / 44 / 4–4 / 44 / 4
size5252 / 5252 / 5252 / 5252 / 5246 / 52–51 / 5228 / 48
symbology2626 / 2626 / 2626 / 2623 / 2411 / 231 / 126 / 261 / 1
truncation2929 / 2929 / 2929 / 2929 / 2926 / 29–29 / 2912 / 24

either (150 or 300 dpi). Each cell is codes read / codes in the tool's symbologies in that category.

categorycodesbarcode-graderzxing-cppzxing-cpp, keeping check-digit errorsZBarQuagga2jsQRrxingOpenCV
2d-size2020 / 2020 / 2020 / 2013 / 13–13 / 1320 / 2010 / 13
carton1212 / 1212 / 1212 / 1212 / 129 / 102 / 212 / 1212 / 12
checkdigit1212 / 125 / 1212 / 124 / 112 / 101 / 15 / 121 / 8
colour4141 / 4132 / 4132 / 4129 / 4132 / 363 / 529 / 4134 / 39
databar99 / 99 / 99 / 97 / 8––6 / 8–
defects9188 / 9185 / 9185 / 9188 / 9182 / 91–86 / 9170 / 77
hri1111 / 1111 / 1111 / 1111 / 1110 / 11–11 / 118 / 9
placement66 / 66 / 66 / 66 / 66 / 6–6 / 66 / 6
png3636 / 3636 / 3636 / 3636 / 3635 / 36–36 / 3621 / 36
quiet3835 / 3825 / 3825 / 3826 / 3626 / 323 / 429 / 3826 / 33
rotation44 / 44 / 44 / 44 / 44 / 4–4 / 44 / 4
size5252 / 5252 / 5252 / 5252 / 5249 / 52–52 / 5232 / 48
symbology2626 / 2626 / 2626 / 2624 / 2413 / 231 / 126 / 261 / 1
truncation2929 / 2929 / 2929 / 2929 / 2926 / 29–29 / 2917 / 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 dpiPDFs at 300 dpieither (150 or 300 dpi)
read by both287359359
only by barcode-grader942222
only by the single pass000
by neither666

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:

filecategorysymbologybarcode-graderread by
defect-ean13-gain50-1200.pngdefectsEAN-13not foundZBar (PNG)
defect-upca-gain50-1200.pngdefectsUPC-Anot foundZBar (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.
symbologycodesread
EAN-13160159
UPC-A9694
EAN-81515
UPC-E1313
ITF-142625
Code 128 / GS1-1283030
GS1 DataBar55
GS1 DataBar Expanded33
GS1 DataBar Limited11
QR Code2625
Data Matrix1211
its symbologies387381
all, including symbologies it does not read387381
categorycodesread
2d-size2020
carton1212
checkdigit1212
colour4141
databar99
defects9188
hri1111
placement66
png3636
quiet3835
rotation44
size5252
symbology2626
truncation2929

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.
symbologycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
EAN-1316086140140159
UPC-A9681868694
EAN-81513141415
UPC-E1310121213
ITF-142625252525
Code 128 / GS1-1283030303030
GS1 DataBar52555
GS1 DataBar Expanded31333
GS1 DataBar Limited11111
QR Code2624252525
Data Matrix1210111111
its symbologies387283352352381
all, including symbologies it does not read387283352352381
categorycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
2d-size2019202020
carton129121212
checkdigit1255512
colour4116323241
databar94999
defects9172858588
hri117111111
placement64666
png3636363636
quiet3815252535
rotation43444
size5244525252
symbology2626262626
truncation2923292929

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.
symbologycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
EAN-1316087143143159
UPC-A9683888894
EAN-81514151515
UPC-E1310131313
ITF-142625252525
Code 128 / GS1-1283030303030
GS1 DataBar52555
GS1 DataBar Expanded31333
GS1 DataBar Limited11111
QR Code2624252525
Data Matrix1210111111
its symbologies387287359359381
all, including symbologies it does not read387287359359381
categorycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
2d-size2019202020
carton129121212
checkdigit129121212
colour4116323241
databar94999
defects9172858588
hri117111111
placement64666
png3636363636
quiet3815252535
rotation43444
size5244525252
symbology2626262626
truncation2923292929

Other results in full (10):

  • defect-ean13-combo2.pdf at 150 dpi: EAN13 0567167369023 (ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-13 9501101369023
  • defect-upca-gain20.pdf at 150 dpi: EAN13 0614141276549 (ChecksumError @ ODMultiUPCEANReader.cpp:289), code is UPC-A 614141876549
  • gs1dm-300.pdf at 150 dpi: DataMatrix `` (ChecksumError @ DMDecoder.cpp:424), code is Data Matrix (01)09501101530003(17)271231(10)AB12
  • size-upca-075.pdf at 150 dpi: EAN13 0614147000036 (ChecksumError @ ODMultiUPCEANReader.cpp:289), code is UPC-A 614141000036
  • cd-ean13-0.pdf at 300 dpi: EAN13 3855411705101 (ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-13 9501101214579
  • cd-upce-0.pdf at 300 dpi: UPCE 0067100001324 (ChecksumError @ ODMultiUPCEANReader.cpp:289), code is UPC-E 06543211
  • defect-ean13-combo2.pdf at 300 dpi: EAN13 0588181369023 (ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-13 9501101369023
  • defect-ean13-combo2.pdf at 300 dpi: EAN13 4428863401101 (ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-13 9501101369023
  • defect-ean13-gain40.pdf at 300 dpi: EAN13 0568181369023 (ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-13 9501101369023
  • defect-ean13-gain40.pdf at 300 dpi: EAN13 4428863401101 (ChecksumError @ ODMultiUPCEANReader.cpp:289), code is EAN-13 9501101369023

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.
symbologycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
EAN-13160141143143159
UPC-A9687888894
EAN-81513141415
UPC-E1311121213
ITF-142624252525
Code 128 / GS1-1283030303030
GS1 DataBar54555
GS1 DataBar Expanded32223
QR Code2616152225
its symbologies374328334341369
all, including symbologies it does not read387328334341381
categorycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
2d-size1310121313
carton1212101212
checkdigit1143411
colour4129272941
databar86778
defects9187888888
hri1111111111
placement66666
png3636363636
quiet3622262634
rotation44444
size5248525252
symbology2424232424
truncation2929292929

Other results in full (1):

  • defect-ean13-voids3-1200.png: EAN13 5501167369023, code is EAN-13 9501101369023

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.size is 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.
symbologycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
EAN-13160114143145159
UPC-A9683898994
EAN-8159101215
UPC-E139111213
ITF-142655725
Code 128 / GS1-1283029292930
its symbologies340249287294336
all, including symbologies it does not read387249287294381
categorycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
carton1089910
checkdigit1022210
colour3617323236
defects9170828288
hri1110101011
placement63666
png3635353536
quiet3224242631
rotation44444
size5239464952
symbology2311111323
truncation2926262629

Other results in full (11):

  • cd-upce-0.pdf at 150 dpi: upc_e 11179641, code is UPC-E 06543211
  • databar-databarexpandedstacked-330.pdf at 150 dpi: ean_8 17383370, code is GS1 DataBar Expanded 0109501101530003310300015010ABC123
  • defect-upca-contrast25.pdf at 150 dpi: upc_e 11901174, code is UPC-A 614141876549
  • defect-upca-gain50.pdf at 150 dpi: ean_8 61410121, code is UPC-A 614141876549
  • itf14-nobearer-495.pdf at 150 dpi: i2of5 30528767104315, code is ITF-14 19501101214573
  • itf14-nobearer-635-300.png: i2of5 30598767104315, code is ITF-14 19501101214573
  • itf14-tb-495.pdf at 150 dpi: i2of5 30528767104315, code is ITF-14 19501101214573
  • itf14-tb-635-300.png: i2of5 30598767104315, code is ITF-14 19501101214573
  • size-ean8-085.pdf at 150 dpi: ean_8 14752452, code is EAN-8 95001234
  • itf14-nobearer-635.pdf at 300 dpi: i2of5 30598767104315, code is ITF-14 19501101214573
  • itf14-tb-635.pdf at 300 dpi: i2of5 30598767104315, code is ITF-14 19501101214573

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.
symbologycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
QR Code2622232325
its symbologies2622232325
all, including symbologies it does not read387222323381
categorycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
2d-size1312131313
carton22222
checkdigit11111
colour53335
quiet43333
symbology11111

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.
symbologycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
EAN-13160107140142159
UPC-A9684889094
EAN-81513141415
UPC-E1310121213
ITF-142622232425
Code 128 / GS1-1283030303030
GS1 DataBar52555
GS1 DataBar Expanded31113
QR Code2622222225
Data Matrix1210111111
its symbologies386301346351380
all, including symbologies it does not read387301346351381
categorycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
2d-size2019202020
carton129121212
checkdigit1255512
colour4120292941
databar83668
defects9172868688
hri118111111
placement66666
png3636363636
quiet3829252935
rotation42444
size5245515252
symbology2624262626
truncation2923292929

Other results in full (2):

  • size-upca-085.pdf at 300 dpi: UpcE 06745752, code is UPC-A 614141000036
  • trunc-ean13-100-30.pdf at 300 dpi: UpcE 10711774, code is EAN-13 9501101678958

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.
symbologycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
EAN-13160131123134159
UPC-A9674627694
EAN-81510111115
UPC-E1300013
QR Code2615202125
its symbologies310230216242306
all, including symbologies it does not read387230216242381
categorycodesPDFs at 150 dpiPDFs at 300 dpieither (150 or 300 dpi)barcode-grader, same codes
2d-size137101013
carton1210121212
checkdigit81118
colour3933293439
defects7769697074
hri98889
placement66566
png3621212136
quiet3325162632
rotation43444
size4829283248
symbology11111
truncation2417121724

Other results in full (2):

  • defect-ean13-gain50-1200.png: EAN_8 47661011, code is EAN-13 9501101369023
  • itf14-tb-635.pdf at 150 dpi: EAN_13 3215942570284, code is ITF-14 19501101214573

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-graderzxing-cppZBarQuagga2jsQRrxingOpenCVpyzbar (native ZBar)
decodes the datayesyesyesyesyesyesyesyes
reports positionyesyesyesyesyesyesyesyes
reads a PDF directlyyesno (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)yesnonononononono
checks size against GS1's magnification rangeyesnonononononono
checks quiet zonesyesnonononononono
checks bar heightyesnonononononono
checks contrast in red lightyesnonononononono
checks GS1 data (Application Identifiers, Digital Link)yesnonononononono
predicts an ISO/IEC 15416 / 15415 gradeyesnonononononono

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.

MIT licensed. It predicts from the artwork; it is not a verifier.