OpenCV with GPU acceleration on TX2

Hello, i’m new at Jetson TX2 so my question is: native openCV code is accelerated on GPU? or it is executed on ARM processor, do i need to use OpenCV?, cv::cuda::GpuMat

Thanks for your help

Hi toolelucidator, the default OpenCV functions run on the CPU, if you want to take advantage of CUDA you will need to build OpenCV with CUDA enabled and utilize the functions from the cv::cuda* namespaces.

So basically only the accelerated functions will run on GPU right? by the way python+OpenCV is CUDA accelerated? or only run on CPU?

Technically the normal OpenCV functions have been accelerated with NEON SIMD for ARM, but they are CPU only - so yes, only the explicit cv::cuda functions will use CUDA.

From this post, it does not appear that OpenCV cuda functions are exported to Python, so you need to write your own wrappers for that like in the post (or just use the CPU-only functions).

How to build opencv with cuda enabled? I used Jetpack 3.3 to install cuda and opencv. In Jetpack there is no such options to enable cuda in opencv. In installed opencv package on TX2, I do not see any functions even the primitive ones like cv::cuda::resize() other than cv::cuda::getCudaEnabledDeviceCount(), cv::cuda::setDevice(), cv::cuda::resetDevice() and other very few functions.

You may have a look to the links in this post.