OpenCV Custom Builder
OpenCV在OCR中只是做图像的读取保存、编解码、缩放等,可以去除大部分功能模块,保留几个核心功能模块即可。
最后利用Github Actions进行编译。
编译选项添加BUILD_WITH_STATIC_CRT=ON
| 操作系统 | ndk |
|---|---|
| ubuntu 22.04 | 25.2.9519653 |
| 操作系统 | vs版本 | JDK | ant |
|---|---|---|---|
| 2019 | vs2015 | 8 | 1.10.14 |
| 2019 | vs2017 | 8 | 1.10.14 |
| 2019 | vs2019 | 8 | 1.10.14 |
| 2022 | vs2022 | 8 | 1.10.14 |
- vs2019和vs2022支持arm64平台
| 操作系统 | gcc | libc | binutils | JDK | ant |
|---|---|---|---|---|---|
| ubuntu 14.04 | 4.8.4 | 2.19 | 2.24 | 8 | 1.10.14 |
| ubuntu 16.04 | 5.4.0 | 2.23 | 2.26.1 | 8 | 1.10.14 |
| ubuntu 18.04 | 7.5.0 | 2.27 | 2.30 | 8 | 1.10.14 |
| ubuntu 20.04 | 9.4.0 | 2.31 | 2.34 | 8 | 1.10.14 |
| ubuntu 22.04 | 11.4.0 | 2.35 | 2.38 | 8 | 1.10.14 |
- 因ubuntu14.04 arm64 gcc4.8.4 libwebp会导致编译错误,故BUILD_WEBP=OFF
- 因ubuntu14.04 386 gcc4.8.4 libopenexr会导致编译错误,故BUILD_OPENEXR=OFF
| 操作系统 | zig |
|---|---|
| ubuntu 22.04 | 0.13.0 |
| 操作系统 | musl |
|---|---|
| ubuntu 22.04 | 11.3.1 |
| 操作系统 | JDK | ant |
|---|---|---|
| 10(失效) | 8 | 1.10.14 |
| 11(失效) | 8 | 1.10.14 |
| 12 | 8 | 1.10.14 |
| 13 | 8 | 1.10.14 |
| 14 | 11 | 1.10.14 |
- github action 已不支持低版本macos runner
- 需要安装最新版的7zip工具,https://www.7-zip.org/download.html
- 4.9.0 Windows WITH_OPENCL=ON, for opencv-rust
- 4.10.0开始提高了对gcc版本的要求,故缺少某些平台的包
需要
构建xfeatures2d时需要: opencv_3rdparty 最好clone的时候指定好branch
- checkout contrib_xfeatures2d_boostdesc_20161012 把所有*.i文件放在opencv_contrib/modules/xfeatures2d/src/路径下
- checkout contrib_xfeatures2d_vgg_20160317 把所有*.i文件放在opencv_contrib/modules/xfeatures2d/src/路径下