MomentInitAlloc

Allocates memory and initializes the moment context structure.

Syntax

IppStatus ippiMomentInitAlloc_64f(IppiMomentState_64f** pState, IppHintAlgorithm hint);

IppStatus ippiMomentInitAlloc_64s(IppiMomentState_64s** pState, IppHintAlgorithm hint);

Parameters

pState

Pointer to the structure for storing moment values.

hint

Option to select the algorithmic implementation of the function.

Description

The function ippiMomentInitAlloc is declared in the ippi.h file. This function initializes the structure that is needed for the function ippiMoments to store the computed image moments. Different functions are used to allocate structures for integer and floating-point data. Computation algorithm is specified by hint argument (see Table “Hint Arguments for Image Moment Functions”).

If the initialization is successful, the ippiMomentInitAlloc function sets the pState pointer to the allocated structure of IppiMomentState type.

If memory allocation failed, the function returns ippStsMemAllocErr error status code.

Return Values

ippStsNoErr

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

ippStsMemAllocErr

Indicates an error condition in case of memory allocation failure.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.