Abstract
Lensless microscopy is a well-established imaging approach that replaces traditional lenses with phase modulators, enabling compact, low-cost, and computationally driven analysis of biological samples. In this work, we show how ray tracing simulations can be used to optimize lensless imaging systems for automated classification, particularly for detecting red blood cell (RBC) disease. Rather than improving the machine learning classification algorithm, our focus is on refining optical parameters such as element spacing and modulator type to maximize classification performance. We modeled a lensless microscope in Zemax OpticStudio (ray tracing) and compared the results against Fourier optics simulations. Despite not explicitly modeling diffraction, ray tracing produced classification results largely consistent with wave optics simulations, confirming its effectiveness for parameter optimization in lensless imaging setups used for classification tasks. Furthermore, to show the flexibility of the ray tracing model, we introduced a microlens array (MLA) as the phase modulator and performed the classification task on the generated patterns. These results establish ray tracing as an efficient tool for the optical design of lensless microscopy systems intended for machine learning based biomedical applications. The developed lensless microscopy model enables the generation of datasets for training neural networks.