Best way to install openCV with Cuda on Jetpack 5 (Xavier NX) : openCV for Tegra?

I have a Jetson Xavier NX with Jetpack 5 installed on it (and ubuntu 20.04).
My application requiring heavy image processing and aiming at a FPS as high as possible, I would like to use the most optimized version of OpenCV (in C++)
One step is to activate the CUDA part of OpenCV.
On the other hand, there is or was an “OpenCV for Tegra” that was optimized for some NVIDIA platforms including old Jetsons. I haven’t found yet any information whether it still is maintained, if it is compatible with Xavier NX with Jetpack 5, and if so how to install it.

So what is the most optimized OpenCV that can be installed on XavierNX with Jetpack 5 that includes CUDA support?
Any hint or documentation on installation (special flags/values for XavierNX?)

Thanks a lot in advance


Please use the OpenCV with CUDA support for this.
You can find a script in the below topic:


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.