Allocates memory and initializes a pyramid structure.
IppStatus ippiPyramidInitAlloc(IppiPyramid** ppPyr, int level, IppiSize roiSize, Ipp32f rate);
The function ippiPyramidInitAlloc is declared in the ippcv.h file. This function allocates memory and initializes the structure for the pyramid with level+1 levels.This structure is used by the ippiOpticalFlowPyrLK function for optical flow calculations.
The IppiPyramid structure contains the following fields:
pImage |
Pointer to the array of (level+1) layer images. |
pStep |
Pointer to the array of (level+1) image row step values. |
pRoi |
Pointer to the array of (level+1) layer image ROIs. |
pRate |
Pointer to the array of (level+1) ratios of i-th levels to the zero level (rate-i). |
pState |
Pointer to the structure to compute the next pyramid layer. |
level |
Number of levels in the pyramid. |
The ippiPyramidInitAlloc function fills pRoi and pRate arrays and the level field. The value of level is equal to the minimum of the input value of the level parameter and the maximum possible number of layers of the pyramid with given rate and zero level size.
Other fields should be specified by the user. The pyramid layer structure pState should be initialized by the functions ippiPyramidLayerDownInitAlloc or ippiPyramidLayerUpInitAlloc. Pyramid layer images can be obtained in many different ways, for example, using the Intel IPP functions ippiPyramidLayerDown and ippiPyramidLayerUp.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error if ppPyr pointer is NULL. |
ippStsSizeErr |
Indicates an error condition if roiSize has a field with zero or negative value. |
ippStsBadArgErr |
Indicates an error condition if level is equal to or less than 0, or if rate is out of the range. |
ippStsMemAllocErr |
Memory allocation error. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.