Optical-flow analysis toolbox for characterization of spatiotemporal dynamics in mesoscale optical imaging of brain activity.
Wide-field optical imaging techniques constitute powerful tools to investigate mesoscale neuronal activity. The sampled data constitutes a sequence of image frames in which one can investigate the flow of brain activity starting and terminating at source and sink locations respectively. Approaches to the analyses of information flow include qualitative assessment to identify sources and sinks of activity as well as their trajectories, and quantitative measurements based on computing the temporal variation of the intensity of pixels. Furthermore, in a few studies estimates of wave motion have been reported using optical-flow techniques from computer vision. However, a comprehensive toolbox for the quantitative analyses of mesoscale brain activity data is still lacking. We present a graphical-user-interface toolbox based in Matlab® for investigating the spatiotemporal dynamics of mesoscale brain activity using optical-flow analyses. The toolbox includes the implementation of three optical-flow methods namely Horn-Schunck, Combined Local-Global, and Temporospatial algorithms for estimating velocity vector fields of flow of mesoscale brain activity. From the velocity vector fields we determined the locations of sources and sinks as well as the trajectories and temporal velocities of flow of activity. Using simulated data as well as experimentally derived sensory-evoked voltage and calcium imaging data from mice, we compared the efficacy of the three optical-flow methods for determining spatiotemporal dynamics. Our results indicate that the combined local-global method we employed, yields the best results for estimating wave motion. The automated approach permits rapid and effective quantification of mesoscale brain dynamics and may facilitate the study of brain function in response to new experiences or pathology.