Skip to content

sepFilter2D

Image processingfunctionOpenCV 5.0.0
import { sepFilter2D } from '@banou/opencv-wasm'

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

Applies a separable linear filter to an image.

The function applies a separable linear filter to the image. 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 shifted by delta is stored in dst .

See: filter2D, Sobel, GaussianBlur, boxFilter, blur

sepFilter2D(src: Mat, dst: Mat, ddepth: number, kernelX: Mat, kernelY: Mat, anchor: Point, delta: number, borderType: number): void;
4 available overloads
sepFilter2D(src: Mat, dst: Mat, ddepth: number, kernelX: Mat, kernelY: Mat): void;
sepFilter2D(src: Mat, dst: Mat, ddepth: number, kernelX: Mat, kernelY: Mat, anchor: Point): void;
sepFilter2D(src: Mat, dst: Mat, ddepth: number, kernelX: Mat, kernelY: Mat, anchor: Point, delta: number): void;
sepFilter2D(src: Mat, dst: Mat, ddepth: number, kernelX: Mat, kernelY: Mat, anchor: Point, delta: number, borderType: number): void;
src

Source image.

dst

Output destination, filled by the native operation. Destination image of the same size and the same number of channels as src .

ddepth

Destination image depth, see filter_depths "combinations"

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 #BorderTypes. #BORDER_WRAP is not supported.

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.