I have a problem that I get only the number 2201 from my image. I have tried all configurations for pytesseract but no result. Maybe somebody here has a solution for me? When I cut the image into two pieces and run the OCR it works perfectly.
text = pytesseract.image_to_string(img, lang = 'deu', config='-psm 4')
print(text)
that was my configuration
Problem is that it short text and it IS NOT on one (base)line. So you will need to split image to 2 part and OCR them separately.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.