Skip to content
forked from zamazan4ik/PRLib

Pre-Recognition Library - library with algorithms for improving OCR quality.

License

Notifications You must be signed in to change notification settings

GerHobbelt/PRLib

 
 

Repository files navigation

PRLib (libprecog)

Pre-Recognition Library.

The main aim of the library: prepare image for text recognition (OCR). Image processing can really help to improve recognition quality.

Features

  • Auto crop image
  • Background normalization
  • Binarization (Global Otsu, Local Otsu, Sauvola, Feng, Niblack, Wolf-Jolion, NICK, FBCITB, Adaptive)
  • Blur detection (LAPM, LAPV, TENG, GLVN)
  • Color balance
  • Crop
  • Deblur (Gaussian-based)
  • Denoise (Non-local Means Denoising algorithm, Salt-Pepper)
  • Deskew
  • Find angle and orientation of an image
  • Gamma correction
  • Hole punch removal
  • Line removal
  • Perspective warp removal
  • Thinning (Zhang-Suen, Guo-Hall)
  • White balance (Simple, Grayworld)

Dependencies

  • OpenCV
  • Leptonica

How to build

  1. Go to the directory with source code
  2. Make directory for build:
     mkdir build
  3. Run cmake:
     cmake ..
  4. Run make:
     make

Build tested

  • Opencv: 4.7.0
  • Leptonica: 1.82.0-3

About

Pre-Recognition Library - library with algorithms for improving OCR quality.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 95.6%
  • C 3.3%
  • CMake 1.1%