Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® Integrated Performance Primitives
- IPP 2D convolution work properly on demo data only

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

Highlighted
##

alexandr_s_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-21-2014
05:27 AM

29 Views

IPP 2D convolution work properly on demo data only

Hello,

I have a question.

There are two functions of 2D convolution in attached cpp-file.

The first one is a standard convolution on floating-point data.

The second is a function, that use ippiConvValid_32f_C1R() for convolution.

When I use data of this example (https://software.intel.com/sites/products/documentation/doclib/ipp_sa/80/ipp_manual/GUID-DB033BE0-5621-4C7A-AA34-B8E0BCA74B0C.htm) with integer numbers for source matrix and kernel, everything is ok, results of two functions are equal, but when i use generator of random integer or floating-point numbers, ippiConvValid_32f_C1R() returns wrong result.

What's the problem?

7 Replies

Highlighted
##

Chao_Y_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-24-2014
12:51 AM

29 Views

Hello,

Which version of Intel IPP are you using now?

ippiConvValid_ functions is deprecated, could you use the ippiConv_xxx as the replacement?

Thanks,

Chao

Highlighted
##

alexandr_s_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-29-2014
03:27 AM

29 Views

I would like to buy the license if it will work properly.

Now, I have tried to use the function ippiConv_32f_C1R(...) instead ippiConvValid_32f_C1R(...), but i get the same result.

I noticed, when i am using the kernel and src1 from example(https://software.intel.com/sites/products/documentation/doclib/ipp_sa/80/ipp_manual/GUID-F26546FF-2F62-4CC2-888E-9849C8D0DE78.htm), both functions are working properly, but if I try to change at least one number in the kernel, thus disrupting its "symmetry", I get absolutely wrong result. What else can i do?

Highlighted
##

Igor_A_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-29-2014
07:34 AM

29 Views

Hi Alexander,

I guess you've implemented correlation instead of convolution - Ii think that if you perform a mirroring of your generated kernel (so that right bottom pixel becomes the left top) for your function (or for IPP) - you'll get the expected and comparable result.

regards, Igor

Highlighted
##

alexandr_s_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-30-2014
03:38 AM

29 Views

I don't quite understand, what you mean?

Highlighted
##

alexandr_s_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-30-2014
05:12 AM

29 Views

In the documentation for the function I see the formula

I need the exactly this formula for convolution, not for correlation. In documentation I don't see any limitation that kernel should be mirrored (symmetric).

Highlighted
##

Igor_A_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-31-2014
12:34 AM

29 Views

Hi Alexander,

I've said nothing about symmetry. It's seen from the formula that kernel (g in the formula) is applied from the top index to bottom. So for your implementation of convolution (I guess) you should perform kernel transposition in the next manner:

from:

k00,k01,k02

k10,k11,k12

k20,k21,k22

to:

k22,k21,k20

k12,k11,k10

k02,k01,k00

regards, Igor

Highlighted
##

alexandr_s_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-31-2014
01:08 AM

29 Views

Hi, Igor,

After transposition of the kernel, you recommended, it works!

Thank you so much!

For more complete information about compiler optimizations, see our Optimization Notice.