Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Is pythonista capable of this?
-
Hello. I want to work on something different but I don't know if pythonista supports it so please help. Here it is.
I want to create a program that takes an image (eg. taking a photo of an image with a large amount of text), reads the text and converts it to a manipulatable string. Does pythonista have this capability? If so, where do I start. Which modules should I import (pythonista or an external module)? I have a pretty good idea but if it's not possible I'll move to something else.Thanks
-
OCR (optical character recognition) is pretty tricky to do at all, let alone well. There are a few open source libraries (tesseract) written in c, and wrappers written in python, but even this was difficult to get working well.
I think your best bet is to look at one of the various online OCR sites, and basically just use
requests
to upload the image and collect the results. Google Docs does OCR, but might be more than what you need. You should do a search for online OCRs to find one that does not use Captchas (thus automatable), and an easy enough layout, and mostly plain html ( nit overly javascript heavy).https://www.newocr.com doesn't look too bad, through the web interface. I have not tried automating the web interface, but it did not look too bad. It also has an rest api, which would make scripting easier, but you only get 200 conversions for free.
If you can host your own service on your Pc, http://www.openocr.net seems like a good option.
If you can claim to be a student, http://ocrsdk.com/for_students/ also offers an API.
-
Great the first option seems pretty easy. I don't know if I can get all the testing done in only 200 request. But the second option seems pretty convenient also. Thanks for the help!
-
Another useful application of OpenCV support.