How to get location of central frequency and poles in FFT

1 view (last 30 days)
Thanks in advance to help me out,
I have an image, which transformed into frequency domain using 'Fast Fourier Transformation (fft2)' and then processed using a low pas filter 'gaussian' (part of my code is as follows)
image=imread('FFT_image.jpg'); % my_image is only taken as example (RGB)
subcrop=rgb2gray(imcrop(image,[560 87 500 480])); % region of interest has been selected and converted into gray scale
FFT=fft2(subcrop); % image transformed into frequency domain using in-built command fft2 (for 2D)
FFTS= fftsfift(FFT); % frequency then shifted to center
FFT2=(FFTS-min(min(FFTS)))./(max(max(FFTS))).*255; % I have used this command to display the (image file attached)
imshow(FFT2) % image file is attached, named 'Shifted FFT frequency domain'
TS=circshift(FFTS,66); % shifting the location of the pole (first order) to central frequency (zero order) manually
TS2= (TS-min(min(TS)))./(max(max(TS))).*255;
figure (2)
imshow(TS2) % image is attached 'Poles_shifted_FFT'
Now, how can I locate the position of central frequency (red arrow) and the poles (blue arrow) using any command or inbuilt function. I have to interchange the postion of these two and then convolute with a gaussian low pass filter. Currently I am doing this task manually using the cursor to locate these two points and the get the difference. Then using 'circshift' and put the value by the amount poles needs to be shifted at location of central frequency.
The final output of my image after using the low pass filter is a 'double complex' type. I would like to add false/pseudo color for better understanding. I tried using 'rgb2ind' but these ways are not working. Kindly help me for this also.
(both the images are attached)

Answers (1)

yanqi liu
yanqi liu on 19 Apr 2022
yes,sir,may be use Butterworth band stop filter to location the bright area

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!