How to add opencv_contrib packages

Hi,

I would like to know what is the best way to add opencv_contrib to opencv. I have installed opencv3.3.1 on the laptop and the Jetson Xavier from JetPack-L4T-4.1-linux-x64_b5.run.

Thanks in advance

you would need to recompile it from scratch.

Also note, that the OpenCV that ships with Jetpack does NOT use CUDA.

Hi koosdupreez,

Thanks a lot for the notes.

You mean that this opencv is just a standard version grafted to Jetpack? Because
I thought it was a Nvidia in-house tuned and optimized version. That was my
misunderstanding.

Instead, should I use Opencv GPU module and recompile it from scratch, for cuda?

Thanks again

Yes, the 3.3.1 version in JetPack doesn’t support CUDA nor gstreamer. (OpenCV4Tegra stopped a few years ago, I think at version 2.4.13, after some of the optimizations got merged into opencv-3.1).
As said by @koosdupreez, you would rebuild your own from source.
You may also use @AastaLLL’s script.
Note that if you want to try opencv-4, cuda modules are now in opencv_contrib.

Hi Honey_Patouceul, Thanks a lot.