Function opencv::gapi::div_c

source ·
pub fn div_c(
    src: &GMat,
    divisor: &GScalar,
    scale: f64,
    ddepth: i32
) -> 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

C++ default parameters

  • ddepth: -1