Function div_rc_def

Source
pub fn div_rc_def(
    divident: &impl GScalarTraitConst,
    src: &impl GMatTraitConst,
    scale: f64,
) -> Result<GMat>
Expand description

Divides scalar by matrix.

The function divRC divides given scalar by each element of matrix src and keep the division result in new matrix of the same size and type as src:

block formula

When src(I) is zero, dst(I) will also be zero. 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.divRC”

§Parameters

  • src: input matrix.
  • divident: number to be divided.
  • ddepth: optional depth of the output matrix. If -1, the depth of output matrix will be the same as input matrix depth.
  • scale: scale factor

§See also

add, sub, div, addWeighted

§Note

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

  • ddepth: -1