分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
The OpenCV GPU module is a set of classes and functions to utilize GPU computational capabilities. It is implemented using NVIDIA* CUDA* Runtime API and supports only NVIDIA GPUs.
1. getCudaEnableDeviceCount:returns the number of installed CUDA-enabled devices;
2. setDevice:sets adevice and initializes it for the current thread;
3. getDevice:returns the current device index set or initialized by default;
4. resetDevice:explicitly destroys and cleans up all resources associated with the current device in the current process;
5. FeatureSet:enumeration providing GPU computing features;
6. class::TargetArchs:class providing a set of static methods to check what NVIDIA card architecture the GPU module was built for;
7. class::DeviceInfo:class providing functionality for querying the specified GPU properties;
8. DeviceInfo::name:returns the device name;
9. DeviceInfo::majorVersion:returns the major compute capability version;
10. DeviceInfo::minorVersion:returns the minor compute capability version;
11. DeviceInfo::multiProcessorCount:returns the number of streaming multiprocessors;
12. DeviceInfo::freeMemory:returns the amount of free memory in bytes;
13. DeviceInfo::totalMemory:returns the amount of total memory in bytes;
14. DeviceInfo::supports:provides information on GPU feature support;
15. DeviceInfo::isCompatible:checks the GPU module and device compatibility;
16. DeviceInfo::deviceID:returns system index of the GPU device starting with 0;
17. struct::PtrStepSz:lightweight class encapsulating pitched memory on a GPU and passed to nvcc-compiled code(CUDA kernels);
18. struct::PtrStep:structure similar to gpu::PtrStepSz but containing only a pointer and row step;
19. class::GpuMat:base storage class for GPU memory with reference counting. Its interface matches the Mat interface;
20. createContinuous:creates a continuous matrix in the GPU memory;
21. ensureSizeIsEnough:ensures that the size of a matrix is big enough and the matrix has a proper type;
22. registerPageLocked:page-locks the memory of matrix and maps it for the device(s);
23. unregisterPageLocked:unmaps the memory of matrix and makes it pageable again;
24. class::CudaMem:class with reference counting wrapping special memory type allocation functions from CUDA. Its interface is also Mat()-like but with additional memory type parameters;
25. CudaMem::createMatHeader:creates a header without reference counting to gpu::CudaMem data;
26. CudaMem::createGpuMatHeader:maps CPU memory to GPU address space and create the gpu::GpuMat header without reference counting for it;
27. CudaMem::canMapHostMemory:returns true if the current hardware supports address space mapping and ALLOC_ZEROCOPY memory allocation;
28. class::Stream:this class encapsulates a queue of asynchronous calls. Some functions have overloads with the additional gpu::Stream parameter;
29. Stream::queryIfComplete:returns true if the current stream queue is finished, otherwise, it returns false;
30. Stream::waitForCompletion:blocks the current CPU thread until all operations in the stream are complete;
31. Stream::enqueueDownload:copies data from device to host;
32. Stream::enqueueUpload:copies data from host to device;
33. Stream::enqueueCopy:copies data from device to device;
34. Stream::enqueueMemSet:initializes or sets device memory to a value;
35. Stream::enqueueConvert:converts matrix type, ex from float to uchar depending on type;
36. Stream::enqueueHostCallback:adds a callback to be called on the host after all currently enqueued items in the stream have completed;
37. struct::StreamAccessor:class that enables getting cuda Stream_t from gpu::Stream and is declared in stream_accessor.hpp because it is the only public header that depends on the CUDA Runtime API;
38. gemm(cv::gemm):performs generalized matrix multiplication;
39. transpose(cv::transpose):transpose a matrix;
40. flip(cv::flip):flips a 2D matrix around vertical, horizontal, or both axes;
41. LUT(cv::LUT):transforms the source matrix into the destination matrix using the given look-up table:dst(I) = lut(src(I));
42. merge(cv::merge):makes a multi-channel matrix out of several single-channel matrices;
43. split(cv::split):copies each plane of a multi-channel matrix into an array;
44. magnitude(cv::magnitude):computes magnitudes of complex matrix elements;
45. magnitudeSqr:computes squared magnitudes of complex matrix elements;
46. phase(cv::phase):computes polar angles of complex matrix elements;
47. cartToPolar(cv::cartToPolar):converts Cartesian coordinates into polar;
48. polarToCart(cv::polarToCart):converts polar coordinates into Cartesian;
49. normalize(cv::normalize):normalizes the norm or value range of an array;
50. add(cv::add):computes a matrix-matrix or matrix-scalar sum;
51. subtract(cv::subtract):computes a matrix-matrix or matrix-scalar difference;
52. multiply(cv::multiply):computes a matrix-matrix or matrix-scalar per-element product;
53. divide(cv::divide):computes a matrix-matrix or matrix-scalar division;
54. addWeighted(cv::addWeighted):computes the weighted sum of two arrays;
55. abs(cv::abs):computes an absolute value of each matrix element;
56. sqr:computes a square value of each matrix element;
57. sqrt(cv::sqrt):computes a square root of each matrix element;
58. exp(cv::exp):computes an exponent of each matrix element;
59. log(cv::log):computes a natural logarithm of absolute value of each matrix element;
60. pow(cv::pow):raises every matrix elem