fast_barcode_scanner icon indicating copy to clipboard operation
fast_barcode_scanner copied to clipboard

support OCR scanning

Open dustin-graham opened this issue 2 years ago • 2 comments

@jhoogstraat , As a shipping and logistics company, my company's app relies on barcode scanning heavily. All of our packages have scannable codes. However, in the real world, printing errors and damaged labels can sometimes make it impossible to scan a code. In most cases though, there's enough information on the shipping label itself to verify that the driver has the correct package. the barcode is often printed with its value directly below it. We have the recipient's name, address, and other identifying information. I recognize that it may seem a bit out of scope for a package titled "fast_barcode_scanner" to also scan text, but performing the OCR using ML Kit and Vision API's in the native code is the ideal place to do it.

What I'm proposing here is that I add a text recognition option to the ML platform implementations. The user can request text recognition in addition to machine-readable codes. For both Vision and MLKit, the implementation of text recognition is very similar to barcodes and I think it would be a clean implementation. What are your thoughts of putting that here?

dustin-graham avatar Feb 10 '22 21:02 dustin-graham

There are lots of other options besides doing that here. However, those other options require me to initialize new camera controller instances, dependencies on MLKit, etc. In short, I have to re-implement much of what is already done here. It would be really nice to add this capability.

dustin-graham avatar Feb 10 '22 21:02 dustin-graham

There were other comments about opening up the plugin to all possible use cases in Vision and MLKit.

I think this might be a great idea long term, if this plugin can provide significant value compared to other solutions.

As for your specific idea: I think everything that allows scanning barcodes faster, with less information or in difficult environments better falls under the current scope of this plugin. Thus in opinion this is a great idea!

Thinking long term, maybe your implementation of OCR can path the way into a generic MLKit/Vision-Plugin by architecturing it with this goal in mind. This does not mean that this plugin will definitely expand beyond barcodes, aber would certainly allow for a rather easy expansion afterwards.

jhoogstraat avatar Feb 11 '22 17:02 jhoogstraat