opencv::gapi

Function div_c_def

source
pub fn div_c_def(
    src: &impl GMatTraitConst,
    divisor: &impl GScalarTraitConst,
    scale: f64,
) -> Result<GMat>
Expand description

Divides matrix by scalar.

The function divC divides each element of matrix src by given scalar value:

block formula

When divisor 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.divC”

§Parameters

  • src: input matrix.
  • divisor: number to be divided by.
  • 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_c function uses the following default values for its arguments:

  • ddepth: -1