[][src]Function opencv::imgproc::hu_moments_1

pub fn hu_moments_1(m: Moments, hu: &mut dyn ToOutputArray) -> Result<()>

Calculates seven Hu invariants.

The function calculates seven Hu invariants (introduced in Hu62; see also http://en.wikipedia.org/wiki/Image_moment) defined as:

block formula

where inline formula stands for inline formula .

These values are proved to be invariants to the image scale, rotation, and reflection except the seventh one, whose sign is changed by reflection. This invariance is proved with the assumption of infinite image resolution. In case of raster images, the computed Hu invariants for the original and transformed images are a bit different.

Parameters

  • moments: Input moments computed with moments .
  • hu: Output Hu invariants.

See also

matchShapes

Overloaded parameters