Posts

Showing posts with the label tesseract

Detecting page orientation (C++)

I have a bunch of images that I would like to rotate based on page orientation. So I search for possible solutions within tesseract&leptonica...

Preparing Windows for Tesseract "Makefile training" (LSTM training)

Image
The Tesseract Makefile training/LSTM training from existing images was created on Linux (unix like) system using the usual Unix tools.  Fortunately, many these tools can also be installed on Windows.

Tesseract LSTM training (aka Makefile training)

  Tesseract LSTM training (aka Makefile training) on Raspberry Pi "Makefile training"  is example of training from existing data (set of image& ground truth file). This tutorial does not cover how to create and prepare training data - this step is crucial for good OCR results. Install general tools sudo apt update sudo apt install make wget bash unzip bc python3 byobu Note : byobu  (text-based window manager and terminal multiplexer) is not necessarily needed for training - but it is very useful when you start training from a remote computer. Installing the latest tesseract on Raspberry Pi If you use Debian-based OS (e.g. Raspbian), no current Tesseract version is available by default (due to Debian's strict update policy). However, you can use the notesalexp  repository (for Debian and Ubuntu) to get the latest stable version: sudo apt install apt-transport-https sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak-$(date +%Y%m%d) echo "deb https...

OCR pdf file in python on the fly

With   PyMuPDF and tesserocr you can OCR image pdf easily

Create searchable pdf with c++ and tesseract

Image
Many office machines creates pdf as result of scan instead of  image. Unfortunately not always they includes also text layer for copy&paste or they include text layer based on default language of scanner and not document language. In such cases you can use  tesseract to crete "searchable pdf".

Visualize Tesseract Box File

 Simply python (only PIL) tesseract box file visualisation.

Show OCR progress

OCR process can last for a while, so monitoring progress could help. Here is simple example how to do in console app.

OpenCV and tesseract

Do you need to OCR OpenCV image? No problem with tesseract.

Building tesserocr on MS Windows 64bit

If you search for efficient solution of using tesseract OCR in python you will need to use tessocer. But there are no recent version of project for current version of python on windows. So you have build it by yourself.