Skip to content

gapi_Laplacian

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

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

ARGUMENTSsrc, ddepth, ksize, scale
FUNCTIONgapi_Laplacian
RETURN TYPEGMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Calculates the Laplacian of an image.

The function calculates the Laplacian of the source image by adding up the second x and y derivatives calculated using the Sobel operator:

\texttt{dst} =  \Delta \texttt{src} =  \frac{\partial^2 \texttt{src}}{\partial x^2} +  \frac{\partial^2 \texttt{src}}{\partial y^2}

This is done when ksize > 1. When ksize == 1, the Laplacian is computed by filtering the image with the following 3 \times 3 aperture:

\vecthreethree {0}{1}{0}{1}{-4}{1}{0}{1}{0}

Note: Function textual ID is "org.opencv.imgproc.filters.laplacian"

See: Sobel, Scharr

gapi_Laplacian(src: GMat, ddepth: number, ksize: number, scale: number, delta: number, borderType: number): GMat;
5 available overloads
gapi_Laplacian(src: GMat, ddepth: number): GMat;
gapi_Laplacian(src: GMat, ddepth: number, ksize: number): GMat;
gapi_Laplacian(src: GMat, ddepth: number, ksize: number, scale: number): GMat;
gapi_Laplacian(src: GMat, ddepth: number, ksize: number, scale: number, delta: number): GMat;
gapi_Laplacian(src: GMat, ddepth: number, ksize: number, scale: number, delta: number, borderType: number): GMat;
src

Source image.

ddepth

Desired depth of the destination image.

ksize

Aperture size used to compute the second-derivative filters. See #getDerivKernels for details. The size must be positive and odd.

scale

Optional scale factor for the computed Laplacian values. By default, no scaling is applied. See #getDerivKernels for details.

delta

Optional delta value that is added to the results prior to storing them in dst .

borderType

Pixel extrapolation method, see #BorderTypes. #BORDER_WRAP is not supported.

Returns

Destination image of the same size and the same number of channels as src. 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.