Ref: https://github.com/AastaNV/JEP/blob/master/script/install_opencv4.1.1_Jetson.sh
//download arm64's libjasper1 libjasper-dev
https://launchpad.net/ubuntu/xenial/arm64/libjasper1/1.900.1-debian1-2.4ubuntu1.2
https://launchpad.net/ubuntu/xenial/arm64/libjasper-dev/1.900.1-debian1-2.4ubuntu1.2
gdebi ./libjasper1_1.900.1-debian1-2.4ubuntu1.2_arm64.deb
gdebi ./libjasper-dev_1.900.1-debian1-2.4ubuntu1.2_arm64.deb
apt install git cmake cmake-qt-gui gdebi rename build-essential libssl-dev libsqlite3-dev
apt
install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
libavresample-dev libglew-dev libgtk2.0-dev libgtk-3-dev libgtk-3-dev
libswscale-dev libv4l-dev libtbb-dev libxvidcore-dev libx264-dev
libjpeg-dev libpng-dev libtiff-dev
apt install python3-dev python3-opencv python3-h5py python3-scipy python3-numpy python3-matplotlib python3-pymssql libhdf5-dev
apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
wget https://bootstrap.pypa.io/get-pip.py
python3 ./get-pip.py
download opencv and opencv_contrib 3.4.8
https://github.com/opencv/opencv/releases
https://github.com/opencv/opencv_contrib/releases
cd opencv-3.4.8
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.8/modules -D WITH_CUDA=ON -D WITH_GSTREAMER=ON -D WITH_LIBV4L=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D BUILD_TESTS=OFF -D BUILD_EXAMPLES=OFF ../
make && make install
ps: CUDA version is not CUDA_ARCH_BIN
沒有留言:
張貼留言