https://github.com/davidegalilei/nimtesseract
A Tesseract OCR wrapper for Nim
https://github.com/davidegalilei/nimtesseract
nim ocr ocr-recognition tesseract text wrapper
Last synced: about 1 month ago
JSON representation
A Tesseract OCR wrapper for Nim
- Host: GitHub
- URL: https://github.com/davidegalilei/nimtesseract
- Owner: DavideGalilei
- License: unlicense
- Created: 2022-01-03T13:23:12.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-23T07:38:35.000Z (over 2 years ago)
- Last Synced: 2025-03-23T18:37:30.760Z (2 months ago)
- Topics: nim, ocr, ocr-recognition, tesseract, text, wrapper
- Language: Nim
- Homepage:
- Size: 10.8 MB
- Stars: 33
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Nim Tesseract 👑👁

Nim Tesseract is a Nim wrapper for the [Tesseract](https://github.com/tesseract-ocr/tesseract/) OCR library, via its dynamic library.## Installation 👇
```bash
$ nimble install nimtesseract
```## Usage 🌷
1. Install (lib)tesseract via your package manager or put the tesseract so/dll/dylib file in the project directory
E.g. for Arch Linux:
```bash
$ pacman -Sy tesseract
```for macOS:
```bash
$ brew install tesseract
```2. Download trained data from https://github.com/tesseract-ocr/tessdata or https://github.com/tesseract-ocr/tessdata_fast
3. Done ✅## Example 🤔
```nim
import nimtesseractecho imageToText("file.png")
```
More examples in the [examples folder](/examples)## Development 🔩
Download trained data and put it into src folder> ⚠️ Outdated, but still useful. Don't refer to this.
> ```bash
> $ cd src
> $ TESSDATA_PREFIX=$(pwd) nim r -d:pixieUseStb nimtesseract.nim
> ```Run tests with nimble:
```bash
$ nimble test
````capi.h` reference: https://github.com/tesseract-ocr/tesseract/blob/main/include/tesseract/capi.h
## Credits 👻
Inspired from https://github.com/Altabeh/tesseract-ocr-wrapper## License 📕
This project is under the `Unlicense` license.
This is free and unencumbered software released into the public domain.