Coder Social home page Coder Social logo

ttesseractocr4's Introduction

TTesseractOCR4

Donate

TTesseractOCR4 is a Object Pascal binding for tesseract-ocr 4.x - an optical character recognition engine.

Building examples

Examples were tested in Delphi 10.2.3 (32-bit build for Windows) and Lazarus 1.8 (32-bit build for Windows and Linux in Ubuntu 18.04).

  1. Clone this repository to a local folder.
  2. Obtain Tesseract 4.x binaries. I recommend using latest version, build from master branch of the tesseract project.
  • Windows: Precompiled binaries can be found in lib\tesseractocr-master.zip. Unpack and copy all DLL files to bin\.
    Microsoft Visual C++ 2017 Redistributable x86 must be installed on the computer.
  • Linux: sudo apt install tesseract-ocr.
    This will also install required shared libraries (liblept5 and libtesseract4).
  • Common: Set {$DEFINE USE_CPPAN_BINARIES} accordingly in tesseractocr.consts.pas if using Tesseract libraries built with CPPAN (defined as default).
  1. Download trained language data files from tesseract-ocr/tessdata/ to bin\tessdata.
    All examples in this repository require English data file (eng.traineddata).
    Additionally examples\delphi-console-pdfconvert example requires osd.traineddata and pdf.ttf files.
    Linux: Tested with language data from tesseract-ocr/tessdata_fast
  2. Open and compile example project:
    • examples\delphi-console-simple. Recognize text in samples\eng-text.png and write to console output delphi-console-simple

    • examples\delphi-vcl-image
      delphi-vcl-image
      4 tabs:

      • Image: View input image
      • Text: Recognized text coded as UTF-8
      • HOCR: Recognized text in HTML format
      • Layout: View page layout (paragraphs, text lines, words...)
    • examples\delphi-console-pdfconvert. Convert samples\multi-page.tif (multiple page image file) to a PDF file

    • examples\lazarus-console-simple. examples\delphi-console-simple for Lazarus

License

MIT

ttesseractocr4's People

Contributors

r1me avatar mateusvicente100 avatar voscha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.