ksseverson57 / campy

Python package for streaming video from multiple cameras to disk. Features real-time compression and debayering using FFmpeg.
MIT License
37 stars 18 forks source link

campy

Hardware/Software Recommendations

Installation

  1. Update graphics drivers
  2. Create and activate a new Python 3.7 Anaconda environment:
    conda create -n campy python=3.7 imageio-ffmpeg matplotlib -c conda-forge
    conda activate campy
    pip install -U setuptools
  3. Install camera software
    • If using Basler cameras, install Pylon software:
    • Install Basler Pylon with Developer options
    • Install pypylon: Windows:
      pip install pypylon

      Linux:

      conda install swig
      git clone https://github.com/basler/pypylon.git
      python ./pypylon/setup.py install

Usage

Configuration

Camera Triggering

Campy's trigger module supports Arduino and Teensy microcontrollers:

  1. Download Arduino IDE (https://www.arduino.cc/en/software). If using Teensy, install Teensyduino (https://www.pjrc.com/teensy/teensyduino.html).
  2. Connect your microcontroller and note its port number (e.g. "COM3" on Windows or "/dev/ttyACM0" on Linux).
  3. In your config.yaml, configure:
    startArduino: True 
    digitalPins: [<pin IDs>] # e.g. [0,1,2]
    serialPort: "<port>" # e.g. "COM3" or "/dev/ttyACM0"
  4. Open and upload "trigger.ino" file (in campy/trigger folder) to your board. Make sure serial monitor is closed while using pyserial connection.
  5. Campy will synchronously trigger the cameras once acquisition has initialized.

Start Recording:

campy-acquire ./configs/campy_config.yaml

Stop Recording:

Helpful tips

Authors

Written by Kyle Severson with contributions from Diego Aldarondo and Iris Odstrcil (2019-2021).

Credits

Special thanks to Tim Dunn, David Hildebrand, Vincent Prevosto, Manuel Levy, and Paul Thompson for helpful comments.

License

MIT License