Intel® Integrated Performance Primitives Developer Guide and Reference

ID 790148
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

GetNormalizedSpatialMoment

Retrieves the normalized value of the image spatial moment computed by ippiMoments.

Syntax

IppStatus ippiGetNormalizedSpatialMoment_64f(const IppiMomentState_64f* pState, int mOrd, int nOrd, int nChannel, IppiPoint roiOffset, Ipp64f* pValue);

Include Files

ippi.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pState

The structure that stores image moments.

mOrd, nOrd

Integer power exponents defining the moment order. These arguments must satisfy the condition 0 mOrd+nOrd 3.

nChannel

The channel for which the moment is returned.

roiOffset

Offset in pixels of the ROI origin (top left corner) from the image origin.

pValue

Pointer to the returned normalized moment value.

Description

This function normalizes the spatial moment value that was previously computed by the ippiMoments function, and returns the pointer pValue to the normalized moment. See Image Moments for details of moments normalization. The moment order (mOrd, nOrd) is specified by integer power exponents. All spatial moment values are computed by ippiMoments relative to the image ROI origin. You may also obtain normalized spatial moment values relative to different point in the image, using the appropriate roiOffset settings.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if pState or pValue pointer is NULL.

ippStsContextMatchErr

Indicates an error condition if a pointer to an invalid structure is passed.

ippStsMoment00ZeroErr

Indicates an error condition if M(0,0) value is close to zero.

ippStsSizeErr

Indicates an error condition if mOrd + nOrd is greater than 3, or nChannel has an illegal value.