04. Tesseract OCR 문자 인식


04. Tesseract OCR 문자 인식

Tesseract OCR은 기계 학습을 사용하지 않고 rule base 규칙 기반의 OCR 엔진 임 첨부파일 ocrtest2.png 파일 다운로드 import cv2 import pytesseract # Tesseract OCR 경로 설정 pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe' # 이미지 파일 경로 image_path = 'c:/data/image/ocrtest2.png' # 이미지 로드 image = cv2.imread(image_path) # 그레이스케일 변환 gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # 이미지에서 텍스트 추출 text = pytesseract.image_to_string(gray_image, lang='eng') # 결과 출력 print(text) [출력 결과] The provided code...



원문링크 : 04. Tesseract OCR 문자 인식