到目前为止,我已通过以下步骤设法达到了95%的准确性:
通过此过程,它几乎可以完美读取几乎每个数字,但有时会混淆3s,5s和9s。
在完成所有此步骤后,我得到的图像类型如下
代码是:
dir_image = file
pdf = wi(filename=file, resolution=300)
pdfImage = pdf.convert("png")
page = wi(image = img)
page.save(filename = filename)
image = cv2.imread(filename, cv2.IMREAD_GRAYSCALE)
#Split into each row would go here but code is too long and doesn't matter
cropped_img_left = cv2.resize(cropped_img_left , None, fx=0.85, fy=0.85, interpolation=cv2.INTER_CUBIC)
ret, cropped_img_left = cv2.threshold(cropped_img_left, 185, 255, cv2.THRESH_BINARY)
我不知道如何达到100%的准确性。我得到的一些想法是:
但是我有点迷茫,我希望能得到一些指导。
非常感谢!