Packages

Elixir wrapper for Tesseract OCR, an open source text recognition engine.

Current section

Files

Jump to
tesseract_ocr lib tesseract_ocr.ex
Raw

lib/tesseract_ocr.ex

defmodule TesseractOcr do
@moduledoc """
Documentation for TesseractOcr.
"""
import TesseractOcr.Utils
@doc """
This function reads the chars on image by OCR.
## Examples
iex> TesseractOcr.read("test/resources/world.png")
"world"
"""
def read(path, options \\ %{}) when is_binary(path) do
path
|> command("stdout", options)
|> elem(0)
|> String.trim()
end
end