OpenCV中OpenCL模块函数
It currently develop and test on GPU devices only. This includes both discrete GPUs(NVidia,AMD), as well as integrated chips(AMD APU and intel HD devices).
The ocl module can be found under the “modules”directory. In “modules/ocl/src” you can find the source code for the cpp class that wrap around the direct kernel invocation. The kernels themselves can be found in “modules/ocl/src/kernels.” Samples can be found under “samples/ocl.”Accuracy tests can be found in “modules/ocl/test,”and performance tests under “module/ocl/perf.”
If a function support 4-channel operator, it should support 3-channel operator as well, because All the 3-channel matrix(i.e. RGB image) are represented by 4-channel matrix in oclMat. It means 3-channel image have 4-channel space with the last channel unused.
1. getDevice:returns the list of devices;
2. setDevice:sets adevice and initializes it;
3. setBinpath:if you call this function and set a valid path, the OCL module will save the complied kernel to the address in the first time and reload the binary since that, it can save compilation time at the runtime;
4. getoclContext:returns the pointer to the opencl context;
5. getoclCommandQueue:returns the pointer to the opencl command queue;
6. class::oclMat:OpenCV C++1-D or 2-D dense array class, the oclMat is the mirror of Mat with the extension of ocl feature;
7. oclMat::convertTo:the method converts source pixel values to the target datatype, saturate cast is applied in the end to avoid possible overflows;
8. oclMat::copyTo:copies the matrix to another one;
9. oclMat::setTo:sets all or some of the array elements to the specified value;
10. absdiff:computes per-element absolute difference between two arrays or between array and ascalar;
11. add:computes per-element addition between two arrays or between array and a scalar;
12. subtract:computes per-element subtract between two arrays or between array and a scalar;
13. multiply:computes per-element multiply between two arrays or between array and a scalar;
14. divide:computes per-element divide between two arrays or between array and a scalar;
15. bitwise_and:computesper-element bitwise_and between two arrays or between array and a scalar;
16. bitwise_or:computes per-element bitwise_or between two arrays or between array and a scalar;
17. bitwise_xor:computes per-element bitwise_xor between two arrays or between array and a scalar;
18. bitwise_not:the function bitwise not compute per-element bit-wise inversion of the source array;
19. cartToPolar:calculates the magnitude and angle of 2d vectors;
20. polarToCart:calculates the Cartesian coordinates of each 2D vector represented by the correspondingelements of magnitude and angle;
21. compare:performs per-element comparison of two arrays or an array and scalar value;
22. exp:calculates the exponent of every element of the input array;
23. log:calculates the log of every element of the input array;
24. LUT:performs a look-up table transform of an array;
25. magnitude:calculates magnitude of 2D vectors formed from the corresponding element of x and y arrays;
26. flip:flips the array in one of three different ways(row and column indices are 0-based);
27. meanStdDev:compute the mean and the standard deviation M of array elements, independently for eachchannel, and return it via the output parameters;
28. merge:composes a multi-channel array from several single-channel arrays;
29. split:split multi-channel array into separate single-channel arrays;
30. norm:calculates absolute array norm, absolute difference norm, or relative difference norm;
31. phase:computes the rotation angle of each 2D vector that is formed from the corresponding elementsof x and y;
32. pow:raises every element of the input array to p;
33. transpose:transposes a matrix;
34. dft(cv::dft):performs a forward or inverse discrete Fourier transform(1D or 2D) of the floating pointmatrix;
35. gemm(cv::gemm):performs generalized matrix multiplication;
36. countNonZero:returns the number of non-zero elements in src;
37. minMax:finds global minimum and maximum in a whole array or sub-array;
38. minMaxLoc:find minimum and maximum element values and their positions;
39. sum:returns the sum of matrix elements for each channel;
40. sqrSum:returns the squared sum of matrix elements for each channel;
41. Sobel:computesthe first x- or y- spatial image derivative using Sobel operator;
42. Scharr:computes the first x- or y- spatial image derivative using Scharr operator;
43. GaussianBlur:convolves the source image with the specified Gaussian kernel;
44. boxFilter:smoothes image using box filter;
45. Laplacian:calculates the Laplacian of the source image by adding up the second x and y derivativescalculated using the Sobel operator;
46. convolue:convolves an image with the kernel;
47. bilateralFilter:applies bilateral filter to the image;
48. copyMakeBorder:forms a border around the image;
49. dilate:dilatesthe source image using the specified structuring element that determines theshape of a pixel neighborhood over which the maximum is taken;
50. erode:erodes the source image using the specified structuring element that determines the shapeof a pixel neighborhood over which the minimum is taken;
51. morphologyEx:a wrapper for erode and dilate;
52. pyrDown(cv::pyrDown):smoothes an image and downsamples it;
53. pyrUp(cv::pyrUp):upsamples an image and then smoothes it;
54. columnSum:computes a vertical(column) sum;
55. blendLinear:performs linear blending of two images;
56. cornerHarris:calculate Harris corner;
57. cornerMinEigenVal:calculate MinEigenVal;
58. calcHist:calculates histogram of one or more arrays;
59. remap:transforms the source image using the specified map;
60. resize:resizes an image;
61. warpAffine: transforms the source image using the specified matrix;
62. warpPerspective:applies a perspective transformation to an image;
63. cvtColor:converts image from one color space to another;
64. threshold:applies fixed-level thresholding to a single-channel array;
65. buildWarpPlaneMaps:builds plane warping maps;
66. buildWarpCylindricalMaps:builds cylindrical warping maps;
67. buildWarpSphericalMaps:builds spherical warping maps;
68. buildWarpPerspectiveMaps(ocl::warpPerspective):builds transformation maps for perspective transformation;
69. buildWarpAffineMaps(ocl::warpAffine):builds transformation maps for affine transformation;
70. class::PyrLKOpticalFlow(cv::calcOpticalFlowPyrLK):class used for calculating an optical flow;
71. PyrLKOpticalFlow::sparse:calculate an optical flow for a sparse feature set;
72. PyrLKOpticalFlow::dense:calculate dense optical flow;
73. PyrLKOpticalFlow::releaseMemory:releases inner buffers memory;
74. interpolateFrames:interpolateframes(images) using provided optical flow(displacement field);
75. class::OclCascadeClassifier:cascade classifier class used for object detection;
76. OclCascadeClassifier::oclHaarDetectObjects:returns the detected objects by a list rectangles;
77. struct::MatchTemplateBuf:class providing memory buffers for matchTemplate function, plus it allows to adjustsome specific parameters;
78. matchTemplate(cv::matchTemplate):computes aproximity map for a raster template and an image where the template is searchedfor;
79. Canny(cv::Canny):finds edgesin an image using the Canny algorithm;
80. class::BruteForceMatcher_OCL_base(cv::DescriptorMatcher,cv::BFMatcher):Brute-force descriptor matcher, for each descriptor in the firstset, this matcher finds the closest descriptor in the second set by trying eachone;
81. BruteForceMatcher_OCL_base::match:finds the best match for each descriptor from a query set with traindescriptors;
82. BruteForceMatcher_OCL_base::makeGpuCollection:performs a GPU collection of traindescriptors and masks in a suitable format for the matchCollection function;
83. BruteForceMatcher_OCL_base::matchDownload:downloads matrices obtained viamatchSingle or matchCollection to vector with DMatch;
84. BruteForceMatcher_OCL_base::matchConvert:converts matrices obtained viamatchSingle or matchCollection to vector with DMatch;
85. BruteForceMatcher_OCL_base::knnMatch:finds the k best matches for eachdescriptor from a query set with train descriptors;
86. BruteForceMatcher_OCL_base::knnMatchDownload:downloads matrices obtained viaknnMatchSingle or knnMatch2Collection to vector with DMatch;
87. BruteForceMatcher_OCL_base::knnMatchConvert:converts matrices obtained viaknnMatchSingle or knnMatch2Collection to CPU vector with DMatch;
88. BruteForceMatcher_OCL_base::radiusMatch:for each query descriptor, finds thebest matches with a distance less than a given threshold;
89. BruteForceMatcher_OCL_base::radiusMatchDownload:downloads matrices obtained viaradiusMatchSingle or radiusMatchCollection to vector with DMatch;
90. BruteForceMatcher_OCL_base::radiusMatchConvert:converts matrices obtained viaradiusMatchSingle or radiusMatchCollection to vector with DMatch;
91. struct::HOGDescriptor:the class implements Histogram ofOriented Gradients object detector;
92. HOGDescriptor::getDescriptorSize:returns the number of coefficientsrequired for the classification;
93. HOGDescriptor::getBlockHistogramSize:returns the block histogram size;
94. HOGDescriptor::setSVMDetector:sets coefficients for the linear SVMclassifier;
95. HOGDescriptor::getDefaultPeopleDetector:returns coefficients of the classifiertrained for people detection(for default window size);
96. HOGDescriptor::getPeopleDetector48x96:returns coefficients of the classifiertrained for people detection(for 48x96 windows);
97. HOGDescriptor::getPeopleDetector64x128:returns coefficients of the classifiertrained for people detection(for 64x128 windows);
98. HOGDescriptor::detect:performs object detection without amulti-scale window;
99. HOGDescriptor::detectMultiScale:performs object detection with amulti-scale window;
100. HOGDescriptor::getDescriptors:returns block descriptors computed forthe whole image;
OpenCV中OpenCL模块函数的更多相关文章
- 【OpenCV】OpenCV中GPU模块使用
CUDA基本使用方法 在介绍OpenCV中GPU模块使用之前,先回顾下CUDA的一般使用方法,其基本步骤如下: 1.主机代码执行:2.传输数据到GPU:3.确定grid,block大小: 4.调用内核 ...
- 【OpenCV】OpenCV中GPU模块使用 (转)
CUDA基本使用方法 在介绍OpenCV中GPU模块使用之前,先回顾下CUDA的一般使用方法,其基本步骤如下: 1.主机代码执行:2.传输数据到GPU:3.确定grid,block大小: 4.调用内核 ...
- OpenCV中GPU模块使用
CUDA IT168的文章系列: Cuda的初始化:http://tech.it168.com/a2011/0715/1218/000001218458.shtml OpenCV: OpenCV中GP ...
- 【计算机视觉】【并行计算与CUDA开发】OpenCV中GPU模块使用
CUDA基本使用方法 在介绍OpenCV中GPU模块使用之前,先回顾下CUDA的一般使用方法,其基本步骤如下: 1.主机代码执行:2.传输数据到GPU:3.确定grid,block大小: 4.调用内核 ...
- OpenCV中的绘图函数-OpenCV步步精深
OpenCV 中的绘图函数 画线 首先要为画的线创造出环境,就要生成一个空的黑底图像 img=np.zeros((512,512,3), np.uint8) 这是黑色的底,我们的画布,我把窗口名叫做i ...
- 【计算机视觉】OpenCV中直方图处理函数简述
计算直方图calcHist 直方图是对数据集合的统计 ,并将统计结果分布于一系列提前定义的bins中.这里的数据不只指的是灰度值 ,统计数据可能是不论什么能有效描写叙述图像的特征. 如果有一个矩阵包括 ...
- Python中functools模块函数解析
Python自带的 functools 模块提供了一些常用的高阶函数,也就是用于处理其它函数的特殊函数.换言之,就是能使用该模块对可调用对象进行处理. functools模块函数概览 functool ...
- 【源码阅读】opencv中opencl版本的dft函数的实现细节
1.函数声明 opencv-3.4.3\modules\core\include\opencv2\core.hpp:2157 CV_EXPORTS_W void dft(InputArray src, ...
- OpenCV中的新函数connectedComponentsWithStats使用
主要内容:对比新旧函数,用于过滤原始图像中轮廓分析后较小的区域,留下较大区域. 关键字 :connectedComponentsWithStats 在以前,常用的方法是"是先调用 cv ...
随机推荐
- CSS 之 margin知识点
1.margin的百分比值 普通元素的百分比maigin相对于容器元素的宽度(width) 进行计算的. 这里我们在图片外面设置一个宽高分别为800 * 600的容器.设置img{ margin: 1 ...
- 项目中用到的input 遇到的问题的归类
input 前几天 为了这个词 用在搜索框被我们总监喷,为了加强印象,我把它记录下来 最原始的造型 <input type="text" value="搜索&quo ...
- Windows 下 SVN 服务器配置
1.下载文件, 下载最新版本subversion,我这里选择VisualSVN-Server-2.5.7.exe 2.安装Subversion 服务器 由于我下载的是setup.exe版本 ...
- 【C#学习笔记】二、面向对象编程
2.1 抽象类与接口 1)概念 抽象类是特殊的类,只是不能被实例化:除此以外,具有类的其他特性:重要的是抽象类可以包括抽象方法,这是普通类所不能的.抽象方法只能声明于抽象类中,且不包含任何实现,派生类 ...
- js中apply和call的用法 以及apply的妙用 (来自网络)
apply:方法能劫持另外一个对象的方法,继承另外一个对象的属性. Function.apply(obj,args)方法能接收两个参数obj:这个对象将代替Function类里this对象args:数 ...
- 关于asp.net会话阻塞
现象:在一个网站中,当访问一个处理比较耗时的页面(A页面),页面请求还没有返回时,此时再点击访问该网站的其他页面(B页面)会出现B页面很久都没有响应和返回,直到A页面输出返回数据时才开始处理B页面的请 ...
- Spring4.0学习笔记(1) —— 基础知识
1.基本定义 IOC: 其思想是反转资源获取的方向,传统的资源查找方式要求组件向容器发起请求查找资源,作为回应,容器适时的返回资源,而应用了 IOC之后,容器主动将资源推送给它所管理的组件,组件索要做 ...
- 转载:JSONObject.fromObject(map)(JSON与JAVA数据的转换)
转载网址:http://blog.sina.com.cn/s/blog_821025b70100wh6v.html JSON与JAVA数据的转换(JSON 即 JavaScript Object Na ...
- CSS3 Transitions
浏览器支持 属性 浏览器 transition Internet Explorer不支持过渡属性. Firefox4需要前缀-moz-. Chrome和Safari需要前缀-webkit-. Oper ...
- 关闭Centos的自动更新
昨天跟老板汇报,提到我们的linux服务器每天自动更新,老板大发雷霆,说生产系统不能够这样,非常不安全,一个师兄也提到他原来在移动的时候,服务器更新也是很谨慎的事情.看来我的思维太技术了,不够全面,所 ...