- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Marco,
{0,3,1} is not symmetric. The function requires and odd length symmetric kernel.
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the clarification. Currently, the function only accepts the 1D kernel, not 2D data.
Thanks,
Chao

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page