how install OCR tesseract on opencv 3.1.0 on linux ubuntu 14.10?
Question: I would like install correctly Opencv_contrib for Text_recognition. Have you a
idea to the good process?

Before I install Opencv 3.1.0 and opencv_contrib, I install leptonia-1.73,
protobuf, caffe, and after Tesseract. After I start to install Opencv 3.1.0
and opencv_contrib. But I don't use Texte module

Process: **_1\. Install leptonia :_**

$ sudo apt-get install autoconf automake libtool

$ sudo apt-get install libpng12-dev

$ sudo apt-get install libjpeg62-dev

$ sudo apt-get install libtiff4-dev

$ sudo apt-get install zlib1g-dev

$ sudo apt-get install libicu-dev

$ sudo apt-get install libpango1.0-dev

$ sudo apt-get install libcairo2-dev

$ wget <http://www.leptonica.org/source/leptonica-1.73.tar.gz>

$ tar -zxvf leptonica-1.73.tar.gz

$ cd leptonica-1.73

$ ./autogen.sh

$ ./configure

$ make

$ sudo checkinstall

$ sudo ldconfig

**2\. Install protobuf**

like "https:"//launchpad."net/ubuntu/trusty/"+package/protobuf-compiler"

**_3\. Install Caffe_**

like "http:"//caffe."berkeleyvision."org"/install_apt"."html

**_4\. Install Opencv 3.1.0 with Opencv_extra_module_path_**

$ cd ~/opencv

$ mkdir build

$ cd build

$ cmake -D CMAKE_BUILD_TYPE=RELEASE \

    
    
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    
    -D INSTALL_C_EXAMPLES=OFF \
    
    -D INSTALL_PYTHON_EXAMPLES=ON \
    
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
    
    -D BUILD_EXAMPLES=ON ..
    

Warning message:

Warning message is : joboxlearning@joboxlearning-
VirtualBox:~/OpenCV/workspace/text_recognition$ ./Text_recognition
2856985-origpic-28a761.jpg

./Text_recognition

Demo program of the Extremal Region Filter algorithm described in Neumann L.,
Matas J.: Real-Time Scene Text Localization and Recognition, CVPR 2012

init done opengl support available **_OpenCV Error: Bad argument (Default
classifier file not found!) in ERClassifierNM1,_** file
/home/joboxlearning/OpenCV/opencv_contrib/modules/text/src/erfilter.cpp,
**_line 1035 terminate called after throwing an instance of 'cv::Exception'_**
what():
/home/joboxlearning/OpenCV/opencv_contrib/modules/text/src/erfilter.cpp:1035:
error: (-5) **_Default classifier file not found! in function
ERClassifierNM1_**

Abandon (core dumped)


Answer: Check this Dockerfile
(<https://gist.github.com/joost/52d59321abe31884ab818b806c69426b>) it shows
all steps to install OpenCV 3.1 with Tesseract and Python bindings. You should
be able to use all features like OCR and ERFilter.

To test them open python:

    
    
    >>> import cv2
    >>> cv2.__version__
    '3.1.0'
    >>> cv2.text # should return the module
    

