WICG / shape-detection-api

Detection of shapes (faces, QR codes) in images
https://wicg.github.io/shape-detection-api
Other
306 stars 36 forks source link

Why is barcode format 'itf' meant to be ITF14? #102

Open mperkh opened 2 months ago

mperkh commented 2 months ago

We try to switch from a JS based solution to using the Barcode Detection API available on Android Chrome.

Unfortunately, it turns out that the barcode format option itf is meant to be ITF14, which is a special form of Interleaved 2 of 5 barcode symbology and must always be 14 digits long, among other restrictions.

As the name suggests, itf should include all variants of Interleaved 2 of 5.

https://wicg.github.io/shape-detection-api/#dom-barcodeformat-itf https://en.wikipedia.org/wiki/Interleaved_2_of_5 https://www.zint.org.uk/manual/chapter/6/1/2#interleaved-code-2-of-5-iso-16390

reillyeon commented 2 months ago

Can you provide an example of an ITF barcode which Android Chrome cannot decode?

mperkh commented 2 months ago

Can you provide an example of an ITF barcode which Android Chrome cannot decode?

itf

(Generated using https://barcode.tec-it.com/en/Code25IL?data=00123456789012345675)

Getting arbitrary results scanning, using Google Pixel 6, Android 14, Chrome 127. Tested using https://georapbox.github.io/barcode-scanner

Expected scan result is 00123456789012345675.