Stytra: An open-source, integrated system for stimulation, tracking and closed-loop behavioral experiments
Fig 4
A) Eyes are detected by fitting an ellipse to the connected components of the image of the fish head after thresholding. B) Example trace of eye motion in response to a full-field rotating background.