我是Python新手。我正在尝试创建一个Python OCR程序,并且正在为它进行在线教程。这里是我使用的推荐代码: from PIL import Image
from pytesser import *
image_file = 'menu.tif'
im = Image.open(image_file)
text = image_to_string(im)
text = imag
我正在写一个与tesseract-ocr一起工作的脚本,我从屏幕获取文本,然后我需要将它与字符串进行比较。问题是,即使我确定字符串是相同的,比较失败,我怎么能使我的代码工作? 这里我的代码: import pyscreenshot as pss
import time
from pytesser import image_to_string
buy=str("VENDI")
buyNow
from PIL import Image
from pytesser import *
image_file = 'E:\Downloads\menu.tiff'
im = Image.open(image_file)
text = image_to_string(im)
text = image_file_to_string(image_file)
text = image_fi