Function opencv::gapi::add_weighted
source · pub fn add_weighted(
src1: &GMat,
alpha: f64,
src2: &GMat,
beta: f64,
gamma: f64,
ddepth: i32
) -> Result<GMat>
Expand description
Calculates the weighted sum of two matrices.
The function addWeighted calculates the weighted sum of two matrices as follows:
where I is a multi-dimensional index of array elements. In case of multi-channel matrices, each
channel is processed independently.
The function can be replaced with a matrix expression:
Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1].
Note: Function textual ID is “org.opencv.core.matrixop.addweighted”
Parameters
- src1: first input matrix.
- alpha: weight of the first matrix elements.
- src2: second input matrix of the same size and channel number as src1.
- beta: weight of the second matrix elements.
- gamma: scalar added to each sum.
- ddepth: optional depth of the output matrix.
See also
add, sub
C++ default parameters
- ddepth: -1