Qt: How to use Leptonic?

I need to write a program that will process scanned images. I chose Qt because of the easy user interface creation. I tried to create the deskew algorithm myself, but then I found the interesting and famous (for others) "Leptonica". And I have 2 problems (googling doesn't help):

  • How can I include Leptonica lib in my Qt project?
  • I cannot find code examples for using it in C ++ (only for Ruby).

Sorry, maybe silly questions, but I'm new to Qt, and for me it's hard even after reading the official documentation.

===================================================

After adding the leptonlib-1.67 directory to Qt Creator and editing the .pro file, I cannot create it. First, an error occurs, for example: "allheaders.h there is no such file or directory." When I included the scrip folder in INCLUDEPATH in the .pro file, this error disappeared, but I got a lot of others. There should be some tutorials. Please, help!

+3
source share
1 answer

To use Leptonica from C ++, just name it the same as in C. You can use existing Leptonica samples as a starting point for calling routines. You need to take a look at ... \ leptonlib-1.xx \ prog \ skewtest.c for a fairly complete example of how routines are used.

, skewtest Qt GUI. : , , . () , . , skewtest, .

+4

Source: https://habr.com/ru/post/1782698/


All Articles