Created
September 12, 2020 13:25
-
-
Save iwatake2222/2bfbfd6aa0c377ce4d1ca44737e97b33 to your computer and use it in GitHub Desktop.
OpenCV_with_CUDA_install_Jetson.sh
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
### System update and install minimum tools ### | |
sudo apt -y update | |
sudo apt -y upgrade | |
sudo apt -y install nano python-pip | |
sudo -H pip install -U jetson-stats | |
### Install other libs ### | |
sudo apt -y install ffmpeg libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libavresample-dev | |
sudo apt -y install libvorbis-dev libxvidcore-dev libx264-dev libxvidcore-dev | |
sudo apt -y install libgtk2.0-dev libgtk-3-dev | |
sudo apt -y install libhdf5-dev libhdf5-serial-dev | |
### Build OpenCV ### | |
mkdir ~/work | |
cvVersion="4.4.0" | |
cd ~/work | |
git clone https://github.com/opencv/opencv.git | |
cd opencv | |
git checkout $cvVersion | |
cd ~/work | |
git clone https://github.com/opencv/opencv_contrib.git | |
cd opencv_contrib | |
git checkout $cvVersion | |
cd ~/work/opencv | |
mkdir build | |
cd build | |
cmake \ | |
-D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=./install \ | |
-D OPENCV_GENERATE_PKGCONFIG=ON \ | |
-D ENABLE_NEON=ON \ | |
-D WITH_TBB=ON \ | |
-D WITH_V4L=ON \ | |
-D WITH_GSTREAMER=ON \ | |
-D WITH_FFMPEG=ON \ | |
-D WITH_QT=OFF \ | |
-D WITH_GTK=ON \ | |
-D WITH_GTK3=ON \ | |
-D WITH_CUDA=ON \ | |
-D OPENCV_EXTRA_MODULES_PATH=~/work/opencv_contrib/modules \ | |
.. | |
make -j4 | |
sudo make install | |
sudo ldconfig | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment