OpenCV for Tegra 2.4.12.3 README PLATFORMS The following table shows the supported hardware, system software and the corresponding versions of OpenCV and CUDA. For desktop platforms a GPU of supported generation is required. You can check you GPU support status on official NVIDIA web page: ------------------------------------------------------------------------------- (1) NVIDIA(R) Jetson(TM) TK1 Pro OS : NVIDIA(R) Vibrante(TM) 3 Linux (V3L RC2) CUDA : NVIDIA(R) CUDA(R) 7.0 (2) NVIDIA(R) Jetson(TM) TK1 OS : NVIDIA(R) Tegra(R) Linux Driver Package R21.4 (L4T) CUDA : NVIDIA(R) CUDA(R) 6.5 (3) NVIDIA(R) DrivePX (P2379 B00), E2580 OS : NVIDIA(R) Vibrante(TM) 4 Linux (V4L) CUDA : NVIDIA(R) CUDA(R) 7.0 (4) NVIDIA(R) Jetson TX1 (P2371) OS : NVIDIA(R) Tegra(R) Linux Driver Package R23 (L4T) CUDA : NVIDIA(R) CUDA(R) 7.0 (5) Desktop X86_64 Ubuntu 12.04, with Kepler(TM) (compute capability 3.x) and Maxwell(TM) (compute capability 5.x) GPU generations OS : Ubuntu 12.04 x86_64 CUDA : NVIDIA(R) CUDA(R) 7.0 (7) Desktop X86_64 Ubuntu 14.04, with Kepler(TM) (compute capability 3.x) and Maxwell(TM) (compute capability 5.x) GPU generations OS : Ubuntu 14.04 x86_64 CUDA : NVIDIA(R) CUDA(R) 7.0 INSTALLATION INSTRUCTIONS ------------------------------------------------------------------------------- NOTE: This README file ONLY describes the installation instructions for Linux-based platforms: desktop Ubuntu, NVIDIA(R) Tegra(R) Linux Driver Package and NVIDIA(R) Vibrante(TM). Other platforms' installation instructions are available in corresponding README files. Install OpenCV for Tegra with the following steps: (1) CUDA Installation (2) OpenCV for Tegra Installation The following sections contain detailed instructions for the installation of these packages. These instructions use the following variables: o specifies the OS version (e.g., ubuntu1404). o specifies the architecture (e.g., amd64, armhf, arm64). o specifies the package release version (e.g., 2.4.12.3). o specifies the package release version (e.g., 7.0). o specifies the supported device. (1) CUDA Installation The NVIDIA invented CUDA(TM) technology provides a parallel computing platform and programming model that enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU). Follow the direct target installation instructions based on your platform: o If you are using a host Ubuntu system as a standalone development platform, go to subsection (1-a). o If you are using Jetson Pro, Drive PX, E2580, Jetson TK1 or Jetson TX1 as a cross development platform, go to subsection (1-b). o If you are using Jetson Pro, Drive PX, E2580 go to subsection (1-c). o If you are using Jetson TK1 L4T or Jetson TX1 platform go to subsection (1-d). o For all platforms, see subsection (1-e) after installation. (1-a) To install CUDA on Ubuntu 12.04 or 14.04 Desktop system for standalone development Download the CUDA Debian package from https://developer.nvidia.com/cuda-downloads. To install the package, execute the following commands: $ sudo dpkg -i cuda-repo-__amd64.deb $ sudo apt-get update $ sudo apt-get install cuda-toolkit- CUDA packages are installed to the following location on your host system: $ /usr/local/cuda- (1-b) To install CUDA for cross-build installation on Ubuntu 12.04 or 14.04 host system Download the CUDA version defined in the corresponding Platforms section for the target operating system from https://developer.nvidia.com/cuda-downloads. The armhf foreign architecture must be enabled in order to install the cross- armhf toolkit. To enable armhf as a foreign architecture, the following commands must be executed: On Ubuntu 12.04 $ sudo sh -c \ 'echo "foreign-architecture armhf" >> /etc/dpkg/dpkg.cfg.d/multiarch' On Ubuntu 14.04 $ sudo dpkg --add-architecture armhf To complete the installation, execute the following: $ sudo dpkg -i cuda-repo-__amd64.deb $ sudo apt-get update $ sudo apt-get install cuda cuda-cross-armhf The cross-build installation of CUDA includes the standalone development files, which are installed under the same location on your host system: $ /usr/local/cuda- (1-c) To install CUDA on Jetson TK1 Pro, Drive PX and E2580 Vibrante Systems CUDA installation on Jetson TK1 Pro, Drive PX and E2580 Vibrante Systems is part of the Vibrante PDK installation and must be carried out on the host before rootfs setup and first boot of the target using: $ bash vibrante--cuda-.run The CUDA toolkit installs after running the following self-deleting shell script that is intended to be run 1 time from the target console: $ vibrante-setup.sh install-run-once-pkgs This installs all deferred run-once scripts in the target's /etc/rcS.d directory, which is why it is important to run the CUDA installer before flashing and first boot of the target. Note: To run, some CUDA samples require running a desktop manager, such as xfce4. The following warning message may appear when launching a CUDA application and can safely be ignored: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.10.17-g3850ea5/modules.dep.bin' (1-d) To install CUDA on Jetson TK1 and Jetson TX1 L4T Systems Execute the following commands: $ sudo dpkg -i cuda-repo-__.deb $ sudo apt-get update $ sudo apt-get install cuda-toolkit- (1-e) CUDA Post-Installation Step (all platforms): To access the CUDA binaries & libraries from any folder on Linux, add the CUDA locations to your system PATH and LD_LIBRARY_PATH environment variables. The exact steps depends on whether your target device has a 32-bit or 64-bit CPU. For 64-bit systems (eg: most desktop PCs): $ cat << END >> ~/.bashrc # Add 64-bit CUDA library & binary paths: export PATH=/usr/local/cuda-/bin:\$PATH export LD_LIBRARY_PATH=/usr/local/cuda-/lib64:\$LD_LIBRARY_PATH END $ source ~/.bashrc For 32-bit systems (eg: most ARM systems): $ cat << END >> ~/.bashrc # Add 32-bit CUDA library & binary paths: export PATH=/usr/local/cuda-/bin:\$PATH export LD_LIBRARY_PATH=/usr/local/cuda-/lib:\$LD_LIBRARY_PATH END $ source ~/.bashrc (2) OpenCV for Tegra Installation NVIDIA provides OpenCV for Tegra as a local repository Debian package named libopencv4tegra-repo-__.deb. Its installation creates a local repository of all the OpenCV for Tegra Debian packages and points the OS software manager to that new repository. Then, you install the OpenCV for Tegra components using apt-get or any other Debian package software manager. All the dependent libraries are automatically installed. To install OpenCV for Tegra on Ubuntu, Jetson TK1, Drive PX, E2580 or Jetson TK1 Pro systems execute the following commands: $ sudo dpkg -i libopencv4tegra-repo-__.deb $ sudo apt-get update $ sudo apt-get install libopencv4tegra libopencv4tegra-dev UNINSTALL INSTRUCTIONS -------------------------------------------------------------------------------- This section describes the uninstallation steps for VisionWorks and CUDA. (1) Uninstall OpenCV for Tegra (2) Uninstall CUDA (1) Uninstall OpenCV for Tegra Uninstall OpenCV for Tegra packages, purge local repositories, and update the apt cache using the following commands: $ sudo apt-get purge libopencv4tegra-dev libopencv4tegra $ sudo apt-get purge libopencv4tegra-repo $ sudo apt-get update To verify uninstallation, check that the following command shows no packages: $ apt-cache show libopencv4tegra (2) Uninstall CUDA Uninstall CUDA packages, purge local repositories, and update the apt cache using the following commands: If cross compile bits were installed: $ sudo apt-get remove cuda-cross-armhf In all cases: $ sudo apt-get purge cuda $ sudo apt-get update