hide
Free keywords:
-
Abstract:
In vivo two-photon microscopy (TPM) using bulk-loaded calcium dyes allows recording of spiking activity in dozens of neurons simultaneously. This relatively noninvasive technique has been used previously in anaesthetized animals, and an extension to awake animals, both head-fixed and freely moving, is desirable. However, brain tissue in awake animals frequently moves relative to the objective lens with such speed as to cause displacements during individual frames. These rapid motions induce unique, non-rigid, and non-uniform distortions that warp the image frame and prevent accurate extraction of fluorescence kinetics. Such nonlinear distortions cannot be corrected by rigid (affine) transformations such as translation, uniform stretching, or rotation. To overcome this obstacle, we present here an algorithm for detection and correction of both fast and slow displacements and its application to neuronal population activity collected from awake animals.
Our motion correction algorithm operates “blind,” relying only on sequences of imaging frames without measurement of motion, heartbeat, respiration, or muscular tension. We parameterize displacement velocity discretely in time, and use the Lucas-Kanade algorithm to solve for time-displacement functions. Additionally, we describe several further optimizations to maximize speed and accuracy, and derive a formula for true distances between image features applicable even when every frame is heavily motion-distorted. In imaging recorded at 96 ms per frame, the algorithm solves for displacement with < 5 ms temporal resolution. Once motion correction is complete, ROI tracking, deblurring of time averaged images larger than the instantaneous field of view, extraction of calcium transients, and determination of AP times are achieved with negligible computational cost.
We applied our motion correction algorithm to in vivo TPM population imaging of visual cortex in awake head-fixed and anesthetized rats. The algorithm successfully detected and corrected movements on multiple timescales, including slow drift over several minutes, regular 2-6 Hz oscillations of 1-4 µm corresponding to respiration and heartbeat rhythms, and fast impulses of over 10 µm in under 50 ms occurring mainly during pronounced motor activity. Fast impulses were ubiquitous in all recordings of head-fixed awake animals. Oscillations in anaesthetized animals also occasionally caused significant displacement within 96 ms, especially when larger craniotomies were employed. Without motion correction, detection of AP times would not have been possible in these imaging sessions.