https://github.com/tx7do/cppocrlite
https://github.com/tx7do/cppocrlite
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tx7do/cppocrlite
- Owner: tx7do
- License: mit
- Created: 2023-02-14T10:30:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-05T16:06:22.000Z (over 3 years ago)
- Last Synced: 2025-01-02T05:32:32.192Z (over 1 year ago)
- Language: C++
- Size: 10.2 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cppocrlite
[chineseocr_lite](https://github.com/DayBreak-u/chineseocr_lite) cpp library
## Install
### Install OpenCV
```shell
sudo apt install libopencv-dev
```
### Install OpenMP
```shell
sudo apt-get install libomp-dev
```
### Install OnnxRuntime
Download Page:
```shell
wget https://github.com/microsoft/onnxruntime/releases/download/v1.14.0/onnxruntime-linux-x64-1.14.0.tgz
tar -zxvf onnxruntime-linux-x64-1.14.0.tgz
sudo mv onnxruntime-linux-x64-1.14.0 /opt/onnxruntime
sudo chown -R `whoami` /opt/onnxruntime
```
## Build
```shell
# build Release version
mkdir cmake-build-release
cd cmake-build-release && cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release --target cppocrlite -- -j 12
# build Debug version
mkdir cmake-build-debug
cd cmake-build-debug && cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build . --config Debug --target cppocrlite -- -j 12
# install
sudo chmod 757 /usr/local
sudo chmod 757 /usr/local/lib
sudo chmod 757 /usr/local/lib/pkgconfig
cmake --install .
```
or execute shell script:
```shell
cd script && ./build.sh
```
check installation state:
```shell
pkg-config --cflags --libs onnxruntime
pkg-config --cflags --libs opencv4
pkg-config --cflags --libs cppocrlite
```