This package was put together to test whether I could use the RPi Camera in an instrument I'm building. Sort of a proof-of-concept. As such it's very rough, with all sorts of issues surely lurking. But it does take images, takes them quickly, and provides you with a 1D numpy ndarray object to manipulate to your heart's content!
Quick list of features:
- Single frame capture up to full sensor resolution in YUV420p or BGR24 formats
- Multiple frame integration
- Arbitrary image sizes
- Access to camera settings such as brightness, saturation, etc.
- Logging using Python's logging module.
The code is here: https://github.com/berkowski/python-rpicamera
The readme has some examples. You really should read it if you decide to try the package.
I run Arch on my RPi where the camera libraries are installed to /opt/vc/lib. If it's different on raspian, just edit the setup.py file to point to the correct location.
Unfortunately I don't think I'll be using the RPi camera module for this instrument. I'd like to be able to get at some setting which don't seem exposed through the MMAL API, and it's too hard to get at the strobe lines on the sensor connector. I'll also be losing access to the RPi camera module I've been testing against shortly, so bug fixes might be an issue if anyone actually uses my code. I'll be attempting to clean it up over the next week though.