Skip to content

gapi_Canny

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

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

ARGUMENTSimage, threshold1, threshold2, apertureSize
FUNCTIONgapi_Canny
RETURN TYPEGMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

gapi_filters

Finds edges in an image using the Canny algorithm.

The function finds edges in the input image and marks them in the output map edges using the Canny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The largest value is used to find initial segments of strong edges. See http://en.wikipedia.org/wiki/Canny_edge_detector

Note: Function textual ID is "org.opencv.imgproc.feature.canny"

gapi_Canny(image: GMat, threshold1: number, threshold2: number, apertureSize: number, L2gradient: boolean): GMat;
3 available overloads
gapi_Canny(image: GMat, threshold1: number, threshold2: number): GMat;
gapi_Canny(image: GMat, threshold1: number, threshold2: number, apertureSize: number): GMat;
gapi_Canny(image: GMat, threshold1: number, threshold2: number, apertureSize: number, L2gradient: boolean): GMat;
image

8-bit input image.

threshold1

first threshold for the hysteresis procedure.

threshold2

second threshold for the hysteresis procedure.

apertureSize

aperture size for the Sobel operator.

L2gradient

a flag, indicating whether a more accurate L_2 norm =\sqrt{(dI/dx)^2 + (dI/dy)^2} should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the default L_1 norm =|dI/dx|+|dI/dy| is enough ( L2gradient=false ).

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.