Skip to content

Instantly share code, notes, and snippets.

@lMortimerl
lMortimerl / main.py
Created February 27, 2024 11:27
Python Image to Text
# Dependencies: pip install opencv-python-headless pytesseract numpy
import cv2
import pytesseract
import matplotlib.pyplot as plt
# Path to Tesseract executable (change this according to your installation)
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe'
def capture_and_parse_text():