# Enhanced Phase Retrieval Method Based on Random Phase Modulation
## 3 Results  
To evaluate the performance of the two existing algorithms and the proposed serial-parallel cascaded approach, we simulated the reconstruction processes using a two-dimensional complex object. As shown in Figure 4, images \"einstein\" and \"galaxia\" were used for the amplitude and phase of the simulated object, respectively, with a resolution of \(1024\times 1024\) pixels. A \"distant planet\" shown in the sub-image of Figure 4b is used as a prominent comparison for the reconstructed results. We use the following parameters: wavelength = 532 nm, pixel size of the recording plane = 5.5 \(\mu\)m, distance from the object plane to SLM = 100 mm, and distance between SLM and the CCD plane = 150 mm. In the simulation, four pairs of random phases and the corresponding measurement intensities are reconstructed. Figure 3: The flow chart of the refinement procedure of \(U_{n}\). Firstly, we evaluate the convergence speed of the serial, parallel, and the proposed serial-parallel cascaded methods. In the reconstruction process, the iteration numbers of the three methods were set to 50, and the iteration number in the cascaded method was allocated as follows: \(n_{1}~{}=~{}5\), \(n_{2}~{}=~{}45\). Figure 5a plots relationships between iteration numbers and mean square errors (MSE) of the reconstructed amplitudes from these three methods. MSE is defined as  
\[\text{MSE}~{}=~{}\frac{1}{XY}\!\!\sum_{\forall x,y}\!\big{|}\big{|}O_{n}(x,y) \big{|}-\big{|}O_{real}(x,y)\big{|}\big{|}^{2}, \tag{1}\]  
where \(O_{n}\) is the reconstructed object distribution after the \(n\)-th iteration, \(n~{}=~{}1,2,\ldots,N\), and \(O_{real}\) represents the real object. \(X\) and \(Y\) are the pixel numbers of the image, while \(x\) and \(y\) are the coordinates of the object plane. As shown in Figure 5a, the convergence speeds of serial and cascaded methods were far faster than that of the parallel method. The superiority of the serial algorithm is evidently manifested, while the first five iterations of the proposed cascaded method were the same as the serial method, thereby reducing MSE to 0.0015. On the other hand, the parallel method required 58 iterations to achieve the same value of MSE. To clearly illustrate the effect of different convergence states on the reconstruction results, the retrieved objects after 50 iterations are displayed in Figure 5b-g. We can see that the serial and cascaded methods achieve excellent results after 50 iterations. The results of the parallel framework were affected by noise since there were not enough iterations, and the contrast of the recovered phase was degraded, as illustrated in the sub-image of Figure 5f. Figure 4: The complex amplitude of the simulated object: (**a**) the amplitude; (**b**) the phase. Figure 5: The convergence speed curves and the reconstructed objects. (**a**) The relationship between iteration number and mean square error (MSE) of the reconstructed amplitude from serial, parallel, and the proposed cascaded reconstruction algorithms, \(n_{1}~{}=~{}5\), \(N=50\). (**b**–**d**) Reconstructed amplitudes of the three methods after 50 iterations; (**e**–**g**) corresponding phases. We use polluted measurements to assess the noise immunity of the three methods. The iteration numbers were set to 80 to further the parallel method's convergence, and the iteration number allocation scheme of the cascaded method was \(n_{1}\ =\ 5,\ n_{2}\ =\ 75\). The noise curves of the three methods are plotted in Figure 6a, where the mean of the added Gaussian noises was 2% of the average of the four measured intensities. As the variance of the added noise increased, the MSEs of the reconstructed amplitudes increased and the imaging quality degraded. Obviously, the degradation speed of the serial algorithm was faster than that of parallel and cascaded methods. Compared with the cascaded framework, the anti-noise performance of the parallel method was worse when variances of the added noise were less than 46%, since the parallel method did not meet complete convergence, even after 80 iterations.