How to integrate the OCR Tesseract library into a C ++ program

I am trying to use the Tesseract OCR Library to create a program for reading photos of elevator floor numbers. I did not find an example of how to include the Tesseract library in a C ++ file. Sort of:

#include "tesseract.h" 

I am using Tesseract v 3.00 on Ubuntu 10.10.

+4
source share
1 answer

PlatformStatus The page has a few comments on how to install it. It has dependencies (leptonica), which also need to be installed.

Another solution , also related to the discussion above, has similar information for other Linux distributions.

When it comes to linking to your program, this post has some features

There is also a C shell for basic API calls ; looking at the attached files, tell what to include. Other wrappers are available here.

The API base class documentation is here ...

The Installation Platform Status page opens.

Comment by tim.lawr ... @ gmail.com, November 23, 2011 I successfully installed tesseract-ocr on Ubuntu 11.10 64Bit using the following commands:

 sudo apt-get install libleptonica-dev autoconf automake libtool libpng12-dev libjpeg62- dev libtiff4-dev zlib1g-dev subversion g++ cd svn checkout http://tesseract-ocr.googlecode.com/svn/trunk/ tesseract-ocr cd tesseract-ocr ./autogen.sh ./configure make sudo make install sudo ldconfig cd /usr/local/share/tessdata/ sudo wget http://tesseract-ocr.googlecode.com/files/eng.traineddata.gz sudo gunzip eng.traineddata.gz cd ~/tesseract-ocr/ tesseract phototest.tif phototest cat phototest.txt 
+7
source

Source: https://habr.com/ru/post/1394903/


All Articles