JetPack 4.3 OpenCV Cuda (GPU support)

Hi,

Is the new JetPack (4.3) OpenCV include (by default) CUDA (GPU) Support ?

Thanks for the help !

No, only gstreamer and python3 are supported.

What is the reason for this? It’s CUDA machine - of course you need CUDA enabled OpenCV!

1 Like

You can build opencv with cuda support fairly easily. Nvidia just doensn’t provide the package itself.

You may use one of these scripts to build and install it:

(my script, any version, default 4.1.0)

If you want the above to build faster on xavier, you may want to set the “JOBS” constant at the top of the above sctipt file to something like 6, or even 8 instead of 1.

(aasta’s script, 4.1.1)
https://github.com/AastaNV/JEP/blob/master/script/install_opencv4.1.1_Jetson.sh

(jetsonhacks script, 3.4.3)
https://github.com/jetsonhacks/buildOpenCVXavier/blob/master/buildOpenCV.sh

Keep in mind this won’t make non-cuda OpenCV code magically accelerated. You will likely have to rewrite any code designed to run on a CPU. Here are some samples.

2 Likes

That is not an answer to my question. I know I can build OpenCV. Question is why it’s not enabled by default on CUDA enabled machine. Probably anyone using Jetson chose them because of CUDA, meaning he/she almost 100% needs OpenCV with CUDA, if he/she needs it at all.

There are issues with the CUDA code in OpenCV (the CUDA code is actually in opencv_contrib) which result in tests not passing. You are free to build with it enabled if you like, but we are not able to support it.

1 Like

It looks to me like Nvidia are only officially supporting the algorithms in OpenVX (previously) or VPI.

Anything else you want to do is a case of “fingers crossed”.

I’ve tested an opencv pre-4.3.0 version tonight and many failing tests are now passing OK…

BTW, why is this topic closed ?

@Honey_Patouceul

re: 4.3.0 A lot of people seem to like it so I guess that’s good news, even if it’s not the most performant option on Tegra. I will bump my build script when a release is tagged. Would you mind sharing the results from your tests if you kept a log around? TBH I haven’t run through them all since they’re slow AF.

re: thread lock I am assuming that’s likely down to the trollish behavior of the poster(s).

I was very surprised to know that JetPack’s opencv does not support Cuda, so ironic!!

If it’s very easy for the end users to built it themselves, should it be even easier for NVidia to build it?

Please add cuda support to the default OpenCV or just remove OpenCV from later Jetpack release, which is a clearer message to the users that nvidia does not support it.

1 Like