OCR 연구 노트 (3) 테서 랙트 연구

OCR 연구 노트 (3) 테서 랙트 연구

테서 랙트 소개

Tesseract는 HP 출시 이후 Google에서 유지 관리하는 오픈 소스 텍스트 인식 프로젝트로, Tesseract v4부터 텍스트 인식을위한 심층 신경망 LSTM 지원을 발표했습니다.

win10에서 tessercat 설치

(0) 내 파이썬 버전은 3.6.5입니다.
(1) 다운로드 링크 : https://digi.bib.uni-mannheim.de/tesseract/
내가 선택한 여기에 사진 설명 삽입
버전 : 여기에있는 버전 나중에 tessorocr 또는 pytesseract로 설치해야합니다. 대응합니다.
사다리없이 다운로드하면 속도가 느려지거나 실패 할 수 있으므로 설치 중에 다운로드 콘텐츠를 확인하지 마십시오.
(2) GitHub에서 언어 팩을 다운로드 할 수 있습니다 : https://github.com/tesseract-ocr/tessdata
중국어 언어 팩을
여기에 사진 설명 삽입
선택한 다음 다운로드 한 파일을 Tesseract-OCR 디렉토리 아래의 tessdata 폴더에 복사합니다. , 그리고 tessdate 폴더를 python 설치 디렉토리에 복사하십시오.
(3)
참조 블로그에서 여기에 환경 변수를 추가하면 블로거 가 환경 변수 참조 블로그를 매우 명확하게 설명합니다.

pytesseract 또는 tesserocr 설치

(1) teseerocr 패키지, 설치 프로세스는 다음과 같습니다. tesserocr-2.2.2-cp36-cp36m-win_amd64.whl
github에서 다운로드 하고 cmd로 설치합니다.
암호:

import tesserocr
from PIL import Image
image = Image.open(r'F:\download\blueman00-text-detection-ctpn-master\text-detection-ctpn\ctpn\data\demo\010.png')
image_vert=tesserocr.image_to_text(image)
print(image_vert)

입력은 다음과 같습니다. 여기에 사진 설명 삽입
출력은 다음과 같습니다.
여기에 사진 설명 삽입
(2)
pycharm
여기에 사진 설명 삽입
코드에 직접 설치 한 pytesseract 설치 :

import pytesseract
from PIL import Image
image = Image.open(r'F:\download\blueman00-text-detection-ctpn-master\text-detection-ctpn\ctpn\data\demo\010.png')
image_vert=pytesseract.image_to_string(image)
print(image_vert)

추천

출처blog.csdn.net/dbdxwyl/article/details/108330700