In computational optics, phase retrieval is a widely studied field. Phase retrieval seeks to solve the phase problem, i.e., to retrieve the missing information about the phase of an object from intensity measurements. Over years, many phase retrieval algorithms have been developed. The first successful algorithm was the Gerchberg-Saxton algorithm based on alternating projections [1]. Here, we describe implementation of the Gerchberg-Saxton algorithm in digital signal processors to be used in embedded systems for phase retrieval of transparent phase objects.
First, software is written in MPLAB IDE environment for a digital signal processor dsPIC30F6014A. In simulations, a cross-section of tertiary spherical aberration is used as the test object. Distribution of light intensity is calculated in the central plane and planes equally spaced on both sides of the central plane. The plane of unknown phase is propagated forth and back, and the phase is continuously updated while the intensity after the propagation is replaced by the actual intensity. The true phase is approached iteratively and compared to the actual phase.
Figure below shows the results of simulations – the original object is shown on the left while its reconstruction is shown on the right. Similarity between the original object and the reconstruction can be seen clearly. The noise present in the reconstructed object may be due to an insufficient number of iterations and/or inappropriate initial guess of the phase.

Next, we plan to implement the digital signal processor in an embedded system where it will receive real data from an imaging sensor. It is intended to study two-dimensional objects by optically splitting them into parallel vectors each of which will be retrieved by the algorithm implemented in the embedded system. Next, all the vectors will be merged based on the method of least squares. In this way, the time required to retrieve two-dimensional objects could be significantly reduced compared to the time required to retrieve these objects from two-dimensional diffraction patterns (see Figure 2).
