gemm
import { gemm } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Performs generalized matrix multiplication.
The function cv::gemm performs generalized matrix multiplication similar to the
gemm functions in BLAS level 3. For example,
gemm(src1, src2, alpha, src3, beta, dst, GEMM_1_T + GEMM_3_T)
corresponds to
\texttt{dst} = \texttt{alpha} \cdot \texttt{src1} ^T \cdot \texttt{src2} + \texttt{beta} \cdot \texttt{src3} ^T
In case of complex (two-channel) data, performed a complex matrix multiplication.
The function can be replaced with a matrix expression. For example, the above call can be replaced with:
dst = alpha*src1.t()*src2 + beta*src3.t();
See: mulTransposed, transform
gemm(src1: Mat, src2: Mat, alpha: number, src3: Mat, beta: number, dst: Mat, flags: number): void;2 available overloads
gemm(src1: Mat, src2: Mat, alpha: number, src3: Mat, beta: number, dst: Mat): void;gemm(src1: Mat, src2: Mat, alpha: number, src3: Mat, beta: number, dst: Mat, flags: number): void;src1first multiplied input matrix that could be real(CV_32FC1, CV_64FC1) or complex(CV_32FC2, CV_64FC2).
src2second multiplied input matrix of the same type as src1.
alphaweight of the matrix product.
src3third optional delta matrix added to the matrix product; it should have the same type as src1 and src2.
betaweight of src3.
dstOutput destination, filled by the native operation. output matrix; it has the proper size and the same type as input matrices.
flagsoperation flags (cv::GemmFlags)
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.