Missing cudaarithm.hpp in 4.5.2 build

Checked out tag 4.5.2 from github and built bot the release and debug libraries with CUDA support enabled successfully.

Attempting to use function call ’ cv::cuda::gem’ in my C++ app; OpenCV 4.5.2 documents (OpenCV: Arithm Operations on Matrices) state this api is found in ’ #include <opencv2/cudaarithm.hpp>.

The <opencv2/cudaarithm.hpp> is missing from the CUDA built release and debug for Windows 10 libraries.


Cudaarithm (and most other CUDA modules) are part of the opencv_contrib repo. Enabling CUDA support while building OpenCV won’t enable this automatically.

You need to clone the GitHub - opencv/opencv_contrib: Repository for OpenCV's extra modules repo and enable it in OPENCV_EXTRA_MODULES_PATH option.

Actually, it turned out that after building from sources (and including the contrib modules), I discovered the need to run the ‘INSTALL’ target to collect up all the pieces-n-parts into a usable entity.

I may have missed something in the documentation regarding the installation of the library, which on windows, simply constructs a directory with all the necessary binaries, includes, etc.

Once I got those details ironed out, it all works as expected.


Thanks for the quick response.