An Automatic Optimized Method for a Digital Optical Phase Conjugation System in Focusing through Scattering Media

In this paper, a reliable automatic optimized method for a digital optical phase conjugation (DOPC) system based on a multipopulation genetic algorithm (MPGA) is proposed for improving the compensation quality of DOPC. The practical implementation and compensation quality of DOPC in focusing through scattering media are greatly limited by imperfect pixel alignment, optical aberration, and mechanical error in the DOPC system. For comprehensively solving the above problems, the concept of global optimization is introduced by Zernike polynomials (Zernike modes) to characterize overall imperfections, and MPGA is used to search for the most optimal Zernike coefficient and compensate for the overall imperfections of the DOPC system. The significant optimization ability of the proposed method is verified in DOPC-related experiments for focusing through scattering media. The peak-to-background ratio (PBR) of the OPC focus increases 174 times that of the initial OPC focus. Furthermore, we evaluated the optimization results of the proposed method with a fitness function of intensity fitness and correlation coefficient fitness in MPGA. The results show that the optimized capability is excellent and more efficiently used than the correlation coefficient fitness function in the Zernike modes.


Introduction
Focusing and imaging through scattering media are of uttermost importance in bioimaging [1][2][3][4][5][6][7][8] and measurements [9]. In scattering media, the extensive scattering of light is a significant obstacle for optical focusing and imaging [10]. For suppression of the scattering effect, various methods have been proposed and have achieved excellent compensation effects, such as modulating wavefront with transmission matrix measurement [11][12][13], iterative wavefront optimization [14,15], and optical phase (4) where H L k x , k y is the Fourier change of the lens factor, ⊗ represents convolution; H k x , k y , k x , k y is a transfer function from the input mode k x , k y to the transmission mode k x , k y . E f 1 k x , k y is the initial ideally focused field without a scattering medium that is used as target-focused field. When the phase conjugation is ideal (i.e., E 1 k x , k y = E 1 * k x , k y ), then from Equation (4), it is concluded that E f 1 k x , k y = E f 1 k x , k y . However, it is not exactly equal in practical experiments. In order to maximize the correlation coefficient between E f 1 k x , k y and E f 1 k x , k y , it is necessary to seek an efficient and accurate algorithm for the optimal Zernike coefficients. In this paper, we propose an automatic optimized method for a DOPC system based on a multipopulation genetic algorithm Appl. Sci. 2020, 10, 8321 4 of 12 (MPGA). Among algorithms, with the enhancement of computing capability, deep learning has gained more accuracy in image segmentation than traditional segmentation and is widely used in medical image processing [41]. A comparison of fuzzy logic (FL), traditional neural networks (NNs), and genetic algorithms (GAs) in image segmentation has been discussed [42]. As for our experiment, it is difficult to obtain the training set needed for NN training. Additionally, there is no guarantee of a global optimal solution. Therefore, we used MPGA to obtain a faster global optimal solution. Moreover, compared with the traditional single-point search method, MPGA is not limited by the precision of the sampling interval. Additionally, it does not demand balanced sampling accuracy and iteration time, which means it can do a fast search for more accurate optimization parameters. The flow chart of the automatic optimized method for a DOPC system is outlined in Figure 1a. Taking focusing through scattering media as an example, the optimization process is illustrated as follows. Above all, after the initial pixel alignment in the DOPC system, the initial phase (ϕ 0 ) of the scattering media is obtained and loaded into a spatial-light modulator (SLM). After DOPC system, an initial OPC focus is obtained. We start with the focus and the initial phase is used as the current initial state of MPGA. The optimal Zernike coefficients are obtained by MPGA iteration. The optimal Zernike phase generated by the optimal Zernike coefficients is added to the initial phase and then loaded into the SLM. After DOPC system, an optimal focus is eventually obtained. , f x y E k k , it is necessary to seek an efficient and accurate algorithm for the optimal Zernike coefficients. In this paper, we propose an automatic optimized method for a DOPC system based on a multipopulation genetic algorithm (MPGA). Among algorithms, with the enhancement of computing capability, deep learning has gained more accuracy in image segmentation than traditional segmentation and is widely used in medical image processing [41]. A comparison of fuzzy logic (FL), traditional neural networks (NNs), and genetic algorithms (GAs) in image segmentation has been discussed [42]. As for our experiment, it is difficult to obtain the training set needed for NN training. Additionally, there is no guarantee of a global optimal solution. Therefore, we used MPGA to obtain a faster global optimal solution. Moreover, compared with the traditional single-point search method, MPGA is not limited by the precision of the sampling interval. Additionally, it does not demand balanced sampling accuracy and iteration time, which means it can do a fast search for more accurate optimization parameters. The flow chart of the automatic optimized method for a DOPC system is outlined in Figure 1a. Taking focusing through scattering media as an example, the optimization process is illustrated as follows. Above all, after the initial pixel alignment in the DOPC system, the initial phase ( 0 ϕ ) of the scattering media is obtained and loaded into a spatial-light modulator (SLM). After DOPC system, an initial OPC focus is obtained. We start with the focus and the initial phase is used as the current initial state of MPGA. The optimal Zernike coefficients are obtained by MPGA iteration. The optimal Zernike phase generated by the optimal Zernike coefficients is added to the initial phase and then loaded into the SLM. After DOPC system, an optimal focus is eventually obtained. The flow chart of MPGA is shown in Figure 1b. The initial populations are divided into 8 subpopulations, the number of individuals in each population is 15, and each individual is one vector of Zernike coefficients. After that, the parallel traditional genetic algorithms (GAs) are implemented on each population. Each GA coded by a real number has a 10% mutation rate and a 90% crossover rate. According to the fitness function, information between individuals is constantly exchanged through selection, crossover, and mutation operations to continuously select individuals. Individuals with low fitness values for the environment are eliminated, and the surviving individuals will automatically group into new groups. Additionally, 30% of optimal individuals in each subpopulation are exchanged to form a new population every 20 iterations. Therefore, the migration strategy can accelerate convergence [43]. Through constant updating and iteration, the optimal individual satisfying the fitness function can be finally acquired. The iteration of the algorithm is 100. The flow chart of MPGA is shown in Figure 1b. The initial populations are divided into 8 subpopulations, the number of individuals in each population is 15, and each individual is one vector of Zernike coefficients. After that, the parallel traditional genetic algorithms (GAs) are implemented on each population. Each GA coded by a real number has a 10% mutation rate and a 90% crossover rate. According to the fitness function, information between individuals is constantly exchanged through selection, crossover, and mutation operations to continuously select individuals. Individuals with low fitness values for the environment are eliminated, and the surviving individuals will automatically group into new groups. Additionally, 30% of optimal individuals in each subpopulation are exchanged to form a new population every 20 iterations. Therefore, the migration strategy can accelerate convergence [43]. Through constant updating and iteration, the optimal individual satisfying the fitness function can be finally acquired. The iteration of the algorithm is 100. The iteration time is 1925.7 s, and the single iteration time is about 200 ms, which concludes 150 ms CCD sampling time and 50 ms computing time. It should be emphasized that the theoretical minimum iteration time of this method depends on the SLM refresh frequency, which is 60 Hz, and the iteration time is 16.7 ms. The selection of fitness function is quite important to ensure that the MPGA quickly converges to a Appl. Sci. 2020, 10, 8321 5 of 12 global optimum. We introduced the Pearson correlation coefficient (γ) [44,45] as the fitness function, which is written as where I f k x , k y . k x and k y denote the coordinates of the image. I f 1 k x , k y is the intensity of the optimized focused field; I f 1 k x , k y is the intensity of the target focused field. The Pearson correlation coefficient (γ) is suitable for different complex target patterns and is widely used as any shape of the reference object, especially in the scattering field.

Experiment and Discussion
The automatic optimized method for the DOPC system is performed through the following two steps.
Step 1: achieve the initial pixel alignment of the DOPC system and obtain the initial phase.
Step 2: finish the optimization step based on this method.

Initial Conjugate Phase Acquisition
The experimental DOPC system is shown in Figure 2. The illumination beam (632.8 nm) was split into two beams by BS1: an object beam and a reference beam. A1 and A2 were used to adjust the interference field to the appropriate intensity. A half-wave plate (H) was used to adjust the polarization to a horizontal direction to ensure the maximum modulation efficiency of the SLM (Holoeye, PLUTO-VIS-016). L2, L3 and L5, L6 are aspherical lenses that were used to expand the reference beam and the object beam to the appropriate size. The diameters were 24 and 4 mm, respectively. In the object beam, a scattering medium (Thorlabs, DG-220) was placed in the back of the microscope objective (MO1, 20X, NA = 0.4), and the scattering field was collected by MO2 (20X, NA = 0.4). The MO3 (20X, NA = 0.4) and the hole were used to expand and filter the object beam. The reference beam passed through a quarter-wave plate to achieve phase shift holography. The scattering field was interfered with by the reference beam by BS3. The SLM plane was directly imaged onto the CCD1 (Teledyne DALSA, G2-GC10-T4095) target by L8. Additionally, the interference intensity on the SLM was recorded by CCD1. Phase measurement of the scattering field was realized by the two-step digital phase shift holography using a quarter-wave plate (Q), and the conjugate phase of the scattering field can be expressed by ( [40]) where * represents the complex conjugate. In the playback step, after adding the conjugate phase to the SLM, the conjugate beam propagated to BS2 and was focused. The final focus field was recorded by CCD2 (IMPERX, GEV-B2021M-TF000). Initial pixel alignment of the DOPC system is described in detail in Section 3.1.2.

Initial Pixel Alignment of the DOPC System
The initial phase ϕ 0 by the two-step digital phase shift holography method has enough precision for compensation. In contrast, pixel misalignment has a greater influence on the experiment. Several pixel misalignments can greatly restrict the final optimization. Thus, it is necessary to carry out the initial pixel alignment of the DOPC system before optimization. In the DOPC system, the optimal performance requires a pixel alignment between object light and conjugate light on the surface of the scattering medium and pixel alignment between the SLM and CCDs. The SLM should be perpendicular to the incident reference beam. The power of the beam, back-propagated through the MO1-3, is measured by a power meter placed between L3 and M2, and the back-propagating signal is maximized by adjusting the rotation platform of the SLM carefully. In such a way, the phase conjugate beam and the object beam are roughly in a total optical path and act at the same position as the scattering medium (SM).

Initial Pixel Alignment of the DOPC System
The initial phase 0 ϕ by the two-step digital phase shift holography method has enough precision for compensation. In contrast, pixel misalignment has a greater influence on the experiment. Several pixel misalignments can greatly restrict the final optimization. Thus, it is necessary to carry out the initial pixel alignment of the DOPC system before optimization. In the DOPC system, the optimal performance requires a pixel alignment between object light and conjugate light on the surface of the scattering medium and pixel alignment between the SLM and CCDs. The SLM should be perpendicular to the incident reference beam. The power of the beam, back-propagated through the MO1-3, is measured by a power meter placed between L3 and M2, and the back-propagating signal is maximized by adjusting the rotation platform of the SLM carefully. In such a way, the phase conjugate beam and the object beam are roughly in a total optical path and act at the same position as the scattering medium (SM). Then, pixel-to-pixel alignment is required between CCD1 and the SLM. The SLM plane is directly imaged on the CCD1 plane via L8. When the pixel dimensions of CCD1 and the SLM are 6 and 8 microns, the pixel-size matching can be addressed by adjusting μ and v based on where μ is the length between SLM and L8, ν is the length between CCD1 and L8, f is the focal length of L8 (f = 100 mm), M is equal to the ratio between dCCD1 and dSLM. dCCD1 is the pixel dimensions of CCD1, and dSLM is the pixel dimensions of the SLM. After that, a phase pattern of a negative United States Air Force (USAF) target was loaded in the SLM, and the corresponding image was obtained by CCD1, as shown in Figure 3a,b. According to the relationship between the pattern and the image, we can determine the pixel correspondence Then, pixel-to-pixel alignment is required between CCD1 and the SLM. The SLM plane is directly imaged on the CCD1 plane via L8. When the pixel dimensions of CCD1 and the SLM are 6 and 8 microns, the pixel-size matching can be addressed by adjusting µ and v based on where µ is the length between SLM and L8, ν is the length between CCD1 and L8, f is the focal length of L8 (f = 100 mm), M is equal to the ratio between d CCD1 and d SLM . d CCD1 is the pixel dimensions of CCD1, and d SLM is the pixel dimensions of the SLM. After that, a phase pattern of a negative United States Air Force (USAF) target was loaded in the SLM, and the corresponding image was obtained by CCD1, as shown in Figure 3a,b. According to the relationship between the pattern and the image, we can determine the pixel correspondence between the SLM and CCD1. We subtracted the inverted image of CCD1 from the pattern loaded by the SLM, as shown in Figure 3c. The magenta part represent s the pattern loaded by SLM, and the green one represent s the inverted image of CCD1. The green and magenta ones should be completely consistent in size and position, which means that the pixel alignment between the SLM and the CCD is achieved. The misalignment of pixels can be greatly eliminated by fine-tuning the pixel correspondence, as shown in Figure 3c,d. In this way, the rough pixel alignment between the SLM and CCD1 was achieved. Additionally, the initial pixel alignment of the DOPC system is finished.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 7 of 12 correspondence, as shown in Figure 3c,d. In this way, the rough pixel alignment between the SLM and CCD1 was achieved. Additionally, the initial pixel alignment of the DOPC system is finished.

Focusing through the Scattering Media Based on the Automatic Optimized Method for DOPC System
Based on the automatic optimized method mentioned above, the optimization ability of compensation on OPC focusing was verified, and the experimental results are shown in Figure 4. Figure 4a shows the image by CCD2 when the phase of the SLM was set to 0, which means the DOPC system was not used. At the same time, the conjugate beam propagated back to the transmission through scattering medium was an unmodulated plane wave. After carefully aligning the system conventionally, the initial OPC focus through the SM can be obtained, as shown in Figure 4d. Figure  4g shows the conjugate phase loaded in the SLM. Instead of initiating the MPGA positions completely randomly, here, we designated the initial position as the initial OPC focus. The correlation coefficient was chosen as the fitness function. We compared the compensation effect of only optimizing misalignment parameters Δx, Δy, and Δz (misalignment parameters in the three displacement axes), with Zernike polynomial optimization. Here, the two situations can be simplified and defined as the Δ-xyz modes and Zernike modes, respectively. After the above optimization process by MPGA, the final optimal compensation phase of the two modes loaded into the SLM can be written as

Focusing through the Scattering Media Based on the Automatic Optimized Method for DOPC System
Based on the automatic optimized method mentioned above, the optimization ability of compensation on OPC focusing was verified, and the experimental results are shown in Figure 4. Figure 4a shows the image by CCD2 when the phase of the SLM was set to 0, which means the DOPC system was not used. At the same time, the conjugate beam propagated back to the transmission through scattering medium was an unmodulated plane wave. After carefully aligning the system conventionally, the initial OPC focus through the SM can be obtained, as shown in Figure 4d. Figure 4g shows the conjugate phase loaded in the SLM. Instead of initiating the MPGA positions completely randomly, here, we designated the initial position as the initial OPC focus. The correlation coefficient was chosen as the fitness function. We compared the compensation effect of only optimizing misalignment parameters ∆x, ∆y, and ∆z (misalignment parameters in the three displacement axes), with Zernike polynomial optimization. Here, the two situations can be simplified and defined as the ∆-xyz modes and Zernike modes, respectively. After the above optimization process by MPGA, the final optimal compensation phase of the two modes loaded into the SLM can be written as z 1 ρ cos θ + z 2 ρ sin θ + z 3 2ρ 2 − 1 +z 4 ρ 2 cos 2θ + z 5 ρ 2 sin 2θ + z 6 3ρ 2 − 1 ρ cos θ +z 7 3ρ 2 − 1 ρ sin θ + z 8 6ρ 4 − 6ρ 2 + 1 where ∆x, ∆y, ∆z are misalignment parameters in the three displacement axes. f x and f y are spatial frequency; λ is the wavelength; ϕ 0 is the initial conjugate phase of the scattering field; the origin of (ρ, θ) is selected in the center of the SLM panel.z 1 : tilt of X; z 2 : tilt of Y; z 3 : focus; z 4 : focus and astigmatism of 0 • ; z 5 : focus and astigmatism of 45 • ; z 6 : coma and tilt of X; z 7 : coma and tilt of Y; z 8 : spherical and focus.
In ∆-xyz mode, the final OPC focus was acquired, as shown in Figure 4e. The peak-to-background ratio (PBR) [31,32] of the OPC focus increased from the original 310 to 16,300, which is defined as the ratio of the peak intensity of the OPC focus to the mean intensity of the speckle pattern when a random phase map is loaded in the SLM. The correlation coefficient is a statistical index used to reflect the degree of correlation between the ideal focus and the OPC focus. The value of γ increased from the original 0.41 to 0.73. In the Zernike modes, after the optimization step was completed, the final OPC focus was acquired, as shown in Figure 4f. The Zernike coefficients of the global compensation phase from the MPGA in this experiment are given in Figure 4b. The PBR of the OPC focus increased from the original 310 to 54,000; it increased 174 times that of the initial OPC focus. It achieved about 3.3 times the enhancement of compensation effect compared with the ∆-xyz modes. The correlation coefficient (γ) with Zernike modes increased from the original 0.41 to 0.78, which has a higher interrelationship than the 0.73 score of the ∆-xyz modes. The line profiles of the central row of the focal spot are shown in Figure 4c; the full width at half maximum (FWHM) of the focal spot decreased from 35.4 to 19.7 µm. It is smaller than the 21.4 µm in the ∆-xyz modes. Comparing Figure 4e,f, it can be concluded that the Zernike modes can not only compensate for the misalignment parameters in the three displacement axes but also suppress the aberration of the system by decreasing the noise around the focal spot. The comparison of optimization abilities under the three methods is shown in Table 1. Obviously, the compensation quality of DOPC is greatly optimized by Zernike modes in the automatic optimized method, which is better than the ∆-xyz modes. Moreover, we use circular polynomials as Zernike modes, which are widely employed in circular pupils. When applying them to a rectangular area, such as the SLM, they might not compensate for the optical aberrations at the corners [46]. Using rectangular polynomials [46,47] might further improve the compensation effect.  In Δ-xyz mode, the final OPC focus was acquired, as shown in Figure 4e. The peak-tobackground ratio (PBR) [31,32] of the OPC focus increased from the original 310 to 16,300, which is defined as the ratio of the peak intensity of the OPC focus to the mean intensity of the speckle pattern when a random phase map is loaded in the SLM. The correlation coefficient is a statistical index used to reflect the degree of correlation between the ideal focus and the OPC focus. The value of γ increased from the original 0.41 to 0.73. In the Zernike modes, after the optimization step was completed, the final OPC focus was acquired, as shown in Figure 4f. The Zernike coefficients of the global compensation phase from the MPGA in this experiment are given in Figure 4b. The PBR of the OPC focus increased from the original 310 to 54,000; it increased 174 times that of the initial OPC focus. It achieved about 3.3 times the enhancement of compensation effect compared with the Δ-xyz modes. The correlation coefficient (γ) with Zernike modes increased from the original 0.41 to 0.78, which has a higher interrelationship than the 0.73 score of the Δ-xyz modes. The line profiles of the central row of the focal spot are shown in Figure 4c; the full width at half maximum (FWHM) of the focal spot decreased from 35.4 to 19.7 μm. It is smaller than the 21.4 μm in the Δ-xyz modes.
Comparing Figure 4e,f, it can be concluded that the Zernike modes can not only compensate for the  For further exploration of the optimized capability of the automatic optimized method, we used intensity fitness as the fitness function of MPGA. Intensity fitness is defined as the comparison between Appl. Sci. 2020, 10, 8321 9 of 12 the maximum intensity of the focus and the maximum intensity of the target focus. The results of intensity fitness are compared with Figure 4f, representing the correlation coefficient. During the optimization in the two cases, we recorded the typical normalized intensity and the correlation coefficient curves of the OPC focus with generation, as shown in Figure 5a,b. The normalized intensity is defined as the ratio of peak intensity of the current focal spot and the maximum intensity 65,535, which depends on the bit depth of the camera; it decreased from 0.77 to 0.55, and the correlation coefficient (γ) decreased from 0.78 to 0.68. Figure 5c shows the line profiles of the central row of the focal spot; the FWHM of intensity fitness was about 23.3 µm, which is worse than the FWHM of 19.7 µm in Figure 4f. Additionally, the PBR was about 20,400 with intensity fitness. The comparison of optimization abilities in two fitness functions is shown in Table 2. This method with Zernike modes can raise the correlation coefficient to above 0.7. Thus, for a correlation coefficient of less than 0.7, this method is available for compensation improvement. Moreover, there is no specific relationship between the iteration time and initial input. The misalignment in DOPC has no direct effect on the final iteration time. In summary, it is concluded that the optimized capability of the automatic optimized method for DOPC quality is more obvious when the correlation coefficient (γ) is chosen as a fitness function with the Zernike modes. For further exploration of the optimized capability of the automatic optimized method, we used intensity fitness as the fitness function of MPGA. Intensity fitness is defined as the comparison between the maximum intensity of the focus and the maximum intensity of the target focus. The results of intensity fitness are compared with Figure 4f, representing the correlation coefficient. During the optimization in the two cases, we recorded the typical normalized intensity and the correlation coefficient curves of the OPC focus with generation, as shown in Figure 5a,b. The normalized intensity is defined as the ratio of peak intensity of the current focal spot and the maximum intensity 65,535, which depends on the bit depth of the camera; it decreased from 0.77 to 0.55, and the correlation coefficient (γ) decreased from 0.78 to 0.68. Figure 5c shows the line profiles of the central row of the focal spot; the FWHM of intensity fitness was about 23.3 μm, which is worse than the FWHM of 19.7 μm in Figure 4f. Additionally, the PBR was about 20,400 with intensity fitness. The comparison of optimization abilities in two fitness functions is shown in Table 2. This method with Zernike modes can raise the correlation coefficient to above 0.7. Thus, for a correlation coefficient of less than 0.7, this method is available for compensation improvement. Moreover, there is no specific relationship between the iteration time and initial input. The misalignment in DOPC has no direct effect on the final iteration time. In summary, it is concluded that the optimized capability of the automatic optimized method for DOPC quality is more obvious when the correlation coefficient (γ) is chosen as a fitness function with the Zernike modes.

Conclusions
In conclusion, an automatic optimized method for a DOPC system based on the MPGA has been presented to optimize the compensation quality of DOPC. This method improves the compensation quality of DOPC by compensating the overall phase introduced by the problems of pixel alignment, optical aberration, and mechanical error. For comprehensively solving the above problems, we introduced the concept of global optimization by Zernike polynomials (Zernike modes) to characterize overall imperfections and used the MPGA to search for the optimal Zernike coefficients in the DOPC system. In addition, to clearly characterize the advantages of Zernike modes, we introduced the ∆-xyz modes as optimization parameters for comparison. Experimentally, the PBR of the OPC focus with Zernike modes increased 174 times to that of the original focus, which achieves about 3.3 times the enhancement of compensation effect compared with the ∆-xyz modes. The correlation coefficient increased from the original 0.41 to 0.78, which is better than the 0.73 score of the ∆-xyz modes. Furthermore, we evaluated the optimization results of the proposed method with the fitness functions of intensity fitness and correlation coefficient fitness in the MPGA. The results show that the optimized capability is excellent and the correlation coefficient is more suitable as a fitness function in Zernike modes. Moreover, it should be mentioned that this method only demands a rough initial pixel alignment. In the future, further optimization of the devices is expected to further shorten the optimization time of the algorithm and improve experimental efficiency [48]. For different grit sizes of diffuser media, the smaller grit size introduces larger speckles and output angles [49]. The larger output angle exceeds the collection capacity of the microscope objective. It will reduce the measurement accuracy of scattering wavefronts in the scattering medium and affect the final PBR of DOPC. Therefore, for different grit sizes of diffuser media, it is necessary to use the appropriate microscope objective to collect maximum scattering information. Finally, we hope that this work contributes to the practical uses of the DOPC system.