This guide will take you through the very easy installation steps for OpenCV with Tesseract on Windows.
Tools | URL with version |
---|---|
OS | Windows 10 |
Installation Tool | GitBash |
Visual Studio | Visual Studio 15 2017 Win64 |
OpenCV | OpenCV 4.0.1 |
Libpng | libpng1636 |
Zlib | zlib1211 |
Leptonica | Leptonica version 1.74.4 |
Tesseract | Tesseract 4.0.0 Release |
Install Git Bash for windows if you haven't yet.
Open GitBash and Clone this repo. Lets clone in C
drive.
cd /C/
git clone https://github.com/ghimiredhikura/Install-OpenCV-with-Tesseract-Windows.git
cd Install-OpenCV-with-Tesseract-Windows
./installOCV.sh
You must download png lib and zlib. Uncompress lpng in folder lpng
and zlib in folder zlib
. lpng and zlib must be in same folder as opencv
and opencv_contrib
.
./installpngzlib.sh
./installLaptonica.sh
./installTesseract.sh
Open OCVTessExample
project using visual studio 2017.
In Bin folder I have kept eng.tessdata file inside folder tessdata which was downloaded form https://github.com/tesseract-ocr/tessdata. You can also get any language pack that you are interested in. Just download and keep inside the tessdata. You may need to change c++ source accordingly. Compile the project.
move to OCVTessExample/Bin>
double click run.sh
#1
TODO