2016-06-04 2 views
0

필자는 pytesser OCR을 사용하고 싶습니다. 시스템의 모든 위치에서 모듈로 가져올 수 있도록 시스템에서 동일한 변경을하고 싶습니다. (Installing pytesser)에 제공된 조언을 사용했지만 사용하지 못했습니다.우분투에 pytesser 설치하기 14.04

+0

https://code.google.com/archive/p/pytesser/ 읽기. 나는 창문에 대해서만 '파이 테서 (pytesser)'라고 생각한다. 우분투의 경우'pytesseract'를 설치해야합니다. 이것은 'pip install pytesseract'처럼 할 수 있습니다. –

답변

2

당신은

pip install pytesseract 

당신은 이미지를 열고 pytesseract을 공급하는 PIL을 사용해야 사용할 수 있습니다. PIL은 Python 이미지 라이브러리의 약자입니다. 그냥 이미지 라이브러리.

pytesseract는 tesseract의 래퍼입니다.

from PIL import Image 
import pytesseract 
im = Image.open('/home/xxxxxxx/Downloads/img.jpg') 
text = pytesseract.image_to_string(im) 
print (text)