OCR Images (with text) using Google Drive and Google Apps Script

This works remarkably well, both for images on file and those taken with the device’s camera. A shot of a somewhat crumpled petrol receipt returned all the text on the original.

You are going to have to do some layout and formatting with the returned text, but very little word editing.

For this I used two google apps script web apps, one for the image upload to google drive, the second to carry out the OCR. I attempted to combine them into one, but couldn’t get my “blob” to play nicely. Google Docs will OCR jpg, png, gif and pdf files, but sadly no pdf functionality in this version, yet to resolve base64 encoding of pdf files on AI2, this only seems viable with images at present.

I used two extensions, ghostfox’s base64 Encoder extension, and
Taifun’s Image extension. And a nod also to Digital Inspiration and Tanaike for some of the code. Gratitudes to all of you 🙂

Once again assuming you are reasonably competent with AI2 and google apps scripting…. Continue reading “OCR Images (with text) using Google Drive and Google Apps Script”