tesseract ocr + vs2012 + win10 + c++

1.安裝程序
可以去我的資源中查找tesseract ocr下載,裏面有安裝程序和庫文件,直接下一步即可完成安裝,我的安裝目錄是C:\Program Files (x86)\Tesseract-OCR\setup
2.配置環境變量
用戶變量和系統變量path都加上 C:\Program Files (x86)\Tesseract-OCR\setup
系統變量TESSDATA_PREFIX也要添加C:\Program Files (x86)\Tesseract-OCR\setup,不要加分號
3.驗證是否安裝正確
在cmd裏面執行tesseract命令,若出來是一下信息則說明安裝正確
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.
5.各種語言文件下載地址
https://github.com/tesseract-ocr/tesseract/wiki/Data-Files

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章