Question: The image signal is modified in the frequency space. Modification takes place in three steps: 1) FFT to the original image in the time domain
The image signal is modified in the frequency space.
Modification takes place in three steps:
1) FFT to the original image in the time domain
2) multiply the result by the frequency response of the filter
3) inverse FFT to the result in the frequency domain
Examine the MATLAB code below:
% Fourier Analysis of a Digital Image % load trees I=ind2gray(X,map); % Intensity image = sample matrix [m,n]=size(I); % mxn is the size of the input matirx I figure(1) imshow(I) FI=fft2(I); % Complex amplitudes, c0 occupies row=1 and column=1; % origin of the xy-co-ordinate system SFI=fftshift(FI); % Complex amplitudes,origin in the middle of the matrix, % in this example c0 can be found on row=130 and column=176; % origin of the uv-co-ordinate system. % Amplitude spectrum------------------------------------ apu=log10(abs(SFI)+1); % Logarithmic scaling of amplitudes (standard) b=max(apu(:)); a=min(apu(:)); figure(2) imshow((apu-a)/(b-a)) % Amplitude spectrum, linear scaling into the % interval [0,1] %-------------------Simulating Noise in the Image-------------------------% SF2=SFI; % Making copy of SFI SF2(74,100)=1200*SFI(74,100); % "Pole" positions (74,100) and (186,252) are % of the same distance from the origin at % row=130 and column=176 (matrix SF2 or SFI) % 74-130=-56 (negative u co-ordinate), % 186-130= 56 (positive u co-ordinate) % 100-176=-76 (negative v co-ordinate), % 252-176= 76 (positive v co-ordinate) SF2(186,252)=1200*SFI(186,252); % Complex amplitudes where one pair of % complex amplitudes have been magnified by % 800 ap2=log10(abs(SF2)+1); b2=max(apu(:)); a2=min(apu(:)); figure(3) imshow((ap2-a2)/(b2-a2)) % Modified amplitude spectrum KUVA2=abs(ifft2(SF2)); % Back to spatial domain (kuva-avaruus) figure(4) imshow(KUVA2)
and
a) indicate which commands/command lines implement the options listed above 1)-3)
b) report the difference between commands fft2(I) and fftshift(FI)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
