GPU capabilities using opencv

Hello, I tried running a simple program using opencv’s cuda mode, but when calling the fuction:

int cudaCount = cuda::getCudaEnabledDeviceCount();

I get 0 as a result.

I am using the standard microSD image (jetson-nano-sd-r32.1-2019-03-18) on a Jetson Nano.

Is there anything I’m missing before running something like this?

I am compiling the test program using this line:

g++ test.cpp -o ~/test.out pkg-config --cflags --libs opencv

Thank you.

You may use opencv function cv::getBuildInformation() for checking if your opencv lib has been built with CUDA support.

Thank you, the result from running it is:

Use Cuda: NO

So I’m guessing there’s no CUDA support in OpenCV on the shipped distro for the Nano, which seems weird.

I will get the source and recompile it to get the functionality running.

For building from source, I’d suggest to use this script for opencv-4.0.0.