OpenCV

Pre-Conditions:

  1. DrivePX2 hardware: AutoCruise or AutoChauffeur.
  2. The latest Nvidia Drive Linux SDK is installed, SDK can be downloaded from : https://developer.nvidia.com/nvidia-drive-downloads
  3. Git is installed , otherwise run : sudo apt-get install git
  • sudo apt-get install git
  • git config --global user.email “your email”
  • git config --global user.name “your name”

The instructions to build OpenCV on DrivePX2 Linux (V4L) platform:

  1. Review the instructions at OpenCV: Building OpenCV for Tegra with CUDA
  2. Read following notes and apply them accordingly:
  1. cherry pick command for cdb9c contains a white space error, change to git cherry-pick cdb9c
  2. SDK does not contain default FFMPEG and V4L2, install these packages by :
  • sudo apt-get install libx264-dev libx265-dev libvpx-dev ffmpeg
  • sudo apt-get install v4l-utils libv4l-dev
  • The proper DCUDA_ARCH_BIN variable need be set in CMake configurations:
    • -DCUDA_ARCH_BIN=6.2 // AutoCruise with iGPU
    • -DCUDA_ARCH_BIN='6.1 6.2' // AutoChauffeur with both iGPU and dGPU
    1. Follow V4L instructions from OpenCV: Building OpenCV for Tegra with CUDA to download and build OpenCV .
    2. Both OpenCV 3.1.0 and 2.4.X are supported.