A Smart Algorithm for Optimizing Bandpass Filter in Phase Volume Measurement with Off-axis Quantitative Phase Imaging

: The advantages of measuring the volume of a phase object through off-axis quantitative phase imaging include fast acquisition rate, great temporal stability, and high spatial phase sensitivity. However, the accuracy of a measured volume is limited by the different noises of measurement system and finite bandpass filter applied in the phase-extraction algorithm. To improve the accuracy of the volume measurement, it has been recommended to apply an appropriate bandpass filter in the procedure of phase retrieval. An optimum size of bandpass filter can provide better accuracy by passing sample phase information and blocking unwanted noises. The present study introduce a smart method which can provide optimum bandpass filter for each object so that the accuracy of phase volume measurement increases as much as possible. Different type of windows is studied in the phase retrieval procedure and by comparing the results, the Gaussian window function is suggested to be utilized in the smart algorithm. Finally, the feasibility of the method is proved by applying the smart algorithm on our previous experiment results related to quantitative phase imaging on a bead, an optical fiber, and a spherical mirror. The results obtained by the smart algorithm method are in good agreement with the optimum filter obtained by testing different filter sizes.


Introduction
Quantitative phase imaging (QPI) is considered as a substantial method for measuring the volume of phase objects such as biological cells, transparent plates, optical fibers, and microparticles. During the recent years, the different types of the method have been proposed such as Fourier phase microscopy [1], Hilbert phase microscopy [2], diffraction phase microscopy [3,4], and digital holographic microscopy [5]. Despite the several advantages of the methods such as fast acquisition rate, great temporal stability, and high spatial phase sensitivity [6][7][8], they suffer from the various sources of errors which lead to a decrease in measurement accuracy like out-of-focusing [9,10], speckles and shot noises [11,12], and point spread function of system [13]. The present study seeks to analyze the effect of the length and type of bandpass filter on the phase extraction algorithm. Based on the results, there is an optimum filter which reduces relative error in volume measurement and improves accuracy significantly. The size of this optimum bandpass filter is not unique and dependent on the size and phase of samples, and amount of different noises in the measurement. Finding an optimum size for unknown samples can be considered as a challenging issue for operators. In this regard, the use of an automatic algorithm providing optimum filter can be helpful. In this paper we introduce a smart algorithm which can automatically adjust the size of band pass filter in order to minimize the error of phase volume measurement. Identifying the optimum filter for the operators measuring real samples without the need for prior knowledge regarding phase objects is considered as the preponderant feature of the suggested method.

Theory
The interference between two light beams is commonly used for object phase measurement. One beam passes through a sample, and another acts as a reference without sample information. The tilt angle between the beams is utilized for producing a certain spatial frequency in an interference pattern. Further, the phase information of sample is extracted through numerical analysis and applied to determine its volume. For simplicity, we consider one-dimensional function is considered in the following discussion. The interferogram pattern can be expressed as follows: where E and E (x) are respectively considered as the electric field of reference and sample beams. Due to the transparency of most of phase objects the amplitude of E (x) can be considered to be a constant. In order to extract sample phase, one transforms the captured pattern in Eq. (1) to the frequency domain. The Fourier transform of Eq. (1) contains three peaks: a DC term corresponding to the ampiltude of the electric fields and two peaks related to phase of sample [13]. The phase function can be obtained by eliminating the negative spatial frequencies and DC term at the center, and taking the inverse Fourier transform of that. The electric field function is considered as a bandwidth-limited function in the frequency domain due to its mathematical properties. This function has a peak at one point and provides little information about the sample at frequencies far from this peak. The sample information at high frequencies are dominated by the noises of system. Thus, utilizing a proper bandpass filter is recommended to minimize the effect of the noise far from the peak by [13]: where F(k) represents the Fourier transformation of I(x) and q refers to the spatial frequency of interference pattern. Additionally, ϕ(x) indicates the phase, which can be calculated by taking the angle part of f (x). I and I are the intensity of sample beam and reference beam respectively. Further, W (k-q) illustrates bandpass filter, which can be the different types of window function such as the Bartlett, Hann, and Gaussian which are usually used in QPI. The size of window W (k-q) should be selected carefully. The small-size bandpass filter can annihilate sample information near the peak and large-size windows result in adding more noise to the final phase. Therefore, an optimum size of W (k-q) should be selected for achieving minimum error. For instance, in the measurement of the curvature of disk laser [14] we used a spherical mirror for calibrating the measurement. Figure 1 displays the effect of the different sizes of bandpass filter on the accuracy of the phase retrieval. A Large bandpass filter leads to a noisy phase image (a) and a small one fails to fully recover the curvature of spherical mirror (b). However, an optimum filter size can completely restore the curvature without any concern about the noise (c). The relative error was utilized for evaluating the accuracy in volume measurement. The relative error in volume measurement is defined by the summation of the difference between the measured value and its actual thickness values in each point of the sample: Where v . and v / are respectively considered as the actual and measured thickness values of the sample at pixel i. The amount of δ increases if the measurement has been accomplished with a low agreement with the ideal one. Therefore, by inserting different values for the width of the filter in Eq. (2) and calculating error amount by using Eq. (3), we can simply find the optimum size of bandpass filter required for minimum error in phase volume measurement.
This simple method is useful for an ideal sample that we know the ideal phase and relative error can be calculated. However, the method of relative error fails to work well because of lacking the information of actual size of sample in the experiment with an unknown sample. Accordingly, proposing a robust algorithm which provides the optimum size of unknown sample can help to attain the best accuracy in measuring phase. In this work, we utilized the Fourier domain distribution of the interferogram of unknown samples in our smart algorithm for finding optimum bandpass filter. The proposed algorithm is demonstrated in Figure 2. In the method, the optimum width of bandpass filter was determined by using the average of noises in the frequency domain. As shown in Figure 3, the interferogram pattern has a peak at k=q in frequency domain, while little information about the sample are observed at frequencies far from this peak, which is dominated and disturbed by the noises. To calculate the amount of noises, a part of the frequency domain far from k=q in the area (Figure 3) was selected, and average value and standard deviation were specified to find noise amount. In the pattern, noise threshold was considered to be equal to the average plus its standard deviation. Then, the signals around the peak were compared with that of noise threshold. The pixel is equal to one when the amount of the signal near the peak in the Fourier domain is larger than the threshold, otherwise it is considered as zero. Finally, the size of the filter can be obtained by counting the number of ones near the peaks in the matrix. The filter size obtained by the algorithm should be placed in a proper window function. In order to determine the most appropriate window function for off-axis QPI, the effect of different types of the functions was assessed as explained in next section. Based on the results, Welch and Gaussian ones were obtained as more proper functions for achieving the better accuracy in phase volume measurement.

Results
In the first step, the effect of different window functions was evaluated by simulating a cube and a bead samples. In fact, a cube can represent many man-made parts used in industry such as MEMS or microchannels, while a bead is considered as a simplified shape of a cell. Additionally, six different common window functions of Gaussian, Hann, Rectangular, Welch, Poisson, and Bartlett filters were evaluated in the study. Figure 4 (a) represents the cross section of these six filters. Further, the minimum error for each window function was determined by placing the suggested window functions in Eq.
(2) and changing the width of windows. As demonstrated in Figure 4 (b, c), less relative error is obtained for Gaussian and Welch windows in two samples. Thus, they were utilized for suggested algorithm optimum filter in the phase measurement. Although Gaussian and Welch windows led to the least relative error, the errors related to Bartlett and Poisson filters changed slowly in the bead and cube, respectively.  Therefore, two latter ones can be considered as proper options for noisy conditions. However, the Gaussian one is more common and easy handling, which was proposed for the algorithm.
The reliability of the proposed algorithm was examined in the next step. In addition, the results obtained by the smart algorithm regarding the optimum size of band pass filter were compared with those related to the previous method. In this regard, a range of the different sizes of filters was assessed in the previous method, and the optimum size was obtained by inserting the measured value in Eq. (3). Along with simulation, the suggested algorithm was tested for the experiment data obtained in our previous works. A spherical mirror that we used in the calibrating active medium of disk laser measurement [14], a 10 µm bead [15], and a single-mode fiber [16]. Table 1 compares the filter sizes obtained by the suggested smart algorithm and those related to the method of testing the different sizes of filters. As shown in Figure 4 (b, c), no sharp minimum is observed for the error, and the optimum size of the filter can be a small range. Furthermore, the optimum size provided by the proposed algorithm is placed in the range of those already obtained through testing various filter sizes for the different types of samples (Table 1).
In Table 1, w and w 1 represent the optimum size of filter in the x and y direction of Fourier domain, respectively. It is worth noting that the samples with symmetry along x and y directions lead to the same w and w 1 , while asymmetric ones like fibers have different optimum size. In addition, those with sharp changes in one direction need a larger size on the direction (w and w 1 for fiber sample). Based on comparing the results of two methods, the proposed algorithm is seemed as robust and reliable for minimizing error in the phase measurement of each unknown sample.

Conclusion
The present study proposed a smart algorithm which can provide the optimum size of bandpass filter with no need for pre-knowledge about samples. Firstly, by changing the filter size, the obtained phase shape was compared with that of the ideal phase and the six types of bandpass filters were examined. Based on the results, the minimum error was obtained in the Gaussian and Welch windows for the two types of samples. Additionally, the reliability of the method was proved by comparing the results of the smart algorithm with those of previous simulations and experiments. The algorithm can minimize the error for the operators dealing with measuring phase volume through off-axis QPI.