gapi_erode
import { gapi_erode } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Erodes an image by using a specific structuring element.
The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:
\texttt{dst} (x,y) = \min _{(x',y'): \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')
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: dilate, morphologyEx
gapi_erode(src: GMat, kernel: Mat, anchor: Point, iterations: number, borderType: number, borderValue: Scalar): GMat;5 available overloads
gapi_erode(src: GMat, kernel: Mat): GMat;gapi_erode(src: GMat, kernel: Mat, anchor: Point): GMat;gapi_erode(src: GMat, kernel: Mat, anchor: Point, iterations: number): GMat;gapi_erode(src: GMat, kernel: Mat, anchor: Point, iterations: number, borderType: number): GMat;gapi_erode(src: GMat, kernel: Mat, anchor: Point, iterations: number, borderType: number, borderValue: Scalar): GMat;srcinput image
kernelstructuring element used for erosion; if
element=Mat(), a3 x 3rectangular structuring element is used. Kernel can be created using getStructuringElement.anchorposition of the anchor within the element; default value (-1, -1) means that the anchor is at the element center.
iterationsnumber of times erosion is applied.
borderTypepixel extrapolation method, see cv::BorderTypes
borderValueborder value in case of a constant border
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.