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.
相关推荐
实验三 Gmapping建图
自主移动机器人第三次实验课,内容包括:(1)turtlebot的gmapping建图;(2)rosbag的使用;(3)gazebo中的gmapping建图。
部分opencv中的GPU加速函数(中文翻译)
由于项目需要,翻译了一部分可以用于我现在项目的opencv函数,记录于此,原始英文文档来自于http://blog.youkuaiyun.com/mtt_sky/article/details/42607839。 getCudaEnableDeviceCount:返回已安装CUDA设备的数量; 2. setDevice:设置adevice并为当前线程初始化它; 3. getDev
Git Worktree + Claude Code:多终端并发开发完全实战
深入讲解如何使用 Git Worktree 配合多终端 Claude Code 实现并发开发,通过实战案例展示如何在 Android 开发中提升 2-3 倍效率,彻底告别等待 AI 的问题。
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
别再硬啃理论了!手把手教你用Simulink搭VSG并网模型,模拟线路故障(含三相故障模块详解)
本文提供了一份详细的Simulink VSG并网模型搭建指南,特别聚焦于三相故障模块的配置与仿真。通过逐步指导,帮助电力电子工程师掌握从基础电路搭建到复杂故障模拟的全流程,包括单相接地、两相短路等典型故障的波形分析与参数设置技巧,有效弥合理论与实践的鸿沟。
生信入门第七课:使用FastQC软件进行测序原始fastq数据质控
从实验到数据:RNA定量、文库片段长度、fastqc质控和fastp去接头
OPenCV CUDA模块图形变换----构建透视变换映射表函数buildWarpPerspectiveMaps()
该函数用于构建一个透视变换(Perspective Transform)的映射表(xmap / ymap),可用于后续的图像重映射操作(如 remap)。 适用于 GPU 加速的图像处理流程,是 cv::warpPerspective 的底层实现之一。
手把手教你解决Kernel panic报错:init找不到的5种排查方法(附NFS挂载实战)
本文深入解析了Linux系统启动时出现“Kernel panic - not syncing: No working init found”报错的根本原因,并提供了五种系统性的排查方法。文章结合NFS挂载根文件系统的实战场景,详细阐述了从动态链接库依赖、内核引导参数、NFS权限配置、文件系统完整性到内核配置干扰的完整排查路径,帮助开发者快速定位并解决这一常见的系统启动故障。
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...
关于Win11安装Ubuntu子系统报错:WslRegisterDistribution failed with error 解决办法
Win11安装Ubuntu子系统报错:WslRegisterDistribution failed with error
数字孪生教程大全之 我们如何构建数字孪生?数字孪生的五个级别都是什么
文章摘要 什么是数字孪生? 我们如何构建数字孪生? 开发智能数字孪生系统的框架 什么是数字孪生? 数字孪生是一个不言自明的术语,用于识别物理系统的数字化版本。数字孪生的最早参考来自大卫·格伦特(David Gelernter )的小说作品。在他 1995 年的书中,Gelernter 博士为读者提供了未来有趣的可能性——万维网。前网络书籍谈到了计算机系统上的镜像数字世界。有些人可能会争辩说,我们的 Meta-verse 是新的数字世界——现实世界的数字孪生。但是,还有其他可能性,时间可能会讲述一个更好的
OpenCV中GPU模块 CUDA 函数
OpenCV中GPU模块 CUDA 函数
RK3588平台开发系列讲解(硬件篇-功能外设2)
RK3588 芯片内置两个USB3.0 OTG控制器(内嵌2个USB2.0 OTG,下图绿色处),1个USB3.0 HOST 控制器,2个USB2.0 HOST控制器。这些控制器与PHY的内部复用图如下:USB3.0 OTG0 控制器支持SS/HS/FS/LS, 内嵌的USB2.0(HS/FS/LS)信号采用USB2.0 OTG PHY, 信号名见下图的红色方框内;RK3588目前仅此接口支持做Fireware的Download,应用中请务必要预留出。
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
VC中sqlite的使用
在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示
VB摄像头监控
该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制
OpenCV CUDA模块设备层-----在 GPU 上执行类似于 std::copy 的操作函数warpCopy()
OpenCV 的 CUDA 模块(cudev) 中的一个设备端内联模板函数,用于在 GPU 上执行类似于 std::copy 的操作
TMS_WebGMaps_1.9.8.0_Full_Source
TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder
OpenCV CUDA 模块中用于在 GPU 上计算两个数组对应元素差值的绝对值函数absdiff(
void cv::cuda::absdiff 是 OpenCV CUDA 模块中的一个函数,用于在 GPU 上计算两个数组对应元素差值的绝对值。
精雕软件(JDpaint) 5.5 绿色版
精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版
移动开发: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 中像素的数量。
4649



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



