- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The wrong value I got after calling function ippiCopyConstBorder_32f_C1R.
Code Example:
Got Wrong Value:
This problem has been bothering me for two days,
Thanks for any help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Very appreciated for your reply! It works now.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
We looked into your code and made few changes to your code.
Since size of ipp32f is 4 Bytes, srcstep will be 32(i.e 8x4=32 Bytes) & dststep will be 28(i.e 7X4=28 Bytes).
where,
srcStep = 8 (Distance in bytes between starts of consecutive lines in the source image.)
dstStep= 7 (Distance, in bytes, between the starting points of consecutive lines in the destination image.)
Could you please try the below code and let us know if it helps?
#include<iostream>
#include <stdio.h>
#include<ipp.h>
int main()
{
Ipp32f src[8 * 4] = { 3.5, 3.5, 3.5, 3.0, 3.0, 8.0, 8.0, 8.0,
3.0, 2.0, 1.0, 2.0, 3.0, 8.0, 8.0, 8.0,
3.0, 2.0, 1.0, 2.0, 3.0, 8.0, 8.0, 8.0,
3.0, 3.0, 3.0, 3.0, 3.0, 8.0, 8.0, 8.0 };
Ipp32f dst[8 * 6]={0};
IppiSize srcRoi = { 5, 4 };
IppiSize dstRoi = { 7, 6 };
int borderWidth = 1;
int borderHeight = 1;
int borderVal = 0;
ippiCopyConstBorder_32f_C1R(src, 32, srcRoi, dst, 28, dstRoi, borderHeight, borderWidth, borderVal);
for (int i = 0; i < 42; i++)
{
printf("%.1f ", dst[i]);
if ((i + 1) % 7 == 0)
printf("\n");
}
}
Please find the below screenshot for the expected output.
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Very appreciated for your reply! It works now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the confirmation.
As this issue has been resolved, we will no longer respond to this thread. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks & Regards,
Noorjahan
![](/skins/images/B7BA37F9CE4B52FF7CAE1FB0388839C8/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page