View Source Tesserax (Tesserax v0.1.2)
Execute commands against the Tesseract OCR Engine. Able to either recognize text in images loaded in memory or by providing a path to the image.
Summary
Functions
Lists the languages available to tesseract via NIF. Accepts path to tessdata (optional).
Runs a command against the NIF with a path to image.
Runs a command against the NIF with the image loaded in memory. Requires the image to be image/png format.
Functions
Lists the languages available to tesseract via NIF. Accepts path to tessdata (optional).
Examples
{:ok, languages} = Tesserax.list_languages()
{:ok, languages} = Tesserax.list_languages("/path/to/tessdata/dir/")
@spec read_from_file(Tesserax.Command.t()) :: {:ok, binary()} | {:error, atom()}
Runs a command against the NIF with a path to image.
Examples
{:ok, text} = Tesserax.read_from_file(command)
@spec read_from_mem(Tesserax.Command.t()) :: {:ok, binary()} | {:error, atom()}
Runs a command against the NIF with the image loaded in memory. Requires the image to be image/png format.
Examples
{:ok, text} = Tesserax.read_from_mem(command)