(a) Performance metrics of the tracking routine from an example dataset plotting the position of the galvanometric mirrors together with the position of the fish, the distance of the head of the fish to the center of the FOV and the swimming speed. (b) Heat map of aggregate data (used in Fig. 2a) showing the distance of the head of the fish to the center of the FOV as a function of swimming speed to illustrate how the tracking algorithm minimizes the movements of the galvanometric mirrors. (c) Comparison of the performance of online tracking vs. offline tracking as measured by the deviation of the distance of the head of the fish to the center of the FOV. The offline tracking has access to the entire image series and can apply better denoising and segmentation (based on background subtraction and spatial filtering in the frequency domain).