Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattsse/opencv-tesseract-gradle
Gradle project to include the opencv and tesseract native libraries depending on your os.
https://github.com/mattsse/opencv-tesseract-gradle
Last synced: 18 days ago
JSON representation
Gradle project to include the opencv and tesseract native libraries depending on your os.
- Host: GitHub
- URL: https://github.com/mattsse/opencv-tesseract-gradle
- Owner: mattsse
- License: mit
- Created: 2018-09-30T13:37:21.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-30T13:48:55.000Z (about 6 years ago)
- Last Synced: 2024-10-06T21:42:09.836Z (about 1 month ago)
- Language: Java
- Size: 57.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenCV & Tesseract Gradle Build
This repo includes a gradle build that provides the opencv and tesseract dependencies based on your operating system.
## Requirements
### Mac
1. [Opencv](https://opencv.org/): Simply follow the Instructions in the [docs](http://opencv-java-tutorials.readthedocs.io/en/latest/01-installing-opencv-for-java.html#install-opencv-3-x-under-macos).
2. [Tesseract](https://github.com/tesseract-ocr): Install using `brew`:```brew install tesseract --with-all-languages```
### Linux (currently not supported & tested but should work the same as macos, but needs some minor adjustments regarding installation paths)
1. [Opencv](https://opencv.org/): Simply follow the Instructions in the [docs](http://opencv-java-tutorials.readthedocs.io/en/latest/01-installing-opencv-for-java.html#install-opencv-3-x-under-linux).
2. [Tesseract](https://github.com/tesseract-ocr): Simply follow the Instructions in the [wiki](https://github.com/tesseract-ocr/tesseract/wiki#linux) for your distribution### Windows
No additional installations required, the opecnv files are downloaded during the first build and stored at [./opencv](./opencv)
## Installation
Simply run `gradlew build`, on windows this will take some time the first time, since we're pulling the opencv files directly from sourceforge and the install it. Subsequent builds will be faster once downloaded.
## Usage
```java
import de.mattsse.opencv.LoadLibs;// load the native opencv library
LoadLibs.loadOpencvLib();```
## Troubleshooting
Currently the version for opencv are hardcoded in the build.gradle, if this differs from your homebrew installation this will result in an error. To resolve that issue you can either change your homebrew installation, adjust the version in build.gradle or overwrite the path to the opencv installation by setting the `OPENCV_PATH` environment variable pointing to your custom installation path.