spatial frequency interpretation of 2D FFT coeff. from Table 10-5 in IPP 4.0

spatial frequency interpretation of 2D FFT coeff. from Table 10-5 in IPP 4.0

Hi,

I'm using IPP libs for researching on a variety of video processing algorithms quite some time and enjoy its remarkable performance. One of my major interests are FFT based techniques for video filtering/interpolation/ME.
Myproblem is that IPP docs are lacking clear and sufficient in my opinion description of 2D FFT data format (please see my issues 193639,204492 and 250843 - the last is being investigatedsince June04). Some time ago I requested magnitude/phase extensions for 2D FFT (but data related format description for that is also rather savvy). Someone might want to perform processingon these and put it back into appropriate format before Inverse FFT. That's why I'd like again kindly request more info regarding interpretation of 2D FFT data format (both for Table 10-5 and magnitude/phase extension) in order to perform the following example tasks:

a) Low pass filtering in both directions by cutting of/zeroing higher half of frequency spectrum (both H and V)
b) Low pass filtering only in vertical direction by cutting of higher half of V only part of frequency spectrum
c) Low pass filtering only in horizontal direction by cutting of higher half of H only part of frequency spectrum
d) normalization ofFFT magnitudes (ie divide FFT coeffs by its magnitude)

Other than that IPP is really great !

Regards,

AndrewK

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Dear Customer,
I have reviewed those issues you submitted, and they are being reviewed in proper channel at this time.

You can expect to hear fromus via your latest issue in Intel Premier Support soon.

Again, thank you for your interest in Intel IPP.

Regards,
Ying

Message Edited by ysong on 11-09-2004 10:35 AM

Rich, do the following examples help you?

IppStatus fft( void ) {
Ipp32f src[64] = {0}, dst[64];
IppiFFTSpec_R_32f *spec;
IppStatus status;
src[0] = -3; src[9] = 1;
ippiFFTInitAlloc_R_32f( &spec, 3, 3, IPP_FFT_DIV_INV_BY_N, ippAlgHintAccurate );
status = ippiFFTFwd_RToPack_32f_C1R( src, 8*4, dst, 8*4, spec, 0 );
ippiFFTFree_R_32f( spec );
return status;
}
/*
-2.00 -2.29 -0.71 -3.00 -1.00 -3.71 -0.71 -4.00
-2.29 -3.00 -1.00 -3.71 -0.71 -4.00 +0.00 -3.71
-0.71 -3.71 -0.71 -4.00 +0.00 -3.71 +0.71 +0.71
-3.00 -4.00 +0.00 -3.71 +0.71 -3.00 +1.00 -3.00
-1.00 -3.71 +0.71 -3.00 +1.00 -2.29 +0.71 +1.00
-3.71 -3.00 +1.00 -2.29 +0.71 -2.00 +0.00 -2.29
-0.71 -2.29 +0.71 -2.00 +0.00 -2.29 -0.71 +0.71
-4.00 -2.00 +0.00 -2.29 -0.71 -3.00 -1.00 -2.00
x=zeros(8,8);x(1,1)=-3;x(2,2)=1;y=fft2(x);for i=1:8 for k=1:8 fprintf(1,'%5.2f,%5.2f ',real(y(i,k)),imag(y(i,k)));end;fprintf(1,'
');end
-2.00, 0.00 -2.29,-0.71 -3.00,-1.00 -3.71,-0.71 -4.00, 0.00 -3.71, 0.71 -3.00, 1.00 -2.29, 0.71
-2.29,-0.71 -3.00,-1.00 -3.71,-0.71 -4.00,-0.00 -3.71, 0.71 -3.00, 1.00 -2.29, 0.71 -2.00, 0.00
-3.00,-1.00 -3.71,-0.71 -4.00, 0.00 -3.71, 0.71 -3.00, 1.00 -2.29, 0.71 -2.00,-0.00 -2.29,-0.71
-3.71,-0.71 -4.00, 0.00 -3.71, 0.71 -3.00, 1.00 -2.29, 0.71 -2.00,-0.00 -2.29,-0.71 -3.00,-1.00
-4.00, 0.00 -3.71, 0.71 -3.00, 1.00 -2.29, 0.71 -2.00, 0.00 -2.29,-0.71 -3.00,-1.00 -3.71,-0.71
-3.71, 0.71 -3.00, 1.00 -2.29, 0.71 -2.00, 0.00 -2.29,-0.71 -3.00,-1.00 -3.71,-0.71 -4.00,-0.00
-3.00, 1.00 -2.29, 0.71 -2.00, 0.00 -2.29,-0.71 -3.00,-1.00 -3.71,-0.71 -4.00,-0.00 -3.71, 0.71
-2.29, 0.71 -2.00,-0.00 -2.29,-0.71 -3.00,-1.00 -3.71,-0.71 -4.00, 0.00 -3.71, 0.71 -3.00, 1.00
-- even
a b c d e f g h
i p q r s t u v
j w x y z
k
l
m
n
o
00 01 02 03 04 05 06 07

-- even
a+0 b+c d+e f+g h+0 f-g d-e b-c
i+j
k+l
m+n
o+0
m-n
k-l
i-j
*/
IppStatus fft1( void ) {
Ipp32f src[8] = {0}, dst[8];
IppiFFTSpec_R_32f *spec;
IppsFFTSpec_R_32f *spc;
IppStatus st;
src[0] = -3; src[7] = 1;
st = ippiFFTInitAlloc_R_32f( &spec, 3, 0, IPP_FFT_DIV_INV_BY_N, ippAlgHintAccurate );
st = ippiFFTFwd_RToPack_32f_C1R( src, 8*4, dst, 8*4, spec, 0 );
ippiFFTFree_R_32f( spec );
st = ippsFFTInitAlloc_R_32f( &spc, 3, IPP_FFT_DIV_INV_BY_N, ippAlgHintAccurate );
st = ippsFFTFwd_RToPerm_32f( src, dst, spc, 0 );
ippsFFTFree_R_32f( spc );
return st;
}
IppStatus fft_cplx( void ) {
Ipp32fc src[64] = {0}, dst[64], m3 = {-3,0}, one = {1,0};
IppiFFTSpec_C_32fc *spec;
IppStatus status;
src[0] = m3; src[9] = one;
ippiFFTInitAlloc_C_32fc( &spec, 3, 3, IPP_FFT_DIV_INV_BY_N, ippAlgHintAccurate );
status = ippiFFTFwd_CToC_32fc_C1R( src, 8*4*2, dst, 8*4*2, spec, 0 );
ippiFFTFree_C_32fc( spec );
return status;
}
/*
-2.0, 0.0 -2.3,-0.7 -3.0,-1.
0 -3.7,-0.7 -4.0, 0.0 -3.7, 0.7 -3.0, 1.0 -2.3, 0.7
-2.3,-0.7 -3.0,-1.0 -3.7,-0.7 -4.0,-0.0 -3.7, 0.7 -3.0, 1.0 -2.3, 0.7 -2.0, 0.0
-3.0,-1.0 -3.7,-0.7 -4.0, 0.0 -3.7, 0.7 -3.0, 1.0 -2.3, 0.7 -2.0,-0.0 -2.3,-0.7
-3.7,-0.7 -4.0, 0.0 -3.7, 0.7 -3.0, 1.0 -2.3, 0.7 -2.0,-0.0 -2.3,-0.7 -3.0,-1.0
-4.0, 0.0 -3.7, 0.7 -3.0, 1.0 -2.3, 0.7 -2.0, 0.0 -2.3,-0.7 -3.0,-1.0 -3.7,-0.7
-3.7, 0.7 -3.0, 1.0 -2.3, 0.7 -2.0, 0.0 -2.3,-0.7 -3.0,-1.0 -3.7,-0.7 -4.0,-0.0
-3.0, 1.0 -2.3, 0.7 -2.0, 0.0 -2.3,-0.7 -3.0,-1.0 -3.7,-0.7 -4.0,-0.0 -3.7, 0.7
-2.3, 0.7 -2.0,-0.0 -2.3,-0.7 -3.0,-1.0 -3.7,-0.7 -4.0, 0.0 -3.7, 0.7 -3.0, 1.0
*/

Leave a Comment

Please sign in to add a comment. Not a member? Join today