Ask Your Question
0

Cannot use Tesseract with OpenCV 4.1.1

asked 2019-08-12 08:26:05 -0600

sturmi1337 gravatar image

Hello there, i followed the official opencv guides to install opencv and tesseract with git bash

https://docs.opencv.org/master/d3/d52... https://docs.opencv.org/trunk/db/d4c/...

I got everything compiled so far and opencv itself works properly but when I try to set up Tesseract with Tesseract::Create() I get these Error Messages:

Error in pixReadMemTiff: function not present Error in pixReadMem: tiff: no pix returned Error in pixaGenerateFontFromString: pix not made Error in bmfCreate: font pixa not made

Guess that Error pops up because Leptonica is not built with tiff lib, does anyone have a proper description on how i could do so? Thanks in Advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-08-12 08:29:30 -0600

holger gravatar image

Add this two lines to your pom - this works for me (window 10 64 bit)

    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>leptonica-platform</artifactId>
        <version>1.77.0-1.4.4</version>
    </dependency>

    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>tesseract-platform</artifactId>
        <version>4.0.0-1.4.4</version>
    </dependency>
edit flag offensive delete link more

Comments

what do you mean with pom?

sturmi1337 gravatar imagesturmi1337 ( 2019-08-12 08:43:44 -0600 )edit

pom.xml - maven dependency file - or how do you manage your dependencies?

holger gravatar imageholger ( 2019-08-12 09:24:05 -0600 )edit

I followed the two guides i linked above without any other dependency manager

sturmi1337 gravatar imagesturmi1337 ( 2019-08-12 10:41:23 -0600 )edit

And its not working... I am giving you a working solution - at least its verified for my setup - your turn now. Actually this is not related to opencv at all.

You can still get everything working without dependency management - thats true - but its too complicated for me to assemble the classpath manually.

You will maybe get to the point when you want to pass a mat to tesseract after you did some preprocessing on it....

holger gravatar imageholger ( 2019-08-12 10:47:22 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-08-12 08:26:05 -0600

Seen: 557 times

Last updated: Aug 12 '19