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

Improving Tesseract accuracy #7

Open
petermr opened this issue Jun 24, 2019 · 1 comment
Open

Improving Tesseract accuracy #7

petermr opened this issue Jun 24, 2019 · 1 comment

Comments

@petermr
Copy link
Member

petermr commented Jun 24, 2019

This is a black art. This issue can be used to gather recent helpful hints

@petermr
Copy link
Member Author

petermr commented Jun 24, 2019

https://parzelsec.de/breaking-simple-captchas-in-python/

Key points:

  • --psm 8 will skip detection of the image structure and assume a single word. This may sometimes be useful.
  • whitelist: "tessedit_char_whitelist=...". It allows us to restrict the detection to only recognize characters we whitelisted. This currently can only be used with the legacy version of tesseract, which is why we also force tesseract to use this engine with the "--oem 0" parameter.
['tesseract', 'image.png', 'stdout', '--psm', '8', '--oem', '0', '-c', 'tessedit_char_whitelist=abcdefghijklmnopqrstuvwxyz', '--dpi', '70']

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

1 participant