这是一个模块,使食品和营养表的具体OCR。
nkocr的Python项目详细描述
Nkocr公司
这是一个模块,使具体的OCR在食品和营养表。在
作为本项目的先决条件,我们拥有tesseract库,可以在
https://github.com/tesseract-ocr/tesseract
先决条件的安装
泰瑟拉克特
在Linux系统上安装tesseract可以通过以下几个命令完成:
$ sudo apt install tesseract-ocr tesseract-ocr-por libtesseract-dev
macOS也一样。MacPorts和Homebrew之间存在差异,但在本文中,我只引用Homebrew的版本:
^{pr2}$在执行tesseract安装之后,可以只在一个命令中执行OCR,因此已经从图像中提取了一些单词。在
The default language is English, depending on the text, it will not be possible to capture the word/phrase. If you want to work with another language, you need to make some additional installations. (https://github.com/tesseract-ocr/tesseract/wiki#other-languages)
开放式CV
在Linux系统上安装OpenCV可以通过以下命令完成:
$ sudo apt install python3-opencv
To more informations, access: https://docs.opencv.org/master/da/df6/tutorial_py_table_of_contents_setup.html
安装
您可以使用以下工具安装此软件包:
$ pip install nkocr --user
如何使用
要使用此软件包,请在执行安装后执行以下操作:
fromnkocrimportOcrTable,OcrProduct
示例
fromnkocrimportOcrTabletext=OcrTable("paste_image_url_here")print(text)# or print(text.text)
- 项目
标签: