Compiling OpenCV 3 on Jetson TX2

These days I am working with a Jetson TX2 from Nvidia. It is a very powerful tiny computer, featuring a Tegra GPU with 256 cores. It allows me to run algorithms for mapping and visual localisation in real-time for PARA.

What you see is the development board, the card is actually only the part with the heat-spreader. It is the size of a credit card.

Jetson TX2

Here is my cmake command to compile OpenCV3:

cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_opencv_java=OFF \
    -DBUILD_opencv_python2=ON \
    -DBUILD_opencv_python3=OFF \
    -DWITH_1394=OFF \
    -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.0 \
    -DCUDA_ARCH_BIN=6.2 \
    -DCUDA_ARCH_PTX="" \

And when the task is finished, run:

make -j4
sudo make install

It will compile fast because the tests and examples are OFF and the library will be CUDA enabled with the latest version from JetPack (9.0). I hope it will help someone out there :).

This article is my 11th oldest. It is 198 words long

© 2019 Stan Larroque. All rights reserved.