1.OpenCV官方网下载OpenCV的安卓平台SDK并解压
在工程的配置pro文件中添加opencv包含路径INCLUDEPATH与库LIBS
unix {
ANDROID_OPENCV = C:\Users\dev2\Desktop\OpenCV-android-sdk\sdk\native
INCLUDEPATH += $$ANDROID_OPENCV/jni/include/opencv2 \
$$ANDROID_OPENCV/jni/include
LIBS += $$ANDROID_OPENCV/staticlibs/arm64-v8a/libopencv_calib3d.a \
$$ANDROID_OPENCV/staticlibs/arm64-v8a/libopencv_core.a \
$$ANDROID_OPENCV/staticlibs/arm64-v8a/libopencv_dnn.a \
$$ANDROID_OPENCV/staticlibs/arm64-v8a/libopencv_features2d.a \
$$ANDROID_OPENCV/staticlibs/ar