Skip to content

gapi_addC1

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

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

ARGUMENTSc, src1, ddepth
FUNCTIONgapi_addC1
RETURN TYPEGMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Calculates the per-element sum of matrix and given scalar.

The function addC adds a given scalar value to each element of given matrix. The function can be replaced with matrix expressions:

\texttt{dst} =  \texttt{src1} + \texttt{c}

Depth of the output matrix is determined by the ddepth parameter. If ddepth is set to default -1, the depth of output matrix will be the same as the depth of input matrix. The matrices can be single or multi channel. Output matrix must have the same size and number of channels as the input matrix.

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

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

See: sub, addWeighted

gapi_addC1(c: GScalar, src1: GMat, ddepth: number): GMat;
2 available overloads
gapi_addC1(c: GScalar, src1: GMat): GMat;
gapi_addC1(c: GScalar, src1: GMat, ddepth: number): GMat;
c

scalar value to be added.

src1

first input matrix.

ddepth

optional depth of the output matrix.

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.