During the compilation process, an error may be reported midway:
opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(51): error: a storage class is not allowed in an explicit specialization
This is due to a problem with NCVPixelOperations.hpp, download
https://download.csdn.net/download/qq_35379989/10315671
Just replace NCVPixelOperations.hpp in the opencv-2.4.9/modules/gpu/src/nvidia/core folder