Skip to content

matMulDeriv

geometryfunctionOpenCV 5.0.0
import { matMulDeriv } from '@banou/opencv-wasm'

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

ARGUMENTSA, B, dABdA, dABdB
FUNCTIONmatMulDeriv
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Computes partial derivatives of the matrix product for each multiplied matrix.

matMulDeriv(A: Mat, B: Mat, dABdA: Mat, dABdB: Mat): void;
A

First multiplied matrix.

B

Second multiplied matrix.

dABdA

Output destination, filled by the native operation. First output derivative matrix d(A*B)/dA of size \texttt{A.rows*B.cols} \times {A.rows*A.cols} .

dABdB

Output destination, filled by the native operation. Second output derivative matrix d(A*B)/dB of size \texttt{A.rows*B.cols} \times {B.rows*B.cols} .

The function computes partial derivatives of the elements of the matrix product A*B with regard to the elements of each of the two input matrices. The function is used to compute the Jacobian matrices in #stereoCalibrate but can also be used in any other similar optimization function.

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.