opencv3.0中与CUDA相关的头文件和库解释
注:每个库包含的类或函数均可以在对应的.hpp中找到,与cuda相关的hpp存放在include\opencv2目录下,并以cuda开头
opencv2/cudaarithm.hpp和opencv_cudaarithm300.lib
基本运算,如add、subtract、multiply、divide等
opencv2/cudaimgproc.hpp和opencv_cudaimgproc300.lib
@addtogroup cuda @{ @defgroup cudaimgproc Image Processing @{ @defgroup cudaimgproc_color Color space processing @defgroup cudaimgproc_hist Histogram Calculation @defgroup cudaimgproc_hough Hough Transform @defgroup cudaimgproc_feature Feature Detection @} @}
图像处理(色域处理、直方图、霍夫变换、特征检测),如HoughLinesDetector类、CannyEdgeDetector类、CLAHE类、calcHist函数等
opencv2/cudafilters.hpp和opencv_cudafilters300.lib
Functions and classes described in this section are used to perform various linear or non-linear filtering operations on 2D images.
二维图像滤波算法,如Box Filter、Linear Filter、Laplacian Filter等
opencv2/cudafeatures2d.hpp和opencv_cudafeatures2d300.lib
特征检测和描述,DescriptorMatcher类、ORB类
opencv2/cudaobjdetect.hpp和opencv_cudaobjdetect300.lib
目标检测,包括HOG、CascadeClassifier
目前,opencv中的cuda接口能够实现的算法还比较少,并不是很齐全,使用前需要先确定算法是否存在cuda接口
Q & A
Q:error LNK2001: 无法解析的外部符号
A:没有成功引用opencv的lib
Q:无法打开 ”<cuda_runtime.h>“
A:头文件路径中添加 cuda的include目录,在NVIDIA GPU Computing Toolkit\CUDA里面