(a) Principle for HDR imaging. Only a restricted portion of the detector dynamic range can be effectively used for signal quantization (R2). The dark noise (blue area, R1) limits the low signal detection, while the high intensity signal near the detector's maximum threshold is saturated (red) and is also disregarded (R3). By combining multiple images (LDR1, LDR2, LDR3) with different sensitivities (α0, α1, α2) the quantization range can be increased giving rise to a high dynamic range image (HDR). Images are simultaneously acquired from three different detectors (PMT1, PMT2, PMT3). The presence of neutral optical density filters with distinct absorptions gives rise to three images covering different areas of the sample's dynamic range. When no absorption filter is present, the limited quantization range provides high sampling resolution at low signal values while saturated regions values are instead unresolvable. Conversely, the images obtained when increased absorption is present in front of the detector, extend the range of the saturated pixels into the usable quantization interval. Meanwhile, regions within the image with low signal are instead buried into the noise. When the information from all the images is combined together, it provides an extended dynamic range and high SNR image. The dark noise level can be different for other measurements schemes. LDR* represents LDR images weighted by α. (b) Schematic representation of the two-photon imaging setup for real-time HDR imaging (Supplementary Fig. 2 and ‘Methods' section). BS, beam splitter; BP, bandpass filter; DC, dichroic mirror; LP, longpass filter; ODF, neutral optical density filter; PMT, photomultiplier tubes. Depending on the microscope setup or preferences, BS could be cube beam splitters, plate beam splitters or a combination of both. An arbitrary number of acquisition channels can be used depending on the number of PMTs available and the intra-scene dynamic range. To perform real-time HDR two-photon acquisition, a minimum number of two PMTs is required.