add

Function add 

Source
pub fn add(
    src1: &impl ToInputArray,
    src2: &impl ToInputArray,
    dst: &mut impl ToOutputArray,
    mask: &impl ToInputArray,
    dtype: i32,
    stream: &mut impl StreamTrait,
) -> Result<()>
Expand description

Computes a matrix-matrix or matrix-scalar sum.

§Parameters

  • src1: First source matrix or scalar.
  • src2: Second source matrix or scalar. Matrix should have the same size and type as src1 .
  • dst: Destination matrix that has the same size and number of channels as the input array(s). The depth is defined by dtype or @p src1 depth.
  • mask: Optional operation mask, 8-bit single channel array, that specifies elements of the destination array to be changed. The mask can be used only with single channel images.
  • dtype: Optional depth of the output array.
  • stream: Stream for the asynchronous version.

@warning In python both @p src1 and @p src2 have to be matrices, see [addWithScalar] for scalar overload.

§See also

cv::add, addWithScalar

§C++ default parameters

  • mask: noArray()
  • dtype: -1
  • stream: Stream::Null()