Abstract
Laser scanning has been widely used in material processing and optical imaging. Among the established scanners, resonant galvo scanners offer high scanning throughput and 100% duty cycle and have been employed in various laser scanning microscopes. However, the common applications of resonant galvo often suffer from position jitters which could introduce substantial measurement artifacts. In this work, we systematically quantify the impact of position sensor, data acquisition system and air turbulence and provide a simple solution to achieve jitter free high-throughput measurement.
1. Introduction
Laser scanning technology holds great importance in material processing [1–3] and optical imaging [4–12]. Many high-performance biomedical imaging techniques rely on laser scanning, which include confocal microscopy [5], optical coherence tomography [6,13] and multiphoton microscopy [4,7,8,14–16]. For high-throughput recording, resonant galvo scanner is particularly important for its speed, robustness, compactness and 100% duty cycle [3,7,8,17]. The data throughput of a scanner is determined by its aperture, angular range, frequency and wavelength [5]. For a 5 mm aperture, 26 optical degrees, 8 kHz scanner (e.g. CRS 8 kHz Cambridge Technology), the average scan speed for a 920 nm laser is 39 M mode/sec (i.e. diffraction limited spots per sec) and the peak speed of the sinusoidal scan is 62 M mode/sec. To properly sample the data, we need a peak sampling rate of 124 M points/sec, which exceeds the throughput of most commercially available scanners. However, whether such a scanning speed can indeed produce meaningful information depends on the repeatability or predictability of the scanning pattern. In practice, it is often found that there is substantial scanning jitter, which leads to random image distortion. As a result, for high-quality and high position accuracy measurement, one has to greatly reduce the scanning range (e.g. oversampling with 4x or even 8x zoom). Therefore, the random jitter causes a dilemma. We need to either sacrifice image quality to gain throughput and field-of-view (FOV) or vice versa. As high-throughput high-quality measurement holds great importance to many applications [1,2,4–6,17], we need to understand the sources of the image jitter and provide a robust and simple solution to enable jitter-free high-throughput measurement.
The position jitter may result from several factors, the accuracy of the galvo’s internal position sensor, the temporal accuracy of the data acquisition system, air turbulence and the environmental noise. First, resonant scanners are typically driven by an internal phase locked loop which requires a positon feedback [3,11]. This internal position feedback also provides a trigger signal for synchronizing the application system’s data acquisition to the resonant scanning [18]. If the position sensor is not sufficiently accurate, the recorded data will contain position jitter. Second, the data acquisition system also has finite timing resolution, which affects both the trigger detection and the data sampling. In the aforementioned resonant galvo throughput, the peak sampling requirement reaches 124 M points/sec. If the trigger pulse edge detection can only reach this 124 MHz sampling rate, the trigger signals arriving between two consecutive sampling points will be treated as the latter point, which will introduce the uncertainty (jitter) of up to one pixel in time. From the early discussion, we only have two points to support a diffraction limited spot (optical mode), and thus the one pixel jitter is actually quite significant. Another factor to consider is that the data acquisition system has its sampling clock whose tick may not coincide with the arrival of the trigger. This will also introduce one pixel level image jitter. Third, air turbulence may also affect the mechanical motion of the galvo. The edge of the 5 mm 8 kHz galvo travels at an average velocity of ∼9 meter/sec, close to the speed of 100-metre dash. Fluid dynamics is known to produce chaotic response [19]. It is unclear whether such a travel speed is sufficient to perturb the scanning at the single optical mode level magnitude. Fourth, the general laboratory environment could contain acoustic noise, which may be coupled to the galvo resonator and introduce jitter.
In this work, we systematically investigated these factors and quantified their contribution to the image jitter. Finally, we present a simple solution to achieve high-throughput jitter-free imaging.
2. Methods
We utilized a 5 mm 8 kHz resonant galvo scanner (CRS 8 kHz Cambridge Technology) in this study for its high scanning throughput and broad adoption in laser scanning microscope systems [17]. The imaging laser source wavelength was 920 nm. To quantify the scanning jitter, we positioned a 10 µm slit (S10RD, Thorlabs) on the focal plane of the scan lens (Fig. 1(a)). Behind the slit, there was a photodiode detector with 14 ns rise time (DET36A, Thorlabs). To provide an external optical position feedback, we used a low-cost 785 nm laser diode (L785P090, Thorlabs) coupled to a single mode fiber to serve as the reference laser source and again employed a slit and a photodiode for position detection. To isolate the external acoustic noise and control the air pressure around the galvo, we fabricated a sturdy aluminum enclosure with two optical windows (25 mm 84465 and 50 mm 84469, Edmund Optics). There was an air vent on the enclosure, connected to a vacuum source (Fig. 1(b)) for air pressure control.
Fig. 1.
(a) System configuration for investigating the origin of image jitter. L1, lens with 500 mm focal length; L2, achromatic telecentric scan lens with 125 mm focal length. (b) Airtight galvo enclosure. The optical windows allow the optical access of the galvo scanner. The air vent is connected to a vacuum source to control the air pressure inside the enclosure.
For jitter quantification measurement, we used the resonant galvo to perform repeated line scan of the slit and recorded the photodiode signal. For data recording, we used the widely used laser scanning microscope software ScanImage [17,18] to control a FPGA based high speed (120 M sample/sec) 4-channel digitizer system (NI 5734, PXIe-1071, PXIe-7961 and PXIe-6341). The resonant galvo scan range was set to the maximum value of 26 optical degrees to mimic the situation of high-throughput recording. The recorded images were analyzed by a MATLAB program to extract the jitter information. For jitter analysis, we used the center of mass to represent the slit center on each line. The averaged center position was used as the ground truth. The deviation from this value was considered image jitter.
3. Results
First, we quantified the image jitter for using the internal TTL trigger signal. The time lapse line scanning showed substantial jitter (Fig. 2(a)). To test whether this was due to the internal trigger accuracy, we switched to the reference laser based external optical trigger. During a single oscillation cycle, the laser beam scanned across the reference slit twice. To provide just one trigger signal per oscillation cycle for the ScanImage software, we utilized the internal TTL signal to trigger a square wave which turned on the reference laser during only half of the oscillation cycle. Using this optical trigger, the image jitter was significantly reduced (Fig. 2(b)). However, there appeared a quasiperiodic jitter noise.
Fig. 2.
(a-d) Time lapse line imaging of a fixed slit with TTL trigger, external optical trigger, external optical trigger and sampling jitter correction, external optical trigger and sampling jitter correction and 0.3 atmospheric air pressure, respectively. (e-h) The corresponding image jitter as a function of time. (i-l) The corresponding jitter histograms.
One hypothesis we had was that the data acquisition system always had a finite sampling rate. If the trigger arrived between two adjacent sampling points, it would be treated as arriving on the latter time point. Therefore, the trigger would contain a time uncertainty of up to one time step. Moreover, the analog sampling would always run on a certain sample clock. So even with a perfect trigger sampling, the actual data still need to be recorded according to the sample clock, which would again introduce image jitter of up to one time step. To test this hypothesis and more importantly provide a robust solution to get rid of this sampling jitter, we split the reference photodiode’s signal, one to the delay generator for producing the optical trigger and the other to the second analog channel of the microscope (Fig. 1(a)). We also revised the reference laser control signal so that its output was higher during half of the resonant cycle and lower during the other half. We set the delay generator trigger threshold to be slightly above the lower signal. In this way, we still had a single optical trigger for Scanimage and two analog pulses for the second analog channel during each resonant cycle. With the simultaneous sampling capability of the digitizer, both channels (one from the actual image detector and one from the reference photodiode) contained similar digitization errors. Therefore, we could detect the jitter from channel 2 and use this info to undo the jitter of channel 1 which was the actual image channel. With this simple method, the jitter was indeed greatly reduced to much less than one pixel (Fig. 2(c)). This also proved that the quasiperiodic jitter was indeed a result of sampling. As long as the analog data recording satisfies the Nyquist limit, we can always computationally shift the image and remove the jitter, for which we utilized linear interpolation to achieve accurate sub-pixel shift.
To explore if we can further reduce the jitter to the ultimate limit of zero, we went on to test the effect of shielding external acoustic noise and reducing air pressure. Using a two-piece CNC machined thick aluminum enclosure (one base, one cover), we shielded the galvo. The two high-flatness glass windows (Fig. 1(b)) allowed optical access. Through the air vent on the enclosure, we connected a vacuum meter and a vacuum source. Experimentally, we found that reducing the air pressure down to 0.3 atmospheric pressure made negligible difference to the jitter (Fig. 2(d)).
Together these measurements suggested that 1) the internal TTL galvo trigger contained substantial jitter; 2) the external optical trigger was reliable; 3) the sampling jitter could reach one pixel and it could be digitally corrected by using the jitter information from the directly sampled analog trigger signal and 4) reducing the air pressure (less air turbulence and lower acoustic noise) could not further reduce the jitter. Overall, to suppress the image jitter, all we need is the external optical trigger and the sampling jitter correction. A key question is whether the sampling jitter is highly correlated across the entire FOV. If so, we just need to measure the optical trigger at one position within the FOV and utilize their spatial correlation to provide full FOV image jitter correction.
To investigate the sampling jitter correlation across the entire FOV (4096 pixels), we used a precision function generator (AFG3252, TEK) to output periodic waveforms at 8 kHz to mimic the galvo scanning, which was connected to the analog input channel of the microscope. Within each period, the waveforms contained a few pulses to mimic imaging an array of slits across the FOV. From the recorded images (Fig. 3), we extracted the sampling jitter across the FOV and quantified their correlation. As expected, the sampling jitter was indeed highly correlated (in phase and with fixed ratio). The amount of jitter is the greatest in the middle of the FOV where the sinusoidal scanning is the fastest and most susceptible to sampling jitter. Based on this correlation, we would only need to measure the trigger signal in the center of the FOV to provide digital correction for the entire image. For fast and computation efficient FOV position dependent correction, we divided the raw line scan data into 64 segments and for each segment we applied different amount of shift based on the correlation curve (Fig. 3(c)). The measurement suggested that the combination of optical trigger and sampling jitter correction allowed us to suppress the jitter down to ∼2% of a pixel (Fig. 3(d)), sufficiently good for most applications.
Fig. 3.
(a) Time lapse line scan measured at five locations across the entire FOV. (b) Time lapse line scan with digital correction based on the jitter information measured at the center of the FOV. (c) Spatial correlation of the sampling jitter across the FOV. (d) Image jitter before and after correction across the FOV.
To validate this method, we performed 2D laser scanning transmission microscopy using the same 8 kHz galvo at full scan range. The numerical aperture of the objective lens was 0.6 and the laser wavelength was 920 nm. We imaged the element 5 and 6 in group 7 of the USAF target (Fig. 4) and the width of the thinnest line was 2.19 µm. Similar to the slit measurement, we observed the lowest image jitter when using the external optical trigger combined with the digital sampling correction.
Fig. 4.

(a-c) 2D imaging of element 5 and 6 in group 7 of the USAF target using internal TTL trigger, external optical trigger, and optical trigger with sampling jitter correction, respectively.
4. Discussion
The dual channel recording could effectively suppress the sampling jitter. One drawback of such an approach was that we had extra data (second channel) recorded while only the information (a few pixels) near the center of the FOV was utilized. A simple solution to reduce the data stored is to have a program to immediately process the second channel and only store the amount of shift (one number) per line. An even better solution is to have the sampling jitter correction built within the FPGA based microscope software. For example, we could use an analog channel to sample the optical trigger and determine the sampling jitter and perform segmented shift for the imaging channel so that the output images are jitter-free.
5. Conclusion
Overall, we systematically investigated the contribution of galvo internal position sensor feedback, sampling error, air turbulence and environmental acoustic noise to image jitter. Our experimental data suggest that the internal sensor feedback contained significant timing noise and the data acquisition system could also introduce sampling jitter. A robust solution is to utilize an external optical trigger combined with digital sampling jitter correction. With this simple approach, we can effectively suppress the jitter to ∼2% of one pixel, sufficient for most applications. As resonant galvo based scanners are widely employed for high-throughput laser scanning imaging systems, this study and the validated solution hold great significance to achieving high-quality and high-throughput jitter-free measurement.
Acknowledgement
M.C. acknowledges the scientific equipment from HHMI.
Funding
National Institutes of Health10.13039/100000002 (RF1MH120005, U01NS094341, U01NS107689).
Disclosures
The authors declare no conflicts of interest.
References
- 1.Steen W. M., Mazumder J., Laser Material Processing (Springer science & business media, 2010). [Google Scholar]
- 2.Duda T., Raghavan L. V., “3D metal printing technology,” IFAC-PapersOnLine 49(29), 103–110 (2016). 10.1016/j.ifacol.2016.11.111 [DOI] [Google Scholar]
- 3.Aylward R. P., “Advanced galvanometer-based optical scanner design,” Sens. Rev. 23(3), 216–222 (2003). 10.1108/02602280310481968 [DOI] [Google Scholar]
- 4.Denk W., Svoboda K., “Photon upmanship: Why multiphoton imaging is more than a gimmick,” Neuron 18(3), 351–357 (1997). 10.1016/S0896-6273(00)81237-4 [DOI] [PubMed] [Google Scholar]
- 5.Pawley J., Handbook of Biological Confocal Microscopy, 3 ed. (Springer, 2006). [Google Scholar]
- 6.Huang D., Swanson E., Lin C., Schuman J., Stinson W., Chang W., Hee M., Flotte T., Gregory K., Puliafito C., “Optical coherence tomography,” Science 254(5035), 1178–1181 (1991). 10.1126/science.1957169 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Kirkpatrick N., Chung E., Cook D., Han X., Gruionu G., Liao S., Munn L., Padera T., Fukumura D., Jain R. K., “Video-rate resonant scanning multiphoton microscopy: An emerging technique for intravital imaging of the tumor microenvironment,” IntraVital 1(1), 60–68 (2012). 10.4161/intv.21557 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Saar B. G., Freudiger C. W., Reichman J., Stanley C. M., Holtom G. R., Xie X. S., “Video-rate molecular imaging in vivo with stimulated Raman scattering,” Science 330(6009), 1368–1370 (2010). 10.1126/science.1197236 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Piyawattanametha W., Barretto R. P., Ko T. H., Flusberg B. A., Cocker E. D., Ra H., Lee D., Solgaard O., Schnitzer M. J., “Fast-scanning two-photon fluorescence imaging based on a microelectromechanical systems two-dimensional scanning mirror,” Opt. Lett. 31(13), 2018–2020 (2006). 10.1364/OL.31.002018 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Park J.-H., Kong L., Zhou Y., Cui M., “Large-field-of-view imaging by multi-pupil adaptive optics,” Nat. Methods 14(6), 581–583 (2017). 10.1038/nmeth.4290 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Kong L., Tang J., Little J. P., Yu Y., Laemmermann T., Lin C. P., Germain R. N., Cui M., “Continuous volumetric imaging via an optical phase-locked ultrasound lens,” Nat. Methods 12(8), 759–762 (2015). 10.1038/nmeth.3476 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Stirman J. N., Smith I. T., Kudenov M. W., Smith S. L., “Wide field-of-view, multi-region, two-photon imaging of neuronal activity in the mammalian brain,” Nat. Biotechnol. 34(8), 857–862 (2016). 10.1038/nbt.3594 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Srinivasan V., Huber R., Gorczynska I., Fujimoto J., Jiang J., Reisen P., Cable A., “High-speed, high-resolution optical coherence tomography retinal imaging with a frequency-swept laser at 850 nm,” Opt. Lett. 32(4), 361–363 (2007). 10.1364/OL.32.000361 [DOI] [PubMed] [Google Scholar]
- 14.Jia H., Rochefort N. L., Chen X., Konnerth A., “Dendritic organization of sensory input to cortical neurons in vivo,” Nature 464(7293), 1307–1312 (2010). 10.1038/nature08947 [DOI] [PubMed] [Google Scholar]
- 15.Ragan T., Kadiri L. R., Venkataraju K. U., Bahlmann K., Sutin J., Taranda J., Arganda-Carreras I., Kim Y., Seung H. S., Osten P., “Serial two-photon tomography for automated ex vivo mouse brain imaging,” Nat. Methods 9(3), 255–258 (2012). 10.1038/nmeth.1854 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Song A., Charles A. S., Koay S. A., Gauthier J. L., Thiberge S. Y., Pillow J. W., Tank D. W., “Volumetric two-photon imaging of neurons using stereoscopy (vTwINS),” Nat. Methods 14(4), 420–426 (2017). 10.1038/nmeth.4226 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Sofroniew N. J., Flickinger D., King J., Svoboda K., “A large field of view two-photon mesoscope with subcellular resolution for in vivo imaging,” bioRxiv, 055947 (2016). [DOI] [PMC free article] [PubMed]
- 18.Pologruto T. A., Sabatini B. L., Svoboda K., “ScanImage: flexible software for operating laser scanning microscopes,” BioMed Eng OnLine 2(1), 13 (2003). 10.1186/1475-925X-2-13 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Von Kármán T., Aerodynamics (McGraw-Hill, 1963), Vol. 9. [Google Scholar]



