RESUMEN
Wavefront coding (WFC) combines phase mask design and image restoration algorithm to extend the depth of field (DOF) for various applications. However, discrete design limits finding globally optimal solutions, increasing the complexity of system design, and affecting the accuracy and robustness of image restoration. An end-to-end imaging system design has emerged to break through these limitations by integrating optical design and image processing algorithms. In this study, we propose an algorithm that synchronously optimizes the optical elements and decoding algorithm in WFC using ray-tracing simulation. We also derive formulas for the optical layer's forward and backward propagation for joint optimization of the optical layer and decoding algorithm. Experimental verification demonstrates the algorithm's effectiveness in optimizing the WFC system and offers improved performance under a unified design framework.