# Extended Depth-of-Field of a Miniature Optical Endoscope Using Wavefront Coding
## 4 Restoration Algorithm with Tikhonov Regularization  
The proposed optical endoscopic modality is a hybrid imaging system, and therefore, optics and processing should be considered jointly and designed together. In this section, our basic assumption is wavefront coding being a linear blurring process. Problems like that require the determination of the unknown input to a linear system from the known output. For instance, image reconstruction from projections is a linear inverse problem. Our work is using one of the most popular regularization methods--Tikhonov regularization--to restore the encoded image [19; 20]. The discretization of a linear inverse problem typically gives rise to a linear system of equations  
\[\mathbf{A}\mathbf{x}=\mathbf{b} \tag{13}\]  
where \(\mathbf{b}\) represents the blurred image and \(\mathbf{x}\) is the unknown true image to be estimated. \(\mathbf{A}\) is a very ill-conditioned matrix. Tikhonov regularization replaces the linear system by the regularized system  
\[(\mathbf{A}^{T}\mathbf{A}+\mu\mathbf{I})x=\mathbf{A}^{T}\mathbf{b} \tag{14}\]  
where \(\mathbf{A}^{T}\) is the transpose of the matrix \(\mathbf{A}\). \(\mu\) is a positive constant that determines the amount of regulation; namely, regularization parameter. \(\mathbf{I}\) is the identity operator. Assuming the value of \(\mu\) is fixed, Equation (14) will have a unique solution, which is given by  
\[\mathbf{x}_{\mu}=(\mathbf{A}^{T}\mathbf{A}+\mu\mathbf{I})^{-1}\mathbf{A}^{T} \mathbf{b} \tag{15}\]  
where \(\mathbf{A}^{T}\) is the transpose of the matrix \(\mathbf{A}\). We note that the solution \(\mathbf{x}_{\mu}\) satisfies the minimization problem  
\[\underset{\mathbf{x}}{\text{min}}\{\|\mathbf{b}-\mathbf{A}\mathbf{x}\|^{2}+\mu \|\mathbf{P}(\mathbf{x}-x_{0})\|_{2}^{2}\} \tag{16}\]  
In the Tikhonov regularization equation, we normally choose \(x_{0}\) as zero and \(\mathbf{P}\) as an identity matrix, which provides a standard Tikhonov regulation form as  
\[\underset{\mathbf{x}}{\text{min}}\{\|\mathbf{b}-\mathbf{A}\mathbf{x}\|^{2}+ \mu\|\mathbf{x}\|_{2}^{2}\} \tag{17}\]  
Figure 9: Spot diagrams of the optical endoscope with phase mask, varied by different object distances and FOVs. Each column stands for the same object distance (e.g., 1.8 mm), and each line stands for the same FOV (e.g., 0\({}^{\circ}\)). The blue cross, green square and red triangle represent the 0.486 \(\upmu\)m, 0.586 \(\upmu\)m and 0.656 \(\upmu\)m incident light. With the purpose of solving Equation (14), the matrix \(\mathbf{A}\) can be decomposed by singular value decomposition (SVD) as follows  
\[\mathbf{D}=\mathbf{U}\Sigma\mathbf{V}^{T}=\Sigma_{i=1}^{N}u_{i}\sigma_{i}v_{i}^{T} \tag{18}\]  
\(\Sigma\) is a diagonal matrix with the singular values, which satisfies:  
\[\Sigma=diag(\sigma_{1}...\sigma_{n}),\ \ \sigma_{1}\geq\sigma_{2}\geq...\geq \sigma_{n}\geq 0 \tag{19}\]  
In addition, the matrices \(U\) and \(V\) are comprised of left and right singular vectors \(U=(u_{1}...u_{n})\) and \(V=(v_{1}...v_{n})\), respectively. On the basis of SVD method, we can solve the Equation (15) as  
\[\mathbf{x}_{\mu}=\sum_{i=1}^{N}f_{i}\frac{u_{i}^{T}b}{\sigma_{i}}v_{i} \tag{20}\]  
\(f_{i}\) represents the Tikhonov filter factor, which is in the form  
\[f_{i}=\frac{\sigma_{i}^{2}}{\sigma_{i}^{2}+\mu},\ \ \ i=1,...,N \tag{21}\]  
More importantly, obtaining the appropriate value of the regularization parameter \(\mu\) plays a crucial role in Tikhonov algorithm. In this calculation, we utilize the L-curve method to determine the suitable regularization parameter \(\mu\). The L-curve is a log-log plot of the norm of the regularized solution versus the corresponding residual norm for each of a set of regularization parameter values.