Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Compute Moments

IP Command Grooper.IP

Calculates the seven Hu invariant moments for an image, providing features that describe the image's shape and structure.

Remarks

The 'Compute Moments' command analyzes an image and computes the seven Hu invariant moments, which are mathematical descriptors used to capture the shape and spatial distribution of pixel intensities. These features are widely used in image analysis and pattern recognition tasks due to their invariance to translation, scale, and rotation.

This command is primarily used internally by other IP commands within Grooper and is not typically configured directly in an IP Profile.

Supported Pixel Formats

The command operates on single-channel (grayscale) images. If the input image is not already in grayscale, it will be converted automatically before processing.

Diagnostics

When diagnostic mode is enabled, the command logs the calculated moment values for each processed image. Each moment is output in the log as a separate entry, for example: Moment 0: 0.001234 Moment 1: 0.000567 ...

Classification Features

The seven Hu moments generated by this command can be used as features for image classification, shape analysis, or quality assessment. These features are invariant to common image transformations, making them robust for various analytical tasks.

How It Works

The command first ensures the image is in grayscale format, then computes the seven Hu moments using the algorithm described in M. K. Hu, "Visual Pattern Recognition by Moment Invariants", IRE Trans. Info. Theory, vol. IT-8, pp.179–187, 1962. The results are stored in the command result object and may be used by downstream processes or for diagnostic review.

For more information on image moments, see the Image Moment article.

Properties

NameTypeDescription

Used By

Notification