Skip to content

gapi_erode3x3

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

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

ARGUMENTSsrc, iterations, borderType, borderValue
FUNCTIONgapi_erode3x3
RETURN TYPEGMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Erodes an image by using 3 by 3 rectangular structuring element.

The function erodes the source image using the rectangular structuring element with rectangle center as an anchor. Erosion can be applied several (iterations) times. In case of multi-channel images, each channel is processed independently. Supported input matrix data types are CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, and CV_32FC1. Output image must have the same type, size, and number of channels as the input image.

Note: - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest.

  • Function textual ID is "org.opencv.imgproc.filters.erode"

See: erode, dilate3x3

gapi_erode3x3(src: GMat, iterations: number, borderType: number, borderValue: Scalar): GMat;
4 available overloads
gapi_erode3x3(src: GMat): GMat;
gapi_erode3x3(src: GMat, iterations: number): GMat;
gapi_erode3x3(src: GMat, iterations: number, borderType: number): GMat;
gapi_erode3x3(src: GMat, iterations: number, borderType: number, borderValue: Scalar): GMat;
src

input image

iterations

number of times erosion is applied.

borderType

pixel extrapolation method, see cv::BorderTypes

borderValue

border value in case of a constant border

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.