markusfisch / BinaryEye

Yet another barcode scanner for Android
https://play.google.com/store/apps/details?id=de.markusfisch.android.binaryeye
MIT License
1.42k stars 117 forks source link

Feature Request: OCR? #355

Closed VGuerreiro closed 1 year ago

VGuerreiro commented 1 year ago

First of all, I want to thank everyone working on this project. It's the best QR Code reader I've used.

I know this might be a huge ask, but are there any plans to implement OCR features later on? Something like what's on the screen capture tool ShareX or alike.

markusfisch commented 1 year ago

No, unfortunately there are no plans to include OCR at the moment.

I know this is tempting sometimes, and could be added in very good quality with ML Kit Text Recognition. But this would quickly escalate to some Google Lens clone - with the exact same technology behind the scenes 😉

Also, ML Kit isn't really open source but proprietary, and I want this app to be as open and transparent as possible. This is why it's using the open source barcode scanning library ZXing C++ instead of Google's proprietary ML Kit Barcode Scan. Nothing wrong with ML Kit or Google, I just want to provide an alternative to the many other barcode scanners out there that are using ML Kit.

Of course, it would also be possible to implement OCR without ML Kit, and I already did this in other apps (using Tesseract or Tensorflow), but only for selected fonts. Reaching the quality level of ML Kit requires a lot of effort, which in my opinion would go far beyond the purpose of a barcode reading app. It would also make the app considerably bigger.

And then, the app wouldn't really be about reading barcodes anymore. A domain that still contains a lot of things this app doesn't support yet. So I think it wouldn't be beneficial to extend this app beyond its core purpose to do something completely different. After all, barcodes were invented because text is hard to read for machines 😉

Of course, it's always possible to fork this project and include ML Kit 😉

VGuerreiro commented 1 year ago

No, unfortunately there are no plans to include OCR at the moment.

I know this is tempting sometimes, and could be added in very good quality with ML Kit Text Recognition. But this would quickly escalate to some Google Lens clone - with the exact same technology behind the scenes 😉

Also, ML Kit isn't really open source but proprietary, and I want this app to be as open and transparent as possible. This is why it's using the open source barcode scanning library ZXing C++ instead of Google's proprietary ML Kit Barcode Scan. Nothing wrong with ML Kit or Google, I just want to provide an alternative to the many other barcode scanners out there that are using ML Kit.

Of course, it would also be possible to implement OCR without ML Kit, and I already did this in other apps (using Tesseract or Tensorflow), but only for selected fonts. Reaching the quality level of ML Kit requires a lot of effort, which in my opinion would go far beyond the purpose of a barcode reading app. It would also make the app considerably bigger.

And then, the app wouldn't really be about reading barcodes anymore. A domain that still contains a lot of things this app doesn't support yet. So I think it wouldn't be beneficial to extend this app beyond its core purpose to do something completely different. After all, barcodes were invented because text is hard to read for machines 😉

Of course, it's always possible to fork this project and include ML Kit 😉

Hah! Yeah didn't realize it would require that much, I would be referring to OCR in terms of reading machine printed text, not handwritten, but I do understand these things can both bloat and "feature-creep" the project out of its original intent. Got it! Thanks for clarifying and for the awesome tool! 😄