Classes | Typedefs | Enumerations | Functions | Variables
cv::gpu Namespace Reference

Classes

struct  StaticAssert< true >
struct  DevMem2D_
struct  PtrStep_
struct  PtrElemStep_
class  TargetArchs
class  DeviceInfo
class  GpuMat
 Smart pointer for GPU memory with reference counting. Its interface is mostly similar with cv::Mat. More...
class  CudaMem
class  Stream
struct  ConvolveBuf
class  BaseRowFilter_GPU
 The Base Class for 1D or Row-wise Filters. More...
class  BaseColumnFilter_GPU
 The Base Class for Column-wise Filters. More...
class  BaseFilter_GPU
 The Base Class for Non-Separable 2D Filters. More...
class  FilterEngine_GPU
 The Base Class for Filter Engine. More...
class  StereoBM_GPU
class  StereoBeliefPropagation
class  StereoConstantSpaceBP
class  DisparityBilateralFilter
struct  HOGDescriptor
class  BruteForceMatcher_GPU_base
class  BruteForceMatcher_GPU< L1< T > >
class  BruteForceMatcher_GPU< L2< T > >
class  BruteForceMatcher_GPU< HammingLUT >
class  BruteForceMatcher_GPU< Hamming >
class  CascadeClassifier_GPU
class  SURF_GPU
struct  StreamAccessor

Typedefs

typedef DevMem2D_< unsigned char > DevMem2D
typedef DevMem2D_< float > DevMem2Df
typedef DevMem2D_< int > DevMem2Di
typedef PtrStep_< unsigned char > PtrStep
typedef PtrStep_< float > PtrStepf
typedef PtrStep_< int > PtrStepi
typedef PtrElemStep_< unsigned
char > 
PtrElemStep
typedef PtrElemStep_< float > PtrElemStepf
typedef PtrElemStep_< int > PtrElemStepi

Enumerations

enum  FeatureSet {
  FEATURE_SET_COMPUTE_10 = 10, FEATURE_SET_COMPUTE_11 = 11, FEATURE_SET_COMPUTE_12 = 12, FEATURE_SET_COMPUTE_13 = 13,
  FEATURE_SET_COMPUTE_20 = 20, FEATURE_SET_COMPUTE_21 = 21, GLOBAL_ATOMICS = FEATURE_SET_COMPUTE_11, NATIVE_DOUBLE = FEATURE_SET_COMPUTE_13
}

Functions

CV_EXPORTS int getCudaEnabledDeviceCount ()
 This is the only function that do not throw exceptions if the library is compiled without Cuda.
CV_EXPORTS void setDevice (int device)
 Functions below throw cv::Expception if the library is compiled without Cuda.
CV_EXPORTS int getDevice ()
CV_EXPORTS void resetDevice ()
CV_EXPORTS void error (const char *error_string, const char *file, const int line, const char *func)
CV_EXPORTS void nppError (int err, const char *file, const int line, const char *func)
CV_EXPORTS void createContinuous (int rows, int cols, int type, GpuMat &m)
 Creates continuous GPU matrix.
CV_EXPORTS void ensureSizeIsEnough (int rows, int cols, int type, GpuMat &m)
CV_EXPORTS void transpose (const GpuMat &src1, GpuMat &dst, Stream &stream=Stream::Null())
CV_EXPORTS void flip (const GpuMat &a, GpuMat &b, int flipCode, Stream &stream=Stream::Null())
CV_EXPORTS void LUT (const GpuMat &src, const Mat &lut, GpuMat &dst, Stream &stream=Stream::Null())
CV_EXPORTS void merge (const GpuMat *src, size_t n, GpuMat &dst, Stream &stream=Stream::Null())
 makes multi-channel array out of several single-channel arrays
CV_EXPORTS void merge (const vector< GpuMat > &src, GpuMat &dst, Stream &stream=Stream::Null())
 makes multi-channel array out of several single-channel arrays
CV_EXPORTS void split (const GpuMat &src, GpuMat *dst, Stream &stream=Stream::Null())
 copies each plane of a multi-channel array to a dedicated array
CV_EXPORTS void split (const GpuMat &src, vector< GpuMat > &dst, Stream &stream=Stream::Null())
 copies each plane of a multi-channel array to a dedicated array
CV_EXPORTS void magnitude (const GpuMat &x, GpuMat &magnitude, Stream &stream=Stream::Null())
CV_EXPORTS void magnitudeSqr (const GpuMat &x, GpuMat &magnitude, Stream &stream=Stream::Null())
CV_EXPORTS void magnitude (const GpuMat &x, const GpuMat &y, GpuMat &magnitude, Stream &stream=Stream::Null())
CV_EXPORTS void magnitudeSqr (const GpuMat &x, const GpuMat &y, GpuMat &magnitude, Stream &stream=Stream::Null())
CV_EXPORTS void phase (const GpuMat &x, const GpuMat &y, GpuMat &angle, bool angleInDegrees=false, Stream &stream=Stream::Null())
CV_EXPORTS void cartToPolar (const GpuMat &x, const GpuMat &y, GpuMat &magnitude, GpuMat &angle, bool angleInDegrees=false, Stream &stream=Stream::Null())
CV_EXPORTS void polarToCart (const GpuMat &magnitude, const GpuMat &angle, GpuMat &x, GpuMat &y, bool angleInDegrees=false, Stream &stream=Stream::Null())
CV_EXPORTS void add (const GpuMat &a, const GpuMat &b, GpuMat &c, Stream &stream=Stream::Null())
CV_EXPORTS void add (const GpuMat &a, const Scalar &sc, GpuMat &c, Stream &stream=Stream::Null())
CV_EXPORTS void subtract (const GpuMat &a, const GpuMat &b, GpuMat &c, Stream &stream=Stream::Null())
CV_EXPORTS void subtract (const GpuMat &a, const Scalar &sc, GpuMat &c, Stream &stream=Stream::Null())
CV_EXPORTS void multiply (const GpuMat &a, const GpuMat &b, GpuMat &c, Stream &stream=Stream::Null())
CV_EXPORTS void multiply (const GpuMat &a, const Scalar &sc, GpuMat &c, Stream &stream=Stream::Null())
CV_EXPORTS void divide (const GpuMat &a, const GpuMat &b, GpuMat &c, Stream &stream=Stream::Null())
CV_EXPORTS void divide (const GpuMat &a, const Scalar &sc, GpuMat &c, Stream &stream=Stream::Null())
CV_EXPORTS void exp (const GpuMat &a, GpuMat &b, Stream &stream=Stream::Null())
CV_EXPORTS void log (const GpuMat &a, GpuMat &b, Stream &stream=Stream::Null())
CV_EXPORTS void absdiff (const GpuMat &a, const GpuMat &b, GpuMat &c, Stream &stream=Stream::Null())
CV_EXPORTS void absdiff (const GpuMat &a, const Scalar &s, GpuMat &c, Stream &stream=Stream::Null())
CV_EXPORTS void compare (const GpuMat &a, const GpuMat &b, GpuMat &c, int cmpop, Stream &stream=Stream::Null())
CV_EXPORTS void bitwise_not (const GpuMat &src, GpuMat &dst, const GpuMat &mask=GpuMat(), Stream &stream=Stream::Null())
 performs per-elements bit-wise inversion
CV_EXPORTS void bitwise_or (const GpuMat &src1, const GpuMat &src2, GpuMat &dst, const GpuMat &mask=GpuMat(), Stream &stream=Stream::Null())
 calculates per-element bit-wise disjunction of two arrays
CV_EXPORTS void bitwise_and (const GpuMat &src1, const GpuMat &src2, GpuMat &dst, const GpuMat &mask=GpuMat(), Stream &stream=Stream::Null())
 calculates per-element bit-wise conjunction of two arrays
CV_EXPORTS void bitwise_xor (const GpuMat &src1, const GpuMat &src2, GpuMat &dst, const GpuMat &mask=GpuMat(), Stream &stream=Stream::Null())
 calculates per-element bit-wise "exclusive or" operation
CV_EXPORTS void min (const GpuMat &src1, const GpuMat &src2, GpuMat &dst, Stream &stream=Stream::Null())
 computes per-element minimum of two arrays (dst = min(src1, src2))
CV_EXPORTS void min (const GpuMat &src1, double src2, GpuMat &dst, Stream &stream=Stream::Null())
 computes per-element minimum of array and scalar (dst = min(src1, src2))
CV_EXPORTS void max (const GpuMat &src1, const GpuMat &src2, GpuMat &dst, Stream &stream=Stream::Null())
 computes per-element maximum of two arrays (dst = max(src1, src2))
CV_EXPORTS void max (const GpuMat &src1, double src2, GpuMat &dst, Stream &stream=Stream::Null())
 computes per-element maximum of array and scalar (dst = max(src1, src2))
CV_EXPORTS void remap (const GpuMat &src, GpuMat &dst, const GpuMat &xmap, const GpuMat &ymap)
CV_EXPORTS void meanShiftFiltering (const GpuMat &src, GpuMat &dst, int sp, int sr, TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 5, 1))
 Does mean shift filtering on GPU.
CV_EXPORTS void meanShiftProc (const GpuMat &src, GpuMat &dstr, GpuMat &dstsp, int sp, int sr, TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 5, 1))
 Does mean shift procedure on GPU.
CV_EXPORTS void meanShiftSegmentation (const GpuMat &src, Mat &dst, int sp, int sr, int minsize, TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 5, 1))
 Does mean shift segmentation with elimination of small regions.
CV_EXPORTS void drawColorDisp (const GpuMat &src_disp, GpuMat &dst_disp, int ndisp, Stream &stream=Stream::Null())
CV_EXPORTS void reprojectImageTo3D (const GpuMat &disp, GpuMat &xyzw, const Mat &Q, Stream &stream=Stream::Null())
CV_EXPORTS void cvtColor (const GpuMat &src, GpuMat &dst, int code, int dcn=0, Stream &stream=Stream::Null())
 converts image from one color space to another
CV_EXPORTS double threshold (const GpuMat &src, GpuMat &dst, double thresh, double maxval, int type, Stream &stream=Stream::Null())
 applies fixed threshold to the image
CV_EXPORTS void resize (const GpuMat &src, GpuMat &dst, Size dsize, double fx=0, double fy=0, int interpolation=INTER_LINEAR, Stream &stream=Stream::Null())
CV_EXPORTS void warpAffine (const GpuMat &src, GpuMat &dst, const Mat &M, Size dsize, int flags=INTER_LINEAR, Stream &stream=Stream::Null())
CV_EXPORTS void warpPerspective (const GpuMat &src, GpuMat &dst, const Mat &M, Size dsize, int flags=INTER_LINEAR, Stream &stream=Stream::Null())
CV_EXPORTS void rotate (const GpuMat &src, GpuMat &dst, Size dsize, double angle, double xShift=0, double yShift=0, int interpolation=INTER_LINEAR, Stream &stream=Stream::Null())
CV_EXPORTS void copyMakeBorder (const GpuMat &src, GpuMat &dst, int top, int bottom, int left, int right, const Scalar &value=Scalar(), Stream &stream=Stream::Null())
CV_EXPORTS void integral (const GpuMat &src, GpuMat &sum, Stream &stream=Stream::Null())
CV_EXPORTS void integralBuffered (const GpuMat &src, GpuMat &sum, GpuMat &buffer, Stream &stream=Stream::Null())
 buffered version
CV_EXPORTS void integral (const GpuMat &src, GpuMat &sum, GpuMat &sqsum, Stream &stream=Stream::Null())
CV_EXPORTS void sqrIntegral (const GpuMat &src, GpuMat &sqsum, Stream &stream=Stream::Null())
CV_EXPORTS void columnSum (const GpuMat &src, GpuMat &sum)
 computes vertical sum, supports only CV_32FC1 images
CV_EXPORTS void rectStdDev (const GpuMat &src, const GpuMat &sqr, GpuMat &dst, const Rect &rect, Stream &stream=Stream::Null())
CV_EXPORTS void cornerHarris (const GpuMat &src, GpuMat &dst, int blockSize, int ksize, double k, int borderType=BORDER_REFLECT101)
 computes Harris cornerness criteria at each image pixel
CV_EXPORTS void cornerMinEigenVal (const GpuMat &src, GpuMat &dst, int blockSize, int ksize, int borderType=BORDER_REFLECT101)
 computes minimum eigen value of 2x2 derivative covariation matrix at each pixel - the cornerness criteria
CV_EXPORTS void mulSpectrums (const GpuMat &a, const GpuMat &b, GpuMat &c, int flags, bool conjB=false)
CV_EXPORTS void mulAndScaleSpectrums (const GpuMat &a, const GpuMat &b, GpuMat &c, int flags, float scale, bool conjB=false)
CV_EXPORTS void dft (const GpuMat &src, GpuMat &dst, Size dft_size, int flags=0)
CV_EXPORTS void convolve (const GpuMat &image, const GpuMat &templ, GpuMat &result, bool ccorr=false)
CV_EXPORTS void convolve (const GpuMat &image, const GpuMat &templ, GpuMat &result, bool ccorr, ConvolveBuf &buf)
 buffered version
CV_EXPORTS void matchTemplate (const GpuMat &image, const GpuMat &templ, GpuMat &result, int method)
 computes the proximity map for the raster template and the image where the template is searched for
CV_EXPORTS void downsample (const GpuMat &src, GpuMat &dst, int k=2)
 downsamples image
CV_EXPORTS void blendLinear (const GpuMat &img1, const GpuMat &img2, const GpuMat &weights1, const GpuMat &weights2, GpuMat &result, Stream &stream=Stream::Null())
CV_EXPORTS void meanStdDev (const GpuMat &mtx, Scalar &mean, Scalar &stddev)
CV_EXPORTS double norm (const GpuMat &src1, int normType=NORM_L2)
CV_EXPORTS double norm (const GpuMat &src1, int normType, GpuMat &buf)
CV_EXPORTS double norm (const GpuMat &src1, const GpuMat &src2, int normType=NORM_L2)
CV_EXPORTS Scalar sum (const GpuMat &src)
CV_EXPORTS Scalar sum (const GpuMat &src, GpuMat &buf)
CV_EXPORTS Scalar absSum (const GpuMat &src)
CV_EXPORTS Scalar absSum (const GpuMat &src, GpuMat &buf)
CV_EXPORTS Scalar sqrSum (const GpuMat &src)
CV_EXPORTS Scalar sqrSum (const GpuMat &src, GpuMat &buf)
CV_EXPORTS void minMax (const GpuMat &src, double *minVal, double *maxVal=0, const GpuMat &mask=GpuMat())
 finds global minimum and maximum array elements and returns their values
CV_EXPORTS void minMax (const GpuMat &src, double *minVal, double *maxVal, const GpuMat &mask, GpuMat &buf)
 finds global minimum and maximum array elements and returns their values
CV_EXPORTS void minMaxLoc (const GpuMat &src, double *minVal, double *maxVal=0, Point *minLoc=0, Point *maxLoc=0, const GpuMat &mask=GpuMat())
 finds global minimum and maximum array elements and returns their values with locations
CV_EXPORTS void minMaxLoc (const GpuMat &src, double *minVal, double *maxVal, Point *minLoc, Point *maxLoc, const GpuMat &mask, GpuMat &valbuf, GpuMat &locbuf)
 finds global minimum and maximum array elements and returns their values with locations
CV_EXPORTS int countNonZero (const GpuMat &src)
 counts non-zero array elements
CV_EXPORTS int countNonZero (const GpuMat &src, GpuMat &buf)
 counts non-zero array elements
CV_EXPORTS void transformPoints (const GpuMat &src, const Mat &rvec, const Mat &tvec, GpuMat &dst, Stream &stream=Stream::Null())
CV_EXPORTS void projectPoints (const GpuMat &src, const Mat &rvec, const Mat &tvec, const Mat &camera_mat, const Mat &dist_coef, GpuMat &dst, Stream &stream=Stream::Null())
CV_EXPORTS void solvePnPRansac (const Mat &object, const Mat &image, const Mat &camera_mat, const Mat &dist_coef, Mat &rvec, Mat &tvec, bool use_extrinsic_guess=false, int num_iters=100, float max_dist=8.0, int min_inlier_count=100, vector< int > *inliers=NULL)
CV_EXPORTS Ptr< FilterEngine_GPUcreateFilter2D_GPU (const Ptr< BaseFilter_GPU > &filter2D, int srcType, int dstType)
 returns the non-separable filter engine with the specified filter
CV_EXPORTS Ptr< FilterEngine_GPUcreateSeparableFilter_GPU (const Ptr< BaseRowFilter_GPU > &rowFilter, const Ptr< BaseColumnFilter_GPU > &columnFilter, int srcType, int bufType, int dstType)
 returns the separable filter engine with the specified filters
CV_EXPORTS Ptr< BaseRowFilter_GPUgetRowSumFilter_GPU (int srcType, int sumType, int ksize, int anchor=-1)
CV_EXPORTS Ptr
< BaseColumnFilter_GPU
getColumnSumFilter_GPU (int sumType, int dstType, int ksize, int anchor=-1)
CV_EXPORTS Ptr< BaseFilter_GPUgetBoxFilter_GPU (int srcType, int dstType, const Size &ksize, Point anchor=Point(-1,-1))
CV_EXPORTS Ptr< FilterEngine_GPUcreateBoxFilter_GPU (int srcType, int dstType, const Size &ksize, const Point &anchor=Point(-1,-1))
 returns box filter engine
CV_EXPORTS Ptr< BaseFilter_GPUgetMorphologyFilter_GPU (int op, int type, const Mat &kernel, const Size &ksize, Point anchor=Point(-1,-1))
CV_EXPORTS Ptr< FilterEngine_GPUcreateMorphologyFilter_GPU (int op, int type, const Mat &kernel, const Point &anchor=Point(-1,-1), int iterations=1)
 returns morphological filter engine. Only MORPH_ERODE and MORPH_DILATE are supported.
CV_EXPORTS Ptr< BaseFilter_GPUgetLinearFilter_GPU (int srcType, int dstType, const Mat &kernel, const Size &ksize, Point anchor=Point(-1,-1))
CV_EXPORTS Ptr< FilterEngine_GPUcreateLinearFilter_GPU (int srcType, int dstType, const Mat &kernel, const Point &anchor=Point(-1,-1))
 returns the non-separable linear filter engine
CV_EXPORTS Ptr< BaseRowFilter_GPUgetLinearRowFilter_GPU (int srcType, int bufType, const Mat &rowKernel, int anchor=-1, int borderType=BORDER_CONSTANT)
CV_EXPORTS Ptr
< BaseColumnFilter_GPU
getLinearColumnFilter_GPU (int bufType, int dstType, const Mat &columnKernel, int anchor=-1, int borderType=BORDER_CONSTANT)
CV_EXPORTS Ptr< FilterEngine_GPUcreateSeparableLinearFilter_GPU (int srcType, int dstType, const Mat &rowKernel, const Mat &columnKernel, const Point &anchor=Point(-1,-1), int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1)
 returns the separable linear filter engine
CV_EXPORTS Ptr< FilterEngine_GPUcreateDerivFilter_GPU (int srcType, int dstType, int dx, int dy, int ksize, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1)
 returns filter engine for the generalized Sobel operator
CV_EXPORTS Ptr< FilterEngine_GPUcreateGaussianFilter_GPU (int type, Size ksize, double sigma1, double sigma2=0, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1)
 returns the Gaussian filter engine
CV_EXPORTS Ptr< BaseFilter_GPUgetMaxFilter_GPU (int srcType, int dstType, const Size &ksize, Point anchor=Point(-1,-1))
 returns maximum filter
CV_EXPORTS Ptr< BaseFilter_GPUgetMinFilter_GPU (int srcType, int dstType, const Size &ksize, Point anchor=Point(-1,-1))
 returns minimum filter
CV_EXPORTS void boxFilter (const GpuMat &src, GpuMat &dst, int ddepth, Size ksize, Point anchor=Point(-1,-1), Stream &stream=Stream::Null())
CV_EXPORTS void erode (const GpuMat &src, GpuMat &dst, const Mat &kernel, Point anchor=Point(-1,-1), int iterations=1, Stream &stream=Stream::Null())
 erodes the image (applies the local minimum operator)
CV_EXPORTS void dilate (const GpuMat &src, GpuMat &dst, const Mat &kernel, Point anchor=Point(-1,-1), int iterations=1, Stream &stream=Stream::Null())
 dilates the image (applies the local maximum operator)
CV_EXPORTS void morphologyEx (const GpuMat &src, GpuMat &dst, int op, const Mat &kernel, Point anchor=Point(-1,-1), int iterations=1, Stream &stream=Stream::Null())
 applies an advanced morphological operation to the image
CV_EXPORTS void filter2D (const GpuMat &src, GpuMat &dst, int ddepth, const Mat &kernel, Point anchor=Point(-1,-1), Stream &stream=Stream::Null())
 applies non-separable 2D linear filter to the image
CV_EXPORTS void sepFilter2D (const GpuMat &src, GpuMat &dst, int ddepth, const Mat &kernelX, const Mat &kernelY, Point anchor=Point(-1,-1), int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, Stream &stream=Stream::Null())
 applies separable 2D linear filter to the image
CV_EXPORTS void Sobel (const GpuMat &src, GpuMat &dst, int ddepth, int dx, int dy, int ksize=3, double scale=1, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, Stream &stream=Stream::Null())
 applies generalized Sobel operator to the image
CV_EXPORTS void Scharr (const GpuMat &src, GpuMat &dst, int ddepth, int dx, int dy, double scale=1, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, Stream &stream=Stream::Null())
 applies the vertical or horizontal Scharr operator to the image
CV_EXPORTS void GaussianBlur (const GpuMat &src, GpuMat &dst, Size ksize, double sigma1, double sigma2=0, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, Stream &stream=Stream::Null())
 smooths the image using Gaussian filter.
CV_EXPORTS void Laplacian (const GpuMat &src, GpuMat &dst, int ddepth, int ksize=1, double scale=1, Stream &stream=Stream::Null())
CV_EXPORTS void graphcut (GpuMat &terminals, GpuMat &leftTransp, GpuMat &rightTransp, GpuMat &top, GpuMat &bottom, GpuMat &labels, GpuMat &buf, Stream &stream=Stream::Null())
 performs labeling via graph cuts
CV_EXPORTS void evenLevels (GpuMat &levels, int nLevels, int lowerLevel, int upperLevel)
 Compute levels with even distribution. levels will have 1 row and nLevels cols and CV_32SC1 type.
CV_EXPORTS void histEven (const GpuMat &src, GpuMat &hist, int histSize, int lowerLevel, int upperLevel, Stream &stream=Stream::Null())
CV_EXPORTS void histEven (const GpuMat &src, GpuMat hist[4], int histSize[4], int lowerLevel[4], int upperLevel[4], Stream &stream=Stream::Null())
CV_EXPORTS void histRange (const GpuMat &src, GpuMat &hist, const GpuMat &levels, Stream &stream=Stream::Null())
CV_EXPORTS void histRange (const GpuMat &src, GpuMat hist[4], const GpuMat levels[4], Stream &stream=Stream::Null())
GpuMat createContinuous (int rows, int cols, int type)
void createContinuous (Size size, int type, GpuMat &m)
GpuMat createContinuous (Size size, int type)
void ensureSizeIsEnough (Size size, int type, GpuMat &m)
GpuMat operator~ (const GpuMat &src)
GpuMat operator| (const GpuMat &src1, const GpuMat &src2)
GpuMat operator& (const GpuMat &src1, const GpuMat &src2)
GpuMat operator^ (const GpuMat &src1, const GpuMat &src2)

Variables

struct CV_EXPORTS ConvolveBuf
class CV_EXPORTS BruteForceMatcher_GPU

Typedef Documentation

typedef DevMem2D_<unsigned char> cv::gpu::DevMem2D
typedef DevMem2D_<float> cv::gpu::DevMem2Df
typedef PtrStep_<unsigned char> cv::gpu::PtrStep
typedef PtrStep_<float> cv::gpu::PtrStepf
typedef PtrElemStep_<unsigned char> cv::gpu::PtrElemStep

Enumeration Type Documentation

Enumerator:
FEATURE_SET_COMPUTE_10 
FEATURE_SET_COMPUTE_11 
FEATURE_SET_COMPUTE_12 
FEATURE_SET_COMPUTE_13 
FEATURE_SET_COMPUTE_20 
FEATURE_SET_COMPUTE_21 
GLOBAL_ATOMICS 
NATIVE_DOUBLE 

Function Documentation

This is the only function that do not throw exceptions if the library is compiled without Cuda.

CV_EXPORTS void cv::gpu::setDevice ( int  device)

Functions below throw cv::Expception if the library is compiled without Cuda.

CV_EXPORTS int cv::gpu::getDevice ( )
CV_EXPORTS void cv::gpu::resetDevice ( )

Explicitly destroys and cleans up all resources associated with the current device in the current process. Any subsequent API call to this device will reinitialize the device.

CV_EXPORTS void cv::gpu::error ( const char *  error_string,
const char *  file,
const int  line,
const char *  func 
)
CV_EXPORTS void cv::gpu::nppError ( int  err,
const char *  file,
const int  line,
const char *  func 
)
CV_EXPORTS void cv::gpu::createContinuous ( int  rows,
int  cols,
int  type,
GpuMat &  m 
)

Creates continuous GPU matrix.

CV_EXPORTS void cv::gpu::ensureSizeIsEnough ( int  rows,
int  cols,
int  type,
GpuMat &  m 
)

Ensures that size of the given matrix is not less than (rows, cols) size and matrix type is match specified one too

CV_EXPORTS void cv::gpu::transpose ( const GpuMat &  src1,
GpuMat &  dst,
Stream &  stream = Stream::Null() 
)

transposes the matrix supports matrix with element size = 1, 4 and 8 bytes (CV_8UC1, CV_8UC4, CV_16UC2, CV_32FC1, etc)

CV_EXPORTS void cv::gpu::flip ( const GpuMat &  a,
GpuMat &  b,
int  flipCode,
Stream &  stream = Stream::Null() 
)

reverses the order of the rows, columns or both in a matrix supports CV_8UC1, CV_8UC4 types

CV_EXPORTS void cv::gpu::LUT ( const GpuMat &  src,
const Mat &  lut,
GpuMat &  dst,
Stream &  stream = Stream::Null() 
)

transforms 8-bit unsigned integers using lookup table: dst(i)=lut(src(i)) destination array will have the depth type as lut and the same channels number as source supports CV_8UC1, CV_8UC3 types

CV_EXPORTS void cv::gpu::merge ( const GpuMat *  src,
size_t  n,
GpuMat &  dst,
Stream &  stream = Stream::Null() 
)

makes multi-channel array out of several single-channel arrays

CV_EXPORTS void cv::gpu::merge ( const vector< GpuMat > &  src,
GpuMat &  dst,
Stream &  stream = Stream::Null() 
)

makes multi-channel array out of several single-channel arrays

CV_EXPORTS void cv::gpu::split ( const GpuMat &  src,
GpuMat *  dst,
Stream &  stream = Stream::Null() 
)

copies each plane of a multi-channel array to a dedicated array

CV_EXPORTS void cv::gpu::split ( const GpuMat &  src,
vector< GpuMat > &  dst,
Stream &  stream = Stream::Null() 
)

copies each plane of a multi-channel array to a dedicated array

CV_EXPORTS void cv::gpu::magnitude ( const GpuMat &  x,
GpuMat &  magnitude,
Stream &  stream = Stream::Null() 
)

computes magnitude of complex (x(i).re, x(i).im) vector supports only CV_32FC2 type

CV_EXPORTS void cv::gpu::magnitudeSqr ( const GpuMat &  x,
GpuMat &  magnitude,
Stream &  stream = Stream::Null() 
)

computes squared magnitude of complex (x(i).re, x(i).im) vector supports only CV_32FC2 type

CV_EXPORTS void cv::gpu::magnitude ( const GpuMat &  x,
const GpuMat &  y,
GpuMat &  magnitude,
Stream &  stream = Stream::Null() 
)

computes magnitude of each (x(i), y(i)) vector supports only floating-point source

CV_EXPORTS void cv::gpu::magnitudeSqr ( const GpuMat &  x,
const GpuMat &  y,
GpuMat &  magnitude,
Stream &  stream = Stream::Null() 
)

computes squared magnitude of each (x(i), y(i)) vector supports only floating-point source

CV_EXPORTS void cv::gpu::phase ( const GpuMat &  x,
const GpuMat &  y,
GpuMat &  angle,
bool  angleInDegrees = false,
Stream &  stream = Stream::Null() 
)

computes angle (angle(i)) of each (x(i), y(i)) vector supports only floating-point source

CV_EXPORTS void cv::gpu::cartToPolar ( const GpuMat &  x,
const GpuMat &  y,
GpuMat &  magnitude,
GpuMat &  angle,
bool  angleInDegrees = false,
Stream &  stream = Stream::Null() 
)

converts Cartesian coordinates to polar supports only floating-point source

CV_EXPORTS void cv::gpu::polarToCart ( const GpuMat &  magnitude,
const GpuMat &  angle,
GpuMat &  x,
GpuMat &  y,
bool  angleInDegrees = false,
Stream &  stream = Stream::Null() 
)

converts polar coordinates to Cartesian supports only floating-point source

CV_EXPORTS void cv::gpu::add ( const GpuMat &  a,
const GpuMat &  b,
GpuMat &  c,
Stream &  stream = Stream::Null() 
)

adds one matrix to another (c = a + b) supports CV_8UC1, CV_8UC4, CV_32SC1, CV_32FC1 types

CV_EXPORTS void cv::gpu::add ( const GpuMat &  a,
const Scalar &  sc,
GpuMat &  c,
Stream &  stream = Stream::Null() 
)

adds scalar to a matrix (c = a + s) supports CV_32FC1 and CV_32FC2 type

CV_EXPORTS void cv::gpu::subtract ( const GpuMat &  a,
const GpuMat &  b,
GpuMat &  c,
Stream &  stream = Stream::Null() 
)

subtracts one matrix from another (c = a - b) supports CV_8UC1, CV_8UC4, CV_32SC1, CV_32FC1 types

CV_EXPORTS void cv::gpu::subtract ( const GpuMat &  a,
const Scalar &  sc,
GpuMat &  c,
Stream &  stream = Stream::Null() 
)

subtracts scalar from a matrix (c = a - s) supports CV_32FC1 and CV_32FC2 type

CV_EXPORTS void cv::gpu::multiply ( const GpuMat &  a,
const GpuMat &  b,
GpuMat &  c,
Stream &  stream = Stream::Null() 
)

computes element-wise product of the two arrays (c = a * b) supports CV_8UC1, CV_8UC4, CV_32SC1, CV_32FC1 types

CV_EXPORTS void cv::gpu::multiply ( const GpuMat &  a,
const Scalar &  sc,
GpuMat &  c,
Stream &  stream = Stream::Null() 
)

multiplies matrix to a scalar (c = a * s) supports CV_32FC1 and CV_32FC2 type

CV_EXPORTS void cv::gpu::divide ( const GpuMat &  a,
const GpuMat &  b,
GpuMat &  c,
Stream &  stream = Stream::Null() 
)

computes element-wise quotient of the two arrays (c = a / b) supports CV_8UC1, CV_8UC4, CV_32SC1, CV_32FC1 types

CV_EXPORTS void cv::gpu::divide ( const GpuMat &  a,
const Scalar &  sc,
GpuMat &  c,
Stream &  stream = Stream::Null() 
)

computes element-wise quotient of matrix and scalar (c = a / s) supports CV_32FC1 and CV_32FC2 type

CV_EXPORTS void cv::gpu::exp ( const GpuMat &  a,
GpuMat &  b,
Stream &  stream = Stream::Null() 
)

computes exponent of each matrix element (b = e**a) supports only CV_32FC1 type

CV_EXPORTS void cv::gpu::log ( const GpuMat &  a,
GpuMat &  b,
Stream &  stream = Stream::Null() 
)

computes natural logarithm of absolute value of each matrix element: b = log(abs(a)) supports only CV_32FC1 type

CV_EXPORTS void cv::gpu::absdiff ( const GpuMat &  a,
const GpuMat &  b,
GpuMat &  c,
Stream &  stream = Stream::Null() 
)

computes element-wise absolute difference of two arrays (c = abs(a - b)) supports CV_8UC1, CV_8UC4, CV_32SC1, CV_32FC1 types

CV_EXPORTS void cv::gpu::absdiff ( const GpuMat &  a,
const Scalar &  s,
GpuMat &  c,
Stream &  stream = Stream::Null() 
)

computes element-wise absolute difference of array and scalar (c = abs(a - s)) supports only CV_32FC1 type

CV_EXPORTS void cv::gpu::compare ( const GpuMat &  a,
const GpuMat &  b,
GpuMat &  c,
int  cmpop,
Stream &  stream = Stream::Null() 
)

compares elements of two arrays (c = a <cmpop> b) supports CV_8UC4, CV_32FC1 types

CV_EXPORTS void cv::gpu::bitwise_not ( const GpuMat &  src,
GpuMat &  dst,
const GpuMat &  mask = GpuMat(),
Stream &  stream = Stream::Null() 
)

performs per-elements bit-wise inversion

CV_EXPORTS void cv::gpu::bitwise_or ( const GpuMat &  src1,
const GpuMat &  src2,
GpuMat &  dst,
const GpuMat &  mask = GpuMat(),
Stream &  stream = Stream::Null() 
)

calculates per-element bit-wise disjunction of two arrays

CV_EXPORTS void cv::gpu::bitwise_and ( const GpuMat &  src1,
const GpuMat &  src2,
GpuMat &  dst,
const GpuMat &  mask = GpuMat(),
Stream &  stream = Stream::Null() 
)

calculates per-element bit-wise conjunction of two arrays

CV_EXPORTS void cv::gpu::bitwise_xor ( const GpuMat &  src1,
const GpuMat &  src2,
GpuMat &  dst,
const GpuMat &  mask = GpuMat(),
Stream &  stream = Stream::Null() 
)

calculates per-element bit-wise "exclusive or" operation

CV_EXPORTS void cv::gpu::min ( const GpuMat &  src1,
const GpuMat &  src2,
GpuMat &  dst,
Stream &  stream = Stream::Null() 
)

computes per-element minimum of two arrays (dst = min(src1, src2))

CV_EXPORTS void cv::gpu::min ( const GpuMat &  src1,
double  src2,
GpuMat &  dst,
Stream &  stream = Stream::Null() 
)

computes per-element minimum of array and scalar (dst = min(src1, src2))

CV_EXPORTS void cv::gpu::max ( const GpuMat &  src1,
const GpuMat &  src2,
GpuMat &  dst,
Stream &  stream = Stream::Null() 
)

computes per-element maximum of two arrays (dst = max(src1, src2))

CV_EXPORTS void cv::gpu::max ( const GpuMat &  src1,
double  src2,
GpuMat &  dst,
Stream &  stream = Stream::Null() 
)

computes per-element maximum of array and scalar (dst = max(src1, src2))

CV_EXPORTS void cv::gpu::remap ( const GpuMat &  src,
GpuMat &  dst,
const GpuMat &  xmap,
const GpuMat &  ymap 
)

DST[x,y] = SRC[xmap[x,y],ymap[x,y]] with bilinear interpolation. supports CV_8UC1, CV_8UC3 source types and CV_32FC1 map type

CV_EXPORTS void cv::gpu::meanShiftFiltering ( const GpuMat &  src,
GpuMat &  dst,
int  sp,
int  sr,
TermCriteria  criteria = TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 5, 1) 
)

Does mean shift filtering on GPU.

CV_EXPORTS void cv::gpu::meanShiftProc ( const GpuMat &  src,
GpuMat &  dstr,
GpuMat &  dstsp,
int  sp,
int  sr,
TermCriteria  criteria = TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 5, 1) 
)

Does mean shift procedure on GPU.

CV_EXPORTS void cv::gpu::meanShiftSegmentation ( const GpuMat &  src,
Mat &  dst,
int  sp,
int  sr,
int  minsize,
TermCriteria  criteria = TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 5, 1) 
)

Does mean shift segmentation with elimination of small regions.

CV_EXPORTS void cv::gpu::drawColorDisp ( const GpuMat &  src_disp,
GpuMat &  dst_disp,
int  ndisp,
Stream &  stream = Stream::Null() 
)

Does coloring of disparity image: [0..ndisp) -> [0..240, 1, 1] in HSV. Supported types of input disparity: CV_8U, CV_16S. Output disparity has CV_8UC4 type in BGRA format (alpha = 255).

CV_EXPORTS void cv::gpu::reprojectImageTo3D ( const GpuMat &  disp,
GpuMat &  xyzw,
const Mat &  Q,
Stream &  stream = Stream::Null() 
)

Reprojects disparity image to 3D space. Supports CV_8U and CV_16S types of input disparity. The output is a 4-channel floating-point (CV_32FC4) matrix. Each element of this matrix will contain the 3D coordinates of the point (x,y,z,1), computed from the disparity map. Q is the 4x4 perspective transformation matrix that can be obtained with cvStereoRectify.

CV_EXPORTS void cv::gpu::cvtColor ( const GpuMat &  src,
GpuMat &  dst,
int  code,
int  dcn = 0,
Stream &  stream = Stream::Null() 
)

converts image from one color space to another

CV_EXPORTS double cv::gpu::threshold ( const GpuMat &  src,
GpuMat &  dst,
double  thresh,
double  maxval,
int  type,
Stream &  stream = Stream::Null() 
)

applies fixed threshold to the image

CV_EXPORTS void cv::gpu::resize ( const GpuMat &  src,
GpuMat &  dst,
Size  dsize,
double  fx = 0,
double  fy = 0,
int  interpolation = INTER_LINEAR,
Stream &  stream = Stream::Null() 
)

resizes the image Supports INTER_NEAREST, INTER_LINEAR supports CV_8UC1, CV_8UC4 types

CV_EXPORTS void cv::gpu::warpAffine ( const GpuMat &  src,
GpuMat &  dst,
const Mat &  M,
Size  dsize,
int  flags = INTER_LINEAR,
Stream &  stream = Stream::Null() 
)

warps the image using affine transformation Supports INTER_NEAREST, INTER_LINEAR, INTER_CUBIC

CV_EXPORTS void cv::gpu::warpPerspective ( const GpuMat &  src,
GpuMat &  dst,
const Mat &  M,
Size  dsize,
int  flags = INTER_LINEAR,
Stream &  stream = Stream::Null() 
)

warps the image using perspective transformation Supports INTER_NEAREST, INTER_LINEAR, INTER_CUBIC

CV_EXPORTS void cv::gpu::rotate ( const GpuMat &  src,
GpuMat &  dst,
Size  dsize,
double  angle,
double  xShift = 0,
double  yShift = 0,
int  interpolation = INTER_LINEAR,
Stream &  stream = Stream::Null() 
)

rotate 8bit single or four channel image Supports INTER_NEAREST, INTER_LINEAR, INTER_CUBIC supports CV_8UC1, CV_8UC4 types

CV_EXPORTS void cv::gpu::copyMakeBorder ( const GpuMat &  src,
GpuMat &  dst,
int  top,
int  bottom,
int  left,
int  right,
const Scalar &  value = Scalar(),
Stream &  stream = Stream::Null() 
)

copies 2D array to a larger destination array and pads borders with user-specifiable constant supports CV_8UC1, CV_8UC4, CV_32SC1 and CV_32FC1 types

CV_EXPORTS void cv::gpu::integral ( const GpuMat &  src,
GpuMat &  sum,
Stream &  stream = Stream::Null() 
)

computes the integral image sum will have CV_32S type, but will contain unsigned int values supports only CV_8UC1 source type

CV_EXPORTS void cv::gpu::integralBuffered ( const GpuMat &  src,
GpuMat &  sum,
GpuMat &  buffer,
Stream &  stream = Stream::Null() 
)

buffered version

CV_EXPORTS void cv::gpu::integral ( const GpuMat &  src,
GpuMat &  sum,
GpuMat &  sqsum,
Stream &  stream = Stream::Null() 
)

computes the integral image and integral for the squared image sum will have CV_32S type, sqsum - CV32F type supports only CV_8UC1 source type

CV_EXPORTS void cv::gpu::sqrIntegral ( const GpuMat &  src,
GpuMat &  sqsum,
Stream &  stream = Stream::Null() 
)

computes squared integral image result matrix will have 64F type, but will contain 64U values supports source images of 8UC1 type only

CV_EXPORTS void cv::gpu::columnSum ( const GpuMat &  src,
GpuMat &  sum 
)

computes vertical sum, supports only CV_32FC1 images

CV_EXPORTS void cv::gpu::rectStdDev ( const GpuMat &  src,
const GpuMat &  sqr,
GpuMat &  dst,
const Rect &  rect,
Stream &  stream = Stream::Null() 
)

computes the standard deviation of integral images supports only CV_32SC1 source type and CV_32FC1 sqr type output will have CV_32FC1 type

CV_EXPORTS void cv::gpu::cornerHarris ( const GpuMat &  src,
GpuMat &  dst,
int  blockSize,
int  ksize,
double  k,
int  borderType = BORDER_REFLECT101 
)

computes Harris cornerness criteria at each image pixel

CV_EXPORTS void cv::gpu::cornerMinEigenVal ( const GpuMat &  src,
GpuMat &  dst,
int  blockSize,
int  ksize,
int  borderType = BORDER_REFLECT101 
)

computes minimum eigen value of 2x2 derivative covariation matrix at each pixel - the cornerness criteria

CV_EXPORTS void cv::gpu::mulSpectrums ( const GpuMat &  a,
const GpuMat &  b,
GpuMat &  c,
int  flags,
bool  conjB = false 
)

performs per-element multiplication of two full (not packed) Fourier spectrums supports 32FC2 matrixes only (interleaved format)

CV_EXPORTS void cv::gpu::mulAndScaleSpectrums ( const GpuMat &  a,
const GpuMat &  b,
GpuMat &  c,
int  flags,
float  scale,
bool  conjB = false 
)

performs per-element multiplication of two full (not packed) Fourier spectrums supports 32FC2 matrixes only (interleaved format)

CV_EXPORTS void cv::gpu::dft ( const GpuMat &  src,
GpuMat &  dst,
Size  dft_size,
int  flags = 0 
)

Performs a forward or inverse discrete Fourier transform (1D or 2D) of floating point matrix. Param dft_size is the size of DFT transform.

If the source matrix is not continous, then additional copy will be done, so to avoid copying ensure the source matrix is continous one. If you want to use preallocated output ensure it is continuous too, otherwise it will be reallocated.

Being implemented via CUFFT real-to-complex transform result contains only non-redundant values in CUFFT's format. Result as full complex matrix for such kind of transform cannot be retrieved.

For complex-to-real transform it is assumed that the source matrix is packed in CUFFT's format.

CV_EXPORTS void cv::gpu::convolve ( const GpuMat &  image,
const GpuMat &  templ,
GpuMat &  result,
bool  ccorr = false 
)

computes convolution (or cross-correlation) of two images using discrete Fourier transform supports source images of 32FC1 type only result matrix will have 32FC1 type

CV_EXPORTS void cv::gpu::convolve ( const GpuMat &  image,
const GpuMat &  templ,
GpuMat &  result,
bool  ccorr,
ConvolveBuf &  buf 
)

buffered version

CV_EXPORTS void cv::gpu::matchTemplate ( const GpuMat &  image,
const GpuMat &  templ,
GpuMat &  result,
int  method 
)

computes the proximity map for the raster template and the image where the template is searched for

CV_EXPORTS void cv::gpu::downsample ( const GpuMat &  src,
GpuMat &  dst,
int  k = 2 
)

downsamples image

CV_EXPORTS void cv::gpu::blendLinear ( const GpuMat &  img1,
const GpuMat &  img2,
const GpuMat &  weights1,
const GpuMat &  weights2,
GpuMat &  result,
Stream &  stream = Stream::Null() 
)

performs linear blending of two images to avoid accuracy errors sum of weigths shouldn't be very close to zero

CV_EXPORTS void cv::gpu::meanStdDev ( const GpuMat &  mtx,
Scalar &  mean,
Scalar &  stddev 
)

computes mean value and standard deviation of all or selected array elements supports only CV_8UC1 type

CV_EXPORTS double cv::gpu::norm ( const GpuMat &  src1,
int  normType = NORM_L2 
)

computes norm of array supports NORM_INF, NORM_L1, NORM_L2 supports all matrices except 64F

CV_EXPORTS double cv::gpu::norm ( const GpuMat &  src1,
int  normType,
GpuMat &  buf 
)

computes norm of array supports NORM_INF, NORM_L1, NORM_L2 supports all matrices except 64F

CV_EXPORTS double cv::gpu::norm ( const GpuMat &  src1,
const GpuMat &  src2,
int  normType = NORM_L2 
)

computes norm of the difference between two arrays supports NORM_INF, NORM_L1, NORM_L2 supports only CV_8UC1 type

CV_EXPORTS Scalar cv::gpu::sum ( const GpuMat &  src)

computes sum of array elements supports only single channel images

CV_EXPORTS Scalar cv::gpu::sum ( const GpuMat &  src,
GpuMat &  buf 
)

computes sum of array elements supports only single channel images

CV_EXPORTS Scalar cv::gpu::absSum ( const GpuMat &  src)

computes sum of array elements absolute values supports only single channel images

CV_EXPORTS Scalar cv::gpu::absSum ( const GpuMat &  src,
GpuMat &  buf 
)

computes sum of array elements absolute values supports only single channel images

CV_EXPORTS Scalar cv::gpu::sqrSum ( const GpuMat &  src)

computes squared sum of array elements supports only single channel images

CV_EXPORTS Scalar cv::gpu::sqrSum ( const GpuMat &  src,
GpuMat &  buf 
)

computes squared sum of array elements supports only single channel images

CV_EXPORTS void cv::gpu::minMax ( const GpuMat &  src,
double *  minVal,
double *  maxVal = 0,
const GpuMat &  mask = GpuMat() 
)

finds global minimum and maximum array elements and returns their values

CV_EXPORTS void cv::gpu::minMax ( const GpuMat &  src,
double *  minVal,
double *  maxVal,
const GpuMat &  mask,
GpuMat &  buf 
)

finds global minimum and maximum array elements and returns their values

CV_EXPORTS void cv::gpu::minMaxLoc ( const GpuMat &  src,
double *  minVal,
double *  maxVal = 0,
Point *  minLoc = 0,
Point *  maxLoc = 0,
const GpuMat &  mask = GpuMat() 
)

finds global minimum and maximum array elements and returns their values with locations

CV_EXPORTS void cv::gpu::minMaxLoc ( const GpuMat &  src,
double *  minVal,
double *  maxVal,
Point *  minLoc,
Point *  maxLoc,
const GpuMat &  mask,
GpuMat &  valbuf,
GpuMat &  locbuf 
)

finds global minimum and maximum array elements and returns their values with locations

CV_EXPORTS int cv::gpu::countNonZero ( const GpuMat &  src)

counts non-zero array elements

CV_EXPORTS int cv::gpu::countNonZero ( const GpuMat &  src,
GpuMat &  buf 
)

counts non-zero array elements

CV_EXPORTS void cv::gpu::transformPoints ( const GpuMat &  src,
const Mat &  rvec,
const Mat &  tvec,
GpuMat &  dst,
Stream &  stream = Stream::Null() 
)
CV_EXPORTS void cv::gpu::projectPoints ( const GpuMat &  src,
const Mat &  rvec,
const Mat &  tvec,
const Mat &  camera_mat,
const Mat &  dist_coef,
GpuMat &  dst,
Stream &  stream = Stream::Null() 
)
CV_EXPORTS void cv::gpu::solvePnPRansac ( const Mat &  object,
const Mat &  image,
const Mat &  camera_mat,
const Mat &  dist_coef,
Mat &  rvec,
Mat &  tvec,
bool  use_extrinsic_guess = false,
int  num_iters = 100,
float  max_dist = 8.0,
int  min_inlier_count = 100,
vector< int > *  inliers = NULL 
)
CV_EXPORTS Ptr<FilterEngine_GPU> cv::gpu::createFilter2D_GPU ( const Ptr< BaseFilter_GPU > &  filter2D,
int  srcType,
int  dstType 
)

returns the non-separable filter engine with the specified filter

CV_EXPORTS Ptr<FilterEngine_GPU> cv::gpu::createSeparableFilter_GPU ( const Ptr< BaseRowFilter_GPU > &  rowFilter,
const Ptr< BaseColumnFilter_GPU > &  columnFilter,
int  srcType,
int  bufType,
int  dstType 
)

returns the separable filter engine with the specified filters

CV_EXPORTS Ptr<BaseRowFilter_GPU> cv::gpu::getRowSumFilter_GPU ( int  srcType,
int  sumType,
int  ksize,
int  anchor = -1 
)

returns horizontal 1D box filter supports only CV_8UC1 source type and CV_32FC1 sum type

CV_EXPORTS Ptr<BaseColumnFilter_GPU> cv::gpu::getColumnSumFilter_GPU ( int  sumType,
int  dstType,
int  ksize,
int  anchor = -1 
)

returns vertical 1D box filter supports only CV_8UC1 sum type and CV_32FC1 dst type

CV_EXPORTS Ptr<BaseFilter_GPU> cv::gpu::getBoxFilter_GPU ( int  srcType,
int  dstType,
const Size &  ksize,
Point  anchor = Point(-1,-1) 
)

returns 2D box filter supports CV_8UC1 and CV_8UC4 source type, dst type must be the same as source type

CV_EXPORTS Ptr<FilterEngine_GPU> cv::gpu::createBoxFilter_GPU ( int  srcType,
int  dstType,
const Size &  ksize,
const Point &  anchor = Point(-1,-1) 
)

returns box filter engine

CV_EXPORTS Ptr<BaseFilter_GPU> cv::gpu::getMorphologyFilter_GPU ( int  op,
int  type,
const Mat &  kernel,
const Size &  ksize,
Point  anchor = Point(-1,-1) 
)

returns 2D morphological filter only MORPH_ERODE and MORPH_DILATE are supported supports CV_8UC1 and CV_8UC4 types kernel must have CV_8UC1 type, one rows and cols == ksize.width * ksize.height

CV_EXPORTS Ptr<FilterEngine_GPU> cv::gpu::createMorphologyFilter_GPU ( int  op,
int  type,
const Mat &  kernel,
const Point &  anchor = Point(-1,-1),
int  iterations = 1 
)

returns morphological filter engine. Only MORPH_ERODE and MORPH_DILATE are supported.

CV_EXPORTS Ptr<BaseFilter_GPU> cv::gpu::getLinearFilter_GPU ( int  srcType,
int  dstType,
const Mat &  kernel,
const Size &  ksize,
Point  anchor = Point(-1,-1) 
)

returns 2D filter with the specified kernel supports CV_8UC1 and CV_8UC4 types

CV_EXPORTS Ptr<FilterEngine_GPU> cv::gpu::createLinearFilter_GPU ( int  srcType,
int  dstType,
const Mat &  kernel,
const Point &  anchor = Point(-1,-1) 
)

returns the non-separable linear filter engine

CV_EXPORTS Ptr<BaseRowFilter_GPU> cv::gpu::getLinearRowFilter_GPU ( int  srcType,
int  bufType,
const Mat &  rowKernel,
int  anchor = -1,
int  borderType = BORDER_CONSTANT 
)

returns the primitive row filter with the specified kernel. supports only CV_8UC1, CV_8UC4, CV_16SC1, CV_16SC2, CV_32SC1, CV_32FC1 source type. there are two version of algorithm: NPP and OpenCV. NPP calls when srcType == CV_8UC1 or srcType == CV_8UC4 and bufType == srcType, otherwise calls OpenCV version. NPP supports only BORDER_CONSTANT border type. OpenCV version supports only CV_32F as buffer depth and BORDER_REFLECT101, BORDER_REPLICATE and BORDER_CONSTANT border types.

CV_EXPORTS Ptr<BaseColumnFilter_GPU> cv::gpu::getLinearColumnFilter_GPU ( int  bufType,
int  dstType,
const Mat &  columnKernel,
int  anchor = -1,
int  borderType = BORDER_CONSTANT 
)

returns the primitive column filter with the specified kernel. supports only CV_8UC1, CV_8UC4, CV_16SC1, CV_16SC2, CV_32SC1, CV_32FC1 dst type. there are two version of algorithm: NPP and OpenCV. NPP calls when dstType == CV_8UC1 or dstType == CV_8UC4 and bufType == dstType, otherwise calls OpenCV version. NPP supports only BORDER_CONSTANT border type. OpenCV version supports only CV_32F as buffer depth and BORDER_REFLECT101, BORDER_REPLICATE and BORDER_CONSTANT border types.

CV_EXPORTS Ptr<FilterEngine_GPU> cv::gpu::createSeparableLinearFilter_GPU ( int  srcType,
int  dstType,
const Mat &  rowKernel,
const Mat &  columnKernel,
const Point &  anchor = Point(-1,-1),
int  rowBorderType = BORDER_DEFAULT,
int  columnBorderType = -1 
)

returns the separable linear filter engine

CV_EXPORTS Ptr<FilterEngine_GPU> cv::gpu::createDerivFilter_GPU ( int  srcType,
int  dstType,
int  dx,
int  dy,
int  ksize,
int  rowBorderType = BORDER_DEFAULT,
int  columnBorderType = -1 
)

returns filter engine for the generalized Sobel operator

CV_EXPORTS Ptr<FilterEngine_GPU> cv::gpu::createGaussianFilter_GPU ( int  type,
Size  ksize,
double  sigma1,
double  sigma2 = 0,
int  rowBorderType = BORDER_DEFAULT,
int  columnBorderType = -1 
)

returns the Gaussian filter engine

CV_EXPORTS Ptr<BaseFilter_GPU> cv::gpu::getMaxFilter_GPU ( int  srcType,
int  dstType,
const Size &  ksize,
Point  anchor = Point(-1,-1) 
)

returns maximum filter

CV_EXPORTS Ptr<BaseFilter_GPU> cv::gpu::getMinFilter_GPU ( int  srcType,
int  dstType,
const Size &  ksize,
Point  anchor = Point(-1,-1) 
)

returns minimum filter

CV_EXPORTS void cv::gpu::boxFilter ( const GpuMat &  src,
GpuMat &  dst,
int  ddepth,
Size  ksize,
Point  anchor = Point(-1,-1),
Stream &  stream = Stream::Null() 
)

smooths the image using the normalized box filter supports CV_8UC1, CV_8UC4 types

CV_EXPORTS void cv::gpu::erode ( const GpuMat &  src,
GpuMat &  dst,
const Mat &  kernel,
Point  anchor = Point(-1,-1),
int  iterations = 1,
Stream &  stream = Stream::Null() 
)

erodes the image (applies the local minimum operator)

CV_EXPORTS void cv::gpu::dilate ( const GpuMat &  src,
GpuMat &  dst,
const Mat &  kernel,
Point  anchor = Point(-1,-1),
int  iterations = 1,
Stream &  stream = Stream::Null() 
)

dilates the image (applies the local maximum operator)

CV_EXPORTS void cv::gpu::morphologyEx ( const GpuMat &  src,
GpuMat &  dst,
int  op,
const Mat &  kernel,
Point  anchor = Point(-1,-1),
int  iterations = 1,
Stream &  stream = Stream::Null() 
)

applies an advanced morphological operation to the image

CV_EXPORTS void cv::gpu::filter2D ( const GpuMat &  src,
GpuMat &  dst,
int  ddepth,
const Mat &  kernel,
Point  anchor = Point(-1,-1),
Stream &  stream = Stream::Null() 
)

applies non-separable 2D linear filter to the image

CV_EXPORTS void cv::gpu::sepFilter2D ( const GpuMat &  src,
GpuMat &  dst,
int  ddepth,
const Mat &  kernelX,
const Mat &  kernelY,
Point  anchor = Point(-1,-1),
int  rowBorderType = BORDER_DEFAULT,
int  columnBorderType = -1,
Stream &  stream = Stream::Null() 
)

applies separable 2D linear filter to the image

CV_EXPORTS void cv::gpu::Sobel ( const GpuMat &  src,
GpuMat &  dst,
int  ddepth,
int  dx,
int  dy,
int  ksize = 3,
double  scale = 1,
int  rowBorderType = BORDER_DEFAULT,
int  columnBorderType = -1,
Stream &  stream = Stream::Null() 
)

applies generalized Sobel operator to the image

CV_EXPORTS void cv::gpu::Scharr ( const GpuMat &  src,
GpuMat &  dst,
int  ddepth,
int  dx,
int  dy,
double  scale = 1,
int  rowBorderType = BORDER_DEFAULT,
int  columnBorderType = -1,
Stream &  stream = Stream::Null() 
)

applies the vertical or horizontal Scharr operator to the image

CV_EXPORTS void cv::gpu::GaussianBlur ( const GpuMat &  src,
GpuMat &  dst,
Size  ksize,
double  sigma1,
double  sigma2 = 0,
int  rowBorderType = BORDER_DEFAULT,
int  columnBorderType = -1,
Stream &  stream = Stream::Null() 
)

smooths the image using Gaussian filter.

CV_EXPORTS void cv::gpu::Laplacian ( const GpuMat &  src,
GpuMat &  dst,
int  ddepth,
int  ksize = 1,
double  scale = 1,
Stream &  stream = Stream::Null() 
)

applies Laplacian operator to the image supports only ksize = 1 and ksize = 3

CV_EXPORTS void cv::gpu::graphcut ( GpuMat &  terminals,
GpuMat &  leftTransp,
GpuMat &  rightTransp,
GpuMat &  top,
GpuMat &  bottom,
GpuMat &  labels,
GpuMat &  buf,
Stream &  stream = Stream::Null() 
)

performs labeling via graph cuts

CV_EXPORTS void cv::gpu::evenLevels ( GpuMat &  levels,
int  nLevels,
int  lowerLevel,
int  upperLevel 
)

Compute levels with even distribution. levels will have 1 row and nLevels cols and CV_32SC1 type.

CV_EXPORTS void cv::gpu::histEven ( const GpuMat &  src,
GpuMat &  hist,
int  histSize,
int  lowerLevel,
int  upperLevel,
Stream &  stream = Stream::Null() 
)

Calculates histogram with evenly distributed bins for signle channel source. Supports CV_8UC1, CV_16UC1 and CV_16SC1 source types. Output hist will have one row and histSize cols and CV_32SC1 type.

CV_EXPORTS void cv::gpu::histEven ( const GpuMat &  src,
GpuMat  hist[4],
int  histSize[4],
int  lowerLevel[4],
int  upperLevel[4],
Stream &  stream = Stream::Null() 
)

Calculates histogram with evenly distributed bins for four-channel source. All channels of source are processed separately. Supports CV_8UC4, CV_16UC4 and CV_16SC4 source types. Output hist[i] will have one row and histSize[i] cols and CV_32SC1 type.

CV_EXPORTS void cv::gpu::histRange ( const GpuMat &  src,
GpuMat &  hist,
const GpuMat &  levels,
Stream &  stream = Stream::Null() 
)

Calculates histogram with bins determined by levels array. levels must have one row and CV_32SC1 type if source has integer type or CV_32FC1 otherwise. Supports CV_8UC1, CV_16UC1, CV_16SC1 and CV_32FC1 source types. Output hist will have one row and (levels.cols-1) cols and CV_32SC1 type.

CV_EXPORTS void cv::gpu::histRange ( const GpuMat &  src,
GpuMat  hist[4],
const GpuMat  levels[4],
Stream &  stream = Stream::Null() 
)

Calculates histogram with bins determined by levels array. All levels must have one row and CV_32SC1 type if source has integer type or CV_32FC1 otherwise. All channels of source are processed separately. Supports CV_8UC4, CV_16UC4, CV_16SC4 and CV_32FC4 source types. Output hist[i] will have one row and (levels[i].cols-1) cols and CV_32SC1 type.

GpuMat cv::gpu::createContinuous ( int  rows,
int  cols,
int  type 
)
void cv::gpu::createContinuous ( Size  size,
int  type,
GpuMat &  m 
)
GpuMat cv::gpu::createContinuous ( Size  size,
int  type 
)
void cv::gpu::ensureSizeIsEnough ( Size  size,
int  type,
GpuMat &  m 
)
GpuMat cv::gpu::operator~ ( const GpuMat &  src)
GpuMat cv::gpu::operator| ( const GpuMat &  src1,
const GpuMat &  src2 
)
GpuMat cv::gpu::operator& ( const GpuMat &  src1,
const GpuMat &  src2 
)
GpuMat cv::gpu::operator^ ( const GpuMat &  src1,
const GpuMat &  src2 
)

Variable Documentation

struct CV_EXPORTS cv::gpu::ConvolveBuf