Forum Archive

Text recognition

ellie_ff1493

Is there any easy way to get the text in a image?
I have looked about but can't find any way, are there any functions that can help?

omz

There isn't really a way to do this in Pythonista without using a web-based OCR API –that would probably be possible, but I don't know much about OCR APIs.

shtek

see some code at this page:
https://www.macstories.net/reviews/pythonista-2-0-brings-action-extension-ipad-pro-support-code-editor-improvements-and-more/

Automated OCR
The other script I'm regularly using through the action extension is based on Microsoft's Project Oxford, and it lets me perform OCR on images and obtain extracted plain text in seconds.
```

import httplib, urllib, base64, clipboard, json, requests, datetime, appex, photos, console, dialogs

timestamp = datetime.datetime.now()
...

ellie_ff1493

An API can work but for my use I will be using 5000+ images at once, so internet will be a bottleneck assuming the API lets me upload that much.
I may be able to make a crude one using shaders and pure python

JonB

iOS is not your friend here. Get a desktop PC, and tesseract.