pip install pyocr brew install tesseract sudo apt-get install tesseract-ocr python import pyocr import pyocr.builders from PIL import Image tools = pyocr.get_available_tools() tool = tools[0] image = Image.open('image.jpg') text = tool.image_to_string( image, builder=pyocr.builders.TextBuilder() ) print(text) python ocr_example.py


上一篇:
下一篇:
切换中文