Jetson
JetsonTX2

jetson TX2へOpenCV2.4.13のインストール

Installing OpenCV2.4.13 for jetson TX2

以下の記事を参考にする。

sudo apt-get -y install build-essential make cmake cmake-curses-gui g++
sudo apt-get -y install libavformat-dev libavutil-dev libswscale-dev
sudo apt-get -y install libv4l-dev
sudo apt-get -y install libeigen3-dev
sudo apt-get -y install libglew1.6-dev
sudo apt-get -y install libgtk2.0-dev
wget --no-check-certificate http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.13/opencv-2.4.13.zip
unzip opencv-2.4.13.zip
cd opencv-2.4.13
mkdir build
cd build
cmake -DWITH_CUDA=ON -DCUDA_ARCH_BIN="6.2" -DCUDA_ARCH_PTX="" -DENABLE_FAST_MATH=1 -DCUDA_FAST_MATH=1 -DWITH_CUBLAS=1 -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF ..
sudo make -j 4 install

パスを.bashrcに追加

echo "# Use OpenCV and other custom-built libraries." >> ~/.bashrc
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/" >> ~/.bashrc
source ~/.bashrc