利用python库识别图片中的文字

2021-08-03 10:56

阅读:758

标签:ima   info   支持中文   文字   python   https   install   安装   bre   一、安装 需要安装两个库和一个识别引擎tesseract-ocr 1 pip install pytesseract 2 pip install pillow windows安装识别引擎,打开这个站点找到最新版下载后安装即可:https://digi.bib.uni-mannheim.de/tesseract/ Mac安装识别引擎建议用brew进行安装:brew install tesseract Tesseract默认是不支持中文的,如果想要识别中文或者其它语言需要下载相应的语言包,下载地址如下:https://tesseract-ocr.github.io/tessdoc/Data-Files 有两个中文语言包:Chinese-Simplified和Chinese-Traditional,分别是简体中文和繁体中文,选择需要的下载即可。下载完成后需要放到Tesseract的路径下的tessdata目录下 mac下查看brew安装包路径:brew info tesseract(方便查找tessdata目录可以用tree命令快速找到位置)   二、图片文字识别         看来对中文的支持还不是很好啊???♂?利用python库识别图片中的文字标签:ima   info   支持中文   文字   python   https   install   安装   bre   原文地址:https://www.cnblogs.com/hanxiaobei/p/14955463.html


评论


亲,登录后才可以留言!