High framerate multichannel beam-scanning microscopy based on Lissajous trajectories

A simple beam-scanning optical design based on Lissajous trajectory imaging is described for achieving up to kHz frame-rate optical imaging on multiple simultaneous data acquisition channels. In brief, two fast-scan resonant mirrors direct the optical beam on a circuitous trajectory through the field of view, with the trajectory repeat-time given by the least common multiplier of the mirror periods. Dicing the raw time-domain data into sub-trajectories combined with model-based image reconstruction (MBIR) 3D in-painting algorithms allows for effective frame-rates much higher than the repeat time of the Lissajous trajectory. Since sub-trajectory and full-trajectory imaging are simply different methods of analyzing the same data, both high-frame rate images with relatively low resolution and low frame rate images with high resolution are simultaneously acquired. The optical hardware required to perform Lissajous imaging represents only a minor modification to established beam-scanning hardware, combined with additional control and data acquisition electronics. Preliminary studies based on laser transmittance imaging and polarization-dependent second harmonic generation microscopy support the viability of the approach both for detection of subtle changes in large signals and for trace-light detection of transient fluctuations. ©2014 Optical Society of America OCIS codes: (190.2620) Harmonic generation and mixing; (180.4315) Nonlinear microscopy; (320.7085) Ultrafast information processing; (100.2000) Digital image processing; (100.3020) Image reconstruction-restoration; (120.5800) Scanners References and links 1. A. Demuro and I. Parker, “Multi-dimensional resolution of elementary Ca2+ signals by simultaneous multi-focal imaging,” Cell Calcium 43(4), 367–374 (2008). 2. T. Horio and T. Suzuki, “Multihit two-dimensional charged-particle imaging system with real-time image processing at 1000 frames/s,” Rev. Sci. Instrum. 80(1), 013706 (2009). 3. H. R. Petty, “Applications of high speed microscopy in biomedical research,” Opt. Photonics News 15, 40–45 (2004). 4. D. W. Holdsworth, H. N. Nikolov, J. Au, K. Beaucage, J. Kishimoto, and S. J. Dixon, “Simultaneous vibration and high-speed microscopy to study mechanotransduction in living cells,” Proc. SPIE 8317, 831715 (2012). 5. D. Oron, E. Tal, and Y. Silberberg, “Scanningless depth-resolved microscopy,” Opt. Express 13(5), 1468–1476 (2005). 6. R. Tomer, K. Khairy, and P. J. Keller, “Light sheet microscopy in cell biology,” Methods Mol. Biol. 931, 123– 137 (2012). 7. R. Pashaie and R. Falk, “Single optical fiber probe for fluorescence detection and optogenetic stimulation,” IEEE Trans. Biomed. Eng. 60(2), 268–280 (2013). 8. K. Jacobson, “Fluorescence recovery after photobleaching: lateral mobility of lipids and proteins in model membranes and on single cell surfaces,” NATO Adv. Study Inst. Ser. A. A34, 271–288 (1980). #216362 $15.00 USD Received 7 Jul 2014; revised 1 Sep 2014; accepted 2 Sep 2014; published 25 Sep 2014 (C) 2014 OSA 6 October 2014 | Vol. 22, No. 20 | DOI:10.1364/OE.22.024224 | OPTICS EXPRESS 24224 9. D. W. Piston, M. S. Kirby, H. Cheng, W. J. Lederer, and W. W. Webb, “Two-photon-excitation fluorescence imaging of three-dimensional calcium-ion activity,” Appl. Opt. 33(4), 662–669 (1994). 10. Y.-J. Lee, J.-D. Kwon, D.-H. Kim, K.-S. Nam, Y. Jeong, S.-H. Kwon, and S.-G. Park, “Structural characterization of wavelength-dependent Raman scattering and laser-induced crystallization of silicon thin films,” Thin Solid Films 542, 388–392 (2013). 11. W. Mohler, A. C. Millard, and P. J. Campagnola, “Second harmonic generation imaging of endogenous structural proteins,” Methods 29(1), 97–109 (2003). 12. P. J. Campagnola, A. C. Millard, M. Terasaki, P. E. Hoppe, C. J. Malone, and W. A. Mohler, “Threedimensional high-resolution second-harmonic generation imaging of endogenous structural proteins in biological tissues,” Biophys. J. 82(1), 493–508 (2002). 13. M. Both, M. Vogel, O. Friedrich, F. von Wegner, T. Künsting, R. H. A. Fink, and D. Uttenweiler, “Second harmonic imaging of intrinsic signals in muscle fibers in situ,” J. Biomed. Opt. 9(5), 882–892 (2004). 14. D. J. Kissick, D. Wanapun, and G. J. Simpson, “Second-order nonlinear optical imaging of chiral crystals,” Annu Rev Anal Chem (Palo Alto Calif) 4(1), 419–437 (2011). 15. Y. Fu, H. Wang, R. Shi, and J. X. Cheng, “Characterization of photodamage in coherent anti-Stokes Raman scattering microscopy,” Opt. Express 14(9), 3942–3951 (2006). 16. C. L. Hoy, N. J. Durr, and A. Ben-Yakar, “Fast-updating and nonrepeating Lissajous image reconstruction method for capturing increased dynamic information,” Appl. Opt. 50(16), 2376–2382 (2011). 17. B. A. Flusberg, E. D. Cocker, W. Piyawattanametha, J. C. Jung, E. L. M. Cheung, and M. J. Schnitzer, “Fiberoptic fluorescence imaging,” Nat. Methods 2(12), 941–950 (2005). 18. B. A. Flusberg, J. C. Jung, E. D. Cocker, E. P. Anderson, and M. J. Schnitzer, “In vivo brain imaging using a portable 3.9 gram two-photon fluorescence microendoscope,” Opt. Lett. 30(17), 2272–2274 (2005). 19. C. J. Engelbrecht, R. S. Johnston, E. J. Seibel, and F. Helmchen, “Ultra-compact fiber-optic two-photon microscope for functional fluorescence imaging in vivo,” Opt. Express 16(8), 5556–5564 (2008). 20. T. Tuma, J. Lygeros, V. Kartik, A. Sebastian, and A. Pantazi, “High-speed multiresolution scanning probe microscopy based on Lissajous scan trajectories,” Nanotechnology 23(18), 185501 (2012). 21. A. Bazaei, Y. K. Yong, and S. O. R. Moheimani, “High-speed Lissajous-scan atomic force microscopy: Scan pattern planning and control design issues,” Rev. Sci. Instrum. 83(6), 063701 (2012). 22. M. Bertalmio, G. Sapiro, V. Caselles, and C. Ballester, “Image inpainting,” in Proceedings of the 27th annual conference on Computer graphics and interactive techniques, (ACM Press/Addison-Wesley Publishing Co., 2000), pp. 417–424. 23. C. Ballester, M. Bertalmio, V. Caselles, G. Sapiro, and J. Verdera, “Filling-in by joint interpolation of vector fields and gray levels,” IEEE Trans. Image Process. 10(8), 1200–1211 (2001). 24. X. Li, “Patch-based image interpolation: algorithms and applications,” in International Workshop on Local and Non-Local Approximation in Image Processing, 2008) 25. J. Mairal, M. Elad, and G. Sapiro, “Sparse learned representations for image restoration,” in Proc. of the 4th World Conf. of the Int. Assoc. for Statistical Computing (IASC), 2008) 26. M. Aharon, M. Elad, and A. Bruckstein, “An algorithm for designing overcomplete dictionaries for sparse representation,” IEEE Trans. Signal Process. 54(11), 4311–4322 (2006). 27. C. Bouman and K. Sauer, “A generalized Gaussian image model for edge-preserving MAP estimation,” IEEE Trans. Image Process. 2(3), 296–310 (1993). 28. W. H. Pun and B. D. Jeffs, “Shape parameter estimation for generalized Gaussian Markov random field models used in MAP image restoration,” in Conference Record of the Twenty-Ninth Asilomar Conference on Signals, Systems and Computers., (IEEE, 1995), 1472–1476. 29. D. Garcia, “Robust smoothing of gridded data in one and higher dimensions with missing values,” Comput. Stat. Data Anal. 54(4), 1167–1178 (2010). 30. G. Wang, D. Garcia, Y. Liu, R. de Jeu, and A. Johannes Dolman, “A three-dimensional gap filling method for large geophysical datasets: Application to global satellite soil moisture observations,” Environ. Model. Softw. 30, 139–142 (2012). 31. D. J. Kissick, R. D. Muir, S. Z. Sullivan, R. A. Oglesbee, and G. J. Simpson, “Real-time dynamic range and signal to noise enhancement in beam-scanning microscopy by integration of sensor characteristics, data acquisition hardware, and statistical methods,” in Proc. Soc. Photo. Opt. Instrum. Eng. (2013), 86570. 32. D. J. Kissick, R. D. Muir, and G. J. Simpson, “Statistical Treatment of Photon/Electron Counting: Extending the Linear Dynamic Range from the Dark Count Rate to Saturation,” Anal. Chem. 82(24), 10129–10134 (2010). 33. R. D. Muir, D. J. Kissick, and G. J. Simpson, “Statistical connection of binomial photon counting and photon averaging in high dynamic range beam-scanning microscopy,” Opt. Express 20(9), 10406–10415 (2012). 34. R. D. Muir, S. Z. Sullivan, R. A. Oglesbee, and G. J. Simpson, “Synchronous digitization for high dynamic range lock-in amplification in beam-scanning microscopy,” Rev. Sci. Instrum. 85(3), 033703 (2014).


Introduction
Motion and change are inherent properties of living systems.The time-scales for quantitatively observing dynamic samples can span microseconds for chemical reactions to milliseconds to seconds for cell and organism motion.Technological advances continue to provide access to new regimes in high-speed imaging capable of capturing full volume renderings at rates previously reserved for single frame acquisitions.High speed cameras with kHz frame rates capable of low-light detection have helped propel new methods for biological microscopy [1][2][3][4].High frame-rate 3D sectioning capabilities have also been achieved using temporal focusing for two-photon fluorescence [5] and light-sheet microscopy for conventional fluorescence [6].
Despite these successes, current approaches for high frame-rate imaging using camerabased platforms still suffer from several practical limitations.Firstly, imaging with high frame rates requires high signal to noise ratio (S/N) within each pixel.When detecting sample fluorescence, the high turn-over rates required to produce such S/N can potentially result in significant photobleaching and/or phototoxicity from undesired photochemical reactivity and local heating within the sample [7][8][9][10].In addition, camera-based imaging is not generally compatible with imaging methods that scale nonlinearly with the incident intensity, including two-photon excited fluorescence (TPEF), second harmonic generation (SHG), coherent anti-Stokes Raman microscopy, stimulated Raman gain/loss imaging etc., all of which typically benefit from the higher intensities encountered in beam-scanning instruments.However, one of the most significant limitations of camera-based approaches for high speed biological imaging is the practical difficulties associated with extension to multi-channel detection.Multi-channel detection underpins colocalization experiments, fluorescence resonance energy transfer (FRET) imaging, depolarization ratio detection, and spectral detection.Each channel of detection requires a dedicated high-speed, high sensitivity camera when using the most common high speed microscopy approaches.In addition to the increased complexity and cost of multi-camera detection, precise spatial registry can be challenging to establish and maintain between multiple cameras.In this respect, beam-scanning instruments with multiple single-channel detectors running in parallel offer distinct advantages.
Fast beam-scanning approaches capable of easily supporting multi-channel detection are now well established for video-rate microscopy [11][12][13][14].Beam-scanning is most commonly achieved by combining a slow-scan galvanometer mirror with a resonant mirror or a rotating polygon mirror for video-rate imaging [15].However, achieving kHz frame rates using a beam-scanning microscope remains challenging.A 512 × 512 image contains ~260,000 pixels, leaving <4 ns per pixel for a 1 ms acquisition to perform the beam positioning and data acquisition.The short duration imposes significant constraints on the beam positioning hardware, the data acquisition electronics, and the sample (e.g., through effects such as saturation, phototoxicity, multiphoton absorption, etc.).
In the present work, a Lissajous trajectory beam scanning technique is implemented on a beam-scanning microscope coupled with a 3D (2D in space, 1D in time) model-based image reconstruction (MBIR) algorithm to recover frame rates exceeding 1000 fps on multiple simultaneous data acquisition channels.By using two resonant fast-scan mirrors with high quality factors (Q > 250) with active phase stabilization for performing the beam-scanning, the position of the beam can be known with high precision at each time-point in the trajectory.Digitizing the signals on multiple channels in synchronicity with the laser repetition rate (80 MHz) allows for reconstruction of high resolution images (> 1 MPix).The MBIR algorithm to recover information in the unsampled pixels builds on the high redundancy in conventional image sets, such that the inherent information content can typically be expressed in much lower dimensionality basis sets.

Adjoining binomial photon counting and photon averaging: theoretical foundation
The underlying Poisson distribution in any pixel can be described entirely by its average value, λ, a good estimate of which is the value that is sought to describe the spectrochemical measurement.The probability of n photons being generated is: In Eq. ( 1), A x and A y are constants representing the amplitudes of the sinusoidal trajectories correlated with the x and y axes and δ x and δ y indicate the corresponding phases.Lissajous trajectory microscopy has been explored previously by several groups in slower imaging applications to achieve frame-rates on the order of a few Hz.Lissajous trajectory beam scanning TPEF microscopes were previously built with MEMS mirrors [16] or fiber scanners [17][18][19].Lissajous trajectories have also been utilized in other applications such as atomic force microscopy (AFM) [20,21].In general, these previous strategies utilized relatively low least common multipliers or non-repeating Lissajous trajectories with correspondingly low resolution images.
In contrast to other Lissajous studies, the trajectories investigated in the present study utilize several thousand consecutive periods of a resonant mirror prior to the repeating of the trajectory, with a frame-rate that is user definable.Lissajous trajectory microscopy has the distinct advantage over traditional raster scanning systems of allowing simultaneous acquisition of high resolution images at low frame-rates, as well as low resolution images at high frame-rates.The sample is coarsely imaged with only a few passes of the beam, with subsequent passes consecutively adding additional spatial information.Thus, a full Lissajous trajectory image can be temporally divided into several subframes to increase the effective imaging frame-rate with a corresponding tradeoff of in spatial resolution.Figure 1(c) plots the frame-rate vs. pixel fill rate for the 10600:11972 Lissajous trajectory described in this manuscript.

Model-based iterative image reconstruction
The Lissajous-scanning pattern can leave large blocks of pixels unsampled in each frame at the higher frame rates, although those missing pixels are sampled at other time-points in the trajectory.For kHz regime frame-rates at a 256x256 resolution, less than 20% of the pixels in some frames are sampled.In dynamic systems, the sample can evolve over time, but the signal intensities in the unsampled pixels as a function of position are still correlated with the information in the preceding and following frames.In this way, information acquired as a function of both time and space can be used to more reliably estimate the appropriate intensities for the unsampled pixels, even for objects changing quickly in time.The case at hand can be posed as an in-painting problem as described by Bertalmio et al. [22]  problems have been solved using a variety of methods, including, but not limited to, partial differential equations (PDEs) [23], patch-based interpolation [24], and sparse learned representations [25], which is an extension to singular value decomposition based on the Kmeans (K-SVD) [26].
The algorithm used in the current work is unique in that a maximum a posteriori (MAP) estimation with a generalized Gaussian Markov random field (GGMRF) prior model was used, adopted within a 3 dimensional space-time neighborhood.In brief, the MAP estimate identifies the recovered image based on maximizing the probability of observing the measured data given additional imposed model-based constraints.These constraints describe relationships between pixels within a neighborhood.For example, in the simplest implementation of a Gaussian Markov random field, it is assumed that adjacent pixels are normally distributed with a similar mean.However, this simple approach typically does not recover sharp edge effects, resulting in significant blurring in the recovered images.The generalized Gaussian function that serves as the prior model in the GGMRF approach used in this work introduces additional shape parameters in the base Gaussian function, reducing the cost associated with high contrast edges in the images. 32In brief, the exponent in a standard Gaussian function is allowed to vary, with p = 2 (quadratic case) corresponding to a standard Gaussian distribution and p = 1 (total variation case) to an exponential (Laplacian) distribution.It is interesting to note that the GGMRF model in MAP estimation has been used successfully previously on many occasions for recovering sharp edges in low-dose transmission tomography [27] and for blur and noise corrupted images [28], but not in this context of 3D space-time inpainting demonstrated herein.
The developed algorithm is an example of iterative model-based image reconstruction.Intuitively, the prior provides an estimate for the overall probability of obtaining an original image or image set.Next, the algorithm iterates to adjust the estimate for the image, with the degree of change controlled by the regularization.Mathematically, the inverse problem can be succinctly expressed as estimating x from y = Ax + W, where x is the MAP estimate of the original image, y is the observation, A is the Lissajous-scanning matrix, x is the underlying noise free and complete image, and W is noise.While formally the noise in the nonlinear optical measurements is likely to be Poisson-distributed, we will model W as additive white Gaussian noise (AWGN) with a zero mean and a constant standard deviation to simplify subsequent analyses.For high means, the Poisson distribution converges to a Gaussian distribution.Bayes theorem in Eq. ( 2) provides a starting point for relating the probability of observing the measured results given constraints imposed by the model.In practice, it is more convenient to minimize the negative logarithm.In this framework, the cost function c(x) to be minimized can be written as shown in Eq. ( 3), p is a design parameter for the generalized Gaussian (chosen to be 1.05).(Note that it reduces to a quadratic case corresponding to a normal Gaussian when p = 2.) q i;j are the spatial weights r t are the temporal weights C represents pair-wise cliques in space T represents temporal neighbors x(t) is value of x at time-sample t, relative to the current time-sample.
The first term of c(x) corresponds to the forward model, with the next two terms corresponding to two separate regularizers: one for 2D space and one for 1D time.The relative weighting and scaling of each of the regularizers can be independently adjusted, as they represent distinct physical properties.The scale parameter p x σ can be computed using the maximum likelihood (ML) estimator, which in the asymptotic limit is normally distributed, unbiased, and computationally efficient.
The iterative coordinate descent (ICD) algorithm was used for performing the minimization in Eq. ( 4).
In addition to the iterative model-based image reconstruction approach, analysis was also performed using a complementary interpolation algorithm based on a discrete cosine transform (DCT) coupled with a penalized least-squares (LS) calculation, optimized for implementation in MatLab [29,30].A discussion of the DCT-LS algorithm and a comparison between the MBIR and DCT-LS results are included in the Supplementary Information.

Experimental
The Lissajous microscope utilized a Tsunami Ti:Sapphire oscillator (Spectra Physics) pumped by a Millenia Vs (Spectra Physics) CW visible laser operating at 5.0 W. The Tsunami produced femtosecond pulses centered around 800 nm, with an 80 MHz repetition rate, and a maximum power of ~1.0 W. The period of the Tsunami served as the master clock dictating all the subsequent timing of the resonant mirrors, feedback controls, and data acquisition electronics.The incident beam was coupled into the microscope by the first resonant mirror in the resonant mirror pair (Electro-Optical Products Corp.) operating at 5986 clock ticks (13.36 kHz,), providing rapid scanning of the laser beam in the X direction.Using a telecentric lens pair (Thorlabs f = 100 mm each), the incident beam was then coupled to the second resonant mirror operating with a period of 5300 clock ticks (15.09 kHz) to provide fast scanning in the Y direction.The beam was then passed through a second telecentric lens pair providing a 2.3 × beam expansion (Thorlabs f = 25.4 mm, f = 60.0 mm) onto the back of a 10 × objective (Optem, NA = 0.30).The transmitted fundamental beam and the SHG signal were collected and recollimated by a condenser lens (Thorlabs, f = 25.4 mm).The SHG signal was then split from the excitation beam by reflection off a 405 nm long pass dichroic mirror (Chroma, Z405RDC) and passed through a polarizing beam splitting cube (Thorlabs, PBS101).The two polarizations were collected by separate photomultiplier tubes (Hamamatsu, H10722-10) after each passed through filter stacks containing both a 400 nm interference filter (CVI, F40-400.0-4-1.00)and a KG3 (Thorlabs, FGS900) to reject the remaining incident 800 nm light.The transmitted 800 nm fundamental beam was passed through a Glan polarizer and focused by a lens (Thorlabs, f = 25.4 mm) onto a photodiode (Thorlabs, DET10A) for detection of laser transmittance and birefringence.The polarization of the incident light was modulated by an electro-optic modulator (Conoptics, 350-160) placed in the beam path prior to the resonant mirror pair.
Precise timing control was maintained to enable the generation of high resolution images.Due to the high Q-factor of the resonant mirrors (Q > 250) amplitude stability was achieved at the sacrifice of phase stability.To stabilize phase drift, a custom built Lissajous timing generator (LTG) control box was designed to perform real-time active phase correction of the resonant mirrors.The LTG was controlled by an 8-bit Microcontroller (Silicon Laboratories, C8051f120), running at 80 MHz derived from an external 10 MHz phase-lock loop (PLL) synchronous with the 80 MHz master clock from the Ti:Sapphire laser.The microcontroller runs a custom built, multitasking preemptive operating system using a combination of Both data acquisition and a significant portion of the timing control was performed using PCI Express digital oscilloscope cards (AlazarTech, ATS 9462), which allowed for continuous streaming of every individual detection event (laser firing) simultaneously on up to 4 channels, although only 3 channels were used to perform the experiments described herein.The digitizer cards were clocked directly from the laser by a fast photodiode (Thorlabs, DET10A), which sampled a small portion of the laser resulting in a pulse train at the frequency of the laser which was used as a clock signal for the digitizer cards.More details about synchronous digitization with beam scanning instrumentation can be found elsewhere [31][32][33][34].The digitizer cards AUX I/O port was configured to supply an output of the clock frequency divided by 8 ( = 10 MHz) in order to clock the LTG through a 10 MHz PLL.As a result the digitization electronics and the mirror drivers all run synchronously with the laser as the master clock (timing diagram, Fig. 2).In this manner, the position within the focal plane, of each pulse of the laser, could be determined with reasonably high confidence.The LTG epoch pulse was used to trigger the start of data acquisition with the digitizing oscilloscope cards.into a single final high resolution image.Alternatively (and simultaneously), the images were separated into sub-frames of the trajectory resulting in higher frame rates of more sparsely sampled images.In either case, the sine-wave trajectory of the resonant mirrors results in nonuniform pixel density across the sample, with higher density near the edges and corners of the image where the resonant mirrors were moving the slowest (turning points).Consequently, some pixels were sampled many times, some fewer times, and in the case of fast sub-frames, some pixels not sampled at all.

Results and discussion
Two model classes of time-varying samples were designed and used for characterization of the prototype Lissajous beam-scanning microscope, selected to represent two distinct effects commonly necessitating high-speed imaging.Sample movement related to fast sample translation (e.g., from sample vibration, heart-beating / breathing, etc.) was modeled by actively translating a sample during imaging.Transient changes in intensity within a fixed field of view (e.g., action potential imaging, vesicle budding, crystal nucleation, etc.) were modeled by performing fast polarization modulation of an SHG-active sample.In the first model, shown in Fig. 3, the sample was rapidly translated during a 25 Hz Lissajous period image acquisition, such that the spatial position of the sample changed significantly during the course of a single Lissajous trajectory.Figure 3   A second model system was developed in which the sample was static in spatial locations, but exhibited transient localized differences in brightness.The measurements, shown in Fig. 4, were achieved by rapid polarization modulation SHG imaging of urea crystals.The period of the polarization modulation was equal to the Lissajous period, resulting in a time-averaged intensity of the field of view for images that are not divided into sub-trajectories.The SHG signal was separated into its horizontal and vertical components with a polarizing beam splitting cube before being detected by fast photomultiplier tubes (PMTs), for sensitive lowlight detection (columns in Figs.4(b) and 4(c)), and complemented by the laser transmittance measurements (column A in Fig. 4(a)) (Media 3-5).The first row shows the full 5 Hz Lissajous period, and the last two rows show sub-trajectories to 1.460 KHz and interpolated results, respectively.The image for the last row was reconstructed based on the sparse sampling provided in the corresponding Lissajous trajectory in the middle row, combined with information from preceding and following spare samplings.The first and last rows are visually similar, though the first row integrates the intensity across the entire modulation period, and the last row features the intensity at a narrow time slice in the modulation period.A movie featuring the 1.460 KHz temporal resolution is provided in Media 3-5, several frames of which are highlighted in Fig. 5 showing the change in intensity as a function of time for the different input polarizations.The quantitative accuracy of the inpainting image interpolation is most easily assessed in a situation where the ground truth is known a priori.A representative ground-truth video was captured with a CCD camera containing large objects moving in the field of view.Pixels were then selectively deleted from each frame in a simulated Lissajous trajectory for a 250 Hz frame-rate image and interpolated (Fig. 6).For pixels that take on integer grayscale values of between 0 and 255, the interpolated pixels had an average error of 3.4 grayscale units (i.e.1.5% standard deviation in grayscale value) relative to the ground truth across the interpolated pixels of the image.Comparison with other inpainting algorithms are detailed in the supplementary information.

Conclusions
Lissajous trajectory beam-scanning microscopy was coupled with image interpolation algorithms to enable > kHz frame rate imaging on multiple simultaneous data acquisition channels through relatively simple modification of a conventional beam-scanning microscope.Active phase stabilization of the resonant mirrors enabled the acquisition of high-resolution images from Lissajous trajectories several thousand oscillations of the resonant mirrors.By dicing the time-dependent data into smaller sub-trajectory sections, frame rates much higher than those achievable from the overall trajectory could be achieved.MBIR interpolation algorithms enabled reconstruction of the data missing from the unsampled pixels in the sub-trajectory images to produce images at several hundred Hz up to several kHz.
Lissajous trajectory microscopy is particularly advantageous over slow raster scanning techniques in multi-photon and nonlinear optical imaging by minimizing the laser dwell time per pixel.The two most well-established damage mechanisms are due to local heating effects and to undesired photochemistry arising from multi-photon absorption. 15, 31Local heating arises from a competition between the rate of heat deposition from the incident beam(s) versus heat dissipation.By using high frequency resonant mirrors in the Lissajous microscope, only 2-3 consecutive laser pulses fall within the same focal volume in the central field of view, with long periods (tens to hundreds of μs) before that same pixel is sampled again in the trajectory.In contrast, conventional imaging using two galvanometer mirrors with 1 μs integration time per pixel and an 80 MHz source corresponds to ~80 consecutive laser pulses, for a >30 times higher local heating rate compared to Lissajous trajectory scanning.In the corners of the Lissajous trajectory, the scan pattern does suffer from an increased consecutive pixel dwell time, where both resonant mirrors are simultaneously moving relatively slowly (Fig. 1(b)).However, adding an iris in the rear conjugate focal plane between the downstream telecentric lens pair provides a simple means to clip just the corners and allow for continuous use of high laser power.
While demonstrated in this study using a pulsed laser source with synchronous digitization, many of the advantages of Lissajous trajectory imaging remain for continuous laser sources (e.g., in confocal fluorescence and confocal reflectance imaging).Given the relative ease with which the experimental hardware can be modified to enable Lissajous microscopy, it should be relatively straightforward to adapt existing confocal microscopes for high frame rate acquisitions by modifications to the scan head and data acquisition electronics.

Fig. 1 .
Fig. 1.A) Example Lissajous trajectory for 7:8 pattern with equal amplitude.Starting point is 0,0, when the trajectory returns to 0,0 the pattern repeats.B) Pixel sampling density map of 7.083:8 Lissajous trajectory used in imaging.C) Plots of % fill rate vs. frame-rate for the 5300:5986 Lissajous trajectory generating a 512 × 512 pixel image.Higher frame-rates come with the tradeoff of fill rate and/or spatial binning resolution.
the MAP estimate, maximizing ( ) ( ) | p y x p x corresponds to recovering the most probable image estimate x , since the denominator ( ) p y is a constant of x.In this notation, ( ) | p x y is the conditional probability of the original image x given the constraints of the measurements in y, and ( ) p x is the prior probability, which is representative of what x should be.
hardware and software timers to produce the and Y mirror drive signals and epoch pulse, which marks the start of the Lissajous trajectory.The X,Y and epoch signals of the LTG were produced using the synchronous counters of the C8051f120 providing inherent phase lock among these 3 signals.Circuits external to the C8051f120 convert the sinusoidal feedback of the resonant mirrors into a digital signal used by the Microcontroller to compute and compensate for X and Y phase error upon the next iteration of the epoch pulse.User communication with the Microcontroller, to adjust mirror and epoch frequency, was performed via RS-232 with a custom LabVIEW application.The resonant mirrors used in the prototype Lissajous microscope were driven at 5300 and 5986 clock ticks, corresponding to 15.09 kHz and 13.36 kHz, respectively, for an approximate 7:8 trajectory (7.083:8) and a frame rate of ~5 Hz (Lissajous period of ~0.2 s).

Fig. 2 .
Fig. 2. Timing diagraming for the prototype Lissajous microscope.An 80MHz Ti:Sapphire laser was used as master clock for the ATS 9462 digitizing cards, which in turn generated a 10MHz PLL to synchronize the Lissajous Timing Generator (LTG), which drove the resonant mirror(s) with active phase control.The LTG supplied an epoch pulse to trigger the start of data acquisition.The peak voltages from each detector following each individual laser pulse were digitized and the image(s) were reconstructed according to Eq. (1).Two separate analyses were performed on each single time-dependent data set.In one, each entire trajectory was binned

Fig. 3 .
Fig. 3. USAF 1951 Resolution Chart.A) High resolution Lissajous microscope image (25 Hz Imaging) of test chart without translation.B) During rapid sample translation, significant blurring occurs.Media 2. C) Example of blurring with traditional raster imaging (15 Hz).D) Data rebinned into sub-trajectories at 100Hz to increase frame rate and reduce blurring with the resultant unsampled pixels.E) Inpainted results of D. F) Data rebinned into sub-trajectories to give 1.25 KHz imaging and the resultant unsampled pixels.G) Inpainted results of F (Media 2.) (a) consists of a high resolution image of a USAF 1951 resolution test chart measured by laser transmittance, with no sample translation.

Figure 3 (
b) is of the test chart with rapid translation, resulting in motion blur (Media 1).

Figure 3 (
c) contains an equivalent motion distortion image from traditional raster scanning at 15Hz.The bottom two rows of Fig.3explore higher frame-rates with complimentary interpolation as a means of removing motion blur, with 3D and 3F respectively showing sub-trajectories to 100 Hz and 1.25 KHz, and 3E and 3G showing the respective interpolated results (Media 2).

Fig. 4 .
Fig. 4. Urea Crystals imaged on three different detectors with the incident optical polarization modulated at the Lissajous Period.Columns B and C corresponds to H and V SHG, and column A corresponds to laser transmittance.The first row demonstrates imaging at the 5Hz Lissajous period, the second and third rows demonstrate a sub-trajectory with a 1.460 KHz frame rates and in in-painted results (Media 3, Media 4, Media 5).While the base image in the first row can only show the average intensity across the modulation period, the 292 × increased temporal resolution is able to show the intensity of the various crystal domains at specific time slices.

Fig. 5 .
Fig. 5. Selected frames of the movie (supplemental information) corresponding image in the last row of Fig. 3 column (A).The enhanced 250 Hz temporal resolution is able to show the intensity evolution of the various crystal domains.

Fig. 6 .
Fig.6.Movie of "Marco" with toy (A) as a surrogate movie for inpainting interpolation fidelity assessment.After superimposing the same unsampled pixel pattern (B) as in row 2 of Fig.3, the resulting interpolation is demonstrated in C. For pixels that take on integer grayscale values between 0 and 255, the interpolated pixels had an average error of 3.4 grayscale units ( ± 1.5% standard deviation) relative to the ground truth as displayed in the difference map (D), where gray corresponds to correct values and white and black correspond to over and underestimated vales, respectively.