Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 Mar 14;13(4):2035-2049.
doi: 10.1364/BOE.445775. eCollection 2022 Apr 1.

Axial motion estimation and correction for simultaneous multi-plane two-photon calcium imaging

Affiliations

Axial motion estimation and correction for simultaneous multi-plane two-photon calcium imaging

Andres Flores-Valle et al. Biomed Opt Express. .

Abstract

Two-photon imaging in behaving animals is typically accompanied by brain motion. For functional imaging experiments, for example with genetically encoded calcium indicators, such brain motion induces changes in fluorescence intensity. These motion-related intensity changes or motion artifacts can typically not be separated from neural activity-induced signals. While lateral motion, within the focal plane, can be corrected by computationally aligning images, axial motion, out of the focal plane, cannot easily be corrected. Here, we developed an algorithm for axial motion correction for non-ratiometric calcium indicators taking advantage of simultaneous multi-plane imaging. Using temporally multiplexed beams, recording simultaneously from at least two focal planes at different z positions, and recording a z-stack for each beam as a calibration step, the algorithm separates motion-related and neural activity-induced changes in fluorescence intensity. The algorithm is based on a maximum likelihood optimisation approach; it assumes (as a first order approximation) that no distortions of the sample occurs during axial motion and that neural activity increases uniformly along the optical axis in each region of interest. The developed motion correction approach allows axial motion estimation and correction at high frame rates for isolated structures in the imaging volume in vivo, such as sparse expression patterns in the fruit fly brain.

PubMed Disclaimer

Conflict of interest statement

The authors declare that there are no conflicts of interest related to this article.

Figures

Fig. 1.
Fig. 1.
Approach and setup for motion estimation and correction. A Outline of method: 1) Calibration step: two stacks of the sample are recorded simultaneously in two different, axially offset focal planes. 2) Fluorescence intensity of the sample is recorded simultaneously in two planes and the sample moves in axial direction ( z -axis). 3) Changes in intensities over time in each plane have two contributions: axial motion as well as neural activity. 4) The algorithm uses the recorded stacks to estimate axial motion of the sample from intensities recorded in the two planes. 5) Changes in fluorescence, ΔF/F , are corrected to remove the contribution of axial motion, yielding motion corrected, neural activity related fluorescence changes. B Optical setup: two Gaussian beams are temporally offset by 6 ns , allowing simultaneous imaging in two different planes using temporal multiplexing. C Normalized profiles of the two beams along the z -axis fitted with Gaussian functions.
Fig. 2.
Fig. 2.
Motion correction in a simulated single ROI. A Top: axial intensity profiles of the two simulated beams and the simulated sample (ROI) at time t=0 . Bottom: two stacks recorded from the sample at time t=0 with the two beams. B Example of axial motion and activity of the ROI. Sample profile along the z -axis at time t=0 is shown in green. At time t>0 , the offset of the ROI along the z -axis changes while its activity increases. C Simulation of ROI activity and motion along the z -axis over time. Top row, left side: beam profiles. Right side: sample moves along z-axis over time. Color indicates sample neural activity. Second row: resulting intensities measured by each beam have two different contributions, motion and activity. Third row: comparison of actual and estimated axial motion. Fourth row: cost function error of the motion estimation algorithm (see Methods for details). Bottom row: actual and estimated, corrected changes in neural activity induced ΔF/F .
Fig. 3.
Fig. 3.
Motion correction in a simulated ring attractor with 32 ROIs. A Top: normalized intensity profiles of the ROIs, which are simulated with varying lengths and offsets along the z -axis. B Bottom: ROI 1 moves along the z -axis over time while its activity ( ΔF/F ) changes (see C for all ROIs). B Top: stacks of the ROIs obtained with first beam. Bottom: same for second beam. C Simulation of ROIs with axial motion and activity changes over time. All ROIs move together, while activity changes independently in each ROI. First row: comparison of actual and estimated axial motion of ROIs. Second row: cost function error of the motion estimation algorithm. Third row: measured changes in fluorescence with combined activity changes and axial motion. Fourth row: changes in fluorescence after motion correction. Fifth row: actual changes in fluorescence due to activity. Bottom row: comparison of the averaged measured, corrected and actual bump amplitudes in the ROIs (see Methods for details on all steps).
Fig. 4.
Fig. 4.
Axial motion estimation and correction in GFP labeled neurons. A Left side: average over all frames of the experiment. Right side: 32 ROIs are defined. B Stacks recorded from each ROI with first (top) and second (bottom) beam, respectively. C Top row: actual and estimated axial motion. Second row: cost function error of motion estimation (see Methods for details). Third row: measured fluorescence changes in each ROI. Fourth row: corrected fluorescence changes in each ROI. Fifth row: difference between corrected and measured fluorescence changes for each ROI. Bottom row: measured, corrected, and expected changes in fluorescence for ROI 1 (representative for all ROIs).
Fig. 5.
Fig. 5.
Axial motion estimation and correction in GFP labeled neurons at different laser powers, simulating changes in neural activity. The definition of ROIs and the recorded stacks are the same as in Fig. 4(A) and (B), respectively. Top row: comparison between actual and estimated axial motion. Second row: cost function error of motion correction algorithm. Third row: measured changes in fluorescence in each ROI. Fourth row: corrected changes in fluorescence in each ROI. Fifth row: difference between corrected and measured changes in fluorescence for each ROI. Bottom row: comparison between measured, corrected and expected changes in fluorescence for ROI 1 (see Methods for details).
Fig. 6.
Fig. 6.
Motion estimation and correction in wedge neurons labeled with jGCaMP8f during controlled axial motion. A Left side: average over all frames. Right side: definition of 32 ROIs. B Z-stacks recorded by the first beam (top) and second beam (bottom). C First to fifth row: same as Fig. 4(C). Bottom row: measured and corrected fluorescence signals (bump amplitude, see Methods for details).
Fig. 7.
Fig. 7.
Motion estimation and correction in wedge neurons labeled with jGCaMP8f. A Left side: average over all frames. Right side: definition of 32 ROIs. B Stacks recorded by the first beam (top) and second beam (bottom). C First to sixth row: same as Fig. 4(C), additionally including lateral motion estimated from computationally aligning frames (second row). Bottom row: measured and corrected fluorescence signals (bump amplitude, see Methods for details).

Similar articles

Cited by

References

    1. Greenberg D. S., Kerr J. N., “Automated correction of fast motion artifacts for two-photon imaging of awake animals,” J. Neurosci. Methods 176(1), 1–15 (2009).10.1016/j.jneumeth.2008.08.020 - DOI - PubMed
    1. Dombeck D. A., Khabbaz A. N., Collman F., Adelman T. L., Tank D. W., “Imaging large-scale neural activity with cellular resolution in awake, mobile mice,” Neuron 56(1), 43–57 (2007).10.1016/j.neuron.2007.08.003 - DOI - PMC - PubMed
    1. Pnevmatikakis E. A., Giovannucci A., “Normcorre: An online algorithm for piecewise rigid motion correction of calcium imaging data,” J. Neurosci. Methods 291, 83–94 (2017).10.1016/j.jneumeth.2017.07.031 - DOI - PubMed
    1. Griffiths V. A., Valera A. M., Lau J. Y., Roš H., Younts T. J., Marin B., Baragli C., Coyle D., Evans G. J., Konstantinou G., Koimtzis T., Nadella K. M. N. S., Punde S. A., Kirkby P. A., Bianco I. H., Silver R. A., “Real-time 3d movement correction for two-photon imaging in behaving animals,” Nat. Methods 17(7), 741–748 (2020).10.1038/s41592-020-0851-7 - DOI - PMC - PubMed
    1. Stringer C., Pachitariu M., “Computational processing of neural recordings from calcium imaging data,” Curr. Opin. Neurobiol. 55, 22–31 (2019).10.1016/j.conb.2018.11.005 - DOI - PubMed

LinkOut - more resources