I am a student that is studying for matlab.
==================================================================
[Question]
Switching magnitude and phase information between two input images
load two different input images
And compare the results of switching the magnitude and phase information of the given inputs.
==================================================================
Reference 1 : Internet users
Reference 2 : http://paeton.tistory.com/15
==================================================================
My answer :
cm=imread('image1.bmp');
figure, imshow('image1.bmp');
cf=fftshift(fft2(cm));
g1=mat2gray(fspecial('gaussian',480,10));
cg1=cf.*g1;
figure,fftshow(cg1,'log');
cgi1=ifft2(cg1);
fftshow(cgi1,'abs');
cf=fftshift(fft2(cm));
g1=mat2gray(fspecial('gaussian',480,50));
cg1=cf.*g1;
figure,fftshow(cg1,'log');
cgi1=ifft2(cg1);
fftshow(cgi1,'abs');
==================================================================
I submit the answer to the teacher, but is wrong.
From it's been two months, but not everyone can give the answer.
I do not know how to solve this problem.
Please help me. Phase and Magnitude to switch the source code, please.