OpenCV
查询指令
# 查看 opencv 已安装的库
pkg-config opencv --libs
# 查看 opencv 已安装的版本
pkg-config opencv --modversion
编译安装
Linux
[compiler] sudo apt-get install build-essential
[required] sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
[optional] sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
https://github.com/opencv/opencv/releases Source Code https://github.com/opencv/opencv_contrib/releases tar.gz
find ./ -type f -print0 | xargs -0 md5sum |
opencv-3.4.2/.cache/
https://github.com/opencv/opencv_3rdparty/branches/all
<md5效验码>-<filenam>
.cache
|__.gitignore
|__data
| |__face_landmark_model.data
|__ippicv
| |__ippicv_2017u3_lnx_intel64_general_20180518.tgz
|__xfeatures2d
|__boostdesc
| |__boostdesc_bgm_hd.i
| |__boostdesc_bgm.i
| |__boostdesc_bgm_bi.i
| |__boostdesc_binboost_064.i
| |__boostdesc_binboost_128.i
| |__boostdesc_lbgm.i
| |__boostdesc_binboost_256.i
|__vgg
|__vgg_generated_48.i
|__vgg_generated_64.i
|__vgg_generated_80.i
|__vgg_generated_120.i
Video_Codec_SDK_9.0.20
opencv-3.4.2/modules/cudacodec/src precomp.hpp、video_decoder.hpp、cuvid_video_source.hpp、frame_queue.hpp、video_parser.hpp
#if CUDA_VERSION >= 9000
#include <dynlink_nvcuvid.h>
#else
#include <nvcuvid.h>
#endif
#if CUDA_VERSION >= 9000 && CUDA_VERSION < 10000
#include <dynlink_nvcuvid.h>
#else
#include "nvcuvid.h"
#endif
Windows 交叉编译 Android OpenCV
编译工具
cmake
- version: MinGW-W64 GCC-5.4.0 x86_64-win32-sjlj
添加到系统环境变量PATH
- version: apache-ant-1.10.12-bin.zip
cmake_gui -> add entry
- ANDROID_ABI: arm64-v8a
- ANDROID_SDK: D:/ProgramData/Android/Sdk
- ANDROID_NDK: D:/ProgramData/Android/Sdk/ndk/17.2.4988734
- ANDROID_NATIVATE_API_LEVEL: 25
- ANDROID_STL: c++_shared
- ANT_EXECUTABLE: D:/Program Files/apache-ant-1.10.12/bin
CMake Error at cmake/android/OpenCVDetectAndroidSDK.cmake:184 (message):
Android SDK: Can't build Android projects as requested by
BUILD_ANDROID_PROJECTS=ON variable.
Use BUILD_ANDROID_PROJECTS=OFF to prepare Android project files without
building them
Call Stack (most recent call first):
CMakeLists.txt:645 (include)
BUILD_ANDROID_PROJECTS: ON -> OFF
添加 opencv-contrib
- OPENCV_EXTRA_MODULES_PATH: D:/ProgramData/Android/opencv/opencv_contrib-3.4.3/modules
- BUILD_ANDROID_PROJECTS=OFF
- BUILD_ANDROID_EXAMPLES=ON
- BUILD_PERF_TESTS=OFF
- BUILD_TESTS=OFF
- BUILD_opencv_world=OFF
- BUILD_SHARED_LIBS=OFF
- WITH_OPENCL=ON 移动端的并行架构支持
- WITH_OPENCL_SVM=ON 开启共享虚拟内存