2017-03-03 13 views
2

私はPytesseractを使用しています。英語を使用するときは機能しますが、ロシア語に翻訳するときは機能します。私はこのような問題があります。イメージからテキストを抽出します。 OCR

"TypeError: 'str' does not support the buffer interface". I've tried other language it also doesn't work.

をそれは私のコードです:

from PIL import Image 
from pytesseract import image_to_string 
k=image_to_string(Image.open("ff.jpg"), lang="rus") 
print(image_to_string(Image.open("picture.jpg"), lang="rus")) 

誰かがこの問題を解決するために私を助けることができますか? https://github.com/tesseract-ocr/langdata

答えて

1

)をtesseractインストールのtessdataフォルダに置きます。

+0

ありがとうございました) –

0

トレーニングデータファイル(rus.traineddataを入れてください - :あなたはあなたが参考のため お使いのシステムで言語サポートファイルをコピーする必要が あなたがサイトを訪問することができ、特定の言語のためたTesseractのためのトレーニングデータに必要

関連する問題