- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I can't get example 9-5 in the ippi manual to work. my code is as follow:
Ipp16s img[6*6]= { 0, 0, 0, 0, 0, 0,
0, 1, 0,-1, 0, 0,
0, 0,-1, 0, 2, 0,
0, 1, 0,-2, 1, 0,
0, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0 };
Ipp16s output[4*4];
Ipp16s buf[4*4];
Ipp16s kerx[3] = {1, 1, 1};
Ipp16s kery[3] = {1, 1, 1};
IppiSize roi = {4,4};
ippiCopy_16s_C1R(img+7, 6*sizeof(Ipp16s), buf, 4*sizeof(Ipp16s), roi);
Separable_3x3(buf, 4*sizeof(Ipp16s), output, 4*sizeof(Ipp16s), roi, kerx, kery);
can anyone help?
Ipp16s img[6*6]= { 0, 0, 0, 0, 0, 0,
0, 1, 0,-1, 0, 0,
0, 0,-1, 0, 2, 0,
0, 1, 0,-2, 1, 0,
0, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0 };
Ipp16s output[4*4];
Ipp16s buf[4*4];
Ipp16s kerx[3] = {1, 1, 1};
Ipp16s kery[3] = {1, 1, 1};
IppiSize roi = {4,4};
ippiCopy_16s_C1R(img+7, 6*sizeof(Ipp16s), buf, 4*sizeof(Ipp16s), roi);
Separable_3x3(buf, 4*sizeof(Ipp16s), output, 4*sizeof(Ipp16s), roi, kerx, kery);
can anyone help?
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
This looks an image border issue. Image filtering functions assume that for each pixel being processed, adjacent pixels also exist. You may check the following artile for more information on this topic:
http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-processing-an-image-from-edge-to-edge.
Could you look at if thecode bellow work for u?
Ipp16s img[6*6]= { 0, 0, 0, 0, 0, 0,
0, 1, 0,-1, 0, 0,
0, 0,-1, 0, 2, 0,
0, 1, 0,-2, 1, 0,
0, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0 };
Ipp16s output[4*4];
Ipp16s buf[6*6];
Ipp16s kerx[3] = {1, 1, 1};
Ipp16s kery[3] = {1, 1, 1};
IppiSize roi = {4,4};
IppiSize roi1 = {6,6};
ippiCopy_16s_C1R(img, 6*sizeof(Ipp16s), buf, 6*sizeof(Ipp16s), roi1);
Separable_3x3(buf+7, 6*sizeof(Ipp16s), output, 4*sizeof(Ipp16s), roi, kerx, kery);
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Chao Yu (Intel)
Hello,
This looks an image border issue. Image filtering functions assume that for each pixel being processed, adjacent pixels also exist. You may check the following artile for more information on this topic:
http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-processing-an-image-from-edge-to-edge.
Could you look at if thecode bellow work for u?
Ipp16s img[6*6]= { 0, 0, 0, 0, 0, 0,
0, 1, 0,-1, 0, 0,
0, 0,-1, 0, 2, 0,
0, 1, 0,-2, 1, 0,
0, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0 };
Ipp16s output[4*4];
Ipp16s buf[6*6];
Ipp16s kerx[3] = {1, 1, 1};
Ipp16s kery[3] = {1, 1, 1};
IppiSize roi = {4,4};
IppiSize roi1 = {6,6};
ippiCopy_16s_C1R(img, 6*sizeof(Ipp16s), buf, 6*sizeof(Ipp16s), roi1);
Separable_3x3(buf+7, 6*sizeof(Ipp16s), output, 4*sizeof(Ipp16s), roi, kerx, kery);
Thanks,
Chao
I'm maybe missing something, but I still can't get the code to work as expected. the other convolution methods work normally. the attched example should produce the same output, but the separable method somehow disfunctions...
I'd love to hear what am I doing wrong. my complete test code attached.
Thanks,
--Lior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can anyone please have a look? I followd the manual example and I can't get right results.
Thanks,
--Lior
Thanks,
--Lior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lior,
In the file attached, the Separable_3x3 function is using duplicate border (ippBorderRepl), while other two filter functions are using 0 border.
I modified somecode to make that sample more easily to understand ( attached). The code can produce the same output for three filter functions.
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