9951 explained code solutions for 126 technologies


tesseract-ocrHow to install Tesseract OCR on Windows?


Tesseract OCR is an open source tool for recognizing text from images. It can be installed on Windows using the following steps:

  1. Install Chocolatey package manager for Windows.

  2. Install Tesseract OCR using the command line:

choco install tesseract
  1. Add Tesseract to the PATH environment variable.

  2. Install the language packs for the languages you wish to use. For example, to install English language pack:

choco install tesseract-ocr-eng
  1. Verify the installation by running the following command:
tesseract -v

Output example

tesseract 4.1.1-rc2
 leptonica-1.78.0
  libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.5.3) : libpng 1.6.35 : libtiff 4.0.9 : zlib 1.2.11
  1. Test the installation by running the following command:
tesseract image.png output
  1. Check the output file output.txt for the recognized text.

Helpful links

Edit this code on GitHub