Skip to content

gapi_subRC

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

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

ARGUMENTSc, src, ddepth
FUNCTIONgapi_subRC
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 difference between given scalar and the matrix.

The function can be replaced with matrix expressions:

\texttt{dst} =  \texttt{c} - \texttt{src}

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 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.subRC"

See: add, addC, subC

gapi_subRC(c: GScalar, src: GMat, ddepth: number): GMat;
2 available overloads
gapi_subRC(c: GScalar, src: GMat): GMat;
gapi_subRC(c: GScalar, src: GMat, ddepth: number): GMat;
c

scalar value to subtract from.

src

input matrix to be subtracted.

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.