getCudaEnableDeviceCount:returns the number of installed CUDA-enabled devices;
setDevice:sets adevice and initializes it for the current thread;
getDevice:returns the current device index set or initialized by default;
resetDevice:explicitly destroys and cleans up all resources associated with the current device in the current process;
FeatureSet:enumeration providing GPU computing features;
class::TargetArchs:class providing a set of static methods to check what NVIDIA card architecture the GPU module was built for;
class::DeviceInfo:class providing functionality for querying the specified GPU properties;
DeviceInfo::name:returns the device name;
DeviceInfo::majorVersion:returns the major compute capability version;
DeviceInfo::minorVersion:returns the minor compute capability version;
DeviceInfo::multiProcessorCount:returns the number of streaming multiprocessors;
DeviceInfo::freeMemory:returns the amount of free memory in bytes;
DeviceInfo::totalMemory:returns the amount of total memory in bytes;
DeviceInfo::supports:provides information on GPU feature support;
DeviceInfo::isCompatible:checks the GPU module and device compatibility;
DeviceInfo::deviceID:returns system index of the GPU device starting with 0;
struct::PtrStepSz:lightweight class encapsulating pitched memory on a GPU and passed to nvcc-compiled code(CUDA kernels);
struct::PtrStep:structure similar to gpu::PtrStepSz but containing only a pointer and row step;
class::GpuMat:base storage class for GPU memory with reference counting. Its interface matches the Mat interface;
createContinuous:creates a continuous matrix in the GPU memory;
ensureSizeIsEnough:ensures that the size of a matrix is big enough and the matrix has a proper type;
registerPageLocked:page-locks the memory of matrix and maps it for the device(s);
unregisterPageLocked:unmaps the memory of matrix and makes it pageable again;
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;
CudaMem::createMatHeader:creates a header without reference counting to gpu::CudaMem data;
CudaMem::createGpuMatHeader:maps CPU memory to GPU address space and create the gpu::GpuMat header without reference counting for it;
CudaMem::canMapHostMemory:returns true if the current hardware supports address space mapping and ALLOC_ZEROCOPY memory allocation;
class::Stream:this class encapsulates a queue of asynchronous calls. Some functions have overloads with the additional gpu::Stream parameter;
Stream::queryIfComplete:returns true if the current stream queue is finished, otherwise, it returns false;
Stream::waitForCompletion:blocks the current CPU thread until all operations in the stream are complete;
Stream::enqueueDownload:copies data from device to host;
Stream::enqueueUpload:copies data from host to device;
Stream::enqueueCopy:copies data from device to device;
Stream::enqueueMemSet:initializes or sets device memory to a value;
Stream::enqueueConvert:converts matrix type, ex from float to uchar depending on type;
Stream::enqueueHostCallback:adds a callback to be called on the host after all currently enqueued items in the stream have completed;
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;
gemm(cv::gemm):performs generalized matrix multiplication;
transpose(cv::transpose):transpose a matrix;
flip(cv::flip):flips a 2D matrix around vertical, horizontal, or both axes;
LUT(cv::LUT):transforms the source matrix into the destination matrix using the given look-up table:dst(I) = lut(src(I));
merge(cv::merge):makes a multi-channel matrix out of several single-channel matrices;
split(cv::split):copies each plane of a multi-channel matrix into an array;
magnitude(cv::magnitude):computes magnitudes of complex matrix elements;
magnitudeSqr:computes squared magnitudes of complex matrix elements;
phase(cv::phase):computes polar angles of complex matrix elements;
cartToPolar(cv::cartToPolar):converts Cartesian coordinates into polar;
polarToCart(cv::polarToCart):converts polar coordinates into Cartesian;
normalize(cv::normalize):normalizes the norm or value range of an array;
add(cv::add):computes a matrix-matrix or matrix-scalar sum;
subtract(cv::subtract):computes a matrix-matrix or matrix-scalar difference;
multiply(cv::multiply):computes a matrix-matrix or matrix-scalar per-element product;
divide(cv::divide):computes a matrix-matrix or matrix-scalar division;
addWeighted(cv::addWeighted):computes the weighted sum of two arrays;
abs(cv::abs):computes an absolute value of each matrix element;
sqr:computes a square value of each matrix element;
sqrt(cv::sqrt):computes a square root of each matrix element;
exp(cv::exp):computes an exponent of each matrix element;
log(cv::log):computes a natural logarithm of absolute value of each matrix element;
pow(cv::pow):raises every matrix element to a power;
absdiff(cv::absdiff):computes per-element absolute difference of two matrices(or of a matrix and scalar);
compare(cv::compare):compares elements of two matrices;
bitwise_not(cv::bitwise_not):performs a per-element bitwise inversion;
bitwise_or(cv::bitwise_or):performs a per-element bitwise disjunction of two matrices or of matrix and scalar;
bitwise_and(cv::bitwise_and):performs a per-element bitwise conjunction of two matrices or of matrix and scalar;
bitwise_xor(cv::bitwise_xor):performs a per-element bitwise exclusive or operation of two matrices of matrix and scalar;
rshift:performs pixel by pixel right shift of an image by a constant value;
lshift:peforms pixel by pixel left shift of an image by a constant value;
min(cv::min):computes the per-element minimum of two matrices(or a matrix and a scalar);
max(cv::max):computes the per-element maximum of two matrices(or a matrix and a scalar);
meanShiftFiltering:performs mean-shift filtering for each point of the source image;
meanShiftProc(gpu::meanShiftFiltering):performs a mean-shift procedure and stores information about processed points(their colorsand positions) in two images;
meanShiftSegmentation:performs a mean-shift segmentation of the source image and eliminates small segments;
integral(cv::integral):computes an integral image;
sqrIntegral:computes a squared integral image;
columnSum:computes a vertical(column) sum;
cornerHarris(cv::cornerHarris):computes the Harris cornerness criteria at each image pixel;
cornerMinEigenVal(cv::cornerMinEigenVal):computes the minimum eigen value of a 2*2 derivative covariation matrix at each pixel(the cornerness criteria);
mulSpectrums(cv::mulSpectrums):performs a per-element multiplication of two Fourier spectrums;
mulAndScaleSpectrums(cv::mulSpectrums):performs a per-element multiplication of two Fourier spectrums and scales the result;
dft(cv::dft):performs a forward or inverse discrete Fourier transform(1D or 2D) of the floating pointmatrix;
struct::ConvolveBuf:class providing a memory buffer for gpu::convolve() function, plus it allows toadjust some specific parameters;
ConvolveBuf::create:constructs a buffer for gpu::convolve() function with respecitive arguments;
convolve(gpu::filter2D):computes a convolution (or cross-correlation) of two images;
struct::MatchTemplateBuf:class providing memory buffers for gpu::matchTemplate() function, plus it allows toadjust some specific parameters;
matchTemplate(cv::matchTemplate):computes a proximity map for a raster template and an image where the template is searchedfor;
remap(cv::remap):applies a generic geometrical transformation to an image;
cvtColor(cv::cvtColor):converts an image from one color space to another;
swapChannels:exchanges the color channels of an image in-place;
threshold(cv::threshold):applies a fixed-level threshold to each array element;
resize(cv::resize):resizes an image;
warpAffine(cv::warpAffine):applies an affine transformation to an image;
buildWarpAffineMats(gpu::warpAffine,gpu::remap):builds transformation maps for affine transformation;
warpPerspective(cv::warpPerspective):applies a perspective transformation to an image;
buildWarpPerspectiveMaps(gpu::warpPerspective,gpu::remap):builds transformation maps for perspective transformation;
rotate(gpu::warpAffine):rotates an image around the origin(0,0) and then shifts it;
copyMakeBorder(cv::copyMakeBorder):forms a border around an image;
rectStdDev:computes a standard deviation of integral images;
evenLevels:computes levels with even distribution;
histEven:calculates a histogram with evenly distributed bins;
histRange:calculates a histogram with bins determined by the levels array;
calcHist:calculates histogram for one channel 8-bit image;
equalizeHist(cv::equalizeHist):equalizes the histogram of a grayscale image;
buildWarpPlaneMaps:builds plane warping maps;
buildWapCylindricalMaps:builds cylindrical warping maps;
buildWarpSphericalMaps:builds spherical warping maps;
pyrDown(cv::pyrDown):smoothes an image and downsamples it;
pyrUp(cv::pyrUp):upsamples an image and then smoothes it;
blendLinear:performs linear blending of two images;
bilateralFilter(cv::bilateralFilter):performs bilateral filtering of passed image;
nonLocalMeans(cv::fastNlMeanDenoising):performs pure non local means denoising without any simplification, and thus it is not fast;
class::FastNonLocalMeansDenoising:the class implements fast approximate Non Local Means Denoising algorithm;
FastNonLocalMeansDenoising::simpleMethod(cv::fastNlMeanDenoising):perform image denoising using Non-local Means Denoising algorithm;
FastNonLocalMeansDenoising::labMethod(cv::fastNlMeanDenoisingColored):modification of FastNonLocalMeansDenoising::simpleMethod for color images;
alphaComp:composites two images using alpha opacity values contained in eachimage;
Canny(cv::Canny):finds edges in an image using Canny algorithm;
HoughLines(cv::HoughLines):finds lines in abinary image using the classical Hough transform;
HoughLinesDownload(gpu::HoughLines):downloads resultsfrom gpu::HoughLines to host memory;
HoughCircles(cv::HoughCircles):finds circles in agrayscale image using the Hough transform;
HoughCirclesDownload(gpu::HoughCircles):downloads results from gpu::HoughCircles to host memory;
meanStdDev(cv::meanStdDev):computes a mean value and a standard deviation of matrix elements;
norm(cv::norm):returns the norm of a matrix(or difference of two matrices );
sum(cv::sum):returns the sum of matrix elements;
absSum:returns the sum of absolute values for matrix elements;
sqrSum:returns the squared sum of matrix elements;
minMax(cv::minMaxLoc):finds global minimum and maximum matrix elements and returns theirvaluse;
minMaxLoc(cv::minMaxLoc):finds global minimumand maximum matrix elements and returns their values with locations;
countNonZero(cv::countNonZero):counts non-zero matrix elements;
reduce(cv::reduce):reduces a matrix to a vector;
struct::HOGDescriptor:the class implements Histogram of Oriented Gradients object detector;
HOGDescriptor::getDescriptorSize:returns the number of coefficients required for the classification;
HOGDescriptor::getBlockHistogramSize:returns the block histogram size;
HOGDescriptor::setSVMDetector:sets coefficients for the linear SVM classifier;
HOGDescriptor::getDefaultPeopleDetector:returns coefficients of the classifier trained for people detection(for default window size);
HOGDescriptor::getPeopleDetector48x96:returns coefficients of the classifier trained for people detection(for 48 * 96windows);
HOGDescriptor::getPeopleDetector64x128:returns coefficients of the classifier trained for people detection(for 64 * 128 windows);
HOGDescriptor::detect:performs object detection without a multi-scale window;
HOGDescriptor::detectMultiScale:performs object detection with a multi-scale window;
HOGDescriptor::getDescriptors:returns block descriptors computed for the whole image;
class::CascadeClassifier_GPU:cascade classifier class used for object detection, supports HAAR and LBP cascades;
CascadeClassifier_GPU::empty:checks whether the classifier is loaded or not;
CascadeClassifier_GPU::load:loads the classifier from a file, the previous content is destroyed;
CascadeClassifier_GPU::release:destroys the loaded classifier;
CascadeClassifier_GPU::detectMultiScale(cv::CascadeClassifier::detectMultiScale):detects objects of different sizes in the input image;
class::FAST_GPU(cv::FAST):class used for corner detection using the FAST algorithm;
FAST_PUG::operator():finds the key points using FAST detector;
FAST_PUG::downloadKeypoints:downlaod key points from GPU to CPU memory;
FAST_PUG::convertKeypoints:converts key points from GPU representation to vector of Key Point;
FAST_PUG::release:releases inner buffer memory;
FAST_PUG::calsKeyPointsLocation:find keypoints and compute it’sresponse if nonmaxSupression is true;
FAST_PUG::getKeyPoints:gets final array of keypoints;
class::ORB_GPU:class for extracting ORB features and descriptors from an image;
ORG_PUG::operator():detects keypoints and computes descriptors for them;
ORG_PUG::downlaodKeyPoints:download keypoints from GPU to CPU memory;
ORG_PUG::convertKeyPoints:converts keypoints from GPU representation to vector of KeyPoint;
ORG_PUG::release:releases inner buffer memory;
class::BruteForceMatcher_GPU_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, this descriptor matcher supports masking permissible matches between descriptor sets;
BruteForceMatcher_GPU_base::match(cv::DescriptorMatcher::match):finds thebest match for each descriptor from a query set with train descriptors;
BruteForceMatcher_GPU_base::makeGpuCollection:performs a GPU collection of traindescriptors and masks in a suitable format for the gpu:: BruteForceMatcher_GPU_base::matchCollectionfunction;
BruteForceMatcher_GPU_base::matchDownload:downloads matrices obtained via gpu:: BruteForceMatcher_GPU_base::matchSingleor gpu:: BruteForceMatcher_GPU_base::matchCollection to vector with DMatch;
BruteForceMatcher_GPU_base::matchConvert:converts matrices obtained via gpu:: BruteForceMatcher_GPU_base::matchSingleor gpu:: BruteForceMatcher_GPU_base::matchCollection to vector with DMatch;
BruteForceMatcher_GPU_base::knnMatch(cv::DescriptorMatcher::knnMatch):finds the k best matches for eachdescriptor from a query set with train descriptors;
BruteForceMatcher_GPU_base::knnMatchDownload:downloads matrices obtained via gpu:: BruteForceMatcher_GPU_base::knnMatchSingleor gpu:: BruteForceMatcher_GPU_base::knnMatch2Collection to vector with DMatch;
BruteForceMatcher_GPU_base::knnMatchConvert:converts matrices obtained via gpu:: BruteForceMatcher_GPU_base::knnMatchSingleor gpu:: BruteForceMatcher_GPU_base::knnMatch2Collection to CPU vector withDMatch;
BruteForceMatcher_GPU_base::radiusMatch(cv::DescriptorMatcher::radiusMatch):for each query descriptor, finds thebest matches with a distance less than a given threshold;
BruteForceMatcher_GPU_base::radiusMatchDownload:downloads matrices obtained via gpu:: BruteForceMatcher_GPU_base::radiusMatchSingleor gpu:: BruteForceMatcher_GPU_base::radiusMatchCollection to vector withDMatch;
BruteForceMatcher_GPU_base::radiusMatchConvert:converts matrices obtained via gpu:: BruteForceMatcher_GPU_base::radiusMatchSingleor gpu:: BruteForceMatcher_GPU_base::radiusMatchCollection to vector withDMatch;
class::BaseRowFilter_GPU:base class for linear or non-linearfilters that processes rows of 2D arrays, such filters are used for the “horizontal”filtering passes in separable filters;
class::BaseColumnFilter_GPU:base class for linear or non-linearfilters that processes columns of 2D arrays, such filters are used for the “vertical”filtering passes in separable filters;
class::BaseFilter_GPU:base class for non-separable 2D filters;
class::FilterEngine_GPU:base class for the Filter Engine;
createFilter2D_GPU(gpu::createBoxFilter_GPU):creates a non-separable filter enginewith the specified filter;
createSeqrableFilter_GPU:creates a separable filter engine withthe specified filters;
getRowSumFilter_GPU:creates a horizontal 1D box filter;
getColumnSumFilter_GPU:creates a vertical 1D box filter;
createBoxFilter_GPU(cv::boxFilter):creates a normalized 2D box filter;
boxFilter(cv::boxFilter):smooths the imageusing the normalized box filter;
blur(cv::blur, gpu::boxFilter):acts as a synonymfor the normalized box filter;
createMorphologyFilter_GPU(cv::createMorphologyFilter):creates a 2Dmorphological filter;
erode(cv::erode):erodes an image by using a specific structuring element;
dilate(cv::dilate):dilates an image by using a specific structuring element;
morphologyEx(cv::morphologyEx):applies an advanced morphologicaloperation to an image;
createLinearFilter_GPU(cv::createLinearFilter):creates anon-separable linear filter;
filter2D(cv::filter2D, gpu::convolve):applies thenon-separable 2D linear filter to an image;
Laplacian(cv::Laplacian, gpu::filter2D):applies theLaplacian operator to an image;
getLinearRowFilter_GPU(cv::createSeparableLinearFilter):creates aprimitive row filter with the specified kernel;
getLinearColumnFilter_GPU(cv::createSeparableLinearFilter):creates aprimitive column filter with the specified kernel;
createSeparableLinearFilter_GPU(cv::createSeparableLinearFilter):creates aseparable linear filter engine;
sepFilter2D(cv::sepFilter2D):applies a separable2D linear filter to an image;
createDerivFilter_GPU(cv::createDerivFilter):creates afilter engine for the generalized Sobel operator;
Sobel(cv::Sobel):applies the generalized Sobel operator to an image;
Scharr(cv::Scharr):calculates the first x- or y- image derivative using the Scharroperator;
createGaussianFilter_GPU(cv::createGaussianFilter):creates aGaussian filter engine;
GaussianBlur(cv::GaussianBlur):smooths an imageusing the Gaussian filter;
getMaxFilter_GPU:create the maximum filter:
getMinFilter_GPU:create the minimum filter;
class::StereoBM_GPU:class computing stereo correspondence(disparity map) using the blockmatching algorithm;
StereoBM_GPU::operator:enables thestereo correspondence operator that finds the disparity for the specifiedrectified stereo pair;
StereoBM_GPU::checkIfGpuCallReasonable:uses a heuristic method to estimatewhether the current GPU is faster than the CPU in this algorithm, it queriesthe currently active device;
class::StereoBeliefPropagation:class computing stereo correspondenceusing the belief propagation algorithm;
StereoBeliefPropagation::estimateRecommendedParams:uses a heuristic method to compute therecommended parameters(ndisp, iters and levels) for the specified image size(widthand height);
StereoBeliefPropagation::operator:enables the stereo correspondenceoperator that finds the disparity for the specified rectified stereo pair ordata cost;
class::StereoConstantSpaceBP:class computingstereo correspondence using the constant space belief propagation algorithm;
StereoConstantSpaceBP::estimateRecommendedParams:uses aheuristic to compute parameters(ndisp, iters, levelsand nrplane) for thespecified image size(width and height);
StereoConstantSpaceBP::operator:enables the stereocorrespondence operator that finds the disparity for the specified rectifiedstereo pair;
class::DisparityBilateralFilter:classrefining a disparity map using joint bilateral filtering;
DisparityBilateralFilter::operator:refines a disparitymap using joint bilateral filtering;
drawColorDisp:colors a disparity image;
reprojectImageTo3D(cv::reprojectImageTo3D):reprojects adisparity image to 3D space;
solvePnPRansac(cv::solvePnPRansac):finds the objectpose from 3D-2D point correspondences;
class::BroxOpticalFlow:class computing the optical flow for two images using Brox et alOptical Flow algorithm;
class::GoodFeaturesToTrackDetector_GPU(cv::goodFeaturesToTrack):class usedfor strong corners detection on an image;
GoodFeaturesToTrackDetector_GPU::operator(cv::goodFeaturesToTrack):finds themost prominent corners in the image;
GoodFeaturesToTrackDetector_GPU::releaseMemory:releasesinner buffers memory;
class::FarnebackOpticalFlow:class computing adense optical flow using the Gunnar Farneback’s algorithm;
FarnebackOpticalFlow::operator(cv::calcOpticalFlowFarneback):computes adense optical flow using the Gunnar Farneback’s algorithm;
FarnebackOpticalFlow::releaseMemory:releases unusedauxiliary memory buffers;
class::PyrLKOpticalFlow(cv::calcOpticalFlowPyrLK):class usedfor calculating an optical flow;
PyrLKOpticalFlow::sparse:calculate an opticalflow for a sparse feature set;
PyrLKOpticalFlow::dense:calculate dense optical flow;
PyrLKOpticalFlow::releaseMemory:releases inner buffers memory;
interpolateFrames:interpolates frames(images) usingprovided optical flow(displacement field);
class::FGDStatModel:class used for background/foregroundsegmentation;
FGDStatModel::create:initializes background model;
FGDStatModel::release:releases all inner buffer’s memory;
FGDStatModel::update:updates the background model andreturns foreground regions count;
class::MOG_GPU(cv::BackgroundSubtractorMOG):GaussianMixture-based Background/Foreground Segmentation Algorithm;
MOG_GPU::operator:updates the background model and returns the foreground mask;
MOG_GPU::getBackgroundImage:computes abackground image;
MOG_GPU::release:releases all inner buffer’s memory;
class::MOG2_GPU(cv::BackgroundSubtractorMOG2):GaussianMixture-based Background/Foreground Segmentation Algorithm;
MOG2_GPU::operator:updates the background model and returns the foreground mask;
MOG2_GPU::getBackgroundImage:computes abackground image;
MOG2_GPU::release:releases all inner buffer’s memory;
class::GMG_GPU:class used for background/foreground segmentation;
GMG_GPU::initialize:initialize background model and allocates all inner buffers;
GMG_GPU::operator:updates the background model and returns the foreground mask;
GMG_GPU::release:releases all inner buffer’s memory;
class::VideoWriter_GPU:video writercalss;
VideoWriter_GPU::open:initializes or reinitializes video writer;
VideoWriter_GPU::isOpened:returns true ifvideo writer has been successfully initialized;
VideoWriter_GPU::close:releases the video writer;
VideoWriter_GPU::write:writes the next video frame;
strct::VideoWriter_GPU::EncoderParams:differentparameters for CUDA video encoder;
VideoWriter_GPU::EncoderParams::load:reads parametersfrom config file;
VideoWriter_GPU::EncoderParams::save:saves parameters toconfig file;
class::VideoWriter_GPU::EncoderCallBack:callbacksfor CUDA video encoder;
VideoWriter_GPU::EncoderCallBack::acquireBitStream:callbackfunctions to signal the start of bitstream that is to be encoded;
VideoWriter_GPU::EncoderCallBack::releaseBitStream:callback function to signal that theencoded bitstream is ready to be written to file;
VideoWriter_GPU::EncoderCallBack::onBeginFrame:callback function to signal thatencoding operation on the frame has started;
VideoWriter_GPU::EncoderCallBack::onEndFrame:callback function signals that theencoding operation on the frame has finished;
class::VideoReader_GPU:class for reading video from files;
VideoReader_GPU::Codec:video codecs supported bygpu::VideoReader_GPU;
VideoReader_GPU::ChromaFormat:chroma formats supported bygpu::VideoReader_GPU;
VideoReader_GPU::FormatInfo:struct providing information aboutvideo file format;
VideoReader_GPU::open:initializes or reinitializes videoreader;
VideoReader_GPU::isOpened:returns true if video reader has beensuccessfully initialized;
VideoReader_GPU::close:releases the video reader;
VideoReader_GPU::read:grabs, decodes and return the nextvideo frame;
VideoReader_GPU::format:returns information about video fileformat;
VideoReader_GPU::dumpFormat:dump information about video fileformat to specified stream;
class::VideoReader_GPU::VideoSource:interface for video demultiplexing;
VideoReader_GPU::VideoSource::format:returns information about video fileformat;
VideoReader_GPU::VideoSource::start:starts processing;
VideoReader_GPU::VideoSource::stop:stops processing;
VideoReader_GPU::VideoSource::isStarted:returns true if processing wassuccessfully started;
VideoReader_GPU::VideoSource::hasError:returns true if error occurred duringprocessing;
VideoReader_GPU::VideoSource::parseVideoData:parse next video frame, implementationmust call this method after new frame was grabbed;
Keep in mind:(1)、No double support on the GPU;(2)、Porting small functions to GPU is not recommended as the upload/download time will be larger than the amount you gain by a parallel execution;(3)、GpuMat works similar tothe Mat with a 2D only limitation and no reference returning for its functions(cannot mix GPU references with CPU ones);(4)、Not for all channel numbers you can make efficient algorithms on the GPU;(5)、The input images for the GPU images need to be either one or four channel ones and one of the char or float type for the item sizes;If you have three channel images as an input you can do two things: either adds a new channel (and use char elements) or split up the image and call the function for each image.The first one isn’t really recommended as you waste memory;(6)、For some functions, where the position of the elements (neighbor items) doesn’t matter quick solution is to just reshape it into a single channel image;(7)、Data allocations are very expensive on GPU;Use a buffer to solve: allocate once reuse later;(8)、You’re throwing out on the window the price for memory allocation and data transfer. And on the GPU this is damn high. Another possibility for optimization is to introduce asynchronous OpenCV GPU calls too with the help of the gpu::Stream;(9)、Memory allocation on the GPU is considerable. Therefore, if it’s possible allocate new memory as few times as possible. If you create a function what you intend to call multiple times it is a good idea to allocate any local parameters for the function only once, during the first call. To do this you create a data structure containing all the local variables you will use. The GpuMat will only reallocate itself on a new call if the new matrix size is different from the previous one;(10)、Avoid unnecessary function data transfers. Any small data transfer will be significant one once you go to the GPU. Therefore, if possible make all calculations in-place (in other words do not create new memory objects for reasons explained at the previous point). For example, although expressing arithmetical operations maybe easier to express in one line formulas, it will be slower;(11)、Use asynchronous calls (the gpu::Stream). By default whenever you call a gpu function it will wait for the call to finish and return with the result afterwards. However, it is possible to make asynchronous calls, meaning it will call for the operation execution, make the costly data allocations for the algorithm and return back right away.Now you can call another function if you wish to do so.By using a stream we can make the data allocation, upload operations while the GPU is already executing a given method. For example we need to upload two images. We queue these one after another and call already the function that processes it. The functions will wait forthe upload to finish, however while that happens makes the output bufferallocations for the function to be executed next.
相关推荐
智慧工地算法视频分析服务器区域入侵检测AI视频分析技术在煤矿的实战应用
通过实时分析和处理井下视频资料,智慧矿山算法视频分析服务器不仅能够及时发现并预警人员违规行为和设备异常状况,还能够通过智能分析预防潜在的安全风险,从而显著提高煤矿的安全管理水平和生产效率。
部分opencv中的GPU加速函数(中文翻译)
由于项目需要,翻译了一部分可以用于我现在项目的opencv函数,记录于此,原始英文文档来自于http://blog.youkuaiyun.com/mtt_sky/article/details/42607839。 getCudaEnableDeviceCount:返回已安装CUDA设备的数量; 2. setDevice:设置adevice并为当前线程初始化它; 3. getDev
CANoe实战:手把手教你用J1939.dbc发送超8字节长帧报文(附完整CAPL代码)
本文详细解析了使用CANoe和J1939.dbc实现超8字节长帧报文的分包发送技术,提供完整的CAPL代码实现与优化策略。内容涵盖J1939.dbc配置、分包发送模块设计、接收端处理逻辑,并与ISO 15765-2协议进行深度对比,帮助开发者构建高效可靠的商用车通信解决方案。
python中GPU版本的opencv常用方法介绍
引言 本篇是以python的视角介绍相关的函数还有自我使用中的一些问题,本想在这篇之前总结一下opencv编译的全过程,但遇到了太多坑,暂时不太想回看做过的笔记,所以主要总结python下GPU版本的opencv。 bitwise_and() bitwise_not() bitwise_or() bitwise_xor() compare() divide():除 exp() log() max() min() multiply() threshold():二值化,但要指定设定阈值 blendLinea
DS250DF410寄存器配置实战:从原理到调试的高速SerDes信号优化指南
在高速串行通信领域,SerDes(串行器/解串器)技术是实现芯片间高速数据传输的核心。其工作原理是通过时钟数据恢复(CDR)从串行数据流中提取时钟,并利用均衡技术补偿信道损耗。这项技术的核心价值在于突破PCB走线或电缆的带宽限制,确保在25Gbps及以上速率下数据的可靠传输。其应用场景广泛覆盖数据中心、高性能计算和通信设备中的高速背板、光模块及芯片互连。本文以TI的DS250DF410多通道重定时器为例,深入剖析其寄存器配置,特别是如何通过精细调控其自适应均衡器和眼图监测模块,实现对高速链路的信号整形与质量
STM32F103C8T6蓝莓派用HAL库GPIO模拟SPI驱动MAX31865读取PT100温度(附完整代码)
本文详细介绍了如何在STM32F103C8T6蓝莓派开发板上使用HAL库通过GPIO模拟SPI驱动MAX31865读取PT100温度传感器的完整方案。内容包括硬件连接、CubeMX配置、GPIO模拟SPI实现、温度计算算法及常见问题排查,并附有完整代码示例,帮助开发者快速实现高精度温度测量。
OPenCV CUDA模块图形变换----构建透视变换映射表函数buildWarpPerspectiveMaps()
该函数用于构建一个透视变换(Perspective Transform)的映射表(xmap / ymap),可用于后续的图像重映射操作(如 remap)。 适用于 GPU 加速的图像处理流程,是 cv::warpPerspective 的底层实现之一。
【25届数字IC秋招总结】面试经验13——豪威科技面试
25届数字ic面试记录———豪威科技
OpenCV中GPU模块(CUDA)函数
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. getCudaE...
作为一名爬虫人如何实现千万级数据爬取?
爬虫门槛不高,高就高在往后余生的每一次实操都随时会让你崩溃!Bro
(SEED-Lab)Buffer Overflow Vulnerability Lab缓冲区溢出实验
(SEED-Lab)Buffer Overflow Vulnerability Lab 欢迎大家访问我的GitHub博客 https://lunan0320.cn 文章目录一、实验目的二、实验步骤与结果2.1 环境初始化2.2 Task1 运行shellcode2.3漏洞程序2.4 Task 22.5 Task 3: ASLR2.6 Task 4: Stack Guard2.7 Task 5:不可执行栈三、参考文献 一、实验目的 理解缓冲区溢出攻击的原理以及如何实施攻击 理解针对缓冲区溢出的防御措施
OpenCV中GPU模块 CUDA 函数
OpenCV中GPU模块 CUDA 函数
【TC3xx芯片】TC3xx芯片PFlash的ECC校验问题补充
TC3xx芯片PFlash的ECC校验问题补充
OpenCV中GPU函数
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. getC
ssm框架搭建
这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载
TMS_WebGMaps_1.9.8.0_Full_Source
TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder
OpenCV CUDA模块设备层-----在 GPU 上执行类似于 std::copy 的操作函数warpCopy()
OpenCV 的 CUDA 模块(cudev) 中的一个设备端内联模板函数,用于在 GPU 上执行类似于 std::copy 的操作
大中型超市收银系统(可直接运行)
光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开
OpenCV CUDA 模块中用于在 GPU 上计算两个数组对应元素差值的绝对值函数absdiff(
void cv::cuda::absdiff 是 OpenCV CUDA 模块中的一个函数,用于在 GPU 上计算两个数组对应元素差值的绝对值。
计算机控制技术及应用
《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。
移动开发:OpenCV中GPU函数
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. getC
OpenCV CUDA 模块中用于在 GPU 上计算矩阵中每个元素的绝对值或复数的模函数abs()
void cv::cuda::abs(InputArray src, OutputArray dst, Stream &stream = Stream::Null()) 是 OpenCV 的 CUDA 模块中的一个函数,用于在 GPU 上计算矩阵中每个元素的绝对值或复数的模。这个函数可以加速图像处理和计算机视觉任务中对绝对值的操作。
OpenCV CUDA 模块中在 GPU 上对图像或矩阵进行 翻转(镜像)操作的一个函数 flip()
cv::cuda::flip 是 OpenCV 的 CUDA 模块中的一个函数,用于在 GPU 上对图像或矩阵进行 翻转(镜像)操作。它类似于 CPU 版本的 cv::flip,但运行在 GPU 上,适用于 cv::cuda::GpuMat 数据。 ## 函数原型
OpenCV CUDA模块图像处理------双边滤波的GPU版本函数bilateralFilter()
该函数在 GPU 上执行双边滤波操作,是一种非线性平滑滤波器,能够在 保留边缘的同时去除噪声。
OpenCV CUDA模块直方图计算------在 GPU 上计算图像直方图的函数calcHist()
OpenCV 的 CUDA 模块 中用于在 GPU 上计算图像直方图的一个函数。
OpenCV CUDA模块设备层-----在 GPU上计算反双曲正切函数atanh()
对输入的 uchar1 像素值(范围 [0, 255]),先归一化到 [0.0, 1.0] 浮点区间,然后计算其 反双曲正切函数 atanh(x),最终返回一个 float1 类型的结果。
是 OpenCV 的 CUDA 模块中用于在 GPU 上对图像或矩阵进行转置操作函数cv::cuda::transpose
cv::cuda::transpose 是 OpenCV 的 CUDA 模块中的一个函数,用于在 GPU 上对图像或矩阵进行转置操作(Transpose)。它是 cv::transpose 的 GPU 加速版本,适用于需要高性能处理的场景。
OpenCV CUDA模块直方图计算------在 GPU 上计算输入图像的直方图(histogram)函数histEven()
该函数用于在 GPU 上计算输入图像的直方图(histogram)。它将像素值区间均匀划分为若干个 bin(桶),并统计每个 bin 中像素的数量。
562



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



