Retrieves image spatial moment of the specified order, computed by ippiMoments.
IppStatus ippiGetSpatialMoment_64f(const IppiMomentState_64f* pState, int mOrd, int nOrd, int nChannel, IppiPoint roiOffset, Ipp64f* pValue);
IppStatus ippiGetSpatialMoment_64s(const IppiMomentState_64s* pState, int mOrd, int nOrd, int nChannel, IppiPoint roiOffset, Ipp64s* pValue, int scaleFactor);
pState |
Pointer to 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 retrieved moment value. |
scaleFactor |
Scale factor (see Integer Result Scaling). |
The function ippiGetSpatialMoment is declared in the ippi.h file. This function returns the pointer pValue to the spatial moment that was previously computed by the ippiMoments function. All spatial moment values are computed by ippiMoments relative to the image ROI origin. You may also obtain spatial moment values relative to different point in the image, using the appropriate roiOffset settings.
The moment order is specified by the integer exponents mOrd, nOrd.
Different functions are used to retrieve spatial moment in integer and floating-point formats, respectively. In case of integer data, the result may be scaled by the specified scaleFactor.
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. |
ippStsSizeErr |
Indicates an error condition if mOrd + nOrd is greater than 3, or nChannel has an illegal value. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.