TesseractOcr

Build Status

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

Installation

If available in Hex, the package can be installed by adding tesseract_ocr to your list of dependencies in mix.exs:

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

Atention: You will need to install the tesseract Ocr application on your operation system. Instalation wiki

Usage

Basic usage:

  TesseractOCR.read('path/of/my/image.ext')
  iex> TesseractOcr.read("test/resources/world.png")
  "world"

With 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}]

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/tesseract_ocr.