Compile OpenCV from source with the same settings used by the JetPack

the OpenCV version that comes with the JetPack 4.2 doesn’t contain the non-free algorithms such as SURF.

I was able to recompile the OpenCV library from source on the TX2 in order to have SURF.

To compile the library with CUDA support and non-free algorithms I have modified some settings on the CMakefile. However, I’m wondering if I missed some setting.

Is it possible to know exactly all the settings with which the OpenCV inside the Jetpack have been compiled with?

Thank you.

You may use opencv function getBuildInformation(), it will display the config and build flags.
That being said, don’t think that the version included in JetPack is very optimized…not sure for JP4.2, but previous releases were embedding opencv3 versions without CUDA support. You may generate a much more optimized version.