项目作者: leferrad

项目描述 :
A simple Julia wrapper for Tesseract OCR
高级语言: Julia
项目地址: git://github.com/leferrad/OCReract.jl.git
创建时间: 2018-07-05T15:56:05Z
项目社区:https://github.com/leferrad/OCReract.jl

开源协议:MIT License

下载


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:

  1. 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.

  1. julia> using Images
  2. julia> using OCReract
  3. julia> img_path = "/path/to/img.png";
  4. # With a disk file
  5. julia> run_tesseract(img_path, "/tmp/res.txt", psm=3, oem=1)
  6. # Image in memory
  7. julia> img = load(img_path);
  8. julia> res_text = run_tesseract(img, psm=3, oem=1);
  9. 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)