[][src]Function opencv::core::scale_add

pub fn scale_add(
    src1: &dyn ToInputArray,
    alpha: f64,
    src2: &dyn ToInputArray,
    dst: &mut dyn ToOutputArray
) -> Result<()>

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: block formula 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);

Parameters

  • src1: first input array.
  • alpha: scale factor for the first array.
  • src2: second input array of the same size and type as src1.
  • dst: output array of the same size and type as src1.

See also

add, addWeighted, subtract, Mat::dot, Mat::convertTo