Skip to content

gapi_divC

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

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

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

Divides matrix by scalar.

The function divC divides each element of matrix src by given scalar value:

\texttt{dst(I) = saturate(src(I)*scale/divisor)}

When divisor is zero, dst(I) will also be zero. Different channels of multi-channel matrices are processed independently. The matrices can be single or multi channel. Output matrix must have the same size and depth as src.

Supported matrix data types are CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1.

Note: Function textual ID is "org.opencv.core.math.divC"

See: add, sub, div, addWeighted

gapi_divC(src: GMat, divisor: GScalar, scale: number, ddepth: number): GMat;
2 available overloads
gapi_divC(src: GMat, divisor: GScalar, scale: number): GMat;
gapi_divC(src: GMat, divisor: GScalar, scale: number, ddepth: number): GMat;
src

input matrix.

divisor

number to be divided by.

scale

scale factor.

ddepth

optional depth of the output matrix. If -1, the depth of output matrix will be the same as input matrix depth.

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.