1

I'm trying to use pytesseract to recognize digital numbers from images as following:

img

i tried following code

text=pytesseract.image_to_string(img, lang='eng',
                config='--psm 13 --oem 3 -c tessedit_char_whitelist=0123456789')
print(text)

it gives me

"ae"

I tried oem=1 and it's still the same.

for your reference my version is as follows:

pytesseract.get_tesseract_version()

LooseVersion ('4.0.0-beta.1')

Any help would be appreciated, including alternative libraries.

1 Answer 1

1

this is a known issue - Blacklist and whitelist unsupported with LSTM (4.0)

basically whitelist and blacklist does not work

one comment states

ghost commented on Jul 20, 2018

Use --oem 0 or -oem 0 and it works

i have no way to test this ATM but it is worth a try

4.1 version should have this fixed

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.