mkdir build
cd build
CFLAGS=-fPIC make
make install
DOPENCV_EXTRA_MODULES_PATH 参数制定额外的模块
-------------------------------------------------------------------------------
如果出现下面错误可按此下修改
原文链接:http://blog.csdn.NET/allyli0022/article/details/62859290
/home/usrname/OpenCV-3.0.0/modules/cudalegacy/src/graphcuts.cpp:120:54: error: ‘NppiGraphcutState’ has not been declared
typedef NppStatus (*init_func_t)(NppiSize oSize, NppiGraphcutState** ppStat^
/home/usrname/opencv-3.0.0/modules/cudalegacy/src/graphcuts.cpp:135:18: error: ‘NppiGraphcutState’ does not name a type
operator NppiGraphcutState*()
^
/home/usrname/opencv-3.0.0/modules/cudalegacy/src/graphcuts.cpp:141:9: error: ‘NppiGraphcutState’ does not name a type
NppiGraphcutState* pState;
解决方案:需要修改一处源码:
在graphcuts.cpp中将
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
改为
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) || (CUDART_VERSION >= 8000)
本文介绍如何解决在使用CUDA编译OpenCV过程中遇到的关于NppiGraphcutState未声明的错误。通过简单的源代码修改即可完成修复,使编译顺利进行。
1277

被折叠的 条评论
为什么被折叠?



