div_def

Function div_def 

Source
pub fn div_def(
    src1: &impl GMatTraitConst,
    src2: &impl GMatTraitConst,
    scale: f64,
) -> Result<GMat>
Expand description

Performs per-element division of two matrices.

The function divides one matrix by another: block formula

For integer types when src2(I) is zero, dst(I) will also be zero. Floating point case returns Inf/NaN (according to IEEE).

Different channels of multi-channel matrices are processed independently. The matrices can be single or multi channel. Output matrix must have the same size and depth as src.

Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1].

Note: Function textual ID is “org.opencv.core.math.div”

§Parameters

  • src1: first input matrix.
  • src2: second input matrix of the same size and depth as src1.
  • scale: scalar factor.
  • ddepth: optional depth of the output matrix; you can only pass -1 when src1.depth() == src2.depth().

§See also

mul, add, sub

§Note

This alternative version of div function uses the following default values for its arguments:

  • ddepth: -1