afriscic / BarcodeScanning.Native.Maui

Barcode scanning library for .NET MAUI
https://www.nuget.org/packages/BarcodeScanning.Native.Maui
MIT License
188 stars 35 forks source link

Some GS1 Code 128 barcodes not detecting #93

Open PeterTaylorTX opened 1 month ago

PeterTaylorTX commented 1 month ago

This project can scan most of the barcodes I have shown it, very quickly. Very impressive.

However, it seems to have trouble with some of the GS1 Code 128 barcodes. Most of these barcode types read correctly, but a good 30% are failing to be detected.

I have uploaded two barcodes that consistently fail to be detected and one that is detected

Detects Pass 1

Fails to Detect Fail 2 Fail 1

Any help in understanding why they do not get detected would be much appreciated

I have been using ScanFromImageAsync to check a an image for the Barcode var results = await BarcodeScanning.Methods.ScanFromImageAsync(imageData);

Thanks, Pete

PeterTaylorTX commented 1 month ago

I have changed the app to use the Scanner Camera View so that it would have more chances, and it does eventually read these barcodes, but it also finds multiple (between 2 to 9) barcodes that do not exist in the process

afriscic commented 1 month ago

Hello. Sorry for slow response. Yes, it seems to be a issue with your barcodes, at least on Android. I'll look into it a bit, but I don't expect to be able to fix this as the detection capabilities are tied to MLKit implementation. I've tried some commercial solutions and they are detecting them...