Open AKortak opened 2 years ago
The heavy lifting of actually extracting the barcode information from the image is not done by this plugin. This plugin uses AVFoundation by Apple for this task.
The (newer) Vision Framework can also scan barcodes and is already implemented into the plugin. Maybe it works better in edge cases because its based on machine learning, instead of manually coded algorithms. As soon as #66 is merged, you will be able to switch between the two implementations.
@AKortak , I encountered the same issues while working on this plugin. Here's the summary of what I learned:
The current implementation of barcode scanning @jhoogstraat mentioned is AVFoundation. AVFoundation has a documented limitation for lnear barcodes where it will only recognize them if the barcode is exactly in the center of the screen. This took me a comically long time to discover and I was able to find old documentation from Apple which confirms it.
As @jhoogstraat pointed out, my PR #66 provides you the option to switch to the new Vision API for scanning. The Vision API does a fantastic job with linear barcodes regardless of where they appear on the screen. Hopefully we'll get this merged soon and you can enjoy the new implementation.
Cheers.
@dustin-graham great job on that PR #66 ! Looking forward to test it out once it's merged!
I noticed, that the scanner is not able to detect horizontal barcodes on arched objects with an iPhone. On Android it works perfectly fine but on iOS it sometimes is impossible to detect a barcode. I use the scanner in my production code and I would be very happy if this is fixxed fast.
This image shows an example of an object where it is very hard to scan the barcode: