【发布时间】:2020-03-23 18:29:52
【问题描述】:
我想做的是图像识别
给定图像 (5000 × 3500) 尺寸(白色背景)
图像将有几何图形以及字母数字
python 会做识别。
【问题讨论】:
标签: python-3.x scipy python-imaging-library image-recognition scipy.ndimage
我想做的是图像识别
给定图像 (5000 × 3500) 尺寸(白色背景)
图像将有几何图形以及字母数字
python 会做识别。
【问题讨论】:
标签: python-3.x scipy python-imaging-library image-recognition scipy.ndimage
只需使用pytesseract 库即可解决您的问题。
首先使用以下 pip 命令安装必要的库:pip install pytesseract, Pillow
成功完成后,就可以运行以下代码了。
try:
from PIL import Image
except ImportError:
import Image
import pytesseract
print(pytesseract.image_to_string(Image.open('test.png')))
【讨论】: