How to compile Tesseract OCR on Windows

Source: Internet
Author: User
Tags image processing library tesseract ocr

There are many ways to get tesseract source code. You can get it directly from repo, or you can download a compressed package. However, there are often strange problems when compiling. Here is how to simply configure and compile the source code.

Reference original: How to Build tesseract OCR Library on Windows

Compiling tesseract
Download
    • Windows Installer of TESSERACT-OCR 3.02.02

Installation

During installation, tick tesseract development files:

Compile

Locate the vs2008 to the project directory in the installation directory:

Find all compilation-related libraries:

Open Visual Studio 2008 (no can go to official website to download Express version), import the project compile. Finally, debug and release two versions of DLLs are generated:libtesseract302d.dll ,libtesseract302.dll

Note this passage in the Readme:

Dependencies and licenses========================= Leptonica is required. (www.leptonica.com). Tesseract no longer compileswithout Leptonica.libtiff is no longer required as a direct dependency.

Tesseract relies on the Leptonica library, so look at how Leptonica is compiled.

Compiling Leptonica

Leptonica is an image processing library written in C that supports JPEG, PNG, Tiff,gif.

Download
    • Source:leptonica-1.68.tar.gz

    • VS Engineering:vs2008-1.68.zip

    • Related header files and libraries:leptonica-1.68-win32-lib-include-dirs.zip

Compile

Unzip the three packets and build the environment according to the following structure:

Buildfolder include leptonica-1.68 lib\

buildfolder\leptonica-1.68 contents:

config\                     Not used for Windows buildsprog\                       regression  tests, examples, utilitiessrc\                        Source files for  libleptvs2008\                     Visual Studio 2008 specific files DLL Debug\                  liblept dll  Debug build output DLL Release\                liblept dll release build output lib debug\                  liblept lib debug  build output LIB Release\                liblept LIB Release build output prog_projects\              Projects for prog  programs  ioformats_reg\              Sample project for prog\ioformats_reg.exe   DLL Debug\                  DLL Debug  build output for sample project   dll release\                DLL Release build output for sample project    LIB Debug\                  LIB Debug build output for sample project    LIB Release\                lib release build output for sample project   ioformats_ reg.vcproj       the ioformats_reg project file  leptonica.sln              the  leptonica solution file leptonica.vcproj            the leptonica project file

Open Visual Studio 2008, import the project compilation. Finally, debug and release two versions of DLLs are generated:liblept168d.dll,liblept168.dll

Reference

Leptonica
Leptonica & Visual Studio 2008
Tesseract-ocr

How to compile Tesseract OCR on Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.