Ask Your Question
0

Opencv won't build after a Tesseract/Leptonica install

asked 2016-07-01 11:45:34 -0600

EdwinS gravatar image

Without tesseract, my opencv builds just fine. After a tesseract/ leptonica install i get this error:

/tmp/opencv/release/modules/text/precomp.hpp:51:31: error: tesseract/baseapi.h: No such file or directory /tmp/opencv/release/modules/text/precomp.hpp:52:38: error: tesseract/resultiterator.h: No such file or directory make[2]: * [modules/text/precomp.hpp.gch/opencv_text_RELEASE.gch] Error 1 make[1]: * [modules/text/CMakeFiles/pch_Generate_opencv_text.dir/all] Error 2

i know exactly where the tesseract header files are located(/include/tesseract/header files) and i have this settings:

-D Tesseract_LIBRARY=$OPENSHIFT_HOMEDIR/python/virtenv/venv/lib/libtesseract.so\ -D Lept_LIBRARY=$OPENSHIFT_HOMEDIR/python/virtenv/venv/lib/liblept.so\ -D Tesseract_INCLUDE_DIR=$OPENSHIFT_HOMEDIR/python/virtenv/venv/include\

What else am i missing? I need tesseract for this particular build .

edit retag flag offensive close merge delete

Comments

1

what opencv version, and can you detail your install/compile procedure? Are you building with contrib modules ?

It's as if it sees tesseract but still can't find all the right files. Did you built from source or is it a binary install. i've build tesseract successfully with leptonica so i maybe able to help you out.

(also - do let me know once you find a way of getting non gibberish output from tesseract :-) It's not that straightforward, and you need to do a lot of preprocessing/tinkering to get what you want.

atv gravatar imageatv ( 2016-07-02 04:50:47 -0600 )edit
1

I am using Opencv3 + opencv_contrib latest modules from github. I am building everything from source because i don't have root. And yes it does find tesseract but i suspect it can't find path to header files. I am a python guy but i suspect it has to do with CMakelist.txt or FindTesseract.cmake. Somehow i need to add something there.

EdwinS gravatar imageEdwinS ( 2016-07-02 08:53:34 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-07-03 02:51:37 -0600

atv gravatar image

Hmm opencv should find tesseract automatically. You shouldn't need to mess with the opencv file manually.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-07-01 11:45:34 -0600

Seen: 1,228 times

Last updated: Jul 01 '16