# PSF Estimation of Space-Variant Ultra-Wide Field of View Imaging Systems
## 5 Proposed Method
Sub-matrix \(f_{i}\) is the image of the point light source in the image plane, while matrix \(f_{d}\) is the sub-image model computed by our method. The size of the sub-arrays must be sufficient to cover the whole neighborhood of the point light object on the positions \(\{u_{0i},v_{0i})\}_{i=1}^{K}\). As was mentioned above, symbols \(\hat{u},\hat{v}\) are used for image plane coordinates in the normalized optimization space, and \(u,v\) are image plane coordinates. Note that \(f_{i}\) and \(f_{d}\) can be located at any point over the entire field of view. The step between the positions of the point light source has to be chosen to cover the observable difference of the acquired point. The positions of the point light source in the field of view play an important role in the convergence efficiency. In our example, we divided the field of view each 10 degrees uniformly horizontally and vertically. We therefore obtain a matrix of PSFs sufficient for a description of the model. It turned out that finer division of the FOV is not necessary and does not improve the accuracy of the model and it satisfies the condition in Equation (15). The algorithm uses two evaluation methods. The first method is based on calculating the root mean square error (RMSE) over the difference matrix in Equation (21) and optimizing the \(W_{klm}\) parameters and the \(\Delta\hat{u},\Delta\hat{v}\) positions for decreasing residuals. The second method is based on deducting the original and model matrix to obtain the maximum difference (MAXDIFF). Then, the residuals of this method indicate the deviation against the original matrix. The first method with RMSE calculation provides a better shape description. However, this method can result in local extremes. The reduction can be resolved by using the MAXDIFF calculation method. This method minimizes the local extremes, because it is focused on minimizing the maximum difference between the \(f_{i}\) and \(f_{d}\) object matrices, but the output can be a more general shape of PSF. Let us now introduce operators \(RMSE(f_{i},f_{d})\) and \(MAXDIFF(f_{i},f_{d})\), which are used as descriptors of the differences between the original PSF and the model of PSF (\(f_{i}\) and \(f_{d}\)). \[RMSE(f_{i},f_{d})=\sqrt{\frac{1}{M\times N}\sum_{\hat{u}=0}^{N-1}\sum_{\hat{v}= 0}^{M-1}(f_{i}(u,v)-f_{d}(\hat{u},\hat{v}))^{2}}. \tag{19}\]  
\[MAXDIFF(f_{i},f_{d})=\max_{(u,v)}(|f_{i}(u,v)-f_{d}(\hat{u},\hat{v})|). \tag{20}\]  
\(M\) and \(N\) are the sizes of the \(f_{i}\) and \(f_{d}\) sub-arrays. The optimization parameter of the \(W_{klm}\) coefficients uses the Nelder-Mead optimizing algorithm, which is described in detail in [43]. Let \(R_{f_{i},f_{d}}\) be the optimizing operator, then  
\[R_{f_{i},f_{d}}(\hat{u},\hat{v})=\min_{W_{klm},\Delta\hat{u},\Delta\hat{v}}[ RMSE(f_{i},f_{d})\lor MAXDIFF(f_{i},f_{d})], \tag{21}\]  
where \(W_{klm},\Delta\hat{u},\Delta\hat{v}\) are variables for minimizing the cost function. For multiparameter optimization tasks, the challenge is to find the global minimum of the function. Considering this issue, we can find an appropriate set of starting parameters of the fit algorithm by smart selection of on-axis points (PSFs) on which we will obtain appropriate \(W_{klm},\Delta\hat{u},\Delta\hat{v}\) variables, and we will then increase the precision of our model by selecting off-axis points and improving \(W_{klm},\Delta\hat{u},\Delta\hat{v}\) variables. The process of point selection is illustrated in Figure 4, and the steps in the algorithm are as follows:  
* Select a point placed on the optical axis (this point is considered as SV aberration free). * The \(W_{klm}\) optimization coefficient is based on minimizing RMSE or the MAXDIFF metrics. Then we obtain \[R_{f_{i},f_{d}}(0,0)\Rightarrow W_{klm}(1),\Delta\hat{u},\Delta\hat{v},\] (22) where \(W_{klm}(1)\) is the first realization of the fit, and \(\Delta\hat{u},\Delta\hat{v}\) represent the displacement of the object point in the image plane.