Getting Text from Images with Python
Adventures with OCR!
- Download the goods
brew install tesseract
- Create and activate virtual environment
python3 -m venv ocr-env
source ocr-virt/bin/activate
source ocr-env/bin/activate
- Pip install
pytesseract
(which should also download PIL – Python Image Library)
pip install pytesseract
RUN TEST:
try:
from PIL import Image
except ImportError:
import Image
import pytesseract
print(pytesseract.image_to_string(Image.open('crime.jpg')))