Skip to content

leferrad/OCReract.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCReract.jl

A simple Julia wrapper for Tesseract OCR

CI Documentation Coverage Status Join the chat at https://gitter.im/OCReract.jl

Installation

From the Julia REPL, type ] to enter the Pkg REPL mode and run:

pkg> add OCReract

This is just a wrapper, so it assumes you already have installed Tesseract. Also, be sure the binary tesseract is in your PATH (you can check this by running tesseract --version in your terminal).

Usage

This is a simple example of usage. For more details check the Documentation.

julia> using Images
julia> using OCReract
julia> img_path = "/path/to/img.png";
# With a disk file
julia> run_tesseract(img_path, "/tmp/res.txt", psm=3, oem=1)
# Image in memory
julia> img = load(img_path);
julia> res_text = run_tesseract(img, psm=3, oem=1);
julia> println(strip(res_text));

Testing

In a Julia session, run Pkg.test("OCReract", coverage=true).

Next steps

  • Develop a module for image pre-processing (to improve OCR results)