opencv-uninstall-reinstall(add opencv_contrib)

original opencv is 3.3.0 cause the jetpack4.2.1 auto install.

Now i want to used the GPU part of opencv ,so download the package opencv4.2.0 and opencv4.2.0_contrib  .

Uninstall part

  1. sudo apt-get purge libopencv*

  2. sudo apt autoremove

  3. sudo apt-get update

note:didn't choose the  method of find,cause it may not safe for me. 

compile part 

lack some of the file in the "opencv-4.2.0/opencv_contrib-4.2.0/modules/xfeatures2d/src"

find in here for free.

https://pan.baidu.com/s/1SmRMg_aydPYOJ1jKNjGZPw

code:z7dp 

If you got VPN,then find the website from the "CMakeDownloadLog.txt"

my_cmake.sh (decide what to compile put inside build file)

#!/bin/bash
cmake \
    -D CMAKE_BUILD_TYPE=Release \
    -D CUDA_GENERATION=Pascal \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D BUILD_opencv_python2=ON \
    -D BUILD_opencv_python3=ON\
    -D WITH_GSTREAMER=ON \
    -D WITH_CUDA=ON \
    -D WITH_CUDNN=ON \
    -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.0 \
    -D CUDA_ARCH_BIN=6.2 \
    -D CUDA_ARCH_PTX="" \
    -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.2.0/modules/ \
    -D WITH_LIBV4L=ON \
    -D BUILD_TESTS=OFF \
    -D BUILD_PERF_TESTS=OFF \
    -D BUILD_EXAMPLES=OFF \
    ../
install part

sudo make install

 

 

發佈了13 篇原創文章 · 獲贊 2 · 訪問量 4636
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章