Tesseract + opencv 3.0 + windows, small text module size, binding errors

I posted this text two days ago at answer.opencv.org, now I am posting it here as well. http://answers.opencv.org/question/68634/text-contrib-module-and-tesseract/

Good day to all. First of all, sorry for my English hehe. I am trying to create the text "openv contrib module", however I have not received success. Note. Other modules like xfeatures2d, never if I had a problem.

My platform is Windows 7 x64, and I use VS2013 as a compiler, I then ( http://vorba.ch/2014/tesseract-3.03-vs2013.html ) to build Tesseract 3.04 as a LIB, but after compiling it successfully I want to generate vproj with cmake, and the problem is that the following:

In CMee GUI, pre-selected opencv source, EXTRAS directory, etc. etc., I do not get vars under the Tesseract group (INCLUDES AND ANY). I know this because when I click configure, the log says "Tesseract: NO".

I checked the FindTesseract cmake script and I think this does not work ....

Please can someone tell me a little what's going on? How can I create an opencv text module to use Tesseract functions?

, Tesseract , undefined...

. -, ?


? , cmake GUI, Tesseract: . , leptonica lib, Tesseract, "Ungrouped Entries".

, , VS, cmake, , , Lept lib 9 , TesseractLib - 128 (/ ), opencv_text300d.lib 12 . - ....

, tesseract . : liblept168-static-mtdll-debug.lib + libtesseract302-static-debug.lib liblept171-static-mtdll-debug.lib + libtesseract304-static-debug.lib

, , .


: opencv_text300d.lib(ocr_tesseract.obj): error LNK2019: unresolved external symbol "public: bool __cdecl tesseract::PageIterator::BoundingBox(enum tesseract::PageIteratorLevel,int *,int *,int *,int *)const " (?........................


...
#include "opencv2/text.hpp"
...
string output;
cv::Mat aux;
Ptr<OCRTesseract> ocr = OCRTesseract::create();
ocr->run(aux, output);
...

, include, .

, .

+2
1

. , , - CMakeLists.txt .

if(${Tesseract_FOUND})
include_directories(${Tesseract_INCLUDE_DIR})
endif()

add_definitions( -DWINDOWS)
add_definitions( -DNOMINMAX)
SET(Tesseract_DIR "C:\\tesseract-build\\tesseract-ocr")
SET(Lept_DIR "C:\\tesseract-build\\lib")
include_directories(
        ${Tesseract_DIR}/api
        ${Tesseract_DIR}/ccutil/
        ${Tesseract_DIR}/ccstruct/
        ${Tesseract_DIR}/ccmain/
    )
link_directories( ${Tesseract_DIR}/vs2013/bin/Win32/DLL_Release/
                  ${Lept_DIR}/
                  ${Lept_DIR}/Win32/
                )   

Cmake, Tesseract - , Tessaract/Lept .

+3

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


All Articles