Tesseract + opencv 3.0 + windows, text module small size, linking errors -


i posted text 2 days ago in answers.opencv.org, i'm posting here well. http://answers.opencv.org/question/68634/text-contrib-module-and-tesseract/

good afternoon everyone. first of all, sorry english hehe. i've been trying build opencv contrib module 'text', haven't got sucess. note: other modules xfeatures2d have never given me problem.

my platform windows 7 x64 , use vs2013 compiler, i've followed tutorial(http://vorba.ch/2014/tesseract-3.03-vs2013.html) in order build tesseract 3.04 lib, after compiling succesfully, want generate vproj cmake , problem following:

in cmake gui, having selected opencv source, extras directory, etc etc, don't vars under 'tesseract' group set correcly (include , libs). know because when click on configure, log says "tesseract: no".

i've inspected findtesseract cmake script , think doesn't work....

please, give me little clue what's happening? how can build opencv text module use tesseract functions?

also i've tried compile text module adding link paths tesseract when want use in program link errors undefined symbols...

this situation taking me serveral days bothering me. there using text module under windows?


nobody can me? i've made progress, cmake gui, says me tesseract:yes. problem hadn't found entry linking leptonica lib, which's not in same tesseract group in 'ungrouped entries'.

ok, problem remains same, vs solution created cmake not building text module correctly can see lept lib 9mb , tesseractlib 128mb (in /mt , debug), opencv_text300d.lib 12mb. wrong....

i'm not sure tesseract version must use. i've traid 2 combinations: liblept168-static-mtdll-debug.lib + libtesseract302-static-debug.lib , liblept171-static-mtdll-debug.lib + libtesseract304-static-debug.lib

of course when link text module program gives me link errors.


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


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

obviously i've set project additional include directories, linker additional library directory , input additional dependecies text module.

really, thank in advanced.

i facing same problem. solution came edit cmakelists.txt file in text module.

replace

if(${tesseract_found}) include_directories(${tesseract_include_dir}) endif() 

with

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/                 )    

when run cmake, tesseract still no , tessaract/lept libraries should empty.


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -