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

[Clarification request/bug?] "Warning. Invalid resolution 0 dpi. Using 70 instead." #649

Closed
Wikinaut opened this Issue Jan 11, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@Wikinaut
Copy link
Contributor

Wikinaut commented Jan 11, 2017

Current version 5b45e5a gives always the "Warning. Invalid resolution 0 dpi. Using 70 instead.".

When tesseract cannot extract a resolution (for example, for ppm inputs), what will be the correct way to set a reasonable dpi ? The original dpi in my case was 200, or 300 in another case.

It is not apparent from
$tesseract --print-parameters
what option to set the correct value has to be used.

Please can you assist, is it a bug ?

@amitdo

This comment has been minimized.

Copy link
Contributor

amitdo commented Jan 11, 2017

Tesseract uses Leptonica for getting the DPI.

For ppm, I think you only have one solution - to convert it to a more advanced format like png or tiff.
https://linux.die.net/man/1/ppm2tiff

@Wikinaut

This comment has been minimized.

Copy link
Contributor Author

Wikinaut commented Jan 11, 2017

@amitdo You are right, that there are more advanced lossless coding schemes, but unpaper (app for cleaning and preprocessing images) only works with ppm (or pgm or pbm), see https://github.com/Flameeyes/unpaper/blob/master/doc/file-formats.md .

In order to save further conversion time and lower SSD wear, I usually pass ppm to tesseract (if I use unpaper).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment