Specify DPI of input image on tesseract command line?

9,472 views
Skip to first unread message

CaptnClumsy

unread,
Jan 23, 2018, 2:02:15 AM1/23/18
to tesseract-ocr
Hi,

I have an image which I know is 300 DPI but when I run tesseract (version 3.05.01) on it I get a warning:

   "Warning. Invalid resolution 0 dpi.  Using 70 instead."

How can I tell command line to use 300 DPI resolution?
I tried looking at all the possible parameters using:

    tesseract --print-parameters

But I cannot see a suitable parameter to pass DPI.

Any help much appreciated.

Max Poliakovski

unread,
Jan 23, 2018, 7:51:08 PM1/23/18
to tesseract-ocr


I have an image which I know is 300 DPI but when I run tesseract (version 3.05.01) on it I get a warning:

   "Warning. Invalid resolution 0 dpi.  Using 70 instead."

It looks like something is wrong with your input image. Which format does it have?

Russia Aiyappa

unread,
Feb 14, 2019, 2:36:19 PM2/14/19
to tesseract-ocr
use the -- dpi option.

Eg: tesseract --dpi 300 inputfile outputfile
Reply all
Reply to author
Forward
0 new messages