opencv and tesseract on windows [closed]

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

WolfG gravatar image

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

Greetings!

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 (http://answers.opencv.org/question/17...) 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 reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-09-26 15:49:51.483128

Comments

Have you try https://docs.opencv.org/trunk/db/d4c/... ? change variable CMAKE_CONFIG_GENERATOR="Visual Studio 14 2015 Win64"

LBerger gravatar imageLBerger ( 2019-01-20 11:26:51 -0600 )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 -0600 )edit
LBerger gravatar imageLBerger ( 2019-01-21 07:18:51 -0600 )edit

Yes, I've installed git-bash before.

WolfG gravatar imageWolfG ( 2019-01-21 09:07:57 -0600 )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 -0600 )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 -0600 )edit

@sturkmen Would you write steps and prerequisites to build openCV + Tesseract I has cloned OpenCV 4.1.2 , Tesseract5.0 and leptonica1.79 i succeed to build opencv using Cmake gui without tesseract , but i can not configure cmake to build with leptionic and tesseract

essamzaky gravatar imageessamzaky ( 2019-10-19 05:54:36 -0600 )edit

@essamzaky do you use windows and Visual Studio ?

sturkmen gravatar imagesturkmen ( 2019-10-19 13:11:48 -0600 )edit

@sturkmen yes i'm using Window and Visual Studio

essamzaky gravatar imageessamzaky ( 2019-10-20 05:00:27 -0600 )edit

@essamzaky send me an e-mail maybe i will help you remotely.sorry i have no time to write step by step

sturkmen gravatar imagesturkmen ( 2019-10-20 09:06:21 -0600 )edit