gapi_mul
import { gapi_mul } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Calculates the per-element scaled product of two matrices.
The function mul calculates the per-element product of two matrices:
\texttt{dst} (I)= \texttt{saturate} ( \texttt{scale} \cdot \texttt{src1} (I) \cdot \texttt{src2} (I))
If src1.depth() == src2.depth(), ddepth can be set to the default -1. In this case, the output matrix will have the same depth as the input matrices. The matrices can be single or multi channel. Output matrix must have the same size as input matrices.
Supported matrix data types are CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1.
Note: Function textual ID is "org.opencv.core.math.mul"
See: add, sub, div, addWeighted
gapi_mul(src1: GMat, src2: GMat, scale: number, ddepth: number): GMat;3 available overloads
gapi_mul(src1: GMat, src2: GMat): GMat;gapi_mul(src1: GMat, src2: GMat, scale: number): GMat;gapi_mul(src1: GMat, src2: GMat, scale: number, ddepth: number): GMat;src1first input matrix.
src2second input matrix of the same size and the same depth as src1.
scaleoptional scale factor.
ddepthoptional depth of the output matrix.
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.