cmake -D CMAKE_BUILD_TYPE=DEBUG -D WITH_CUDA=ON -D WITH_CUBLAS=ON -D CUDA_FAST_MATH=ON -D WITH_CUFFT=ON -D WITH_NVCUVID=ON -D WITH_V4L=ON -D WITH_LIBV4L=ON -D WITH_OPENGL=ON -D WITH_FFMPEG=ON -D INSTALL_C_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D CUDA_GENERATION=Auto ..
make -j
sudo make install
2.4.11
error: ‘NppiGraphcutState’ has not been declared
修改/data/opencv-2.4.11/modules/gpu/src/graphcuts.cpp
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) 改为:
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) || (CUDART_VERSION >= 8000)
error:Unsupported gpu architecture 'compute_11'
添加编译项 -D CUDA_GENERATION=Auto