Run CUDA in Opencv4 in Jetson TX2


I’m trying to run CUDA in OpenCV4 with C++ and apparently I’m getting an error when its looking for the following package:

fatal error: opencv2/cudaarithm.hpp: No such file or directory
#include <opencv2/cudaarithm.hpp>

I’m assuming I need to install CUDA in opencv4 somehow. How do I do that? I’m using the Jetson TX2. Thanks.