Abstract
<jats:p>Single-photon miniscopes enable large-scale calcium imaging in freely behaving animals but are limited by out-of-focus background fluorescence that degrades image contrast and single-cell signal fidelity. Multiphoton approaches address this limitation but remain costly and complex. Here we introduce a lightweight (<3 g), low-cost structured illumination miniscope that achieves optical sectioning in freely behaving mice. Using HiLo imaging implemented with a simple Ronchi grating and time-multiplexed excitation, the system strongly suppresses background fluorescence while preserving the speed, field of view, and accessibility of widefield miniscopes, and supports optical-sectioned multi-plane imaging to increase neuronal yield. Using hippocampal recordings, we show enhanced region-of-interest (ROI)-based signal quality and spatial information readout, allowing simple ROI-averaged signals to approach the performance of offline algorithm-extracted signals. We further demonstrate a proof-of-principle closed-loop brain--machine interface enabled by rapid online signal extraction and real-time neural decoding. Together, these results establish structured illumination as a practical and accessible strategy for achieving high-contrast calcium imaging with miniaturized microscopes.</jats:p>