Ask Your Question
2

How to build OpenCV 3.2 Text Module with Tesseract 4.0?

asked 2016-12-28 14:37:00 -0600

ccm2016 gravatar image

I am new to OpenCV & Tesseract and intend to use cv2.text for text detection and recognition.

I have successfully and separately built OpenCV 3.2.0 with its contrib modules and Tesseract-OCR 4.0.0-dev by Visual Studio 2015 under 64-bit Windows 10. To build OpenCV with Tesseract-OCR, CMake requires the 'include' files from Tesseract-OCR but it wasn't in my Tesseract-OCR 4 build output. Can anyone help to advise how can I get the Tesseract-OCR 'include' files?

edit retag flag offensive close merge delete

Comments

Finally, I managed to compile it. Checked text\FindTesseract.cmake, then added paths to header and lib files.

ccm2016 gravatar imageccm2016 ( 2016-12-29 12:15:38 -0600 )edit

hi ccm2016 i i'm stuck in Tesseract-OCR 'include' folder and lib like you . can you tell me how to get it in Tesseract 4.0?. Im try to include api folder and tesseract305.lib but this is not work. Sorry for my bad english Thank you so much !

hoangtocdo90 gravatar imagehoangtocdo90 ( 2017-02-05 18:32:56 -0600 )edit

where specifically did you edit the paths of the header and lib files to? Then did you simply run make on that FindTesseract.cmake file? my tesseract 4.0 was built in my HOME directory @ccm2016

docfig gravatar imagedocfig ( 2017-04-04 00:34:38 -0600 )edit

I have the same problem. I've used the pre-compiled version of Tesseract 4.0. There isn't any include file. Please, @ccm2016, where did you find the header files? I'm able to compile and run text module of OpenCV 3.2 but without using Tesseract

buburider gravatar imagebuburider ( 2017-04-24 11:56:14 -0600 )edit
1

@bburider I built Tesseract 4.0.0a from source.. Then, I copied all the header files to ~\tesseract\include\tesseract and \tesseract\include\leptonica. If you using binary version of tesseract, you may try to clone the tesseract and leptonica source files to get the header file for compiling OpenCV 3.2.0.

ccm2016 gravatar imageccm2016 ( 2017-05-05 09:05:53 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
-1

answered 2018-11-19 02:19:43 -0600

jiyoung.oh gravatar image

updated 2018-11-19 02:48:36 -0600

I was posting my blog how to build opencv 3.4.3 text module.

To Build Opencv Text module, you need to Leptonica Lib and Tesseract Lib.

How to get include files.

  1. Collect All Header files from Leptonica Library.

  2. Collect All Header files from Tesseract Library.

  3. Copy All Header files to 'Tesseract' Directory.

[reference]

(https://blog.naver.com/ohjiyoung89/22...)

edit flag offensive delete link more

Comments

please rather write an answer (in english) HERE, than just linking to your chinese blogpost (which is somewhat useless on this site)

berak gravatar imageberak ( 2018-11-19 02:22:04 -0600 )edit

another idea read doc

LBerger gravatar imageLBerger ( 2018-11-19 03:10:48 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2016-12-28 14:37:00 -0600

Seen: 3,487 times

Last updated: Nov 19 '18