Press enter to see results or esc to cancel.

Convert image to text using CMD Command Prompt, Tesseract Optical Character Recognition (OCR)

Here is the steps you need to convert the image to text using CMD.

See OCR Java Web Project here.

1.Download and Install the Tesseract ‘tesseract-ocr-setup-3.02.02.exe’.

You can download that in the below link.
Download tesseract-ocr-setup files here

Install in any location you want,

Eg. C:\OCR

2.After installing verify all the below files are available in the installed directory, we are going to use tesseract.exe for the operation.

3.Collect the image and save that we need to OCR to any location in the PC

Eg: C:\Image_to_OCR.jpg

4.Open Command Prompt CMD in Administrator mode,

5.The Command to execute the OCR is,

tesseract <imagename> <outputname>

Where <imagename> you want to give the path of image and <outputname> you want to give path of output text file. Note that the out put is always text file as from Tesseract Documentation.
So the command for our testing will be,

"C:\OCR\tesseract" "C:\Image_to_OCR.jpg" "C:\out"

6.Now run the command in CMD

7.Now it will create an output file in C: as out.txt

8.The possible error which I got on testing was Cannot Open input file. It was caused when I missed to give the image name ,

Tesseract Open Source OCR Engine v3.02 with Leptonica
Cannot open input file:

ie. “C:\OCR\tesseract” “C:\ ” “C:\out”
“C:\OCR\tesseract” “C:\out”





It will not work for fancy writings and product images can you explain how to extract text from a retail product image

investment shares

Hi to every body, it’s my first pay a visit of this weblog; this website consists of awesome and actually fine data in support of visitors.


Thank you very much!!..:-)

testicular cancer

Thanks designed for sharing such a nice thought, article is nice, thats why i have read it entirely


Thank you

Leave a Comment