agent_management_app / modules /kyc_processor.py
DSatishchandra's picture
Update modules/kyc_processor.py
afc860e verified
raw
history blame
234 Bytes
import pytesseract
import cv2
def extract_text_from_id(image_path):
image = cv2.imread(image_path)
if image is None:
raise ValueError(f"Invalid image file: {image_path}")
return pytesseract.image_to_string(image)