23999
29999
30999
40000
40000
40000
40000
1
43000
44000
44000
44500
This is what tesseract extracts from the image. As you can see its mostly fine but instead for 4111 it extracts 1. Now, this can vary if I change the languages or change some thresholding values, but that might work for this case, but it wont work for the other ones.
I guess only training would be a possibility to fix errors, but I couldnt really do it. The positions or angles of the data doesnt change, its just the font I Would need to train, but I dont know how to generate a lot of training information.
code:
img = cv2.imread(xy.png',cv2.IMREAD_GRAYSCALE)
ret,thresh1 = cv2.threshold(img,150,255,cv2.THRESH_BINARY_INV)
ROI1 = thresh1[130:1050,1280:1420]
text = pytesseract.image_to_string(ROI1,config="digits")
I imagegrab the screen and select ROI.
Any suggestion? Maybe theres some training data that with some digits in it that I could change to my font?