Skip to content

Scharr

Image processingfunctionOpenCV 5.0.0
import { Scharr } from '@banou/opencv-wasm'

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

Calculates the first x- or y- image derivative using Scharr operator.

The function computes the first x- or y- spatial image derivative using the Scharr operator. The call

\texttt{Scharr(src, dst, ddepth, dx, dy, scale, delta, borderType)}

is equivalent to

\texttt{Sobel(src, dst, ddepth, dx, dy, FILTER_SCHARR, scale, delta, borderType)} .

See: cartToPolar

Scharr(src: Mat, dst: Mat, ddepth: number, dx: number, dy: number, scale: number, delta: number, borderType: number): void;
4 available overloads
Scharr(src: Mat, dst: Mat, ddepth: number, dx: number, dy: number): void;
Scharr(src: Mat, dst: Mat, ddepth: number, dx: number, dy: number, scale: number): void;
Scharr(src: Mat, dst: Mat, ddepth: number, dx: number, dy: number, scale: number, delta: number): void;
Scharr(src: Mat, dst: Mat, ddepth: number, dx: number, dy: number, scale: number, delta: number, borderType: number): void;
src

input image.

dst

Output destination, filled by the native operation. output image of the same size and the same number of channels as src.

ddepth

output image depth, see filter_depths "combinations"

dx

order of the derivative x.

dy

order of the derivative y.

scale

optional scale factor for the computed derivative 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.

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.