I can get the Fourier transform frequency domain using the MATLAB fft2() code, but I want to get the highest spectrum magnitudes and the DC. What should I do?
The purpose is to :
- Get the frequency domain representation F(U,v) of g(x,y) using Fourier Transform.
- What is the DC value of (u,v)?
- Select the three highest spectrum magnitudes as the image’s signature vector.
- Obtain the signature vector for each image in each class.
- Use nearest neighbor to assign f(u,v) to its closest class.
I found this code that gets the magnitude:
% Perform 2D FFTsfftA = fft2(double(imageA));% Display magnitude and phase of 2D FFTsfigureimshow(abs(fftshift(fftA)),[24 100000]);colormap graytitle('Image A FFT2 Magnitude')