# Create build directory and switch into it mkdir -p build && cd build # Configure (remember to flag: WITH_CUDA=ON) cmake -DWITH_CUDA=ON -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-master/modules ../opencv-master
1 2
# Build cmake --build .
It should take a long while to build.
1 2
#Install (or just `make install` if you are in root) sudo make install