Giter Site home page Giter Site logo

tesseract-sys's Introduction

tesseract-sys

Rust bindings for Tesseract. Requires version 4.1.0 or newer.

Help wanted

Windows and Mac maintainers wanted.

Building

This links to the C libraries leptonica and tesseract.

On Ubuntu and derivatives the additional dependencies can be installed by running:

sudo apt-get install libleptonica-dev libtesseract-dev clang

On Fedora 30 the additional dependencies can be installed by running:

sudo dnf install leptonica-devel tesseract-devel clang

On Termux 2019 (Android, Android on Chromebooks) the additional dependencies can be installed by running:

pkg install libclang leptonica-dev tesseract-dev

Building on Windows

On Windows, this library uses Microsoft's vcpkg to provide tesseract.

Please install vcpkg and set up user wide integration or vcpkg crate won't be able to find a library.

To install tesseract

REM from the vcpkg directory

REM 32 bit
.\vcpkg install tesseract:x86-windows

REM 64 bit
.\vcpkg install tesseract:x64-windows

vcpkg allows building either dynamically or statically linked application

if you prefer dynamic linking

SET VCPKGRS_DYNAMIC=true

for statically linked libraries

SET RUSTFLAGS=-Ctarget-feature=+crt-static

To run the tests please download the English trained data to this directory and set

SET TESSDATA_PREFIX=.

If you prefer to compile tesseract yourself (Because, for example, you could not get vcpkg to build using clang-cl.exe), you can set these environment variables: TESSERACT_INCLUDE_PATHS, TESSERACT_LINK_PATHS and TESSERACT_LINK_LIBS.

For example:

set TESSERACT_INCLUDE_PATHS=D:\tesseract\build\include
set TESSERACT_LINK_PATHS=D:\tesseract\build\lib
set TESSERACT_LINK_LIBS=tesseract41

tesseract-sys's People

Contributors

ccouzens avatar antimatter15 avatar vim-zz avatar bepvte avatar ava57r avatar davidrusu avatar dspicher avatar n3xed avatar nico-abram avatar paolobarbolini avatar houqp avatar stripedmonkey avatar timvisee avatar vladmovchan 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.