Autofocusing method for active Hadamard single-pixel microscopy using gradient descent algorithms - Tobón-Maya, Heberley; Zapata-Valencia, Samuel I.; Willstatter, Lindsey; Bonora, Stefano; Farina, Andrea; Lancis, Jesús; Tajahuerce, Enrique (Optics and lasers in engineering, 2025)
•Analysis of frequency descriptors for the Hadamard spectrum is proposed.•A method to correct defocus based on these frequency descriptors is presented.•The proposed method eliminates the need for mechanical displacements.•Autofocusing is significantly improved compared to axial scanning methods. In active single-pixel microscopy (SPM) the final image quality is mainly determined by the correct focusing of a set of structured light patterns over the sample under study. The correct pattern checking represents a recurrent time-consuming task. In this work a fast, reconstruction-less autofocusing correction method for Hadamard-based reflective SPM is presented. The defocus phenomenon in SPM is physically described, and numerically and experimentally evaluated. A focus tunable lens is employed to introduce a controllable phase and correct the defocusing aberration. The value of the focal length correction is evaluated by analyzing a reduced region of interest within the Hadamard frequency space which ensures fast and reconstructionless operation for the autofocus routine. The sum of the absolute value of the measured sampled frequencies reaches its maximum value when the defocus is fully corrected. The inverse of the calculated sum is minimized using the gradient descent algorithm within an average of 9 experimental iterations to reach the optimal phase value. The performance of the method is tested experimentally with a resolution test chart placed along the focusing axis.