googlesamples / googlesamples/mlkit

[Feature request] barcode-scanning checksum

Open
#746 1 comment 0 reactions 1 assignee Claimed by @zhouyiself View on GitHub
Dominant language
Kotlin
Stars
4.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

**What's your feature request? Please describe.**
For applications in the retail industry it is important that the checksum matches for barcodes with a format that has a checksum as a last digit.

Example from our world is an ITF barcode of length 22 for discounted article (perishable goods).

We notice that the checksum is not always valid with the scanner option configuration formats (all formats use Modulo10)

Barcode.FORMAT_EAN_13,
Barcode.FORMAT_EAN_8,
Barcode.FORMAT_ITF, // interleaved2of5
Barcode.FORMAT_UPC_A

Currently we have to do some validity check additionally in the code which is quite slow.

Request: Modulo10 information as an additional scanner option or checksum flag if checksums are not already calculated.

**Mobile environment**
Android : com.google.mlkit:barcode-scanning version 17.2.0

**Additional context**
When modifying the code for the format ITF in the gsm scanner sample it will still always give the result of code128 which has another modulo and the result is also varying greatly.

Here is a sample of such a barcode in ITF standard with a checksum:
barcode128

We wonder if today OCR scanner would outrun then the barcode scanner results for this particular format because a barcode of greater length is more prone to errors frail in the printing process.

Unfortunately nothing is stated in the documentation which lengths are supported for ITF formats or if checksums are validated already.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.