pub fn sep_filter_def(
src: &impl GMatTraitConst,
ddepth: i32,
kernel_x: &impl MatTraitConst,
kernel_y: &impl MatTraitConst,
anchor: Point,
delta: Scalar,
) -> Result<GMat>Expand description
Applies a separable linear filter to a matrix(image).
The function applies a separable linear filter to the matrix. That is, first, every row of src is filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D kernel kernelY. The final result is returned.
Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. Output image must have the same type, size, and number of channels as the input image.
Note:
- In case of floating-point computation, rounding to nearest even is procedeed if hardware supports it (if not - to nearest value).
- Function textual ID is “org.opencv.imgproc.filters.sepfilter”
§Parameters
-
src: Source image.
-
ddepth: desired depth of the destination image (the following combinations of src.depth() and ddepth are supported:
src.depth() = CV_8U, ddepth = -1/CV_16S/CV_32F/CV_64F src.depth() = CV_16U/CV_16S, ddepth = -1/CV_32F/CV_64F src.depth() = CV_32F, ddepth = -1/CV_32F/CV_64F src.depth() = CV_64F, ddepth = -1/CV_64F
when ddepth=-1, the output image will have the same depth as the source)
- kernelX: Coefficients for filtering each row.
- kernelY: Coefficients for filtering each column.
- anchor: Anchor position within the kernel. The default value
means that the anchor is at the kernel center.
- delta: Value added to the filtered results before storing them.
- borderType: Pixel extrapolation method, see cv::BorderTypes
- borderValue: border value in case of constant border type
§See also
boxFilter, gaussianBlur, medianBlur
§Note
This alternative version of sep_filter function uses the following default values for its arguments:
- border_type: BORDER_DEFAULT
- border_value: Scalar(0)