OpenCV compilation

I’m trying to set up OpenCV for DRIVE AGX. I tried both native-compilation and cross-compilation, but got stuck at different errors. It doesn’t seem to be straightforward to configure the compilation. Since there was a tutorial for cross-compiling OpenCV for Drive PX2, could you also provide a tutorial for installing OpenCV on DRIVE AGX?

Thank you!

Dear James22,
We do not officially support OpenCV on DRIVE AGX. May I know why you are looking to install opencv(like what functionalities you need from Opencv which are not in our SW stack)?

Hi Siva,
I’m looking for some basic image manipulation (e.g. camera calibration, affine transform, alpha blending, etc.) It seems Drive OS does not have such capabilities at all. For DriveWorks, the only similar API I found was ‘Rectifier’, which is not as flexible as some image processing modules provided in OpenCV. May there is something I’m missing? Please suggest.
Thanks!

Dear James22,

Could you please refer to the following NvMedia related docs for your topic?

Affine transform:
https://docs.nvidia.com/drive/drive_os_5.1.6.1L/nvvib_docs/index.html#page/DRIVE_OS_Linux_SDK_Development_Guide/NvMedia/nvmedia_concept_ipp.html

Alpha blending:
https://docs.nvidia.com/drive/drive_os_5.1.6.1L/nvvib_docs/index.html#page/DRIVE_OS_Linux_SDK_Development_Guide/NvMedia/nvmedia_concept_video.htm

I will take a look. Thanks!

Dear James22,

here are the instructions for installing OpenCV with CUDA on the DRIVE AGX with Drive Software 10.

once the board is flashed, follow these steps:
•Execute the command: sudo apt update
•Execute the command: sudo dpkg -i /var/cuda-repo-10-2-local-10.2.19/cuda-toolkit-10-2_10.2.19-1_arm64.deb
•Execute the command: sudo apt --fix-broken -y install
•Run the script “install_oprncv4.11_Jeston.sh” downloaded from here: https://github.com/AastaNV/JEP/blob/master/script/install_opencv4.1.1_Jetson.sh

Note: OpenCV is not officially supported nor is it optimized on the Drive platform. These instructions are provided only to help with porting/prototyping and are not maintained by NVIDIA. It is recommended to utilize NVIDIA APIs moving forward.