简体   繁体   中英

how can I get back a real signal after applying ifft2?

After applying the following command on matlab:

>> fftshift(fft2(rand(1,5)))
ans =
   0.1073 + 0.8753i  -0.1051 + 0.2787i   1.9568 + 0.0000i  -0.1051 - 0.2787i   0.1073 - 0.8753i

The components with zero imaginary part in the middle of the signal is the DC component, which always has zero imaginary part. If you look a bit closer you will find that the signals are conjugate symmetric around the DC component, ie, they are symmetric with opposite sign on the imaginary part.

So, how can I set some frequencies to zero, taking into consideration the previous characteristics, to get a real signal after ifft2 ?

You just need to maintain complex conjugate symmetry in order to get a real-valued signal. So if you're just setting bins to zero then make sure you do this symmetrically, eg

0.1073 + 0.8753i 0 + 0i 1.9568 + 0.0000i 0 + 0i 0.1073 - 0.8753i

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM