Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

IPP v3.0 DCT transform

olivier_prat
Beginner
1,118 Views
Hello,
I'm a bit puzzled with the general DCT transform in IPP v3.0 (not the 8x8 versions).
After forward transforming an image, the inverse transform of this transformed image doesn't yield the original image. Is this normal? I've called both initialisation functions (forward and inverse) and I'm working with the 32f_C1R version of the functions.
By the way, are the low frequencies of the transform at the begining of the image (nearest to the original image pointer)?
Hope someone can help!
0 Kudos
5 Replies
olivier_prat
Beginner
1,118 Views
ok, sorry everyone. My fault. I wasn't comparing the same images... silly me.
0 Kudos
Intel_C_Intel
Employee
1,118 Views
Hi Oliver
I'm glad you solved your problem. Feel free to ask questions if youhave something to ask.
Regards,
Vladimir
0 Kudos
olivier_prat
Beginner
1,118 Views
Allright :-). Here I go!
I'm using the DCT transform functions to solve a 2D partial differential equation. I suppose the DCT transform used in the IPP is the classical:
F(i,j) = sum(k: 0 to N) sum(l: 0 to M) f(k,l).cos[Pi.k.(i+1/2)/N].cos[Pi.l.(j+1/2)/N]
and inverse:
f(i,j) = (4/NM) sum(k: 0 to N) sum(l: 0 to M) F(k,l).cos[Pi.k.(i+1/2)/N].cos[Pi.l.(j+1/2)/N]
I haven't got access to the book referenced as [Rao90] in the documentation so I'm not absolutely sure of that. Can someone confirm this?
Also, is the data in the transformed image packed the straightforward way :F(i,j) stored at pixel location (i,j)?
Are there any constraints involved when using these transform functions not cited in the documentation?
Thanks for any answers.
0 Kudos
Intel_C_Intel
Employee
1,118 Views
According developer in ippiDCT the following equation are used:

F(k,l) = (1/sqrt(N*M))*C(k)*C(l) * sum(i: 0 to N-1) sum(j: 0 to M-1) f(i,j)*cos[Pi*k*(i+1/2)/N]*cos(Pi*l*(j+1/2)/M]

f(i,j) = (1/sqrt(N*M)) * sum(k: 0 to N-1) sum(l: 0 to M-1) C(k)*C(l) * F(k,l)*cos[Pi*k*(i+1/2)/N]*cos(Pi*l*(j+1/2)/M]

where?(?)=1for ?=0and ?(k)=sqrt(2)for k>0

Doesit helps you?

Vladimir

0 Kudos
olivier_prat
Beginner
1,118 Views
Thanks, that should do the trick. I'll check my code against that...
0 Kudos
Reply