Last active
June 17, 2020 02:04
-
-
Save dieudv/35e698fbcd4b3225b4cb3dfbad3cd0a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update -y | |
sudo apt upgrade -y | |
sudo apt dist-upgrade -y | |
sudo apt install -y build-essential cmake git libgtk2.0-dev pkg-config libswscale-dev libtbb2 libtbb-dev | |
sudo apt install -y python3-dev python3-numpy | |
sudo apt install -y libavcodec-dev libavformat-dev | |
sudo apt install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev | |
sudo apt install -y libv4l-dev v4l-utils qv4l2 v4l2ucp libdc1394-22-dev | |
wget https://github.com/opencv/opencv/archive/4.3.0.zip -O opencv.zip | |
wget https://github.com/opencv/opencv_contrib/archive/4.3.0.zip -O opencv_contrib.zip | |
unzip opencv.zip | |
unzip opencv_contrib.zip | |
mv opencv-4.3.0/ opencv | |
mv opencv_contrib-4.3.0/ opencv_contrib | |
cd opencv/ | |
mkdir build | |
cd build/ | |
cmake -D WITH_CUDA=ON \ | |
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \ | |
-D WITH_GSTREAMER=ON \ | |
-D WITH_LIBV4L=ON \ | |
-D BUILD_opencv_python3=ON \ | |
-D BUILD_TESTS=OFF \ | |
-D BUILD_PERF_TESTS=OFF \ | |
-D BUILD_EXAMPLES=OFF \ | |
-D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=/usr/local .. | |
make | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment