% in the GS algorithm, the input is what? Is the amplitude of an image, and image of the Fourier amplitude Ye Yu?
close all; clear all; clc; %
% % simulate the complex object
INput=imresize ((imread (' cameraman. Tif)), [256256]).
ObjectAmplitude=double (INput);
ObjectPhase=double (imread (' westconcordorthophoto. PNG '));
ObjectPhase=2 * PI * imresize (objectPhase, [256256])./Max (Max (objectPhase));
The object=objectAmplitude. * exp (1 i. * objectPhase); Cameraman % 's amplitude and westcocordorthophoto' s phase
% % to get images of the amplitude and the amplitude of Fourier plane
Amplitude_object=abs (object); % measuring the amplitude of the object space domain
FT_object=fftshift (fft2 (object));
FT_object_amp=abs (FT_object); % % target amplitude frequency domain need square???????
% % GS algorithm[M, N]=size (object);
Phase=2 * PI * rand (M, N); % produces random phase
For p=1:7 0;
Fxy=Amplitude_object. * exp (1 I * Phase); % the amplitude and phase multiply
Fuv=fftshift (fft2 (fxy));
Fuv_phase=Angle (Fuv); % only in the phase of Fourier transform,
Fuv=FT_object_amp. * exp (1 I * Fuv_phase); % into the target strength of frequency domain
Fxy=ifft2 (ifftshift (Fuv));
The Phase Angle of=(fxy); % only take phase,
End
% % o
Figure, imshow (Amplitude_object, []); The title (' input amplitude);
Figure, imshow (objectPhase, []); The title (' input phase);
Figure, imshow (Phase, []); The title (' retrival Phase recovery Phase ');
CodePudding user response:
The program failed to recover phase, which is wrong?CodePudding user response:
@ ethel2009CodePudding user response:
May I have your this phase back out? Urgent pleaseCodePudding user response:
Phase back out?CodePudding user response:
When I first started to learn how to express the algorithm's input?