namespace cv::cuda
Overview
namespace cuda { // enums enum AlphaCompTypes; enum DemosaicTypes; enum FeatureSet; // structs struct EventAccessor; struct FGDParams; struct StreamAccessor; // classes class BackgroundSubtractorFGD; class BackgroundSubtractorGMG; class BackgroundSubtractorMOG; class BackgroundSubtractorMOG2; class BroxOpticalFlow; class BufferPool; class CLAHE; class CannyEdgeDetector; class CascadeClassifier; class Convolution; class CornernessCriteria; class CornersDetector; class DFT; class DenseOpticalFlow; class DensePyrLKOpticalFlow; class DescriptorMatcher; class DeviceInfo; class DisparityBilateralFilter; class Event; class FarnebackOpticalFlow; class FastFeatureDetector; class FastOpticalFlowBM; class Feature2DAsync; class Filter; class GpuMat; class HOG; class HostMem; class HoughCirclesDetector; class HoughLinesDetector; class HoughSegmentDetector; class ImagePyramid; class LookUpTable; class ORB; class OpticalFlowDual_TVL1; class SparseOpticalFlow; class SparsePyrLKOpticalFlow; class StereoBM; class StereoBeliefPropagation; class StereoConstantSpaceBP; class Stream; class TargetArchs; class TemplateMatching; // global functions void abs( InputArray src, OutputArray dst, Stream& stream = Stream::Null() ); void absdiff( InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null() ); Scalar absSum( InputArray src, InputArray mask = noArray() ); void add( InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), int dtype = -1, Stream& stream = Stream::Null() ); void addWeighted( InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray dst, int dtype = -1, Stream& stream = Stream::Null() ); void alphaComp( InputArray img1, InputArray img2, OutputArray dst, int alpha_op, Stream& stream = Stream::Null() ); void bilateralFilter( InputArray src, OutputArray dst, int kernel_size, float sigma_color, float sigma_spatial, int borderMode = BORDER_DEFAULT, Stream& stream = Stream::Null() ); void bitwise_and( InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null() ); void bitwise_not( InputArray src, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null() ); void bitwise_or( InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null() ); void bitwise_xor( InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null() ); void blendLinear( InputArray img1, InputArray img2, InputArray weights1, InputArray weights2, OutputArray result, Stream& stream = Stream::Null() ); void buildWarpAffineMaps( InputArray M, bool inverse, Size dsize, OutputArray xmap, OutputArray ymap, Stream& stream = Stream::Null() ); void buildWarpPerspectiveMaps( InputArray M, bool inverse, Size dsize, OutputArray xmap, OutputArray ymap, Stream& stream = Stream::Null() ); void calcAbsSum( InputArray src, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null() ); void calcHist( InputArray src, OutputArray hist, Stream& stream = Stream::Null() ); void calcHist( InputArray src, InputArray mask, OutputArray hist, Stream& stream = Stream::Null() ); void calcNorm( InputArray src, OutputArray dst, int normType, InputArray mask = noArray(), Stream& stream = Stream::Null() ); void calcNormDiff( InputArray src1, InputArray src2, OutputArray dst, int normType = NORM_L2, Stream& stream = Stream::Null() ); void calcOpticalFlowBM( const GpuMat& prev, const GpuMat& curr, Size block_size, Size shift_size, Size max_range, bool use_previous, GpuMat& velx, GpuMat& vely, GpuMat& buf, Stream& stream = Stream::Null() ); void calcSqrSum( InputArray src, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null() ); void calcSum( InputArray src, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null() ); void cartToPolar( InputArray x, InputArray y, OutputArray magnitude, OutputArray angle, bool angleInDegrees = false, Stream& stream = Stream::Null() ); void compare( InputArray src1, InputArray src2, OutputArray dst, int cmpop, Stream& stream = Stream::Null() ); void connectivityMask( const GpuMat& image, GpuMat& mask, const cv::Scalar& lo, const cv::Scalar& hi, Stream& stream = Stream::Null() ); void convertFp16( InputArray _src, OutputArray _dst, Stream& stream = Stream::Null() ); void copyMakeBorder( InputArray src, OutputArray dst, int top, int bottom, int left, int right, int borderType, Scalar value = Scalar(), Stream& stream = Stream::Null() ); int countNonZero(InputArray src); void countNonZero( InputArray src, OutputArray dst, Stream& stream = Stream::Null() ); Ptr<cuda::BackgroundSubtractorFGD> createBackgroundSubtractorFGD(const FGDParams& params = FGDParams()); Ptr<cuda::BackgroundSubtractorGMG> createBackgroundSubtractorGMG( int initializationFrames = 120, double decisionThreshold = 0.8 ); Ptr<cuda::BackgroundSubtractorMOG> createBackgroundSubtractorMOG( int history = 200, int nmixtures = 5, double backgroundRatio = 0.7, double noiseSigma = 0 ); Ptr<cuda::BackgroundSubtractorMOG2> createBackgroundSubtractorMOG2( int history = 500, double varThreshold = 16, bool detectShadows = true ); Ptr<Filter> createBoxFilter( int srcType, int dstType, Size ksize, Point anchor = Point(-1,-1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0) ); Ptr<Filter> createBoxMaxFilter( int srcType, Size ksize, Point anchor = Point(-1, -1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0) ); Ptr<Filter> createBoxMinFilter( int srcType, Size ksize, Point anchor = Point(-1, -1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0) ); Ptr<CannyEdgeDetector> createCannyEdgeDetector( double low_thresh, double high_thresh, int apperture_size = 3, bool L2gradient = false ); Ptr<cuda::CLAHE> createCLAHE( double clipLimit = 40.0, Size tileGridSize = Size(8, 8) ); Ptr<Filter> createColumnSumFilter( int srcType, int dstType, int ksize, int anchor = -1, int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0) ); void createContinuous( int rows, int cols, int type, OutputArray arr ); Ptr<Convolution> createConvolution(Size user_block_size = Size()); Ptr<Filter> createDerivFilter( int srcType, int dstType, int dx, int dy, int ksize, bool normalize = false, double scale = 1, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1 ); Ptr<DFT> createDFT( Size dft_size, int flags ); Ptr<cuda::DisparityBilateralFilter> createDisparityBilateralFilter( int ndisp = 64, int radius = 3, int iters = 1 ); Ptr<Filter> createGaussianFilter( int srcType, int dstType, Size ksize, double sigma1, double sigma2 = 0, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1 ); Ptr<GeneralizedHoughBallard> createGeneralizedHoughBallard(); Ptr<GeneralizedHoughGuil> createGeneralizedHoughGuil(); Ptr<CornersDetector> createGoodFeaturesToTrackDetector( int srcType, int maxCorners = 1000, double qualityLevel = 0.01, double minDistance = 0.0, int blockSize = 3, bool useHarrisDetector = false, double harrisK = 0.04 ); Ptr<CornernessCriteria> createHarrisCorner( int srcType, int blockSize, int ksize, double k, int borderType = BORDER_REFLECT101 ); Ptr<HoughCirclesDetector> createHoughCirclesDetector( float dp, float minDist, int cannyThreshold, int votesThreshold, int minRadius, int maxRadius, int maxCircles = 4096 ); Ptr<HoughLinesDetector> createHoughLinesDetector( float rho, float theta, int threshold, bool doSort = false, int maxLines = 4096 ); Ptr<HoughSegmentDetector> createHoughSegmentDetector( float rho, float theta, int minLineLength, int maxLineGap, int maxLines = 4096 ); Ptr<ImagePyramid> createImagePyramid( InputArray img, int nLayers = -1, Stream& stream = Stream::Null() ); Ptr<Filter> createLaplacianFilter( int srcType, int dstType, int ksize = 1, double scale = 1, int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0) ); Ptr<Filter> createLinearFilter( int srcType, int dstType, InputArray kernel, Point anchor = Point(-1,-1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0) ); Ptr<LookUpTable> createLookUpTable(InputArray lut); Ptr<Filter> createMedianFilter( int srcType, int windowSize, int partition = 128 ); Ptr<CornernessCriteria> createMinEigenValCorner( int srcType, int blockSize, int ksize, int borderType = BORDER_REFLECT101 ); Ptr<Filter> createMorphologyFilter( int op, int srcType, InputArray kernel, Point anchor = Point(-1, -1), int iterations = 1 ); void createOpticalFlowNeedleMap( const GpuMat& u, const GpuMat& v, GpuMat& vertex, GpuMat& colors ); Ptr<Filter> createRowSumFilter( int srcType, int dstType, int ksize, int anchor = -1, int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0) ); Ptr<Filter> createScharrFilter( int srcType, int dstType, int dx, int dy, double scale = 1, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1 ); Ptr<Filter> createSeparableLinearFilter( int srcType, int dstType, InputArray rowKernel, InputArray columnKernel, Point anchor = Point(-1,-1), int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1 ); Ptr<Filter> createSobelFilter( int srcType, int dstType, int dx, int dy, int ksize = 3, double scale = 1, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1 ); Ptr<cuda::StereoBeliefPropagation> createStereoBeliefPropagation( int ndisp = 64, int iters = 5, int levels = 5, int msg_type = CV_32F ); Ptr<cuda::StereoBM> createStereoBM( int numDisparities = 64, int blockSize = 19 ); Ptr<cuda::StereoConstantSpaceBP> createStereoConstantSpaceBP( int ndisp = 128, int iters = 8, int levels = 4, int nr_plane = 4, int msg_type = CV_32F ); Ptr<TemplateMatching> createTemplateMatching( int srcType, int method, Size user_block_size = Size() ); void cvtColor( InputArray src, OutputArray dst, int code, int dcn = 0, Stream& stream = Stream::Null() ); void demosaicing( InputArray src, OutputArray dst, int code, int dcn = -1, Stream& stream = Stream::Null() ); bool deviceSupports(FeatureSet feature_set); void dft( InputArray src, OutputArray dst, Size dft_size, int flags = 0, Stream& stream = Stream::Null() ); void divide( InputArray src1, InputArray src2, OutputArray dst, double scale = 1, int dtype = -1, Stream& stream = Stream::Null() ); void drawColorDisp( InputArray src_disp, OutputArray dst_disp, int ndisp, Stream& stream = Stream::Null() ); void ensureSizeIsEnough( int rows, int cols, int type, OutputArray arr ); void equalizeHist( InputArray src, OutputArray dst, Stream& stream = Stream::Null() ); void evenLevels( OutputArray levels, int nLevels, int lowerLevel, int upperLevel, Stream& stream = Stream::Null() ); void exp( InputArray src, OutputArray dst, Stream& stream = Stream::Null() ); void fastNlMeansDenoising( InputArray src, OutputArray dst, float h, int search_window = 21, int block_size = 7, Stream& stream = Stream::Null() ); void fastNlMeansDenoisingColored( InputArray src, OutputArray dst, float h_luminance, float photo_render, int search_window = 21, int block_size = 7, Stream& stream = Stream::Null() ); void findMinMax( InputArray src, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null() ); void findMinMaxLoc( InputArray src, OutputArray minMaxVals, OutputArray loc, InputArray mask = noArray(), Stream& stream = Stream::Null() ); void flip( InputArray src, OutputArray dst, int flipCode, Stream& stream = Stream::Null() ); void gammaCorrection( InputArray src, OutputArray dst, bool forward = true, Stream& stream = Stream::Null() ); void gemm( InputArray src1, InputArray src2, double alpha, InputArray src3, double beta, OutputArray dst, int flags = 0, Stream& stream = Stream::Null() ); int getCudaEnabledDeviceCount(); int getDevice(); void graphcut( GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTransp, GpuMat& top, GpuMat& bottom, GpuMat& labels, GpuMat& buf, Stream& stream = Stream::Null() ); void graphcut( GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTransp, GpuMat& top, GpuMat& topLeft, GpuMat& topRight, GpuMat& bottom, GpuMat& bottomLeft, GpuMat& bottomRight, GpuMat& labels, GpuMat& buf, Stream& stream = Stream::Null() ); void histEven( InputArray src, OutputArray hist, int histSize, int lowerLevel, int upperLevel, Stream& stream = Stream::Null() ); void histEven( InputArray src, GpuMat hist [4], int histSize [4], int lowerLevel [4], int upperLevel [4], Stream& stream = Stream::Null() ); void histRange( InputArray src, OutputArray hist, InputArray levels, Stream& stream = Stream::Null() ); void histRange( InputArray src, GpuMat hist [4], const GpuMat levels [4], Stream& stream = Stream::Null() ); void integral( InputArray src, OutputArray sum, Stream& stream = Stream::Null() ); void interpolateFrames( const GpuMat& frame0, const GpuMat& frame1, const GpuMat& fu, const GpuMat& fv, const GpuMat& bu, const GpuMat& bv, float pos, GpuMat& newFrame, GpuMat& buf, Stream& stream = Stream::Null() ); void labelComponents( const GpuMat& mask, GpuMat& components, int flags = 0, Stream& stream = Stream::Null() ); void log( InputArray src, OutputArray dst, Stream& stream = Stream::Null() ); void lshift( InputArray src, Scalar_<int> val, OutputArray dst, Stream& stream = Stream::Null() ); void magnitude( InputArray xy, OutputArray magnitude, Stream& stream = Stream::Null() ); void magnitude( InputArray x, InputArray y, OutputArray magnitude, Stream& stream = Stream::Null() ); void magnitudeSqr( InputArray xy, OutputArray magnitude, Stream& stream = Stream::Null() ); void magnitudeSqr( InputArray x, InputArray y, OutputArray magnitude, Stream& stream = Stream::Null() ); void max( InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null() ); void meanShiftFiltering( InputArray src, OutputArray dst, int sp, int sr, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 5, 1), Stream& stream = Stream::Null() ); void meanShiftProc( InputArray src, OutputArray dstr, OutputArray dstsp, int sp, int sr, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 5, 1), Stream& stream = Stream::Null() ); void meanShiftSegmentation( InputArray src, OutputArray dst, int sp, int sr, int minsize, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 5, 1), Stream& stream = Stream::Null() ); void meanStdDev( InputArray mtx, Scalar& mean, Scalar& stddev ); void meanStdDev( InputArray mtx, OutputArray dst, Stream& stream = Stream::Null() ); void merge( const GpuMat* src, size_t n, OutputArray dst, Stream& stream = Stream::Null() ); void merge( const std::vector<GpuMat>& src, OutputArray dst, Stream& stream = Stream::Null() ); void min( InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null() ); void minMax( InputArray src, double* minVal, double* maxVal, InputArray mask = noArray() ); void minMaxLoc( InputArray src, double* minVal, double* maxVal, Point* minLoc, Point* maxLoc, InputArray mask = noArray() ); void mulAndScaleSpectrums( InputArray src1, InputArray src2, OutputArray dst, int flags, float scale, bool conjB = false, Stream& stream = Stream::Null() ); void mulSpectrums( InputArray src1, InputArray src2, OutputArray dst, int flags, bool conjB = false, Stream& stream = Stream::Null() ); void multiply( InputArray src1, InputArray src2, OutputArray dst, double scale = 1, int dtype = -1, Stream& stream = Stream::Null() ); void nonLocalMeans( InputArray src, OutputArray dst, float h, int search_window = 21, int block_size = 7, int borderMode = BORDER_DEFAULT, Stream& stream = Stream::Null() ); double norm( InputArray src1, int normType, InputArray mask = noArray() ); double norm( InputArray src1, InputArray src2, int normType = NORM_L2 ); void normalize( InputArray src, OutputArray dst, double alpha, double beta, int norm_type, int dtype, InputArray mask = noArray(), Stream& stream = Stream::Null() ); void phase( InputArray x, InputArray y, OutputArray angle, bool angleInDegrees = false, Stream& stream = Stream::Null() ); void polarToCart( InputArray magnitude, InputArray angle, OutputArray x, OutputArray y, bool angleInDegrees = false, Stream& stream = Stream::Null() ); void pow( InputArray src, double power, OutputArray dst, Stream& stream = Stream::Null() ); void printCudaDeviceInfo(int device); void printShortCudaDeviceInfo(int device); 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() ); void pyrDown( InputArray src, OutputArray dst, Stream& stream = Stream::Null() ); void pyrUp( InputArray src, OutputArray dst, Stream& stream = Stream::Null() ); void rectStdDev( InputArray src, InputArray sqr, OutputArray dst, Rect rect, Stream& stream = Stream::Null() ); void reduce( InputArray mtx, OutputArray vec, int dim, int reduceOp, int dtype = -1, Stream& stream = Stream::Null() ); void registerPageLocked(Mat& m); void remap( InputArray src, OutputArray dst, InputArray xmap, InputArray ymap, int interpolation, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(), Stream& stream = Stream::Null() ); void reprojectImageTo3D( InputArray disp, OutputArray xyzw, InputArray Q, int dst_cn = 4, Stream& stream = Stream::Null() ); void resetDevice(); void resize( InputArray src, OutputArray dst, Size dsize, double fx = 0, double fy = 0, int interpolation = INTER_LINEAR, Stream& stream = Stream::Null() ); void rotate( InputArray src, OutputArray dst, Size dsize, double angle, double xShift = 0, double yShift = 0, int interpolation = INTER_LINEAR, Stream& stream = Stream::Null() ); void rshift( InputArray src, Scalar_<int> val, OutputArray dst, Stream& stream = Stream::Null() ); static void scaleAdd( InputArray src1, double alpha, InputArray src2, OutputArray dst, Stream& stream = Stream::Null() ); void setBufferPoolConfig( int deviceId, size_t stackSize, int stackCount ); void setBufferPoolUsage(bool on); void setDevice(int device); void setGlDevice(int device = 0); 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, std::vector<int>* inliers = NULL ); void split( InputArray src, GpuMat* dst, Stream& stream = Stream::Null() ); void split( InputArray src, std::vector<GpuMat>& dst, Stream& stream = Stream::Null() ); void sqr( InputArray src, OutputArray dst, Stream& stream = Stream::Null() ); void sqrIntegral( InputArray src, OutputArray sqsum, Stream& stream = Stream::Null() ); Scalar sqrSum( InputArray src, InputArray mask = noArray() ); void sqrt( InputArray src, OutputArray dst, Stream& stream = Stream::Null() ); void subtract( InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), int dtype = -1, Stream& stream = Stream::Null() ); Scalar sum( InputArray src, InputArray mask = noArray() ); void swapChannels( InputOutputArray image, const int dstOrder [4], Stream& stream = Stream::Null() ); double threshold( InputArray src, OutputArray dst, double thresh, double maxval, int type, Stream& stream = Stream::Null() ); void transformPoints( const GpuMat& src, const Mat& rvec, const Mat& tvec, GpuMat& dst, Stream& stream = Stream::Null() ); void transpose( InputArray src1, OutputArray dst, Stream& stream = Stream::Null() ); void unregisterPageLocked(Mat& m); void warpAffine( InputArray src, OutputArray dst, InputArray M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(), Stream& stream = Stream::Null() ); void warpPerspective( InputArray src, OutputArray dst, InputArray M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(), Stream& stream = Stream::Null() ); } // namespace cuda
Detailed Documentation
Global Functions
Ptr<Filter> createMedianFilter( int srcType, int windowSize, int partition = 128 )
Performs median filtering for each point of the source image.
Outputs an image that has been filtered using median-filtering formulation.
Parameters:
srcType | type of of source image. Only CV_8UC1 images are supported for now. |
windowSize | Size of the kernerl used for the filtering. Uses a (windowSize x windowSize) filter. |
partition | Specifies the parallel granularity of the workload. This parameter should be used GPU experts when optimizing performance. |