opencv and tesseract on windows

asked 2019-01-20 10:58:08 -0500

WolfG gravatar image

updated 2019-01-20 10:58:28 -0500


I've built opencv-master-4.0.1 on windows/mingw and want to use tesseract. I found some hints how to build leptonica and tesseract ( leptonica works fine, however tesseract cmake(mingw compiler) this fails with

Checking for module 'lept>=1.74' No package 'lept' found

the environment variable leptonica_dir=F:\leptonica-1.74.4 is set.

How can I make tesseract ocr working with c++ opencv and windows?

Thanks for hints, Wolf

edit retag flag offensive close merge delete


Have you try ? change variable CMAKE_CONFIG_GENERATOR="Visual Studio 14 2015 Win64"

LBerger gravatar imageLBerger ( 2019-01-20 11:26:51 -0500 )edit

Thanks; however the installation using git-bash produces endless errors on my wind10 system; Like:

sh.exe was found in your PATH, here  D:/Programme/Git/usr/bin/sh.exe

No such a path neither in windows, nor with git-bash. I renamed 'sh.exe' in the above path. Next are the following errors:

Scanning dependencies of target png-fix-itxt
[  2%] Building C object CMakeFiles/png-fix-itxt.dir/contrib/tools/png-fix-itxt.c.obj
mingw32-make.exe[2]: *** No rule to make target 'D:/lib/install/zlib/lib/zlibstatic.lib', needed by 'png-fix-itxt.exe'.  Stop.
CMakeFiles\Makefile2:71: recipe for target 'CMakeFiles/png-fix-itxt.dir/all' failed
mingw32-make.exe[1]: *** [CMakeFiles/png-fix-itxt.dir/all] Error 2
Makefile:139: recipe for target 'all' failed

I stopped the task.

WolfG gravatar imageWolfG ( 2019-01-21 05:31:27 -0500 )edit
LBerger gravatar imageLBerger ( 2019-01-21 07:18:51 -0500 )edit

Yes, I've installed git-bash before.

WolfG gravatar imageWolfG ( 2019-01-21 09:07:57 -0500 )edit

@WolfG you can ping me if you still need help. (today i compiled text module with tesseract)

sturkmen gravatar imagesturkmen ( 2019-01-31 09:20:40 -0500 )edit

@sturkmen thanks for your offer to help :-) I'm using windows 10 (if that matters) cmake and code::blocks. Still running into problems as described in original post. How was your appreoach?

WolfG gravatar imageWolfG ( 2019-02-13 13:45:22 -0500 )edit