-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Problem with png images #1914
Comments
Try the command line and post the output. Can you share the png image? |
Can you also provide output of |
Any suggestions? |
Remove alpha channel from png image. |
@amitdo @stweil @jbreiden : one of solution (workaround?) would be to remove alpha channel in tesseract. e.g. during SetImage:
Not sure if we have time to check this for side effect. |
remark: pdfrenderer.cpp also removes alpha channel from PNG images with pixAlphaBlendUniform function... |
Alpha channel seem to be only part of problem. I exported image with transparency to png and gif. Tesseract produce:
=> for png it is not able to do recognition. But when I use psm:
it produce output but worse than for gif... So more investigation should be done. Here are images for testing. |
Zdenko, did you try to do what the pdf renderer originally did? Your code uses a different function. |
Explained in code review comment... |
So I see two issues here:
|
Environment
Sample code:
Current Behavior:
If source image comes in jpg all works good. If image comes in png recognized text is empty.
If convert source png to jpg (commented code fragment above) text is recognized well
Expected Behavior:
Png images successfully recognized
The text was updated successfully, but these errors were encountered: