- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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?
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I have downloaded last demo version IPP two weeks ago.
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?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I don't quite understand, what you mean?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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).
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi, Igor,
After transposition of the kernel, you recommended, it works!
Thank you so much!

- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable