https://github.com/dannnylo/tesseract-ocr-elixir
This package is a wrapper of Tesseract OCR. Helping to read characters on an image.
https://github.com/dannnylo/tesseract-ocr-elixir
hacktoberfest tesseract tesseract-ocr
Last synced: 22 days ago
JSON representation
This package is a wrapper of Tesseract OCR. Helping to read characters on an image.
- Host: GitHub
- URL: https://github.com/dannnylo/tesseract-ocr-elixir
- Owner: dannnylo
- License: mit
- Created: 2018-05-07T02:06:26.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-06T18:18:16.000Z (about 3 years ago)
- Last Synced: 2025-06-05T04:08:13.235Z (about 1 month ago)
- Topics: hacktoberfest, tesseract, tesseract-ocr
- Language: Elixir
- Homepage:
- Size: 41 KB
- Stars: 57
- Watchers: 1
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# TesseractOcr
[](https://travis-ci.org/dannnylo/tesseract-ocr-elixir)
[](https://hex.pm/packages/tesseract_ocr)
[](https://hexdocs.pm/tesseract_ocr)
[](https://hex.pm/packages/tesseract_ocr)
[](https://hex.pm/packages/tesseract_ocr)
[](https://github.com/dannnylo/tesseract-ocr-elixir/commits/master)Elixir wrapper for [Tesseract OCR](https://github.com/tesseract-ocr), an open
source text recognition (OCR) Engine.## Requirements
- Elixir 1.6+ / Erlang OTP 19+
- [Tesseract OCR binary](https://github.com/tesseract-ocr/tesseract/wiki)## Installation
Add `tesseract_ocr` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:tesseract_ocr, "~> 0.1.5"}
]
end
```## Usage
Reading an image file.
```elixir
iex> TesseractOcr.read("test/resources/world.png")
"world"
```With additional options.
```elixir
iex> TesseractOcr.read("test/resources/world.png", %{lang: "por", psm: 7, oem: 1})
"world"
```Get words positions.
```elixir
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.
```elixir
iex> TesseractOcr.PDF.read("test/resources/world.png", "/tmp/test")
"/tmp/test.pdf"
```
Convert image into TSV with text.```elixir
iex> TesseractOcr.TSV.read("test/resources/world.png", "/tmp/test")
"/tmp/test.tsv"
```