Skip to content

This package is a wrapper of Tesseract OCR. Helping to read characters on an image.

License

Notifications You must be signed in to change notification settings

dannnylo/tesseract-ocr-elixir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TesseractOcr

travis-ci.org hex.pm hex.pm hex.pm hex.pm github.com

Elixir wrapper for Tesseract OCR, an open source text recognition (OCR) Engine.

Requirements

Installation

Add tesseract_ocr to your list of dependencies in mix.exs:

def deps do
  [
    {:tesseract_ocr, "~> 0.1.5"}
  ]
end

Usage

Reading an image file.

iex> TesseractOcr.read("test/resources/world.png")
"world"

With additional options.

iex> TesseractOcr.read("test/resources/world.png", %{lang: "por", psm: 7, oem: 1})
"world"

Get words positions.

iex> TesseractOcr.Words.read("test/resources/world.png")
[%{confidence: 95, word: "world", x_end: 185, x_start: 2, y_end: 56, y_start: 2}]

Convert image into PDF with text.

iex> TesseractOcr.PDF.read("test/resources/world.png", "/tmp/test")
"/tmp/test.pdf"

Convert image into TSV with text.

iex> TesseractOcr.TSV.read("test/resources/world.png", "/tmp/test")
"/tmp/test.tsv"

About

This package is a wrapper of Tesseract OCR. Helping to read characters on an image.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages