flutter-ml / google_ml_kit_flutter

A flutter plugin that implements Google's standalone ML Kit
MIT License
930 stars 707 forks source link

Issue with inconsistent/incorrect barcode scanning #544

Closed bagintz closed 9 months ago

bagintz commented 9 months ago

Issue with inconsistent/incorrect barcode scanning

I am getting weird results on some Code 39 barcodes that start with 222. The scanner often omits the first 2. This happens on both my app and the example app.

Am I missing anything on making this thing be more consistent?

Thank you

bagintz commented 9 months ago

Here is an example that sees 2201 way more often than it sees 22201

example

fbernaly commented 9 months ago

@bagintz: Android or iOS? or both? have you try Google's native example app? https://github.com/googlesamples/mlkit

bkoznov commented 9 months ago

@fbernaly This definitely happens on iOS, and it happens on Google's native example app. This does not happen on at least two other barcode apps.

https://pub.dev/packages/flutter_barcode_scanner Looks like this one might use AVFoundation stuff on the iOS side? https://pub.dev/packages/flutter_zxing And this one uses FFI with a CPP library?

IMG_0213

https://github.com/googlesamples/mlkit/issues/748

bagintz commented 9 months ago

@fbernaly It might have something to do with code 39 having 2 ways to do checksum, mod 10 and mod 43.

fbernaly commented 9 months ago

@bagintz : if you can reproduce this in Google's native app then I suggest you move the conversation to Google's channels or repos. Take a look at our README in there we explain that this plugin is only a wrapper around the native API using FlutterMethodChannels. This plugin does not process your image, it passes it to Google's native API. So, if you have issues with the native API then you need to report that to Google.