I am making a simple program to detect numbers in an image with python and pytesseract, but the case is that it always returns me ♀, I am analyzing an image like this:
my image
and my code to read the numbers is the following:
import pytesseract
from pytesseract import (
Output,
TesseractError,
TesseractNotFoundError,
TSVNotSupported,
get_tesseract_version,
image_to_boxes,
image_to_data,
image_to_osd,
image_to_pdf_or_hocr,
image_to_string,
run_and_get_output
)
def analizar_resultado(path):
image = cv2.imread(path, 1)
text = pytesseract.image_to_string(image, config = 'digits')
print('texto detectado:', text)
but I can't make it work for me, I have tried more images of this type with better quality and others, but I can't get any number back, how could I solve this? Thanks a lot
question from:
https://stackoverflow.com/questions/65877125/pytesseract-does-not-detect-me-numbers 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…