gapi_morphologyEx
import { gapi_morphologyEx } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Performs advanced morphological transformations.
The function can perform advanced morphological transformations using an erosion and dilation as basic operations.
Any of the operations can be done in-place. In case of multi-channel images, each channel is processed independently.
Note: - Function textual ID is "org.opencv.imgproc.filters.morphologyEx"
- The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (#MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).
See: dilate, erode, getStructuringElement
gapi_morphologyEx(src: GMat, op: number, kernel: Mat, anchor: Point, iterations: number, borderType: number, borderValue: Scalar): GMat;5 available overloads
gapi_morphologyEx(src: GMat, op: number, kernel: Mat): GMat;gapi_morphologyEx(src: GMat, op: number, kernel: Mat, anchor: Point): GMat;gapi_morphologyEx(src: GMat, op: number, kernel: Mat, anchor: Point, iterations: number): GMat;gapi_morphologyEx(src: GMat, op: number, kernel: Mat, anchor: Point, iterations: number, borderType: number): GMat;gapi_morphologyEx(src: GMat, op: number, kernel: Mat, anchor: Point, iterations: number, borderType: number, borderValue: Scalar): GMat;srcInput image.
opType of a morphological operation, see #MorphTypes
kernelStructuring element. It can be created using #getStructuringElement.
anchorAnchor position within the element. Both negative values mean that the anchor is at the kernel center.
iterationsNumber of times erosion and dilation are applied.
borderTypePixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.
borderValueBorder value in case of a constant border. The default value has a special meaning.
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.