TY - JOUR T1 - Pixying Behavior: A Versatile Real-Time and Post-Hoc Automated Optical Tracking Method for Freely Moving and Head Fixed Animals JF - eneuro JO - eNeuro DO - 10.1523/ENEURO.0245-16.2017 SP - ENEURO.0245-16.2017 AU - Mostafa A. Nashaat AU - Hatem Oraby AU - Laura Blanco AU - Sina Dominiak AU - Matthew E. Larkum AU - Robert N. S. Sachdev Y1 - 2017/02/14 UR - http://www.eneuro.org/content/early/2017/02/14/ENEURO.0245-16.2017.abstract N2 - A traditional approach to the study of neural function is to relate activity in a circuit to a distinct behavior. While methods for measuring and manipulating neural activity have become increasingly sophisticated, the ability to monitor and manipulate behavior has not kept pace. Here we describe an automated optical method for tracking animal behavior in both head-fixed and freely moving animals, in real-time and offline. It takes advantage of an off-the-shelf camera system, the Pixy camera, designed as a fast vision sensor for robotics that uses a color-based filtering algorithm at 50 Hz to track objects. Using customized software, we demonstrate the versatility of our approach by first tracking the rostro-caudal motion of individual adjacent row (D1, D2) or arc whiskers (beta, gamma), or a single whisker and points on the whisker pad, in head-fixed mice performing a tactile task. Next we acquired high-speed video and Pixy data simultaneously, and applied the pixy based real-time tracking to high-speed video data. With this approach we expand the temporal resolution of the Pixy camera and track motion (post-hoc) at the limit of high-speed video frame rates. Finally, we show that this system is flexible: it can be used to track individual whisker or limb position without any sophisticated object tracking algorithm, it can be used in many lighting conditions including infrared; it can be used to track head rotation and location of multiple animals simultaneously. Our system makes behavioral monitoring possible in virtually any biological setting.Significance Statement: We developed a method for tracking the motion of whiskers, limbs and whole animals in real-time. We show how to use a plug and play Pixy camera to monitor the motion of multiple colored objects in real-time and post-hoc. Our method has major advantages over currently available methods: we can track the motion of multiple adjacent whiskers in real-time at 50 Hz, and apply the same methods post-hoc at a high-temporal resolution. Our method is flexible; it can track objects with similar shape like two adjacent whiskers, forepaws or even two freely moving animals. With this method it becomes possible to use the phase of movement of particular whiskers or a limb to perform closed-loop experiments. ER -