/// <summary> /// Create a Gaussian filter. /// </summary> /// <param name="ksize">The size of the kernel</param> /// <param name="sigma1">This parameter may specify Gaussian sigma (standard deviation). If it is zero, it is calculated from the kernel size.</param> /// <param name="sigma2">In case of non-square Gaussian kernel the parameter may be used to specify a different (from param3) sigma in the vertical direction. Use 0 for default</param> /// <param name="rowBorderType">The row border type.</param> /// <param name="columnBorderType">The column border type.</param> public GpuGaussianFilter(Size ksize, double sigma1, double sigma2, CvEnum.BORDER_TYPE rowBorderType, CvEnum.BORDER_TYPE columnBorderType) { _ptr = GpuInvoke.gpuCreateGaussianFilter(_matType, _matType, ref ksize, sigma1, sigma2, (int)rowBorderType, (int)columnBorderType); }
/// <summary> /// Create a Laplacian filter. /// </summary> /// <param name="ksize">Either 1 or 3</param> /// <param name="scale">Optional scale. Use 1.0 for default</param> /// <param name="borderType">The border type.</param> /// <param name="borderValue">The border value.</param> public GpuLaplacianFilter(int ksize, double scale, CvEnum.BORDER_TYPE borderType, MCvScalar borderValue) { _ptr = GpuInvoke.gpuCreateLaplacianFilter(_matType, _matType, ksize, scale, (int)borderType, ref borderValue); }
/// <summary> /// Create a Gpu LinearFilter /// </summary> /// <param name="kernel">Convolution kernel, single-channel floating point matrix (e.g. Emgu.CV.Matrix). If you want to apply different kernels to different channels, split the gpu image into separate color planes and process them individually</param> /// <param name="anchor">The anchor of the kernel that indicates the relative position of a filtered point within the kernel. The anchor shoud lie within the kernel. The special default value (-1,-1) means that it is at the kernel center</param> /// <param name="borderType">Border type. Use REFLECT101 as default.</param> /// <param name="borderValue">The border value</param> public GpuLinearFilter(Matrix <float> kernel, System.Drawing.Point anchor, CvEnum.BORDER_TYPE borderType, MCvScalar borderValue) { _ptr = GpuInvoke.gpuCreateLinearFilter(_matType, _matType, kernel, ref anchor, borderType, ref borderValue); }
internal static extern IntPtr gpuCreateLinearFilter(int srcType, int dstType, IntPtr kernel, ref Point anchor, CvEnum.BORDER_TYPE borderMode, ref MCvScalar borderValue);
/// <summary> /// Create a BoxMin filter. /// </summary> /// <param name="ksize">Size of the kernel</param> /// <param name="anchor">The center of the kernel. User (-1, -1) for the default kernel center.</param> /// <param name="borderType">The border type.</param> /// <param name="borderValue">The border value.</param> public GpuBoxMinFilter(Size ksize, Point anchor, CvEnum.BORDER_TYPE borderType, MCvScalar borderValue) { _ptr = GpuInvoke.gpuCreateBoxMinFilter(_matType, ref ksize, ref anchor, (int)borderType, ref borderValue); }
/// <summary> /// Create a Sobel filter. /// </summary> /// <param name="dx">Order of the derivative x</param> /// <param name="dy">Order of the derivative y</param> /// <param name="ksize">Size of the extended Sobel kernel</param> /// <param name="scale">Optional scale, use 1 for default.</param> /// <param name="rowBorderType">The row border type.</param> /// <param name="columnBorderType">The column border type.</param> public GpuSobelFilter(int dx, int dy, int ksize, double scale, CvEnum.BORDER_TYPE rowBorderType, CvEnum.BORDER_TYPE columnBorderType) { _ptr = GpuInvoke.gpuCreateSobelFilter(_matType, _matType, dx, dy, ksize, scale, (int)rowBorderType, (int)columnBorderType); }