Skip to content

gapi_sepFilter

gapifunctionOpenCV 5.0.0
import { gapi_sepFilter } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSsrc, ddepth, kernelX, kernelY
FUNCTIONgapi_sepFilter
RETURN TYPEGMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

namespace imgproc

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"

See: boxFilter, gaussianBlur, medianBlur

gapi_sepFilter(src: GMat, ddepth: number, kernelX: Mat, kernelY: Mat, anchor: Point, delta: Scalar, borderType: number, borderValue: Scalar): GMat;
3 available overloads
gapi_sepFilter(src: GMat, ddepth: number, kernelX: Mat, kernelY: Mat, anchor: Point, delta: Scalar): GMat;
gapi_sepFilter(src: GMat, ddepth: number, kernelX: Mat, kernelY: Mat, anchor: Point, delta: Scalar, borderType: number): GMat;
gapi_sepFilter(src: GMat, ddepth: number, kernelX: Mat, kernelY: Mat, anchor: Point, delta: Scalar, borderType: number, borderValue: Scalar): GMat;
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 (-1,-1) 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

Returns

The GMat result. Release returned native handles with using or delete(), including handles nested in results.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.