-
Notifications
You must be signed in to change notification settings - Fork 0
Recording
Recording, carried out on the Raspberry Pi, is a surprisingly finicky process. If you intend to edit this procedure, be prepared for some difficulties.
The basic principle is simple - recording the wide-angle video of the cage and syncing it with RFID data from all four readers. The trouble comes in the syncing process. There are no available tools (to my knowledge) to easily sync this data to the video feed - the Presentation Timestamps prove to be inaccurate due to clock differences between the camera and the Pi. In order to sync this data efficiently, we must encode the information directly into the video feed in real time.
We use Pillow to modify the buffers received from the picamera library, writing a series of pixels to the top left corner that encode for information on RFID pickups. The color of the pixels is set to 0, 85, 170, or 255 depending on the mouse and reader the RFID pickup occurs on. An important note is that the picamera library currently has a bug involving this feature. A fixed version is available at https://github.com/Judge24601/picamera - note that this version does not support the capture_continuous functionality. Please remove the default picamera installation and install this version through the setup script.
- Remove current picamera version with
$ pip uninstall picamera - Clone rollback version
$ git clone https://github.com/Judge24601/picamera - Run the setup script
$ python setup.py install