Camera Support - TitaniumBunker/Selfietorium GitHub Wiki
While Selfietorium has been written primarily for use with the Raspberry PI - it is potentially possible to possible to run on more standard hardware. The initial development was completed on a Lenovo G500 laptop (running Ubuntu 16.10), but at the same time the test environment was a Raspberry Pi 2. This left a design decision about accessing the camera hardware.
The Raspberry Pi camera module currently attaches through a specialized interface to the Raspberry pi, and is accessible vi Raspberry Pi's own library, python-picamera. The built in web cam for the Lenovo G500 is exposed as a USB web cam, and is therefore not accessible via the same library.
It is possible to configure the Raspberry Pi camera module to operate as a Video for linux - latest raspbian images ship with v4L2 drivers, and can be set up using
sudo modprobe bcm2835-v4l2
At this point the camera is potentially accessible via pygame's Camera library (to be tested)
So - what to do.
We created some classes to abstract the use of the camera away, and set up a system where a library can be loaded based on a name, loaded from a configuration file. This allowed the Laptop to use it's webcam, and the Pi to use the Pi Camera through the same abstraction. In addition it allowed a simple "Fake" camera to be created, allowing Selfietorium to operate without any form of camera.
This plugin abstraction approach may be useful for