PROGRAMMING / TECHNOLOGY / ARTIFICIAL INTELLIGENCE
Image To Text in 5 Lines Of Python
Optical Character Recognition (OCR) used to be thought of as Artificial Intelligence — now it is sublimely easy to do on your local machine.
Image to Code
This is the image that I wanted to convert to text:
The first way to do this is straightforward, involves no coding, and is quick
Do it through Google Docs
Upload the file into Google Docs and the right click the image and select
Open with ->
The result is a two-page document — one with the image in it — and the second with the converted text.
The text came out —however, it is unreadable.
Time To Get To The Code
I booted up pycharm (you can get the community edition here)
and pasted this code:
I was missing a few of the components namely
pytesseract which were underlined in red.
A quick right-click on the offending import