Function abs_diff

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

Calculates the per-element absolute difference between two matrices.

The function absDiff calculates absolute difference between two matrices of the same size and depth: block formula where I is a multi-dimensional index of matrix elements. In case of multi-channel matrices, each channel is processed independently. Output matrix must have the same size and depth as input matrices.

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

Note: Function textual ID is “org.opencv.core.matrixop.absdiff”

§Parameters

  • src1: first input matrix.
  • src2: second input matrix.

§See also

abs