Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not recognizing correctly image with clear digit on it #4143

Open
dwissmann opened this issue Oct 10, 2023 · 4 comments
Open

Not recognizing correctly image with clear digit on it #4143

dwissmann opened this issue Oct 10, 2023 · 4 comments

Comments

@dwissmann
Copy link

Current Behavior

Using product in python and latest version of openCV and pytessaract.
After a ton of other preprocessing using openCV, I end up with a cropped image with just one digit on it (as intended). I tried everything from sharpening, blurring, filtering but the gist is that any image of the number 5 (see image as attachment) is either not recognized or is recognized as a 2. But it is clearly a 5. This is what I us:
ocrStr = pytesseract.image_to_string(thr, config='--oem 3 --psm 6 digits') where thr is the image attached. I also tried with any iteration of psm 10, white listing numbers etc.

No clue why this is happening. Any insight would be very appreciated.

hardSu-5-3=2-sharp

Expected Behavior

No response

Suggested Fix

No response

tesseract -v

No response

Operating System

macOS 11 Big Sur

Other Operating System

No response

uname -a

No response

Compiler

No response

CPU

No response

Virtualization / Containers

No response

Other Information

No response

@yashwantpradhan
Copy link

I want to work on this issue.

@jihchao
Copy link

jihchao commented Jan 9, 2024

I have same problem, have any updates?

@zdenop
Copy link
Contributor

zdenop commented Jan 9, 2024

tesseract I_read_documentation_instead_of_writing_issue.png - --psm 6
5

@jihchao
Copy link

jihchao commented Jan 9, 2024

tesseract I_read_documentation_instead_of_writing_issue.png - --psm 6
5

thanks, that's helpful, I'm missing the psm parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants