天天看點

OCR 開源軟體 Tesseract 的下載下傳和入門使用

資源下載下傳

tesseract-ocr-setup-3.05.01.exe

注: 安裝的時候選好要識别的語言

tesseract-4.0-with-LSTM#400-alpha-for-windows

Windows中運作tesseract

1.

tesseract

是一個指令行OCR程式,打開一個終端(組合鍵Win +R),輸入:

tesseract imagename outputbase [-l lang] [-psm pagesegmode] [configfile...]

imagename
The name of the input image. Most image file formats (anything readable by 
Leptonica) are supported.(輸入圖檔的檔案名,可以是Leptonica支援的各種圖檔格式)

outputbase
The basename of the output file (to which the appropriate extension will be 
appended). By default the output will be named outbase.txt.(輸出檔案的檔案名,
預設輸出檔案是txt格式的,還可以指定Hocr和pdf格式)
           

2.舉個栗子:識别

myscan.png

圖像,将識别結果存入

out.txt

,指令行:

tesseract myscan.png out

3.指定特定語言,指定識别簡體中文和英文

-l chi_sim+eng

,指令行:

tesseract myscan.png out -l chi_sim+eng

4.指定輸出檔案格式,在指令行最後加上檔案格式即可,可以指定Hocr和pdf格式,hOCR是

是一種HTML檔案,它對每個識别的字詞會後一些參數的說明。tesseract 3.03及以上的版本才

支援pdf格式,指令行為:

hOCR:

tesseract myscan.png out hocr

pdf:

tesseract myscan.png out pdf

Github 參考檔案

運作tesseract

參數說明

本文轉自:https://blog.csdn.net/cylj102908/article/details/78760777

繼續閱讀