I'm trying to build OpenCV with the Tesseract OCR module to use on a 
raspberry pi.

There is very little information online on how to build this, and what is 
available is very incomplete.

I'm building using Visual Studio 2017 on windows 10 using the VisualGDB 
plugin for cross compilation.


I tried downloading and building Tesseract I cloned 
https://github.com/tesseract-ocr/tess... 
<https://github.com/tesseract-ocr/tesseract>

But there is no *include* folder anywhere int he sources. There is an src 
folder that contains headers and source files, but no include folder 
anywhere.

Do I need to build tesseract first? And when its built, it creates lib and 
include files?

I tried to build tesseract, but it required leptonica. I was able to build 
leptonica. but I cannot manage to include it in the Tesseract cmake. 

I added the lines 

*add_subdirectory(${CMAKE_SOURCE_DIR}/../leptonica) *

*add_subdirectory(${CMAKE_SOURCE_DIR}/../leptonica/build) *

*find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} REQUIRED CONFIG) *

But I'm getting errors: 

*add_subdirectory not given a binary directory but the given source 
C:\opencv\tesseract\CMakeLists.txt *

*Could not find a package configuration file provided by "Leptonica" 
C:\opencv\tesseract\CMakeLists.txt *



My directory structure is as follows: 


Tesseract git repository located in  *C:\opencv\tesseract*

Tesseract build directory  *C:\opencv\tesseract\build*

Leptonica repository located in  *C:\opencv\leptonica*

Leptonica build directory in  *C:\opencv\leptonica\build* 
(contains LeptonicaConfig.cmake, 

Leptonica library files, 
(libleptonica.so, libleptonica.so.1.77.0, libleptonica.so.5.3.0) are in 
*C:\opencv\leptonica\build\src*



Can anyone please help me figure out what lines I need to add to the 
CMakeLists.txt for Tesseract or Leptonica in order to get Tesseract to 
build correctly? 

Or any other files I need to edit?


Do I need to install anything else to build? I'm trying to avoid using 
pkg-config or anything else that will make it more complicated.


Thank you,



-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To post to this group, send email to tesseract-ocr@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/73780003-f81b-4bfa-9975-d32c68d2f8dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to