I spent hours looking at other videos or web pages to try to understand why my implementation of the 2D FFT didn't work, and finally that's your video which clarified everything ! Thank you so much !!!
Dr. Mike, your linear algebra book is so good. The sections on SVD and intro PCA are explained so well. This video just answered my question too, thanks for all you do.
Mike , Your videos generally hits the bulls eye. Focusing on extremely critical parts and its nuances of overall concepts, which generally is missed by others. I am looking for little more info on how to elicit out Frequencies and amplitudes from the resultant matrix output. Whether it is DFT ot FFT. Can you provide further pointers.
Thanks, Saimadhav. Getting amplitude is fairly straight forward: just take the magnitude of the Fourier coefficients (MATLAB function abs() ). Slightly trickier is knowing which frequencies you want to extract. The easiest way is to create a Gaussian to produce a low- or high-pass filter (depending on whether you set the Gaussian to be 1 or the non-Gaussian parts to be 1). A narrowband spatial filter would be a ring in the 2D Fourier space. Mike
But why when calculating 2D transform we are first calculating transform for columns, and then transform for rows of the previous result? Why this works? Why we are not calculating transform for columns, and for rows of the input image and then adding it together like in calculating 2D derivative?
When you say at 2:07 that for images the DC frequencies are shifted to the center, is that just for displaying the frequency spectrum? Or is it necessary for using it e.g. to apply a gaussian filter convolution via the convolution theorem?
Both: Shifting the spectrum facilitates interpretation, and it makes it easier to construct a frequency-domain Gaussian for filtering. But the shifting is not necessary in either case.
So, when you transform to frequency space, you loose the ability to, e.g., edit a single pixel in the spatial domain. Because you decorrelated the pixels into freq and phase components?
I have a 512 x 81 matrix in matlab. The matrix represents a image. There is clutter in the image. How do I generate image from that matrix and remove the clutter??
Hi Radhika. The concept is the same. Some of the syntax is a bit different, but hopefully easy enough to translate. The 2D FFT in Python would be np.fft.fft2(image)
The syntax in Python is a bit different from that in MATLAB, but the principle is the same. You can use scipy.fft.fft2 for the 2D Fourier transform, and then use plt.imshow to visualize the results.
The middle corresponds to the DC component, or zero Hz (low frequency). In a 1D FFT, think of how the middle (the y axis) is low frequency as well - same concept
I spent hours looking at other videos or web pages to try to understand why my implementation of the 2D FFT didn't work, and finally that's your video which clarified everything ! Thank you so much !!!
Awesome :)
Thank you Mike!! After going through so many videos, I can now finally understand how the two axis interplay. Well done!
Awesome.
Dr. Mike, your linear algebra book is so good. The sections on SVD and intro PCA are explained so well. This video just answered my question too, thanks for all you do.
Awesome, thank you! 🥰
Great explanation - exactly what I was looking for to fill in some gaps in my knowledge. You did some of the experiments I was curious about. Thanks.
This is amazing, great explanation, was able to give some intuition about something unintuitive (to me)
Thanks :)
Bro you’re the goat! Great explanation 🫡
Thank you, kind internet stranger :)
Thank you for the interesting video! The link for the code stopped working tho. Hope I can reproduce it from the video atleast.
Thank you to upload this video. I have a question. how can I evaluate Phase and Amplitude at a given temperature data?
Thanks for this - Much appreciated. Well done, and well explained!
Glad it was helpful!
Mike , Your videos generally hits the bulls eye. Focusing on extremely critical parts and its nuances of overall concepts, which generally is missed by others. I am looking for little more info on how to elicit out Frequencies and amplitudes from the resultant matrix output. Whether it is DFT ot FFT. Can you provide further pointers.
Thanks, Saimadhav. Getting amplitude is fairly straight forward: just take the magnitude of the Fourier coefficients (MATLAB function abs() ). Slightly trickier is knowing which frequencies you want to extract. The easiest way is to create a Gaussian to produce a low- or high-pass filter (depending on whether you set the Gaussian to be 1 or the non-Gaussian parts to be 1). A narrowband spatial filter would be a ring in the 2D Fourier space.
Mike
But why when calculating 2D transform we are first calculating transform for columns, and then transform for rows of the previous result? Why this works? Why we are not calculating transform for columns, and for rows of the input image and then adding it together like in calculating 2D derivative?
I applied the 1D fft in matlab by using fft(X, [ ], 1) for an FFT of the 7x7 matrix to get the values like at 1:24 but I get different results
Same here, off by a significant figure for some reason... padding?
Could you please tell how to obtain the frequency of a cartesian point on fouriered image in matlab
When you say at 2:07 that for images the DC frequencies are shifted to the center, is that just for displaying the frequency spectrum? Or is it necessary for using it e.g. to apply a gaussian filter convolution via the convolution theorem?
Both: Shifting the spectrum facilitates interpretation, and it makes it easier to construct a frequency-domain Gaussian for filtering. But the shifting is not necessary in either case.
So, when you transform to frequency space, you loose the ability to, e.g., edit a single pixel in the spatial domain. Because you decorrelated the pixels into freq and phase components?
yes, correct. The frequency domain encodes the spatial frequencies that are distributed over the pixels, not the pixels themselves.
Excellent video
how to do match between input image and template image? if I use FFT
I have a 512 x 81 matrix in matlab. The matrix represents a image. There is clutter in the image. How do I generate image from that matrix and remove the clutter??
How can I get the matlab code used in the video? What tool box is required ?
My apologies for the missing code. I added the link in the description. No toolboxes are required, and it will work in MATLAB and in Octave.
I want he code for python. If not then MATLAB is ok. Actually I want to build something like this in my final year project.
Nice video. Could you please tell how to obtain the frequency in 2D Fourier transform spectrum in Python?
Hi Radhika. The concept is the same. Some of the syntax is a bit different, but hopefully easy enough to translate. The 2D FFT in Python would be np.fft.fft2(image)
Thanks Mike
Спасибо!
thank you so much : )
You're welcome!
nice works,我喜欢
谢谢!
hello , lease can you tell me how can I do space domain in python to show image ?please
The syntax in Python is a bit different from that in MATLAB, but the principle is the same. You can use scipy.fft.fft2 for the 2D Fourier transform, and then use plt.imshow to visualize the results.
I am sorry , its just me or to hear you I need a bigger speaker
Sorry I think in the middle should be high frequency, not low frequency.
The middle corresponds to the DC component, or zero Hz (low frequency). In a 1D FFT, think of how the middle (the y axis) is low frequency as well - same concept