Compile the code with:
nvcc -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs convergence.cu
If you want to dowload openCV modules follow the tutorial from the official website.
And if the program doesn't recognize the library opencv2 try with:
ln -s /usr/local/include/opencv4/opencv2/ /usr/local/include/opencv2