## 3 Method
### Depth Estimation of Light Fields Considering Blur Features and Prior Knowledge
#### 3.2.2 Depth Estimation Optimization Process Considering Prior Knowledge  
(1) Plane Prior Optimization: Prior knowledge of planar geometric structures refers to the process of utilizing information about planar structures in a scene to assist in depth estimation. This information can include common planar features in the scene, such as walls, floors, ceilings, and other objects possessing planar characteristics. By incorporating this prior knowledge, algorithms can better understand the scene structure, thereby improving the accuracy of depth estimation [32; 33]. In light field depth estimation tasks, plane priors typically assume that most object surfaces are flat or approximately flat. This assumption guides the algorithm to focus on planar regions, thereby reducing the number of mismatches and yielding improved estimation accuracy. For instance, when an algorithm detects the presence of planar structures in the scene, it can utilize these planar features to limit the range of depth values or employ plane fitting methods to estimate depth more accurately. To implement plane prior optimization, we first obtain the disparity map of the reference microlens image I and select the reliable sparse disparity points using a cost threshold (below 0.1). On the basis of these trustworthy matching points, we generate tri-angular meshes. As shown in Figure 8, in well-textured areas, we use smaller meshes to keep to ensuring that the structures of nonplanar regions are preserved. In low-texture areas, we use larger triangular meshes. Each triangular mesh computes the plane parameters (disparity information and normal information) based on its vertices and applies these parameters to the pixels located on the same plane to optimize the depth estimation effect. After the plane model is constructed, plane prior information is utilized to assist in optimizing the depth estimation results obtained for the microlens images. A probabilistic graphical plane optimization model is established, and after the plane prior information is integrated, the new matching cost calculation formula is as follows:  
\[\text{C}_{\text{P}}\big{(}\text{p}.f_{\text{P}}\big{)}=\frac{\text{C}^{2} \big{(}\text{p}.f_{\text{P}}\big{)}}{\beta}-\log\Bigg{(}\eta+\text{e}^{-\frac {(\text{d}_{1}-\text{d}_{2})\cdot\text{p}_{2}}{2\text{d}_{3}}}\cdot\text{e}^{- \frac{\text{area}\text{area}^{2}\big{(}\text{n}^{\text{T}}\cdot\text{np}_{2} \big{)}}{2\text{d}_{3}}}\Bigg{)}, \tag{7}\]  
Figure 8: Sparse reliable correspondences and triangulation results. (**a**) Sparse point cloud, the blue is the background and the green is the point cloud; (**b**) triangulation result, the solid red lines are triangulation nets. In the formula, \(\lambda_{d}\) represents the disparity bandwidth, and \(\lambda_{n}\) denotes the bandwidth of the normal difference. The first term on the right side of the equation represents the aggregated matching cost, which corresponds to the photometric consistency of the current pixel p being updated with respect to the candidate hypothesis plane \(f_{P}\). The second term is the regularization term based on the plane prior. If the depth information of the current pixel \(p\) is consistent with the depth information of the plane structure, a reward is granted; otherwise, a penalty is applied. This process encourages the depth information in regions with weak textures to align with the depth information derived from the plane structure, thereby optimizing the depth estimation results obtained in those areas. Finally, the candidate hypothesis that provides the best depth information \(C_{p}\big{(}p,f_{P}\big{)}\) is selected for updating the current pixel p.  
(2) Optimization Step Based on Matching Window Completeness:  
During the stereo matching process employed for light field images, the matching cost of pixels directly affects the accuracy of depth estimation. To address this issue, we propose a weight distribution strategy based on the completeness of the matching window to improve the accuracy and robustness of the matches.