Help us understand the problem. What is going on with this article?

NVIDIA Jetson TX1でOpenCV3をビルドする

More than 3 years have passed since last update.
  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 .. \
    -DWITH_OPENGL:BOOL=ON \
    -DWITH_QT:BOOL=ON \
    -DWITH_CUDA:BOOL=ON \
    -DCUDA_ARCH_BIN="5.2" \
    -DCUDA_ARCH_PTX="5.2" \
    -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
    -DCMAKE_INSTALL_PREFIX=/usr/local \
    -DBUILD_TESTS:BOOL=OFF \
    -DBUILD_PERF_TESTS:BOOL=OFF \
    -DWITH_FFMPEG:BOOL=OFF \
    -DENABLE_NEON:BOOL=ON \
    -DBUILD_EXAMPLES:BOOL=ON \
    -DINSTALL_C_EXAMPLES:BOOL=OFF \
    -DINSTALL_PYTHON_EXAMPLES:BOOL=ON \
    -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules
    
  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
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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
ユーザーは見つかりませんでした