- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
int main(int argc, char* argv[])
{
Ipp8u Src[5 * 4] = {
{ 1},{ 2},{ 3},{ 4},{ 5},
{ 6},{ 7},{ 8},{ 9},{10},
{11},{12},{13},{14},{15},
{16},{17},{18},{19},{20},
};
Ipp8u Buf[(5+2) * (4+2)] = {
{ 1}, { 1},{ 2},{ 3},{ 4},{ 5}, { 5},
{ 6}, { 6},{ 7},{ 8},{ 9},{10}, {10},
{11}, {11},{12},{13},{14},{15}, {15},
{16}, {16},{17},{18},{19},{20}, {20},
};
int bufStep = 5 + 2;
Ipp8u Dst[5 * 4];
int dstStep = 5;
IppiSize dstRoiSize = {5, 4};
Ipp32f Kernel[3*3] = {
{1.0},{1.0},{1.0},
{1.0},{1.0},{1.0},
{1.0},{1.0},{1.0},
};
IppiSize kernelSize = {3, 3};
IppiPoint anchor = {1, 1};
IppStatus Status;
bufStep, Dst, dstStep, dstRoiSize,
Kernel, kernelSize, anchor);
for ( y = 0; y < 4; y++ )
{
pTmp = Dst + y * dstStep;
for ( x = 0; x < 5; x++ )
{
printf("%d ", *pTmp); pTmp++;
}
}
}
Message Edited by Seiji-Torigoe on 11-18-2004 10:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Youshould provide 2-pixel border for 5x5 kernel and anchor in the center. For example:
Ipp32f *pImg, *pDst, *pRoi, pK[25]=
{
1.f, 1.f, 1.f, 1.f, 1.f,
1.f, 1.f, 1.f, 1.f, 1.f,
1.f, 1.f, 1.f, 1.f, 1.f,
1.f, 1.f, 1.f, 1.f, 1.f,
1.f, 1.f, 1.f, 1.f, 1.f
};
IppiSize roi;
IppiPoint anch;
IppiSize ker;
int sstep, dstep;
pImg = ippiMalloc_32f_C1( 14, 14, &sstep );
pDst = ippiMalloc_32f_C1( 10, 10, &dstep );
roi.height = roi.width = 14;
ippiSet( 1.f, pImg, sstep, roi );
ker.width = ker.height = 5;
roi.height = roi.width = 10;
anch.x = anch.y = 2;
pRoi = (Ipp32f*)((Ipp8u*)pImg+2*sstep+2*sizeof(Ipp32f));
ippiFilter_32f_C1R( pRoi, sstep, pDst, dstep, roi, pK, ker, anch );
kkkkkxxxxxxxxx
kkkkkxxxxxxxxx
kkAkkrrrrrrrxx
kkkkkrrrrrrrxx
kkkkkrrrrrrrxx
xxrrrrrrrrrrxx
xxrrrrrrrrrrxx
xxrrrrrrrrrrxx
xxrrrrrrrrrrxx
xxrrrrrrrrrrxx
xxrrrrrrrrrrxx
xxrrrrrrrrrrxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxx
There is how to obtain 1-st point - A (anchor) points to the 1-st point of the roi.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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