tesseract ocr安裝問題

2022-01-29 11:07:47 字數 794 閱讀 9302

今天安裝tesseract-ocr的時候,載了坑,記錄一下。

1. 安裝時語言庫的選擇,我把aditional language data這一項全選中了,裝的時候那叫乙個慢啊,差不多3個小時裝好的。如果不是必要的話,建議選擇其中的一部分去安裝。

2. 安裝好了,在命令列裡直接輸入 「tesseract「  也是沒有問題,但是在實際使用的過程中,總是報錯。如下

traceback (most recent call last):

file "c:/users/administrator/******.py", line 6, in print(tesserocr.image_to_text(image))

file "tesserocr.pyx", line 2400, in tesserocr._tesserocr.image_to_text

runtimeerror: failed to init api, possibly an invalid tessdata path:c:\programdata\anaconda3\

最簡單的解決方法,乙個是檢查環境變數的問題。

另乙個就是,將c:\program files (x86)\tesseract-ocr目錄(tesseract-ocr預設安裝目錄)下的tessdata資料夾拷貝到c:\programdata\anaconda3目錄,就是報錯資訊的最後,那個目錄。

Tesseract OCR 安裝嘗試

tesseract是乙個影象識別專案,將圖中的文字識別出來。將乙個.jpg png 等等 的作為輸入,txt作為識別內容輸出 tesseract專案github位址 windows 10,tesseract 4.1.0 到選擇自己需要的語言,英語是預設就帶的,我選了中文的 chinese simpl...

Mac上tesseract OCR的安裝配置

ocr optical character recognition 即光學字元識別技術,專門用於對文字進行識別,並獲取文字。tesseract ocr引擎先由hp實驗室研發,後來成為乙個開源專案,主要由google進行改進優化。homebrew是macos上的包管理器,類似於ubuntu中的apt ...

各版本系統安裝tesseract ocr

mac版本 1.tesseract ocr安裝 brew install tesseract ocr 注意 如果未安裝brew命令,可以輸入命令 brew官網 usr bin ruby e curl fssl 2.pytesseract安裝 sudo pip install pytesseract ...