Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
OrganizationEventAdvent CalendarQiitadon (β)
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.


NVIDIA Jetson TX1でOpenCV3をビルドする

  1. CUDAなどをインストール(JetPack参照)
  2. OpenCVをダウンロード

    wget https://github.com/Itseez/opencv/archive/3.1.0.zip -O /tmp/opencv-3.1.0.zip
    cd /tmp
    unzip opencv-3.1.0.zip
    cd opencv-3.1.0
    git clone --depth 1 https://github.com/Itseez/opencv_contrib.git opencv_contrib
    cd opencv_contrib
    git fetch origin --tags --depth 1
    git checkout 3.1.0
  3. 依存パッケージのインストール

    sudo apt-get -y -qq install cmake git libgtk2.0-dev ocl-icd-opencl-dev qt5-default
  4. ビルド設定

    mkdir build && cd build
    cmake .. \
    -DCUDA_ARCH_BIN="5.2" \
    -DCUDA_ARCH_PTX="5.2" \
    -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
    -DCMAKE_INSTALL_PREFIX=/usr/local \
  5. ビルド

    make -j4
  6. インストール

    sudo make install -j4
    sudo ldconfig
  7. 環境変数を更新

    echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc


cd opencv-3.1.0/samples/gpu
g++ `pkg-config --libs 
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Help us understand the problem. What are the problem?