SHTFwd

Computes the forward spherical harmonic transform.

Syntax

IppStatus ipprSHTFwd_32f_C1I(const Ipp32f* pX, const Ipp32f* pY, const Ipp32f* pZ, const Ipp32f* pSrc, Ipp32u N, Ipp32f* pSrcDstClm, Ipp32u L, IppSHState* pSHState);

IppStatus ipprSHTFwd_32f_C3I(const Ipp32f* pX, const Ipp32f* pY, const Ipp32f* pZ, const Ipp32f* pSrc, Ipp32u N, Ipp32f* pSrcDstClm[3], Ipp32u L, IppSHState* pSHState);

IppStatus ipprSHTFwd_32f_P3I(const Ipp32f* pX, const Ipp32f* pY, const Ipp32f* pZ, const Ipp32f* pSrc[3], Ipp32u N, Ipp32f* pSrcDstClm[3], Ipp32u L, IppSHState* pSHState);

Parameters

pX, pY, pZ

Pointers to the source vectors representing a unit sphere points in Cartesians coordinates.

pSrc

Pointer to the source vector of values assigned to each point represented by the input vectors.

N

Number of Cartesians points, that is the length of the source vector.

pSrcDstClm

Pointer to the destination vector or an array of pointers to the destination vectors to store the running values of SHT coefficients of length (L+1)(L+1).

L

Order, can not be greater than maximum order specified in the function ipprSHInit.

pSHState

Pointer to the external buffer for the SHT state structure that must be initialized with maximum order not less than L.

Description

The function ipprSHTFwd is declared in the ippr.h file.

All function flavors perform projecting of a function f(x, y, z) defined on a unit sphere for each input point (pX[i], pY[i], pZ[i]) into the SH functions basis Ylm (x, y, z), 0 ≤ lL, |m| ≤ L, that is computation of the SHT coefficients {Clm:0 ≤ lL, |m| ≤ L} by accumulating partial sums of SHT integral in the destination vectors.

The function ipprSHTFwd_32f_C1I calculates



for 0 ≤ lL, |m| ≤ L.

The function ipprSHTFwd_32f_C3P3I calculates



for 0 ≤ lL, |m| ≤ L, 0 ≤ k ≤ 3.

The function ipprSHTFwd_32f_P3I calculates



for 0 ≤ lL, |m| ≤ L, 0 ≤ k ≤ 3.

The functions ipprSHTFwd_32f_C3P3I and ipprSHTFwd_32f_P3I are suitable to transform a color function, for example f:(x, y, z) --> R, G, B, for both pixel-ordered or planar images respectively.

It is supposed for each input point (pX[i], pY[i], pZ[i]), 0 ≤ i < N, that pX[i]2 + pY[i]2 + pZ[i]2 =1.

The function updates running SHT values Clm that are accumulated in the destination vector pSrcDstClm or each vector of the destination array pSrcDstClm in the following order:

C00

C1-1, C10, C11

C2-2, C2-1, C20 , C21, C22

...

CL-L, CL-L+1 ,... CL-1, CL0, CL1,... CLL-1, CLL .

Before the first call to the function ipprSHTFwd the destination vector (vectors) pSrcDstClm must be zeroed.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if N is equal to 0.

ippStsRangeErr

Indicates an error condition if L is greater that maximum order specified in the function ipprSHInit.


Submit feedback on this help topic

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