Files
datenbanken-llm/test_image.py
T
2024-12-10 20:48:01 +01:00

7 lines
226 B
Python

import cv2
import pytesseract
def extract_image_content(path):
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
img = cv2.imread(path)
return pytesseract.image_to_string(img)