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

ippiFilterBox

sohrab_ali
Beginner
296 Views
Hi
I am trying to use ippiFilterBox but i am not getting the right results ,if some onecan help me with my this code
Ipp8u src[5][5] =
{
{2,4,6,8,10},
{1,1,1,1,1},
{1,1,1,1,1},
{1,1,1,1,1},
{1,1,1,1,1}
};

Ipp8u dst[5][5] =
{
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0}
};
IppiSize srcRoiSize;
srcRoiSize.width=5;
srcRoiSize.height=5;
int srcStep=5;

IppiSize dstRoiSize;
dstRoiSize.width=5;
dstRoiSize.height=5;
int dstStep=5;

IppiSize maskSize;
maskSize.width=3;
maskSize.height=3;
IppiPoint anchor;
anchor.x=1;
anchor.y=1;
Ipp8u temp[7][7];
Ipp8u value=1;
IppiSize tempRoiSize;
tempRoiSize.width=7;
tempRoiSize.height=7;
int tempStep=7;

IppStatus Status=ippiCopyConstBorder_8u_C1R((Ipp8u*)src,srcStep,srcRoiSize,(Ipp8u*)temp,tempStep,tempRoiSize, 1, 1, value);
Status=ippiFilterBox_8u_C1R((Ipp8u*)temp,tempStep,(Ipp8u*)dst, dstStep,dstRoiSize, maskSize,anchor);
I think i have to shift the temp but how....? and in this case if i shift the temp by1 byte it gets right results.
0 Kudos
1 Reply
Vladimir_Dudnik
Employee
296 Views
Hi, our expert answer that you should do
Code:
Status = ippiFilterBox_8u_C1R(
(temp + anchor.x + anchor.y * tempStep),
tempStep,
(Ipp8u*)dst,
dstStep,
dstRoiSize,
maskSize,
anchor);
Regards,
Vladimir

Message Edited by vdudnik on 05-13-2005 10:28 AM

0 Kudos
Reply