Python-tesseract -


GPL
Windows
Python

软件简介

Python-tesseract 是 Tesseract OCR
Python 封装包,可作常用的图片文件读取和解码。

示例代码:

import cv2.cv as cv  
import tesseract

api = tesseract.TessBaseAPI()  
api.Init(".","eng",tesseract.OEM_DEFAULT)  
api.SetPageSegMode(tesseract.PSM_AUTO)

image=cv.LoadImage("eurotext.jpg", cv.CV_LOAD_IMAGE_GRAYSCALE)  
tesseract.SetCvImage(image,api)  
text=api.GetUTF8Text()  
conf=api.MeanTextConf()