Ask Your Question
1

Text contrib module and Tesseract

asked 2015-08-14 10:16:41 -0600

davidpoza gravatar image

updated 2015-08-16 12:39:16 -0600

Good afternoon to everyone. First of all, sorry for my english hehe. I've been trying to build the opencv contrib module 'text', however I haven't got sucess. Note: Other modules like xfeatures2d have never given me a problem.

My platform is windows 7 x64 and I use VS2013 as compiler, I've followed this tutorial(http://vorba.ch/2014/tesseract-3.03-vs2013.html) in order to build Tesseract 3.04 as LIB, but after compiling it succesfully, I want to generate the vproj with cmake and the problem is the following:

In CMake GUI, having previously selected opencv source, EXTRAS directory, etc etc, I don't get the vars under 'Tesseract' group set correcly (INCLUDE AND LIBS). I know it because when I click on configure, The log says "Tesseract: NO".

I've inspected the FindTesseract cmake script and I think that it doesn't work....

Please, anyone could give me a little clue about what's happening? How can I build the opencv text module to use Tesseract functions?

Also I've tried to compile text module adding link paths to Tesseract but when I want to use in my program I get link errors about undefined symbols...

This situation is taking me serveral days bothering me. Are there someone who is using text module under windows?

Really, thank you so very much in advanced.

edit retag flag offensive close merge delete

Comments

Nobody can help me? I've made some progress, now cmake GUI, says me Tesseract:Yes. The problem was that I hadn't found the entry for linking the leptonica lib, which's not in the same Tesseract group but in 'Ungrouped Entries'

Ok, now the problem remains same, the VS solution created by cmake is not building the text module correctly as I can see Lept lib is about 9Mb and TesseractLib is 128Mb (in /MT and debug), however the opencv_text300d.lib is only 12Mb. Something is wrong....

I'm not sure about what tesseract version I must use. I've traid with two combinations: liblept168-static-mtdll-debug.lib + libtesseract302-static-debug.lib and liblept171-static-mtdll-debug.lib + libtesseract304-static-debug.lib Of course when I link text module to my program it gives me link errors.

davidpoza gravatar imagedavidpoza ( 2015-08-16 12:59:11 -0600 )edit

the linking errors look like: 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 " (?........................

davidpoza gravatar imagedavidpoza ( 2015-08-16 13:00:41 -0600 )edit

the code in my program now is very simple:

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

Obviously I've set up my project with additional include directories, linker additional library directory and input additional dependecies to the text module.

davidpoza gravatar imagedavidpoza ( 2015-08-16 13:05:41 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-08-19 06:41:49 -0600

davidpoza gravatar image
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-08-14 10:16:41 -0600

Seen: 4,251 times

Last updated: Aug 19 '15