Pixy is an open source computer vision system. Mostafa Nashaat, Robert Sachdev, and colleagues including Matthew Larkum have developed software for use with the Pixy, that can be used to track mouse behavior, including free movement around an enclosure (top image), or track the movement of individual whiskers (bottom image), all at 50 Hz. Here’s the paper.
Back in 2013, we had a post on Pixy. It was a Kickstarter project then (funded about 10-fold more than the goal), and it shipped in the first part of 2014. You can still buy them, worldwide, from their distributors. E.g., Adafruit’s Pixy web page looks nice and has useful information and links.