scaleAdd
import { scaleAdd } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Calculates the sum of a scaled array and another array.
The function scaleAdd is one of the classical primitive linear algebra operations, known as DAXPY or SAXPY in BLAS. It calculates the sum of a scaled array and another array:
\texttt{dst} (I)= \texttt{scale} \cdot \texttt{src1} (I) + \texttt{src2} (I)
The function can also be emulated with a matrix expression, for example:
Mat A(3, 3, CV_64F);
...
A.row(0) = A.row(1)*2 + A.row(2);
See: add, addWeighted, subtract, Mat::dot, Mat::convertTo
scaleAdd(src1: Mat, alpha: number, src2: Mat, dst: Mat): void;src1first input array.
alphascale factor for the first array.
src2second input array of the same size and type as src1.
dstOutput destination, filled by the native operation. output array of the same size and type as src1.
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.