Can not build contrib text-module

asked 2016-08-08 08:38:25 -0500

KOHTPOJIEP gravatar image

Hi. Please apologize for my english. Here is the problem:

I'm using MS Visual Studio 2012 on Windows 7 64 (x86 proc). I have troubles with installing (building) text-module. I used this guide. ALL_BUILD and INSTALL projects have been builded successfully only after I have built all of them (not with button "Build only..."), contains some error.

Despite including text-module in CMake configures and copying it in opencv\modules folder, it's lib did not appear.

Previously I tried to copy this module's headers with files of modules, which are already working. Then compiler see the header, but if I try to use this example, compiler says that OCRHMMDecoder is not a class or a namespace name. Despite this, I can find and open headers contain this class with "Open document" buttons. So the IDE knows, where the header is.

Later I learned there is Tesseract nessecary. I've tried to download pre-build binaries from here, but there is only .exe files. I don't know how to use them for coding. If this is a problem moment, please tell how to build Tesseract correctly.

edit retag flag offensive close merge delete

Comments

1

"... and copying it in opencv\modules folder," -- this for sure sounds wrong.

you need to rebuild opencv + opencv_contrib from src, like said here

berak gravatar imageberak ( 2016-08-08 08:49:47 -0500 )edit

can we see your cmake output ?

berak gravatar imageberak ( 2016-08-08 08:52:42 -0500 )edit
1

"Later I learned there is Tesseract nessecary. " -- if you build the text module with tesseract, it will use that for text decoding, else it will use the builtin OCRHMMDecoder . so, it's nice to have , but not mandatory.

note, that the text module is also about text detection, which is totally independant of tesseract present or not.

berak gravatar imageberak ( 2016-08-08 09:11:03 -0500 )edit

Thx for info. I tried this, but have several problems: 1) It does the same GUI verstion does: just put the headers in the "wrong" place, from which I removed them later. 2) Obviously, I'm doing something wrong, because I can't use "make -j5" command (or cmake make -j5), because it sends an error message: directory ".../-j5 does not exist". Here is my Cmake output.

KOHTPOJIEP gravatar imageKOHTPOJIEP ( 2016-08-08 11:04:38 -0500 )edit