Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

pyramid functions, correct parameter for

cignarellageomind_it
329 Views
i'm trying to use pyramid functions:PyramidLayerDownInitAlloc,PyramidLayerDown, and having some problems understanding the parameters to pass toPyramidLayerDownInitAlloc to define the kernel.
i'm using the8u_C3R flavour.
for the 3x3 kernel
| 1 | 3 | 1 |
| 3 | 9 | 3 |
| 1 | 3 | 1 |
my code looks like:
///////////////////////////////////////////////////////////////////////////////
Ipp16s myKernel[]={1,3,1};
int kerSize = 3;
Ipp32f reduceRatio = 2;
IppiPyramidDownState_8u_C3R* pyrDef = NULL;
ippError = ippiPyramidLayerDownInitAlloc_8u_C3R( &pyrDef, srcRoiSize, reduceRatio, myKernel, kerSize,IPPI_INTER_LINEAR );
///////////////////////////////////////////////////////////////////////////////
and this seems to work, ( note kerSize is 3 ), is this the correct way?
my problem is i would have a kernel like this:
| 0 | 0 | 0 |
| 0 | 9 | 3 |
| 0 | 3 | 1 |
but if i use the previous code with
Ipp16s myKernel[]={0,3,1};
i got an ippStsSymKernelExpectederror
why can't have that kernel, is that not symmetric separable?
thanks
marco cignarella
0 Kudos
3 Replies
Chao_Y_Intel
Moderator
329 Views

Hi Marco,

{0,3,1} is not symmetric. The function requires and odd length symmetric kernel.

Thanks,
Chao

0 Kudos
cignarellageomind_it
329 Views
I see{0,3,1} is not symmetric,
but the matrix
| 0 | 0 | 0 |
| 0 | 9 | 3 |
| 0 | 3 | 1 |
is ( as a matrix ), so i wished it could be accepted , and passed to function by
[bash]Ipp16s	myKernel[]={0,0,0, 0,9,3, 0,3,1};
int	kerSize = 9;[/bash]
0 Kudos
Chao_Y_Intel
Moderator
329 Views

Hi,

Thanks for the clarification. Currently, the function only accepts the 1D kernel, not 2D data.

Thanks,
Chao

0 Kudos
Reply