Author Topic: Tesseract and Leptonica  (Read 7943 times)

Offline ibelic

  • Single posting newcomer
  • *
  • Posts: 2
Tesseract and Leptonica
« on: December 14, 2021, 09:46:21 am »
Hi, I have already used an enormous amount of time trying to install Tesseract OCR and Leptonica SW from GitHub using Cmake. Trouble is that everything is set to be installed for Windows Visual Studio. Can anybody help me with advice, how to actually do it. I am using Win10 and of course C::B with C++ MinGw.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 679
Re: Tesseract and Leptonica
« Reply #1 on: December 14, 2021, 10:10:01 am »
If you look at the github repo for https://github.com/tesseract-ocr/tesseract you will see cmake scattered in the repo listing. As such i suggest google codeblocks and cmake, but first it looks like you did not do the first thing that IMHO you should always do and that is to use the github search facility to search the repo for keywords and in this case the magic keyword is guess what....(you have to figure it out) and if you guess correctly you will get info on how to compile tesseract-ocr as you have requested.

Once you get tesseract-ocr see if you can use the same method for Leptonica.

P.S. better to teach people how to fish than give them a single fish today.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Tesseract and Leptonica
« Reply #2 on: February 07, 2022, 04:05:37 pm »
Package: mingw-w64-x86_64-tesseract-ocr - MSYS2 Packages

Package: mingw-w64-x86_64-leptonica - MSYS2 Packages

A simple way to use those libraries is just use the pre-build libs from msys2 projects, see the above two links.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.