当前位置: 首页 > 编程日记 > 正文

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;

 

相关文章:

这位创造GitHub冠军项目的“老男人”,堪称10倍程序员本尊

作者 | 马超,CSDN博客专家,金融科技从业者来源 | CSDN博客7月12日一款叫做TDengine的时序数据库项目在GitHub上开源了,这个项目一经发布就稳稳占据了GitHub排行榜的C位,目前TdEngine已经累积了5000多个star,并且连续一周排在上升榜…

hdu 1724 Ellipse——辛普森积分

题目&#xff1a;http://acm.hdu.edu.cn/showproblem.php?pid1724 #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #define db double using namespace std; const db eps1e-5; int T;db a,b,l,r; db f(db x){return sqrt(…

模仿Hibernate的逆向工程_java版_源码下载

在这篇blog&#xff1a;"Hibernate逆向工程原理_java版本"中谈到了Hibernate逆向工程原理。 我喜欢理论和实践相结合....so,今天我试着模仿hibernate的逆向工程&#xff0c;哈哈&#xff0c;我成功啦.... 话不多说....直接上图先&#xff1a; 项目结构&#xff1a; 运…

http协议进阶(三)http报文

一、报文流 http报文是在http应用程序之间发送的数据块&#xff08;也可称为数据包&#xff09;、这些数据块以一些文本的元信息&#xff08;meta-information&#xff09;开头&#xff0c;描述了报文的内容及含义&#xff0c;后面跟着 可选的数据部分&#xff0c;这些报文在客…

一行Python代码能实现什么丧心病狂的功能?

作者 | 天元浪子来源 | CSDN博客手头有 109 张头部 CT 的断层扫描图片&#xff0c;我打算用这些图片尝试头部的三维重建。基础工作之一&#xff0c;就是要把这些图片数据读出来&#xff0c;组织成一个三维的数据结构&#xff08;实际上是四维的&#xff0c;因为每个像素有 RGB…

Windows7 32位机上,OpenCV中配置GPU操作步骤

1、 查看本机配置&#xff0c;查看显卡类型是否支持NVIDIA GPU&#xff0c;本机显卡为NVIDIA GeForce 8400 GS&#xff1b; 2、 从http://www.nvidia.cn/Download/index.aspx?langcn下载最新驱动并安装&#xff1b; 3、 从https://developer.nvidia.com/cuda-toolkit根据…

【2018.12.15】【考试总结】【模拟+逆序对+树状数组+贪心+multiset】爆零之旅

这是我悲惨的接近爆零的一次考试&#xff0c;但是本蒟蒻不能放弃&#xff0c;还是要总结的QAQ 答题卡 【题目背景】 八月是个悲惨的月份。先不谈炎热的天气&#xff0c;对于新生来说&#xff0c;八月意味着军训&#xff1b; 而对于高二高三的同学来说&#xff0c;八月意味着开学…

RememberMe 功能的实现(base-auth使用说明)

2019独角兽企业重金招聘Python工程师标准>>> 日常记录&#xff0c;代码是根据SpringSecurity写的。 ###写个Entity类实现UserDetails <!-- lang: java --> package com.lqz.b2c.base.web.controller.member.support;import com.lqz.b2c.base.entity.Passport;…

AutoML前沿技术与实践经验分享 | 免费公开课

传统机器学习的解决范式可表示为&#xff1a;ML Solution ML expertise Computation Data新机器学习范式可表示为&#xff1a;New ML Solution 100x Computation 100x Data通过表示的变化&#xff0c;可以看出&#xff0c;传统范式的“ML expertise”被“100x”的“Comput…

Windows 7 64位机上搭建Android开发环境

1、从http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html下载Java JDK&#xff0c;根据机子本身配置&#xff0c;选择jdk-7u25-windows-x64.exe下载&#xff0c;将其安装到D:\ProgramFiles\Java\jdk1.7.0_25文件夹下&#xff0c;并将D:\Pro…

近4万Star,登月源码登顶GitHub,这位女程序员“拯救”了阿波罗

作者 | 伍杏玲转载自CSDN&#xff08;ID&#xff1a;CSDNnews&#xff09;1969 年 7 月 20 日&#xff0c;“阿波罗 11 号”飞船登月&#xff0c;宇航员尼尔阿姆斯特朗&#xff08;Neil Armstrong&#xff09;成功踏上月球表面&#xff0c;标志着人类第一次踏上月球&#xff0c…

Eclipse中通过Android模拟器调用OpenGL ES2.0函数操作步骤

1、 先按照http://blog.csdn.net/fengbingchun/article/details/10439281中操作搭建好基本的Android开发环境&#xff1b; 2、 打开Eclipse&#xff0c;-->Window-->AndroidVirtual Device Manager-->New-->AVD Name:Android_OpenGLES, Device:GalaxyNexus(4.65…

animate默认时长所带来的问题及解决

一、需求描述 做一个进度条长度逐渐减少的动画&#xff0c;当进度条长度小于等于0时&#xff0c;关闭动画&#xff0c;并弹出透明底板显示新提示。 二、问题描述 初始代码如下&#xff1a; //设置进度条初始长度 var progressLength 180; //设置一个定时器 var timer …

避坑指南:如何选择适当的预测评价指标?| 程序员评测

作者 | Nicolas Vandeput译者 | Tianyu责编 | Jane出品 | AI科技大本营&#xff08;ID&#xff1a;rgznai100&#xff09;【导语】因为不存在一个适用于所有情况的评价指标&#xff0c;所以评估预测精度&#xff08;或误差&#xff09;就变成了一件不是那么容易的事情。只有通过…

利用JNI技术在Android中调用C++代码

JNI是Java Native Interface的简称&#xff0c;也就是Java本地接口&#xff0c;它提供了若干的API实现Java和其它语言的通信(主要是C&C)。 1、打开Eclipse&#xff0c;File-->New-->Project…-->AndroidApplication Project-->Application Name:TestJNI,Packag…

微软开源数据处理引擎 Trill,每天可分析万亿次事件

微软近日开源了数据处理引擎 Trill&#xff0c;它每天能够分析万亿次事件。项目地址&#xff1a;https://github.com/Microsoft/trill当下每毫秒处理大量数据正成为一种常见的业务需求&#xff0c;此次微软开源的 Trill&#xff0c;据说每秒能够处理高达数十亿事件&#xff0c;…

【杭电ACM】1097 A hard puzzle

【杭电ACM】1097 A hard puzzle http://acm.hdu.edu.cn/showproblem.php?pid1097 先用int手写了算法结果竟然wrong answer&#xff0c;估计是测试数据很大&#xff0c;直接上BigInteger 和modPow()&#xff0c;轻松解决。 1 //author:pz2 3 import java.math.BigInteger;4 im…

mvc 下的 signalR使用小结

2019独角兽企业重金招聘Python工程师标准>>> sirnal下有两种使用。 一种是 Persistent Connection &#xff0c;另外一种是Hubs 。详细请看 https://github.com/SignalR/SignalR/wiki &#xff1b; hubs支持浏览器与客户端互相调用方法。所以应用更广泛。 在前台…

利用JNI技术在Android中调用C++形式的OpenGL ES 2.0函数

1、 打开Eclipse&#xff0c;File-->New-->Project…-->Android-->AndroidApplication Project,Next-->Application Name:FillTriangle, PackageName:com.filltriangle.android,Minimum Required SDK:API 10Android2.3.3(Gingerbread),Next--&g…

Python三十年技术演变史

作者 | 宋天龙&#xff0c;大数据技术专家&#xff0c;触脉咨询合伙人兼副总裁&#xff0c;前Webtrekk中国区技术和咨询负责人&#xff08;Webtrekk&#xff0c;德国的在线数据分析服务提供商&#xff09;。擅长数据挖掘、建模、分析与运营&#xff0c;精通端到端数据价值场景设…

php 扩展包链接

https://pecl.php.net/package-stats.php?cid7转载于:https://www.cnblogs.com/gaoyuechen/p/10148754.html

面向中小企业的视频云服务 视频托管

2019独角兽企业重金招聘Python工程师标准>>> 面向中小企业的视频云服务解决方案 如果你是一个传统的企业网站&#xff0c;想要在网站首页加入一段视频&#xff0c;或者是一个垂直资讯网站想要开设视频频道&#xff0c;又或者想要进行一项活动的在线直播。这时候也许…

VS2010下编译OpenCV2.4.6静态库

1、 从 http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.3/ 下载最新的OpenCV2.4.6&#xff1b; 2、 将OpenCV-2.4.6.0.exe存放到D:\Soft\OpenCV2.4.6文件夹下&#xff0c;解压到当前文件夹下&#xff0c;生成一个opencv文件夹&#xff1b; 3、 下…

【性能优化之道】每秒上万并发下的Spring Cloud参数优化实战

一、写在前面 相信不少朋友都在自己公司使用Spring Cloud框架来构建微服务架构&#xff0c;毕竟现在这是非常火的一门技术。 如果只是用户量很少的传统IT系统&#xff0c;使用Spring Cloud可能还暴露不出什么问题。 如果是较多用户量&#xff0c;高峰每秒高达上万并发请求的互联…

共话数据智能新经济,首届市北·GMIS 2019全球数据智能峰会隆重召开

7月19日&#xff0c;上海市市北高新技术服务业园区&#xff08;以下简称“市北高新”&#xff09;成功举办首届「市北GMIS 2019全球数据智能峰会」&#xff08;以下简称“市北GMIS峰会”&#xff09;。为期两天的市北GMIS峰会以“拥抱数智经济&#xff0c;赋能产业生态”为主题…

最新剑桥《AI全景报告》出炉:中国发表机器学习学术研究超过美国

来源 | 转载自新智元&#xff08;ID:AI_era&#xff09;2019年即将过去一半&#xff0c;剑桥大学的两位研究人员近日推出了本年度的State AI 2019全景报告。本报告基本沿袭去年的大体框架&#xff0c;从产业、人才、政策、预测等方面对过去一年来AI领域的技术的新进步、产业格局…

《OpenMP编译原理及实现技术》摘录

内容摘自《OpenMP编译原理及实现技术》第2章 代码测试环境&#xff1a;Windows7 64bit, VS2010, 4核机。 可以说OpenMP制导指令将C语言扩展为一个并行语言&#xff0c;但OpenMP本身不是一种独立的并行语言&#xff0c;而是为多处理器上编写并行程序而设计的、指导共享内存、多…

C# 36进制转10进制

代码是Java转过来的&#xff0c;变量名都没有改……有空再整理一下好了。public long toDecimal(string input, long bs){try{long Bigtemp 0, temp 1;int len input.Length;for (int i len - 1; i > 0; i--){if (i ! len - 1)temp * bs;long num changeDec(input[i]);…

Oracle Cloud Native Framework推出云原生解决方案

摘要&#xff1a;Oracle Cloud Native Framework云原生平台提供托管云服务和本地软件&#xff0c;同时在现Oracle云基础架构上跨应用程序配置和分析大量服务。developer relations for Oracle Cloud Infrastructure副总裁Bob Quillin讨论了该框架的优势以及对2019年云原生市场的…

OpenMP知识点汇总

1. OpenMP(Open Multi-Processing)官网&#xff1a;http://openmp.org/wp/ 2. OpenMP最新版本4.0&#xff0c;2013年7月发布。Visual Studio 2010内置支持OpenMP2.0&#xff0c;选中工程属性->C/C->Language->Open MP Support:选中Yes(/openmp)即可&#xff0c;然后在…