windows下的装置颇为重大,直接装置可实施挨次即可。当你抉择装置种种语言之时,则需要一个稍微耗时的期待操作,好比下图中所示的信息:
tesseract-ocr中文版装置运用教程:
下载完后妨碍装置,默认情景下装置挨次会给你配置装备部署零星情景变量,以指向装置目录(之后可能经由DOS界面在恣意目录运行tesseract)。装置实现后目录如下:
附录:
tessdata 目录寄存的是语言字库文件,以及在命令行界面中可能用到的参数所对于应的文件. 这个装置挨次默认搜罗了英翰墨库。
运用Tessract-OCR引擎识别验证码
掀开DOS界面,输入tesseract:
假如泛起如上输入,展现装置个别。
我豫备了一张验证码code.jpg放在D盘根目录下,上图:
服从为:
附录:
Usage:tesseract imagename outputbase [-l lang] [-psm pagesegmode] [configfile...]
pagesegmode values are:
0 = Orientation and script detection (OSD) only.
1 = Automatic page segmentation with OSD.
2 = Automatic page segmentation, but no OSD, or OCR
3 = Fully automatic page segmentation, but no OSD. (Default)
4 = Assume a single column of text of variable sizes.
5 = Assume a single uniform block of vertically aligned text.
6 = Assume a single uniform block of text.
7 = Treat the image as a single text line.
8 = Treat the image as a single word.
9 = Treat the image as a single word in a circle.
10 = Treat the image as a single character.
-l lang and/or -psm pagesegmode must occur before anyconfigfile.
tesseract imagename outputbase [-l lang] [-psm pagesegmode] [configfile...]
tesseract 图片名 输入文件名 -l 字库文件 -psm pagesegmode 配置装备部署文件
好比:
tesseract code.jpg result -l chi_sim -psm 7 nobatch
-l chi_sim 展现用简体中翰墨库(需要下载中翰墨库文件,解压后,寄存到tessdata目录上来,字库文件扩展名为 .raineddata 简体中翰墨库文件名为: chi_sim.traineddata)
-psm 7 展现见告tesseract code.jpg图片是一行文本 这个参数可能削减识别过错率. 默以为 3
configfile 参数值为tessdataconfigs 以及 tessdatatessconfigs 目录下的文件名