Skip to content
A simple OCR using Opencv + Tesseract.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A simple OCR using Opencv + Tesseract. Using code from

Usage Instructions

  • Have a window opened and get its title using Spy++, direct method or any other software.
  • Start this program, as you type in your window, the program will detect words and output on console as well as highlight on output screen.

Setup Instructions (Windows)

  • Install Tesseract (make sure you select 'add to path' in installer.
  • Get OpenCV binaries from (works with VS2015/2017).
  • Create new empty cpp proj, add source file to project.
  • Add opencv include dir in Project Properties > C/C++ > Additional Include Directories.
  • Add opencv lib dir in Project Properties > Linker > General > Additional Library Directories.
  • Add opencv lib files:
    • Goto opencv lib folder.
    • Open cmd, type dir /b *d.lib > libs.txt (this is for debug mode libs).
    • Open libs.txt and copy/paste to Project Properties > Linker > Input > Additional Dependencies.
  • Run in debug mode! (make sure you have a window opened with the title in windowString).


  1. For testing, notepad or any simple text editor with reasonably big font works best.
  2. It's easier to use prebuilt libraries, building on windows almost always causes issues.
  3. To build with tesseract APIs (as required here) you need extra libs from tesseract.
You can’t perform that action at this time.