OpenCV  3.0.0-dev
Open Source Computer Vision
Classes | Functions

Classes

class  cv::cuda::Filter
 Common interface for all CUDA filters : More...
 

Functions

Ptr< Filter > cv::cuda::createBoxFilter (int srcType, int dstType, Size ksize, Point anchor=Point(-1,-1), int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0))
 Creates a normalized 2D box filter. More...
 
Ptr< Filter > cv::cuda::createBoxMaxFilter (int srcType, Size ksize, Point anchor=Point(-1,-1), int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0))
 Creates the maximum filter. More...
 
Ptr< Filter > cv::cuda::createBoxMinFilter (int srcType, Size ksize, Point anchor=Point(-1,-1), int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0))
 Creates the minimum filter. More...
 
Ptr< Filter > cv::cuda::createColumnSumFilter (int srcType, int dstType, int ksize, int anchor=-1, int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0))
 Creates a vertical 1D box filter. More...
 
Ptr< Filter > cv::cuda::createDerivFilter (int srcType, int dstType, int dx, int dy, int ksize, bool normalize=false, double scale=1, int rowBorderMode=BORDER_DEFAULT, int columnBorderMode=-1)
 Creates a generalized Deriv operator. More...
 
Ptr< Filter > cv::cuda::createGaussianFilter (int srcType, int dstType, Size ksize, double sigma1, double sigma2=0, int rowBorderMode=BORDER_DEFAULT, int columnBorderMode=-1)
 Creates a Gaussian filter. More...
 
Ptr< Filter > cv::cuda::createLaplacianFilter (int srcType, int dstType, int ksize=1, double scale=1, int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0))
 Creates a Laplacian operator. More...
 
Ptr< Filter > cv::cuda::createLinearFilter (int srcType, int dstType, InputArray kernel, Point anchor=Point(-1,-1), int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0))
 Creates a non-separable linear 2D filter. More...
 
Ptr< Filter > cv::cuda::createMorphologyFilter (int op, int srcType, InputArray kernel, Point anchor=Point(-1,-1), int iterations=1)
 Creates a 2D morphological filter. More...
 
Ptr< Filter > cv::cuda::createRowSumFilter (int srcType, int dstType, int ksize, int anchor=-1, int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0))
 Creates a horizontal 1D box filter. More...
 
Ptr< Filter > cv::cuda::createScharrFilter (int srcType, int dstType, int dx, int dy, double scale=1, int rowBorderMode=BORDER_DEFAULT, int columnBorderMode=-1)
 Creates a vertical or horizontal Scharr operator. More...
 
Ptr< Filter > cv::cuda::createSeparableLinearFilter (int srcType, int dstType, InputArray rowKernel, InputArray columnKernel, Point anchor=Point(-1,-1), int rowBorderMode=BORDER_DEFAULT, int columnBorderMode=-1)
 Creates a separable linear filter. More...
 
Ptr< Filter > cv::cuda::createSobelFilter (int srcType, int dstType, int dx, int dy, int ksize=3, double scale=1, int rowBorderMode=BORDER_DEFAULT, int columnBorderMode=-1)
 Creates a Sobel operator. More...
 

Detailed Description

Functions and classes described in this section are used to perform various linear or non-linear filtering operations on 2D images.

Note
  • An example containing all basic morphology operators like erode and dilate can be found at opencv_source_code/samples/gpu/morphology.cpp

Function Documentation

Ptr<Filter> cv::cuda::createBoxFilter ( int  srcType,
int  dstType,
Size  ksize,
Point  anchor = Point(-1,-1),
int  borderMode = BORDER_DEFAULT,
Scalar  borderVal = Scalar::all(0) 
)

Creates a normalized 2D box filter.

Parameters
srcTypeInput image type. Only CV_8UC1 and CV_8UC4 are supported for now.
dstTypeOutput image type. Only the same type as src is supported for now.
ksizeKernel size.
anchorAnchor point. The default value Point(-1, -1) means that the anchor is at the kernel center.
borderModePixel extrapolation method. For details, see borderInterpolate .
borderValDefault border value.
See also
boxFilter
Ptr<Filter> cv::cuda::createBoxMaxFilter ( int  srcType,
Size  ksize,
Point  anchor = Point(-1,-1),
int  borderMode = BORDER_DEFAULT,
Scalar  borderVal = Scalar::all(0) 
)

Creates the maximum filter.

Parameters
srcTypeInput/output image type. Only CV_8UC1 and CV_8UC4 are supported.
ksizeKernel size.
anchorAnchor point. The default value (-1) means that the anchor is at the kernel center.
borderModePixel extrapolation method. For details, see borderInterpolate .
borderValDefault border value.
Ptr<Filter> cv::cuda::createBoxMinFilter ( int  srcType,
Size  ksize,
Point  anchor = Point(-1,-1),
int  borderMode = BORDER_DEFAULT,
Scalar  borderVal = Scalar::all(0) 
)

Creates the minimum filter.

Parameters
srcTypeInput/output image type. Only CV_8UC1 and CV_8UC4 are supported.
ksizeKernel size.
anchorAnchor point. The default value (-1) means that the anchor is at the kernel center.
borderModePixel extrapolation method. For details, see borderInterpolate .
borderValDefault border value.
Ptr<Filter> cv::cuda::createColumnSumFilter ( int  srcType,
int  dstType,
int  ksize,
int  anchor = -1,
int  borderMode = BORDER_DEFAULT,
Scalar  borderVal = Scalar::all(0) 
)

Creates a vertical 1D box filter.

Parameters
srcTypeInput image type. Only CV_8UC1 type is supported for now.
dstTypeOutput image type. Only CV_32FC1 type is supported for now.
ksizeKernel size.
anchorAnchor point. The default value (-1) means that the anchor is at the kernel center.
borderModePixel extrapolation method. For details, see borderInterpolate .
borderValDefault border value.
Ptr<Filter> cv::cuda::createDerivFilter ( int  srcType,
int  dstType,
int  dx,
int  dy,
int  ksize,
bool  normalize = false,
double  scale = 1,
int  rowBorderMode = BORDER_DEFAULT,
int  columnBorderMode = -1 
)

Creates a generalized Deriv operator.

Parameters
srcTypeSource image type.
dstTypeDestination array type.
dxDerivative order in respect of x.
dyDerivative order in respect of y.
ksizeAperture size. See getDerivKernels for details.
normalizeFlag indicating whether to normalize (scale down) the filter coefficients or not. See getDerivKernels for details.
scaleOptional scale factor for the computed derivative values. By default, no scaling is applied. For details, see getDerivKernels .
rowBorderModePixel extrapolation method in the vertical direction. For details, see borderInterpolate.
columnBorderModePixel extrapolation method in the horizontal direction.
Ptr<Filter> cv::cuda::createGaussianFilter ( int  srcType,
int  dstType,
Size  ksize,
double  sigma1,
double  sigma2 = 0,
int  rowBorderMode = BORDER_DEFAULT,
int  columnBorderMode = -1 
)

Creates a Gaussian filter.

Parameters
srcTypeSource image type.
dstTypeDestination array type.
ksizeAperture size. See getGaussianKernel for details.
sigma1Gaussian sigma in the horizontal direction. See getGaussianKernel for details.
sigma2Gaussian sigma in the vertical direction. If 0, then \(\texttt{sigma2}\leftarrow\texttt{sigma1}\) .
rowBorderModePixel extrapolation method in the vertical direction. For details, see borderInterpolate.
columnBorderModePixel extrapolation method in the horizontal direction.
See also
GaussianBlur
Ptr<Filter> cv::cuda::createLaplacianFilter ( int  srcType,
int  dstType,
int  ksize = 1,
double  scale = 1,
int  borderMode = BORDER_DEFAULT,
Scalar  borderVal = Scalar::all(0) 
)

Creates a Laplacian operator.

Parameters
srcTypeInput image type. Supports CV_8U , CV_16U and CV_32F one and four channel image.
dstTypeOutput image type. Only the same type as src is supported for now.
ksizeAperture size used to compute the second-derivative filters (see getDerivKernels). It must be positive and odd. Only ksize = 1 and ksize = 3 are supported.
scaleOptional scale factor for the computed Laplacian values. By default, no scaling is applied (see getDerivKernels ).
borderModePixel extrapolation method. For details, see borderInterpolate .
borderValDefault border value.
See also
Laplacian
Ptr<Filter> cv::cuda::createLinearFilter ( int  srcType,
int  dstType,
InputArray  kernel,
Point  anchor = Point(-1,-1),
int  borderMode = BORDER_DEFAULT,
Scalar  borderVal = Scalar::all(0) 
)

Creates a non-separable linear 2D filter.

Parameters
srcTypeInput image type. Supports CV_8U , CV_16U and CV_32F one and four channel image.
dstTypeOutput image type. Only the same type as src is supported for now.
kernel2D array of filter coefficients.
anchorAnchor point. The default value Point(-1, -1) means that the anchor is at the kernel center.
borderModePixel extrapolation method. For details, see borderInterpolate .
borderValDefault border value.
See also
filter2D
Ptr<Filter> cv::cuda::createMorphologyFilter ( int  op,
int  srcType,
InputArray  kernel,
Point  anchor = Point(-1,-1),
int  iterations = 1 
)

Creates a 2D morphological filter.

Parameters
opType of morphological operation. The following types are possible:
  • MORPH_ERODE erode
  • MORPH_DILATE dilate
  • MORPH_OPEN opening
  • MORPH_CLOSE closing
  • MORPH_GRADIENT morphological gradient
  • MORPH_TOPHAT "top hat"
  • MORPH_BLACKHAT "black hat"
srcTypeInput/output image type. Only CV_8UC1 and CV_8UC4 are supported.
kernel2D 8-bit structuring element for the morphological operation.
anchorAnchor position within the structuring element. Negative values mean that the anchor is at the center.
iterationsNumber of times erosion and dilation to be applied.
See also
morphologyEx
Ptr<Filter> cv::cuda::createRowSumFilter ( int  srcType,
int  dstType,
int  ksize,
int  anchor = -1,
int  borderMode = BORDER_DEFAULT,
Scalar  borderVal = Scalar::all(0) 
)

Creates a horizontal 1D box filter.

Parameters
srcTypeInput image type. Only CV_8UC1 type is supported for now.
dstTypeOutput image type. Only CV_32FC1 type is supported for now.
ksizeKernel size.
anchorAnchor point. The default value (-1) means that the anchor is at the kernel center.
borderModePixel extrapolation method. For details, see borderInterpolate .
borderValDefault border value.
Ptr<Filter> cv::cuda::createScharrFilter ( int  srcType,
int  dstType,
int  dx,
int  dy,
double  scale = 1,
int  rowBorderMode = BORDER_DEFAULT,
int  columnBorderMode = -1 
)

Creates a vertical or horizontal Scharr operator.

Parameters
srcTypeSource image type.
dstTypeDestination array type.
dxOrder of the derivative x.
dyOrder of the derivative y.
scaleOptional scale factor for the computed derivative values. By default, no scaling is applied. See getDerivKernels for details.
rowBorderModePixel extrapolation method in the vertical direction. For details, see borderInterpolate.
columnBorderModePixel extrapolation method in the horizontal direction.
See also
Scharr
Ptr<Filter> cv::cuda::createSeparableLinearFilter ( int  srcType,
int  dstType,
InputArray  rowKernel,
InputArray  columnKernel,
Point  anchor = Point(-1,-1),
int  rowBorderMode = BORDER_DEFAULT,
int  columnBorderMode = -1 
)

Creates a separable linear filter.

Parameters
srcTypeSource array type.
dstTypeDestination array type.
rowKernelHorizontal filter coefficients. Support kernels with size <= 32 .
columnKernelVertical filter coefficients. Support kernels with size <= 32 .
anchorAnchor position within the kernel. Negative values mean that anchor is positioned at the aperture center.
rowBorderModePixel extrapolation method in the vertical direction For details, see borderInterpolate.
columnBorderModePixel extrapolation method in the horizontal direction.
See also
sepFilter2D
Ptr<Filter> cv::cuda::createSobelFilter ( int  srcType,
int  dstType,
int  dx,
int  dy,
int  ksize = 3,
double  scale = 1,
int  rowBorderMode = BORDER_DEFAULT,
int  columnBorderMode = -1 
)

Creates a Sobel operator.

Parameters
srcTypeSource image type.
dstTypeDestination array type.
dxDerivative order in respect of x.
dyDerivative order in respect of y.
ksizeSize of the extended Sobel kernel. Possible values are 1, 3, 5 or 7.
scaleOptional scale factor for the computed derivative values. By default, no scaling is applied. For details, see getDerivKernels .
rowBorderModePixel extrapolation method in the vertical direction. For details, see borderInterpolate.
columnBorderModePixel extrapolation method in the horizontal direction.
See also
Sobel