当前位置:   article > 正文

OpenCV3.4.10/4.6.0/4.7.0安装与CMakeLists编写_cmakelists opencv

cmakelists opencv


第零部分 OpenCV 3.4.10安装

0.0 旧源码安装版本卸载

#进入旧代码源码的build文件夹
cd /home/zph/3rdParty/opencv3.4.10/opencv/build
sudo make uninstall
# 一些空文件夹需要删掉
sudo rm -r /usr/local/include
sudo rm -r /usr/local/share/OpenCV
sudo rm -r /usr/local/bin/opencv_demo
sudo rm -r /usr/local/share/licenses/opencv3
# 一些没删掉的库文件,需要删掉
sudo rm /usr/local/lib/libopencv_*
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

0.1 安装相关依赖

这部分我抄的learnopencv.com

## Install dependencies
sudo apt -y install build-essential checkinstall cmake pkg-config yasm
sudo apt -y install git gfortran
sudo apt -y install libjpeg8-dev libpng-dev

sudo apt -y install software-properties-common
## sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt -y update

sudo apt -y install libjasper1
sudo apt -y install libtiff-dev

sudo apt -y install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev
sudo apt -y install libxine2-dev libv4l-dev
cd /usr/include/linux
sudo ln -s -f ../libv4l1-videodev.h videodev.h
cd "$cwd"

sudo apt -y install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
sudo apt -y install libgtk2.0-dev libtbb-dev qt5-default
sudo apt -y install libatlas-base-dev
sudo apt -y install libfaac-dev libmp3lame-dev libtheora-dev
sudo apt -y install libvorbis-dev libxvidcore-dev
sudo apt -y install libopencore-amrnb-dev libopencore-amrwb-dev
sudo apt -y install libavresample-dev
sudo apt -y install x264 v4l-utils

# Ceres required package
sudo apt-get install libmetis-dev
sudo apt-get install libsuitesparse-dev
sudo apt-get install libboost-all-dev

# OpenGL and VTK
sudo apt-get install libglfw3-dev libglfw3 libqt5x11extras5-dev

# numpy
sudo apt install python-numpy
sudo apt install python3-numpy

# OpenBLAS
sudo apt install libopenblas-dev
sudo apt install liblapacke-dev

# Optional dependencies
sudo apt -y install libprotobuf-dev protobuf-compiler
sudo apt -y install libgoogle-glog-dev libgflags-dev
sudo apt -y install libgphoto2-dev libeigen3-dev libhdf5-dev doxygen
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47

0.2 相关依赖Ceres确认

不能使用Ceres2.0版本,不然编译会报错,根据此博客Ceres版本与OpenCV中内容下载安装1.14.0的版本

0.3 建立工作空间

mkdir -p 3rdParty/opencv3.4.10
cd 3rdParty/opencv3.4.10
## 下载源码
## 若是CIUS实验室成员,请从企业仓库下载速度更快,包含opencv 3.4.10源码主分支,contrib模块,以及gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2文件
git clone https://gitee.com/cius/opencv3.4.10.git
## 官方下载
git clone https://github.com/opencv/opencv.git
cd opencv
git checkout 3.4.10
cd ..

git clone https://github.com/opencv/opencv_contrib.git
cd opencv_contrib
git checkout 3.4.10
cd ..

## 进入opencv目录
cd opencv
mkdir build
cd build
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

opencv-4.6.0

进入OpenCV Github Release网页:https://github.com/opencv/opencv/releases
接下来轮到OpenCV-contrib:https://github.com/opencv/opencv_contrib/releases
都选择一样的版本 4.6.0
后面安装步骤一样。但是安装过程中cuda一致报错,我最后适配了cuda-11.6,cudnn-8.4.0,编译成功。

opencv-4.7.0

进入OpenCV Github Release网页:https://github.com/opencv/opencv/releases
接下来轮到OpenCV-contrib:https://github.com/opencv/opencv_contrib/releases
都选择一样的版本 4.7.0
安装过程中cuda 最后适配了cuda-12.0,cudnn-8.8.0,编译成功。

0.4.1 构建命令

下面是和cuda一起编译的构建命令,并且打开了python2 和python3选项

cmake -D CMAKE_BUILD_TYPE=RELEASE \
        -D CMAKE_C_COMPILER=/usr/bin/gcc-7 \
        -D CMAKE_INSTALL_PREFIX=/usr/local \
        -D INSTALL_PYTHON_EXAMPLES=ON \
        -D INSTALL_C_EXAMPLES=OFF \
        -D WITH_TBB=ON \
        -D OPENCV_ENABLE_NONFREE=ON \
        -D WITH_CUDA=ON \
        -D BUILD_opencv_cudacodec=OFF \
        -D WITH_CUDNN=ON \
        -D OPENCV_DNN_CUDA=ON \
        -D ENABLE_FAST_MATH=1 \
        -D CUDA_FAST_MATH=1 \
        -D CUDA_ARCH_BIN=7.5 \
        -D WITH_CUBLAS=1 \
        -D WITH_V4L=ON \
        -D WITH_V4L=ON \
        -D WITH_QT=ON \
        -D WITH_OPENGL=ON \
        -D WITH_VTK=ON \
        -D WITH_GSTREAMER=ON \
        -D OPENCV_GENERATE_PKGCONFIG=ON \
        -D OPENCV_PC_FILE_NAME=opencv.pc \
        -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
        -D BUILD_NEW_PYTHON_SUPPORT=ON \
        -D BUILD_TESTS=OFF \
        -D BUILD_EXAMPLES=ON \
        -D WITH_OPENGL=ON \
        -D PYTHON3_EXECUTABLE=/usr/bin/python3.8 \
        -D PYTHON3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.8.a \
        -D BUILD_opencv_python2=OFF \
        -D BUILD_opencv_python3=ON \
        -D BUILD_TIFF=ON .. \
        -D BUILD_LIST=calib3d,features2d,highgui,dnn,imgproc,imgcodecs,\
cudev,cudaoptflow,cudaimgproc,cudalegacy,cudaarithm,cudacodec,cudastereo,\
cudafeatures2d,xfeatures2d,tracking,stereo,\
aruco,videoio,ccalib, video
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37

0.4.2 检查

OpenBLASLAPACK 找不到 参考 Correction in OpenCV’s default CMAKE search Path for OpenBLAS Library on Ubuntu-64bit Machines [Solution]

0.5 编译命令

## nporc 命令看电脑线程数
make -j4
  • 1
  • 2

0.6 安装命令

sudo make install
  • 1

0.7 install路径中安装的文件

Install the project...
-- Install configuration: "RELEASE"
-- Installing: /usr/local/share/licenses/opencv4/ippicv-readme.htm
-- Installing: /usr/local/share/licenses/opencv4/ippicv-EULA.txt
-- Installing: /usr/local/share/licenses/opencv4/ippicv-third-party-programs.txt
-- Installing: /usr/local/share/licenses/opencv4/ippiw-support.txt
-- Installing: /usr/local/share/licenses/opencv4/ippiw-third-party-programs.txt
-- Installing: /usr/local/share/licenses/opencv4/ippiw-EULA.txt
-- Installing: /usr/local/share/licenses/opencv4/opencl-headers-LICENSE.txt
-- Installing: /usr/local/share/licenses/opencv4/ade-LICENSE
-- Installing: /usr/local/include/opencv4/opencv2/cvconfig.h
-- Installing: /usr/local/include/opencv4/opencv2/opencv_modules.hpp
-- Installing: /usr/local/lib/pkgconfig/opencv4.pc
-- Installing: /usr/local/lib/cmake/opencv4/OpenCVModules.cmake
-- Installing: /usr/local/lib/cmake/opencv4/OpenCVModules-release.cmake
-- Installing: /usr/local/lib/cmake/opencv4/OpenCVConfig-version.cmake
-- Installing: /usr/local/lib/cmake/opencv4/OpenCVConfig.cmake
-- Installing: /usr/local/bin/setup_vars_opencv4.sh
-- Installing: /usr/local/share/opencv4/valgrind.supp
-- Installing: /usr/local/share/opencv4/valgrind_3rdparty.supp
-- Installing: /usr/local/share/licenses/opencv4/openexr-LICENSE
-- Installing: /usr/local/share/licenses/opencv4/openexr-AUTHORS.ilmbase
-- Installing: /usr/local/share/licenses/opencv4/openexr-AUTHORS.openexr
-- Installing: /usr/local/share/licenses/opencv4/protobuf-LICENSE
-- Installing: /usr/local/share/licenses/opencv4/protobuf-README.md
-- Installing: /usr/local/share/licenses/opencv4/quirc-LICENSE
-- Installing: /usr/local/share/licenses/opencv4/ittnotify-LICENSE.BSD
-- Installing: /usr/local/share/licenses/opencv4/ittnotify-LICENSE.GPL
-- Installing: /usr/local/include/opencv4/opencv2/opencv.hpp
-- Installing: /usr/local/lib/libopencv_cudev.so.4.6.0
-- Installing: /usr/local/lib/libopencv_cudev.so.406
-- Set runtime path of "/usr/local/lib/libopencv_cudev.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_cudev.so
-- Installing: /usr/local/include/opencv4/opencv2/cudev.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/block/block.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/block/detail/reduce.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/block/detail/reduce_key_val.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/block/dynamic_smem.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/block/reduce.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/block/scan.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/block/vec_distance.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/common.hpp
-- Up-to-date: /usr/local/include/opencv4/opencv2/cudev/common.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/expr/binary_func.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/expr/binary_op.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/expr/color.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/expr/deriv.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/expr/expr.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/expr/per_element_func.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/expr/reduction.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/expr/unary_func.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/expr/unary_op.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/expr/warping.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/functional/color_cvt.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/functional/detail/color_cvt.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/functional/functional.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/functional/tuple_adapter.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/copy.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/copy.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/histogram.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/integral.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/minmaxloc.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/pyr_down.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/pyr_up.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/reduce.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/reduce_to_column.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/reduce_to_row.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/split_merge.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/transform.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/detail/transpose.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/histogram.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/integral.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/pyramids.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/reduce.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/reduce_to_vec.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/split_merge.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/transform.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/grid/transpose.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/constant.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/deriv.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/detail/gpumat.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/extrapolation.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/glob.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/gpumat.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/interpolation.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/lut.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/mask.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/remap.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/resize.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/texture.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/traits.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/transform.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/warping.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/ptr2d/zip.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/util/atomic.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/util/detail/tuple.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/util/detail/type_traits.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/util/limits.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/util/saturate_cast.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/util/simd_functions.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/util/tuple.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/util/type_traits.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/util/vec_math.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/util/vec_traits.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/warp/detail/reduce.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/warp/detail/reduce_key_val.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/warp/reduce.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/warp/scan.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/warp/shuffle.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudev/warp/warp.hpp
-- Installing: /usr/local/lib/libopencv_core.so.4.6.0
-- Installing: /usr/local/lib/libopencv_core.so.406
-- Set runtime path of "/usr/local/lib/libopencv_core.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64:/opt/OpenBLAS/lib"
-- Installing: /usr/local/lib/libopencv_core.so
-- Installing: /usr/local/include/opencv4/opencv2/core.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/affine.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/async.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/base.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/bindings_utils.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/bufferpool.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/check.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/core.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/core_c.h
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda.inl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/block.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/border_interpolate.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/color.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/common.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/datamov_utils.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/detail/color_detail.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/detail/reduce.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/detail/reduce_key_val.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/detail/transform_detail.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/detail/type_traits_detail.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/detail/vec_distance_detail.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/dynamic_smem.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/emulation.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/filters.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/funcattrib.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/functional.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/limits.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/reduce.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/saturate_cast.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/scan.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/simd_functions.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/transform.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/type_traits.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/utility.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/vec_distance.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/vec_math.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/vec_traits.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/warp.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/warp_reduce.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda/warp_shuffle.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda_stream_accessor.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cuda_types.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cv_cpu_dispatch.h
-- Installing: /usr/local/include/opencv4/opencv2/core/cv_cpu_helper.h
-- Installing: /usr/local/include/opencv4/opencv2/core/cvdef.h
-- Installing: /usr/local/include/opencv4/opencv2/core/cvstd.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cvstd.inl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/detail/async_promise.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/detail/dispatch_helper.impl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/detail/exception_ptr.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/directx.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/dualquaternion.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/dualquaternion.inl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/eigen.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/fast_math.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/hal.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/interface.h
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_avx.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_avx512.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_cpp.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_forward.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_msa.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_neon.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_rvv.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_rvv071.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_sse.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_sse_em.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_vsx.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/intrin_wasm.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/msa_macros.h
-- Installing: /usr/local/include/opencv4/opencv2/core/hal/simd_utils.impl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/mat.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/mat.inl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/matx.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/neon_utils.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/ocl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/ocl_genbase.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/ocl_defs.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/opencl_info.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/opencl_svm.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/autogenerated/opencl_clblas.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/autogenerated/opencl_clfft.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/autogenerated/opencl_core.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/autogenerated/opencl_core_wrappers.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/autogenerated/opencl_gl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/autogenerated/opencl_gl_wrappers.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/opencl_clblas.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/opencl_clfft.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/opencl_core.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/opencl_core_wrappers.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/opencl_gl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/opencl_gl_wrappers.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/opencl_svm_20.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/opencl_svm_definitions.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opencl/runtime/opencl_svm_hsa_extension.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/opengl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/operations.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/optim.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/ovx.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/parallel/backend/parallel_for.openmp.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/parallel/backend/parallel_for.tbb.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/parallel/parallel_backend.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/persistence.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/quaternion.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/quaternion.inl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/saturate.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/simd_intrinsics.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/softfloat.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/sse_utils.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/traits.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/types.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/types_c.h
-- Installing: /usr/local/include/opencv4/opencv2/core/utility.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/utils/allocator_stats.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/utils/allocator_stats.impl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/utils/filesystem.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/utils/fp_control_utils.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/utils/instrumentation.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/utils/logger.defines.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/utils/logger.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/utils/logtag.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/utils/tls.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/utils/trace.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/va_intel.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/version.hpp
-- Installing: /usr/local/include/opencv4/opencv2/core/vsx_utils.hpp
-- Installing: /usr/local/share/licenses/opencv4/SoftFloat-COPYING.txt
-- Installing: /usr/local/lib/libopencv_cudaarithm.so.4.6.0
-- Installing: /usr/local/lib/libopencv_cudaarithm.so.406
-- Set runtime path of "/usr/local/lib/libopencv_cudaarithm.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_cudaarithm.so
-- Installing: /usr/local/include/opencv4/opencv2/cudaarithm.hpp
-- Installing: /usr/local/lib/libopencv_flann.so.4.6.0
-- Installing: /usr/local/lib/libopencv_flann.so.406
-- Set runtime path of "/usr/local/lib/libopencv_flann.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_flann.so
-- Installing: /usr/local/include/opencv4/opencv2/flann.hpp
-- Installing: /usr/local/include/opencv4/opencv2/flann/all_indices.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/allocator.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/any.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/autotuned_index.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/composite_index.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/config.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/defines.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/dist.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/dummy.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/dynamic_bitset.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/flann.hpp
-- Installing: /usr/local/include/opencv4/opencv2/flann/flann_base.hpp
-- Installing: /usr/local/include/opencv4/opencv2/flann/general.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/ground_truth.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/hdf5.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/heap.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/hierarchical_clustering_index.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/index_testing.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/kdtree_index.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/kdtree_single_index.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/kmeans_index.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/linear_index.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/logger.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/lsh_index.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/lsh_table.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/matrix.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/miniflann.hpp
-- Installing: /usr/local/include/opencv4/opencv2/flann/nn_index.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/object_factory.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/params.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/random.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/result_set.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/sampling.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/saving.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/simplex_downhill.h
-- Installing: /usr/local/include/opencv4/opencv2/flann/timer.h
-- Installing: /usr/local/lib/libopencv_imgproc.so.4.6.0
-- Installing: /usr/local/lib/libopencv_imgproc.so.406
-- Set runtime path of "/usr/local/lib/libopencv_imgproc.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_imgproc.so
-- Installing: /usr/local/include/opencv4/opencv2/imgproc.hpp
-- Installing: /usr/local/include/opencv4/opencv2/imgproc/bindings.hpp
-- Installing: /usr/local/include/opencv4/opencv2/imgproc/detail/gcgraph.hpp
-- Installing: /usr/local/include/opencv4/opencv2/imgproc/hal/hal.hpp
-- Installing: /usr/local/include/opencv4/opencv2/imgproc/hal/interface.h
-- Installing: /usr/local/include/opencv4/opencv2/imgproc/imgproc.hpp
-- Installing: /usr/local/include/opencv4/opencv2/imgproc/imgproc_c.h
-- Installing: /usr/local/include/opencv4/opencv2/imgproc/segmentation.hpp
-- Installing: /usr/local/include/opencv4/opencv2/imgproc/types_c.h
-- Installing: /usr/local/lib/libopencv_plot.so.4.6.0
-- Installing: /usr/local/lib/libopencv_plot.so.406
-- Set runtime path of "/usr/local/lib/libopencv_plot.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_plot.so
-- Installing: /usr/local/include/opencv4/opencv2/plot.hpp
-- Installing: /usr/local/lib/libopencv_cudafilters.so.4.6.0
-- Installing: /usr/local/lib/libopencv_cudafilters.so.406
-- Set runtime path of "/usr/local/lib/libopencv_cudafilters.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_cudafilters.so
-- Installing: /usr/local/include/opencv4/opencv2/cudafilters.hpp
-- Installing: /usr/local/lib/libopencv_cudaimgproc.so.4.6.0
-- Installing: /usr/local/lib/libopencv_cudaimgproc.so.406
-- Set runtime path of "/usr/local/lib/libopencv_cudaimgproc.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_cudaimgproc.so
-- Installing: /usr/local/include/opencv4/opencv2/cudaimgproc.hpp
-- Installing: /usr/local/lib/libopencv_cudawarping.so.4.6.0
-- Installing: /usr/local/lib/libopencv_cudawarping.so.406
-- Set runtime path of "/usr/local/lib/libopencv_cudawarping.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_cudawarping.so
-- Installing: /usr/local/include/opencv4/opencv2/cudawarping.hpp
-- Installing: /usr/local/lib/libopencv_dnn.so.4.6.0
-- Installing: /usr/local/lib/libopencv_dnn.so.406
-- Set runtime path of "/usr/local/lib/libopencv_dnn.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64:/opt/OpenBLAS/lib"
-- Installing: /usr/local/lib/libopencv_dnn.so
-- Installing: /usr/local/include/opencv4/opencv2/dnn.hpp
-- Installing: /usr/local/include/opencv4/opencv2/dnn/all_layers.hpp
-- Installing: /usr/local/include/opencv4/opencv2/dnn/dict.hpp
-- Installing: /usr/local/include/opencv4/opencv2/dnn/dnn.hpp
-- Installing: /usr/local/include/opencv4/opencv2/dnn/dnn.inl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/dnn/layer.details.hpp
-- Installing: /usr/local/include/opencv4/opencv2/dnn/layer.hpp
-- Installing: /usr/local/include/opencv4/opencv2/dnn/shape_utils.hpp
-- Installing: /usr/local/include/opencv4/opencv2/dnn/utils/debug_utils.hpp
-- Installing: /usr/local/include/opencv4/opencv2/dnn/utils/inference_engine.hpp
-- Installing: /usr/local/include/opencv4/opencv2/dnn/version.hpp
-- Installing: /usr/local/lib/libopencv_features2d.so.4.6.0
-- Installing: /usr/local/lib/libopencv_features2d.so.406
-- Set runtime path of "/usr/local/lib/libopencv_features2d.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_features2d.so
-- Installing: /usr/local/include/opencv4/opencv2/features2d.hpp
-- Installing: /usr/local/include/opencv4/opencv2/features2d/features2d.hpp
-- Installing: /usr/local/include/opencv4/opencv2/features2d/hal/interface.h
-- Installing: /usr/local/lib/libopencv_imgcodecs.so.4.6.0
-- Installing: /usr/local/lib/libopencv_imgcodecs.so.406
-- Set runtime path of "/usr/local/lib/libopencv_imgcodecs.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_imgcodecs.so
-- Installing: /usr/local/include/opencv4/opencv2/imgcodecs.hpp
-- Installing: /usr/local/include/opencv4/opencv2/imgcodecs/imgcodecs.hpp
-- Installing: /usr/local/include/opencv4/opencv2/imgcodecs/imgcodecs_c.h
-- Installing: /usr/local/include/opencv4/opencv2/imgcodecs/ios.h
-- Installing: /usr/local/include/opencv4/opencv2/imgcodecs/legacy/constants_c.h
-- Installing: /usr/local/include/opencv4/opencv2/imgcodecs/macosx.h
-- Installing: /usr/local/lib/libopencv_videoio.so.4.6.0
-- Installing: /usr/local/lib/libopencv_videoio.so.406
-- Set runtime path of "/usr/local/lib/libopencv_videoio.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_videoio.so
-- Installing: /usr/local/include/opencv4/opencv2/videoio.hpp
-- Installing: /usr/local/include/opencv4/opencv2/videoio/cap_ios.h
-- Installing: /usr/local/include/opencv4/opencv2/videoio/legacy/constants_c.h
-- Installing: /usr/local/include/opencv4/opencv2/videoio/registry.hpp
-- Installing: /usr/local/include/opencv4/opencv2/videoio/videoio.hpp
-- Installing: /usr/local/include/opencv4/opencv2/videoio/videoio_c.h
-- Installing: /usr/local/lib/libopencv_calib3d.so.4.6.0
-- Installing: /usr/local/lib/libopencv_calib3d.so.406
-- Set runtime path of "/usr/local/lib/libopencv_calib3d.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64:/opt/OpenBLAS/lib"
-- Installing: /usr/local/lib/libopencv_calib3d.so
-- Installing: /usr/local/include/opencv4/opencv2/calib3d.hpp
-- Installing: /usr/local/include/opencv4/opencv2/calib3d/calib3d.hpp
-- Installing: /usr/local/include/opencv4/opencv2/calib3d/calib3d_c.h
-- Installing: /usr/local/lib/libopencv_cudacodec.so.4.6.0
-- Installing: /usr/local/lib/libopencv_cudacodec.so.406
-- Set runtime path of "/usr/local/lib/libopencv_cudacodec.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_cudacodec.so
-- Installing: /usr/local/include/opencv4/opencv2/cudacodec.hpp
-- Installing: /usr/local/lib/libopencv_cudafeatures2d.so.4.6.0
-- Installing: /usr/local/lib/libopencv_cudafeatures2d.so.406
-- Set runtime path of "/usr/local/lib/libopencv_cudafeatures2d.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_cudafeatures2d.so
-- Installing: /usr/local/include/opencv4/opencv2/cudafeatures2d.hpp
-- Installing: /usr/local/lib/libopencv_cudastereo.so.4.6.0
-- Installing: /usr/local/lib/libopencv_cudastereo.so.406
-- Set runtime path of "/usr/local/lib/libopencv_cudastereo.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_cudastereo.so
-- Installing: /usr/local/include/opencv4/opencv2/cudastereo.hpp
-- Installing: /usr/local/lib/libopencv_highgui.so.4.6.0
-- Installing: /usr/local/lib/libopencv_highgui.so.406
-- Set runtime path of "/usr/local/lib/libopencv_highgui.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_highgui.so
-- Installing: /usr/local/include/opencv4/opencv2/highgui.hpp
-- Installing: /usr/local/include/opencv4/opencv2/highgui/highgui.hpp
-- Installing: /usr/local/include/opencv4/opencv2/highgui/highgui_c.h
-- Installing: /usr/local/lib/libopencv_video.so.4.6.0
-- Installing: /usr/local/lib/libopencv_video.so.406
-- Set runtime path of "/usr/local/lib/libopencv_video.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_video.so
-- Installing: /usr/local/include/opencv4/opencv2/video.hpp
-- Installing: /usr/local/include/opencv4/opencv2/video/background_segm.hpp
-- Installing: /usr/local/include/opencv4/opencv2/video/detail/tracking.detail.hpp
-- Installing: /usr/local/include/opencv4/opencv2/video/legacy/constants_c.h
-- Installing: /usr/local/include/opencv4/opencv2/video/tracking.hpp
-- Installing: /usr/local/include/opencv4/opencv2/video/video.hpp
-- Installing: /usr/local/lib/libopencv_xfeatures2d.so.4.6.0
-- Installing: /usr/local/lib/libopencv_xfeatures2d.so.406
-- Set runtime path of "/usr/local/lib/libopencv_xfeatures2d.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_xfeatures2d.so
-- Installing: /usr/local/include/opencv4/opencv2/xfeatures2d.hpp
-- Installing: /usr/local/include/opencv4/opencv2/xfeatures2d/cuda.hpp
-- Installing: /usr/local/include/opencv4/opencv2/xfeatures2d/nonfree.hpp
-- Installing: /usr/local/lib/libopencv_ximgproc.so.4.6.0
-- Installing: /usr/local/lib/libopencv_ximgproc.so.406
-- Set runtime path of "/usr/local/lib/libopencv_ximgproc.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_ximgproc.so
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/brightedges.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/color_match.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/deriche_filter.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/disparity_filter.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/edge_drawing.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/edge_filter.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/edgeboxes.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/edgepreserving_filter.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/estimated_covariance.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/fast_hough_transform.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/fast_line_detector.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/fourier_descriptors.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/lsc.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/paillou_filter.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/peilin.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/radon_transform.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/ridgefilter.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/run_length_morphology.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/scansegment.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/seeds.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/segmentation.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/slic.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/sparse_match_interpolator.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/structured_edge_detection.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ximgproc/weighted_median_filter.hpp
-- Installing: /usr/local/lib/libopencv_aruco.so.4.6.0
-- Installing: /usr/local/lib/libopencv_aruco.so.406
-- Set runtime path of "/usr/local/lib/libopencv_aruco.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_aruco.so
-- Installing: /usr/local/include/opencv4/opencv2/aruco.hpp
-- Installing: /usr/local/include/opencv4/opencv2/aruco/charuco.hpp
-- Installing: /usr/local/include/opencv4/opencv2/aruco/dictionary.hpp
-- Installing: /usr/local/lib/libopencv_ccalib.so.4.6.0
-- Installing: /usr/local/lib/libopencv_ccalib.so.406
-- Set runtime path of "/usr/local/lib/libopencv_ccalib.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_ccalib.so
-- Installing: /usr/local/include/opencv4/opencv2/ccalib.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ccalib/multicalib.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ccalib/omnidir.hpp
-- Installing: /usr/local/include/opencv4/opencv2/ccalib/randpattern.hpp
-- Installing: /usr/local/lib/libopencv_cudalegacy.so.4.6.0
-- Installing: /usr/local/lib/libopencv_cudalegacy.so.406
-- Set runtime path of "/usr/local/lib/libopencv_cudalegacy.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_cudalegacy.so
-- Installing: /usr/local/include/opencv4/opencv2/cudalegacy.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudalegacy/NCV.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudalegacy/NCVBroxOpticalFlow.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudalegacy/NCVHaarObjectDetection.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudalegacy/NCVPyramid.hpp
-- Installing: /usr/local/include/opencv4/opencv2/cudalegacy/NPP_staging.hpp
-- Installing: /usr/local/lib/libopencv_optflow.so.4.6.0
-- Installing: /usr/local/lib/libopencv_optflow.so.406
-- Set runtime path of "/usr/local/lib/libopencv_optflow.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_optflow.so
-- Installing: /usr/local/include/opencv4/opencv2/optflow.hpp
-- Installing: /usr/local/include/opencv4/opencv2/optflow/motempl.hpp
-- Installing: /usr/local/include/opencv4/opencv2/optflow/pcaflow.hpp
-- Installing: /usr/local/include/opencv4/opencv2/optflow/rlofflow.hpp
-- Installing: /usr/local/include/opencv4/opencv2/optflow/sparse_matching_gpc.hpp
-- Installing: /usr/local/lib/libopencv_tracking.so.4.6.0
-- Installing: /usr/local/lib/libopencv_tracking.so.406
-- Set runtime path of "/usr/local/lib/libopencv_tracking.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_tracking.so
-- Installing: /usr/local/include/opencv4/opencv2/tracking.hpp
-- Installing: /usr/local/include/opencv4/opencv2/tracking/feature.hpp
-- Installing: /usr/local/include/opencv4/opencv2/tracking/kalman_filters.hpp
-- Installing: /usr/local/include/opencv4/opencv2/tracking/onlineBoosting.hpp
-- Installing: /usr/local/include/opencv4/opencv2/tracking/tldDataset.hpp
-- Installing: /usr/local/include/opencv4/opencv2/tracking/tracking.hpp
-- Installing: /usr/local/include/opencv4/opencv2/tracking/tracking_by_matching.hpp
-- Installing: /usr/local/include/opencv4/opencv2/tracking/tracking_internals.hpp
-- Installing: /usr/local/include/opencv4/opencv2/tracking/tracking_legacy.hpp
-- Installing: /usr/local/lib/libopencv_cudaoptflow.so.4.6.0
-- Installing: /usr/local/lib/libopencv_cudaoptflow.so.406
-- Set runtime path of "/usr/local/lib/libopencv_cudaoptflow.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_cudaoptflow.so
-- Installing: /usr/local/include/opencv4/opencv2/cudaoptflow.hpp
-- Installing: /usr/local/lib/libopencv_stereo.so.4.6.0
-- Installing: /usr/local/lib/libopencv_stereo.so.406
-- Set runtime path of "/usr/local/lib/libopencv_stereo.so.4.6.0" to "/usr/local/lib:/usr/local/cuda-11.6/lib64"
-- Installing: /usr/local/lib/libopencv_stereo.so
-- Installing: /usr/local/include/opencv4/opencv2/stereo.hpp
-- Installing: /usr/local/include/opencv4/opencv2/stereo/descriptor.hpp
-- Installing: /usr/local/include/opencv4/opencv2/stereo/quasi_dense_stereo.hpp
-- Installing: /usr/local/include/opencv4/opencv2/stereo/stereo.hpp
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_eye.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_eye_tree_eyeglasses.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_frontalcatface.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_frontalcatface_extended.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_frontalface_alt.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_frontalface_alt2.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_frontalface_alt_tree.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_frontalface_default.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_fullbody.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_lefteye_2splits.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_licence_plate_rus_16stages.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_lowerbody.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_profileface.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_righteye_2splits.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_russian_plate_number.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_smile.xml
-- Installing: /usr/local/share/opencv4/haarcascades/haarcascade_upperbody.xml
-- Installing: /usr/local/share/opencv4/lbpcascades/lbpcascade_frontalcatface.xml
-- Installing: /usr/local/share/opencv4/lbpcascades/lbpcascade_frontalface.xml
-- Installing: /usr/local/share/opencv4/lbpcascades/lbpcascade_frontalface_improved.xml
-- Installing: /usr/local/share/opencv4/lbpcascades/lbpcascade_profileface.xml
-- Installing: /usr/local/share/opencv4/lbpcascades/lbpcascade_silverware.xml

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • 357
  • 358
  • 359
  • 360
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366
  • 367
  • 368
  • 369
  • 370
  • 371
  • 372
  • 373
  • 374
  • 375
  • 376
  • 377
  • 378
  • 379
  • 380
  • 381
  • 382
  • 383
  • 384
  • 385
  • 386
  • 387
  • 388
  • 389
  • 390
  • 391
  • 392
  • 393
  • 394
  • 395
  • 396
  • 397
  • 398
  • 399
  • 400
  • 401
  • 402
  • 403
  • 404
  • 405
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417
  • 418
  • 419
  • 420
  • 421
  • 422
  • 423
  • 424
  • 425
  • 426
  • 427
  • 428
  • 429
  • 430
  • 431
  • 432
  • 433
  • 434
  • 435
  • 436
  • 437
  • 438
  • 439
  • 440
  • 441
  • 442
  • 443
  • 444
  • 445
  • 446
  • 447
  • 448
  • 449
  • 450
  • 451
  • 452
  • 453
  • 454
  • 455
  • 456
  • 457
  • 458
  • 459
  • 460
  • 461
  • 462
  • 463
  • 464
  • 465
  • 466
  • 467
  • 468
  • 469
  • 470
  • 471
  • 472
  • 473
  • 474
  • 475
  • 476
  • 477
  • 478
  • 479
  • 480
  • 481
  • 482
  • 483
  • 484
  • 485
  • 486
  • 487
  • 488
  • 489
  • 490
  • 491
  • 492
  • 493
  • 494
  • 495
  • 496
  • 497
  • 498
  • 499
  • 500
  • 501
  • 502
  • 503
  • 504
  • 505
  • 506
  • 507
  • 508
  • 509
  • 510
  • 511
  • 512
  • 513
  • 514
  • 515
  • 516
  • 517
  • 518
  • 519
  • 520
  • 521
  • 522
  • 523
  • 524

0.8 查看cv2版本

import cv2
print cv2.__version__
  • 1
  • 2

0.9 查看pkg-config路径

# 查看动态库路径
cd /etc/ld.so.conf.d/
cat opencv.conf
# 查看pkg-config需要的文件
cd /usr/local/lib/pkgconfig
ls
# 如果是opencv4.6.0会生成opencv4.pc的文件,复制一份命名为opencv.pc
opencv4.pc opencv.pc
# 查看版本
pkg-config opencv --modversion
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

0.10 备注

cv_bridge建议自己源码编译并安装python3版本的,先建立一个新的tools_ws工作空间.因为他会用catkin build编译这个包
剩余步骤参考这里第一部分就好:一、编译cv_bridge包与使用依赖cv_bridge包:
重点是: 从这里下载源码https://github.com/ros-perception/vision_opencv.git编译时采用python3


思考

第一部分 opencv版本指定

前言:如果使用sudo apt install ros-melodic-desktop-full安装的ros,那么会默认安装opencv3.2版本到/usr/include,/usr/lib, /usr/share三个目录。但是如果我们从opencv官网源码编译安装的(以最常用的opencv3.4.10为例)opencv会默认安装到usr/local下对应的三个子目录。

此处提醒,不要安装opencv4.0及4.0以上的版本,因为这与ros1不兼容。我们推荐使用opencv3.4.10

ubuntu系统中一般都会安装有pkg-config这个工具,那么派生出来的PKG_CONFIG_PATH一般含有常用的一些库,PKG_CONFIG_PATH其中一个路径是/usr/local/lib/pkgconfig,我们安装opencv后为了方便调用opencv,会在usr/local/lib/pkgconfig下生成一个opencv.pc。所以我们如果直接输出查看opencv的版本,那么就是这个opencv.pc指定的。

ros默认安装的opencv,使用的/usr/lib/x86_64-linux-gnu/pkgconfig下的opencv.pc

第二部分 CmakeLists指定opencv

首先使用set(OpenCV_DIR /usr/share/OpenCV)或者set(OpenCV_DIR /usr/local/share/OpenCV)来分别指定ros自带的opencv和我们自己安装的opencv

其次,我们可以通过两种方式找到opencv的包,

第一种:把opencv作为catkin_library的一部分,以后只需要${catkin_LIBRARIES}链接到目标文件。

find_package(catkin REQUIRED COMPONENTS
  OpenCV
  cv_bridge
  geometry_msgs
  mavros_msgs
  nav_msgs
  roscpp
  rospy
  sensor_msgs
  std_msgs
  tf
  trajectory_msgs
)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

第二种:单独寻找opencv的库,但以后使用需要${OpenCV_LIBS}链接到需要的目标文件。

find_package(OpenCV)
  • 1

第三部分 把opencv链接到自己库或者可执行文件

比如我有自己库,这个库里用到了opencv和cv_bridge,注意:cv_bridge是ros的库,不是opencv下的库。

add_library(mission_lib
         include/mission/ros_related.h
         include/mission/common_usage.h
         lib/mission_core.h
         lib/mission_core.cpp
)

//如果之前opencv添加进catkin,如下
target_link_libraries(mission_lib ${catkin_LIBRARIES})
//如果之前opencv和catkin是分别find_package()的,如下
target_link_libraries(mission_lib ${catkin_LIBRARIES} ${OpenCV_LIBS})
//用自己的库也可以继续生成可执行文件
add_executable(mission_node_gazebo src/mission_node_gazebo.cpp)
target_link_libraries(mission_node_gazebo mission_lib )
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

更简单的使用是,我要生成自己的可执行文件,这个可执行文件文件用到了opencv和cv_bridge

add_executable(mission_node_gazebo src/mission_node_gazebo.cpp)
target_link_libraries(mission_node_gazebo ${catkin_LIBRARIES} ${OpenCV_LIBS})
  • 1
  • 2

Problem

Problem1

//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.3.so.6.3: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0’

  • Answer1 : cmake add -D WITH_TIFF=ON -D BUILD_TIFF=ON see forum link
  • Answer2 : comment anaconda see github issue, I adopt this method and succeed
#export PATH=~/anaconda3/bin:$PATH

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!

#__conda_setup="$('/home/up/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
#if [ $? -eq 0 ]; then
#    eval "$__conda_setup"
#else
#    if [ -f "/home/up/anaconda3/etc/profile.d/conda.sh" ]; then
#        . "/home/up/anaconda3/etc/profile.d/conda.sh"
#    else
#        export PATH="/home/up/anaconda3/bin:$PATH"
#    fi
#fi
#unset __conda_setup

# <<< conda initialize <<<
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18

Problem2

/usr/local/include/opencv2/core/cvstd.inl.hpp:151: undefined reference to `cv::read(cv::FileNode const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)’

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/539485
推荐阅读
相关标签
  

闽ICP备14008679号