- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ipp32f* src = ippsMalloc_32f(width * hieght);
int srcStep = width * sizeof(Ipp32f);
IppiSize srcRoi = { width, height };
//populate the array with floats
int dstX = width + 4;
int dstY = height + 4;
Ipp32f* dst = ippsMalloc_32f(dstX * dstY);
IppiSize dstRoi = { dstX, dstY };
int dstStep = dstX * sizeof(Ipp32f);
int topBorderHeight = 2;
int leftBorderWidth = 2;
IppStatus boxStatus = ippiCopyReplicateBorder_32f_C1R(src, srcStep, srcRoi, dst, dstStep, dstRoi, topBorderHeight, leftBorderWidth);
//handle errors if any
int dstBorderedStep = dstRoi.width * sizeof(Ipp32f);
IppiSize maskSize{ 3, 3 };
IppiPoint anchor{ 1, 1 };
boxStatus = ippiFilterBox_32f_C1R(dst + dstX * 2 + anchor.x + anchor.y, dstBorderedStep, src, srcStep, srcRoi, maskSize, anchor);
The filtered result has three or four horizontal lines that divide the image into three or four parts.
Where in the code should I change to fix the issue?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Philips_1.
Could you please tell us the width and height of your reproducer and used IPP version? Also the function ippiFilterBox_32f_C1R was deprecated after IPP8.2. Is it possible for you to update to IPP2019.5 and call function ippiFilterBoxBorder_32f_C1R? https://software.intel.com/en-us/ipp-dev-ference-filterboxborder. It supports borders itself. Link to example https://software.intel.com/en-us/ipp-dev-reference-filterboxborder-sample
Thanks!
p.s. I've modified your reproducer. Could you try it please?
void main() { Ipp32f* src = ippsMalloc_32f(width * height); int srcStep = width * sizeof(Ipp32f); IppiSize srcRoi = { width, height }; //populate the array with floats int dstX = width + 2; int dstY = height + 2; Ipp32f* dst = ippsMalloc_32f(dstX * dstY); IppiSize dstRoi = { dstX, dstY }; int dstStep = dstX * sizeof(Ipp32f); int topBorderHeight = 1; int leftBorderWidth = 1; int y, x; for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { src[width*y + x] = y + x; } } IppStatus boxStatus = ippiCopyReplicateBorder_32f_C1R(src, srcStep, srcRoi, dst, dstStep, dstRoi, topBorderHeight, leftBorderWidth); //handle errors if any int dstBorderedStep = dstRoi.width * sizeof(Ipp32f); IppiSize maskSize = { 3, 3 }; IppiPoint anchor = { 1, 1 }; boxStatus = ippiFilterBox_32f_C1R(dst + dstX * anchor.y + anchor.x, dstBorderedStep, src, srcStep, srcRoi, maskSize, anchor); }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Andrey.
int width = 110;
int height = 280;
The src has been populated before passed in, so I removed the loop.
The final image is still divided horizontally.
I haven't updated to IPP2019.5 and thought these two functions should work in my case.
I tried to add "thicker" border like "int topBorderHeight = 1;" and also increase the mask and anchor size. That added more horizontal sections in the final image. Does that give you any clue on what is wrong.
Thanks again and have a great weekend.
void main()
{
int width = 110;
int height = 280;
Ipp32f* src = ippsMalloc_32f(width * height);
int srcStep = width * sizeof(Ipp32f);
IppiSize srcRoi = { width, height };
//This array has been populated with floats
int dstX = width + 2;
int dstY = height + 2;
Ipp32f* dst = ippsMalloc_32f(dstX * dstY);
IppiSize dstRoi = { dstX, dstY };
int dstStep = dstX * sizeof(Ipp32f);
int topBorderHeight = 1;
int leftBorderWidth = 1;
IppStatus boxStatus = ippiCopyReplicateBorder_32f_C1R(src, srcStep, srcRoi, dst, dstStep, dstRoi, topBorderHeight, leftBorderWidth);
int dstBorderedStep = dstRoi.width * sizeof(Ipp32f);
IppiSize maskSize = { 3, 3 };
IppiPoint anchor = { 1, 1 };
boxStatus = ippiFilterBox_32f_C1R(dst + dstX * anchor.y + anchor.x, dstBorderedStep, src, srcStep, srcRoi, maskSize, anchor);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. Could you add please next lines to get IPP version:
IppLibraryVersion* version; version = ippiGetLibVersion(); printf("Name=%s\n", version->Name); printf("Version=%s\n", version->Version); printf("BuildDate=%s\n", version->BuildDate);
And what is your OS - Win/Linux?
Thanks.

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