Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dannnylo/tesseract-ocr-crystal
This is a wrapper of Tesseract OCR. Helping to read characters on an image.
https://github.com/dannnylo/tesseract-ocr-crystal
hacktoberfest tesseract tesseract-ocr
Last synced: 2 months ago
JSON representation
This is a wrapper of Tesseract OCR. Helping to read characters on an image.
- Host: GitHub
- URL: https://github.com/dannnylo/tesseract-ocr-crystal
- Owner: dannnylo
- License: mit
- Created: 2019-08-12T04:13:48.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-06T18:12:40.000Z (about 2 years ago)
- Last Synced: 2024-01-27T14:33:04.920Z (5 months ago)
- Topics: hacktoberfest, tesseract, tesseract-ocr
- Language: Crystal
- Homepage:
- Size: 977 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Lists
- awesome-ocr - tesseract-ocr - A Crystal wrapper for tesseract-ocr. (Software / OCR libraries by programming language)
- awesome-ocr - tesseract-ocr - A Crystal wrapper for tesseract-ocr. (7. <a name='Languagedetection'></a>Language detection / 7.3. <a name='OCRlibrariesbyprogramminglanguage'></a>OCR libraries by programming language)
README
# tesseract-ocr
This package is a wrapper of Tesseract OCR. Helping to read characters on a image.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
tesseract-ocr:
github: dannnylo/tesseract-ocr-crystal
```2. Run `shards install`
## Usage
```crystal
require "tesseract-ocr"
```Basic usage:
```crystal
Tesseract::Ocr.read("spec/resources/world.png") => "world"
```With options:
```crystal
Tesseract::Ocr.read("spec/resources/world.png", { :l => "por", :oem => "1" }) => "world"
```Convert image to PDF readable.
```crystal
Tesseract::Ocr.to_pdf("spec/resources/world.png", { :oem => "1" }) => "/tmp/RANDOM_NAME.pdf"
```Reading the image and get words positions
```crystal
Tesseract::OcrWords.read("spec/resources/world.png") => [{word: "world", confidence: 95, x_start: 2, y_start: 2, x_end: 185, y_end: 56}]
```## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## Contributors
- [Danilo Jeremias da Silva](https://github.com/dannnylo) - creator and maintainer