Saxena et al., 2018. Inexpensive, scalable camera system for tracking rats in large spaces
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.ipynb_checkpoints Picamera Paper final version Mar 20, 2018
output_1_0.png Picamera Paper final version Mar 20, 2018

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Follow the steps in following order:

  • DevelopmentEnvironment: instruction to install Python and OpenCV on Windows and Linux systems

  • TTLandZmodo: instructions to set up TTL wiring for synchronizing the Picamera system with the neural recording system. Also contains information about setting up Zmodo multi display system. These instructions will work with minor modifications for any cheap security camera system capable of displaying videos from multiple cameras, which accepts composite video inputs from multiple cameras.

  • PicameraTrackingSystem: information about the Picamera system, operating the system and changes required to be made to Picamera library for accurate timestamping.

  • PicameraLibraryModified: modified Picamera ( Python library code which allows accurate timestamping

  • PicameraVideoAcquistionScripts: codes used in capturing video data, frame timestamps and Transistor-Transistor Logic (TTL) pulse timestamps with difference in logging TTL timestamp.

    • uses Rpi.GPIO ( and Picamera python library to log timestamp for each transition.
    • kills Picamera video acqusition script (
  • LinuxStitchingCodes: codes used in calculating the camera intrinsic parameter and position tracking from multiple cameras

    • getBlendedImage: generates single blended stitched image from a list of input images.
    • getStitchingParams: calculates the registration data for each camera.
    • getTransformedImages: generates the transformed images from each camera using the previously calculated registration data.
    • stitchedVideoTracking: calculates position in each video camera frame from given set of video inputs
    • stitching&RegistrationData: calculates the registration data and saves single blended image from multiple input images.
  • adjustTime_multiplesync: python script to account for temporal drift between the Picamera system and the Neuralynx data acquisition system. Requires: to read Neuralynx event file data.

(Compilation and running instruction are present within each sub folder)