• Stars
    star
    258
  • Rank 158,189 (Top 4 %)
  • Language
    Rust
  • License
    MIT License
  • Created over 5 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Productive and safe Rust binding for leptonica and tesseract

Leptess

Test Crates.io Docs

Productive and safe Rust bindings/wrappers for Tesseract and Leptonica.

Build dependencies

Make sure you have clang, Leptonica and Tesseract installed.

Tesseract should be version 4.0.0 or above.

Ubuntu

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

You will also need to install tesseract language data based on your OCR needs:

sudo apt-get install tesseract-ocr-eng

Mac

brew install tesseract leptonica

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 the 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

To run the tests configure vcpkg-crate to find the tesseract library:

SET VCPKGRS_DYNAMIC=true
cargo test

Usage

let mut lt = leptess::LepTess::new(None, "eng").unwrap();
lt.set_image("path/to/page.bmp");
println!("{}", lt.get_utf8_text().unwrap());

For more examples, see docs and examples directory.

To run demos in examples directory, try:

cargo run --example low_level_ocr_full_page

Development

To run tests, you will need at Tesseract 4.x or 5.x to match what we have in tests/tessdata/eng.traineddata. See GitHub config actions to see how to replicate the setup.

More Repositories

1

sqlvet

Go fearless SQL. Sqlvet performs static analysis on raw SQL queries in your Go code base.
Go
489
star
2

vpcstudio

VPC design made easy
TypeScript
128
star
3

shell.py

shell power for python
Python
96
star
4

asciidoc-deckjs

A deck.js backend for asciidoc
CSS
39
star
5

gtest

Go test utility library inspired by pytest
Go
31
star
6

libue

A self-contained minimal library for interacting with Linux hot-plug events
C
25
star
7

pyh3c

Client and Sever for h3c 802.1x authentication
Python
20
star
8

terraform-provider-airflow

Go
20
star
9

iris-python-client

python client for Iris REST api
Python
8
star
10

vimrc-houqp

my vim configuration file
Vim Script
7
star
11

wbwa

ไธ€ไปฝ็ฎ€้™‹็š„AsciiDocๆ•™็จ‹
Shell
6
star
12

DebugOnline

an online debuger
PHP
4
star
13

pex_uwsgi

build script for uwsgi with pex support
Python
4
star
14

mindwavesocket

web interface for mindwave metrics
JavaScript
4
star
15

ownPrey

Prey control panel app for ownCloud
PHP
3
star
16

download-release-assets-action

GitHub action to download release assets
Shell
2
star
17

linux.vim

vim plugin for kernel hacking
Vim Script
2
star
18

myNasmTemplate

code template for NASM
Assembly
2
star
19

znc.docker

ZNC docker image
Shell
2
star
20

NoMoreRestriction

A very very very SIMPLE chrome extension that aims to disable annoying scripts.
JavaScript
1
star
21

longkey

My fork of longkey for linux, the original projects seems not in maintain anymore, I am still trying to contact the author...
Perl
1
star
22

bibdb

Translates BibTeX bibliographic entries to DocBook XML. Author: Sylvain Schmitz
Shell
1
star
23

markdownpage

A simple script that generates html page with template file and markdown file as input
Python
1
star
24

map

deprecated, project moved to https://github.com/owncloud/maps
JavaScript
1
star