class documentation
class PiCameraV2(StreamingPiCamera2): (source)
Constructor: PiCameraV2(thing_server_interface, camera_num)
A Thing that provides and interface to the Raspberry Pi Camera V2.
| Property | capture |
Modes the camera can use for capturing. |
| Property | streaming |
Modes the camera can stream in. |
| Class Variable | _camera |
Undocumented |
Inherited from StreamingPiCamera2:
| Method | __enter__ |
Start streaming when the Thing context manager is opened. |
| Method | __exit__ |
Close the picamera connection when the Thing context manager is closed. |
| Method | __init__ |
Initialise the camera with the given camera number. |
| Method | analogue |
The Analogue gain applied by the camera sensor. |
| Method | analogue |
Undocumented |
| Method | auto |
Adjust exposure until a the target white level is reached. |
| Method | calibrate |
Take an image and use it for flat-field correction. |
| Method | capture |
Acquire one image from the camera and return as an array. |
| Method | colour |
Undocumented |
| Method | colour |
The red and blue colour gains, must be between 0.0 and 32.0. |
| Method | colour |
Undocumented |
| Method | discard |
Discard frames so that the next frame captured is fresh. |
| Method | exposure |
The camera exposure time in microseconds. |
| Method | exposure |
Undocumented |
| Method | flat |
Disable flat-field correction. |
| Method | flat |
Disable flat-field correction for colour only. |
| Method | full |
Perform a full auto-calibration. |
| Method | reset |
Overwrite the colour correction matrix in camera tuning with default values. |
| Method | reset |
Revert to default lens shading settings. |
| Method | save |
Override save_settings to ensure that camera properties don't recurse. |
| Method | set |
Set the contrast enhancement to disabled. |
| Method | set |
Set the green equalisation to a static value. |
| Class Variable | mjpeg |
Bitrate for MJPEG stream (None for default). |
| Class Variable | supports |
Undocumented |
| Instance Variable | default |
Undocumented |
| Instance Variable | stream |
Whether the MJPEG stream is active. |
| Instance Variable | streaming |
Undocumented |
| Instance Variable | tuning |
The Raspberry PiCamera Tuning File JSON. |
| Property | calibration |
Whether the camera needs calibrating. |
| Property | camera |
The "configuration" dictionary of the picamera2 object. |
| Property | capture |
Return the metadata from the camera. |
| Property | colour |
The colour_correction_matrix from the tuning file. |
| Property | focus |
Return the focus figure of merit. |
| Property | gamma |
Return the gamma correction curve from the tuning file. |
| Property | lens |
The current lens shading (i.e. flat-field correction). |
| Property | manual |
The camera settings to expose as property controls in the settings panel. |
| Property | primary |
The calibration actions for both calibration wizard and settings panel. |
| Property | secondary |
The calibration actions that appear only in settings panel. |
| Property | sensor |
The native resolution of the camera's sensor. |
| Property | streaming |
True if the camera is streaming. |
| Property | thing |
Update generic camera metadata with Picamera-specific data. |
| Method | _capture |
Acquire one image from the camera and return it as a PIL Image. |
| Method | _create |
Create the dictionary to pass to Picamera2.configure. |
| Method | _ensure |
Ensure in correct mode for capture. |
| Method | _get |
Undocumented |
| Method | _initialise |
Acquire the picamera device and store it as self._picamera. |
| Method | _on |
Undocumented |
| Method | _start |
Start the MJPEG stream. This is where persistent controls are sent to camera. |
| Method | _stop |
Stop the MJPEG stream. |
| Method | _streaming |
Lock access to picamera and return the underlying Picamera2 instance. |
| Class Variable | _sensor |
Undocumented |
| Instance Variable | _analogue |
Undocumented |
| Instance Variable | _camera |
Undocumented |
| Instance Variable | _colour |
Undocumented |
| Instance Variable | _exposure |
Undocumented |
| Instance Variable | _focus |
Undocumented |
| Instance Variable | _picamera |
Undocumented |
| Instance Variable | _picamera |
Undocumented |
| Instance Variable | _setting |
Undocumented |
Inherited from BaseCamera (via StreamingPiCamera2):
| Method | background |
The name of the active background selector. |
| Method | background |
Validate and set background_detector_name. |
| Method | capture |
Acquire one image from the camera. |
| Method | capture |
Capture an image and save it to disk. |
| Method | capture |
Acquire one image from the camera, downsample, and return as an array. |
| Method | capture |
Capture an image to memory. This can be saved later with save_from_memory. |
| Method | change |
Change the mode the camera is streaming in. |
| Method | clear |
Clear all images in memory. |
| Method | grab |
Acquire one image from the preview stream and return as an array. |
| Method | grab |
Acquire one image from the preview stream and return as blob of JPEG data. |
| Method | grab |
Acquire one image from the preview stream and return its size. |
| Method | image |
Label the current image as either background or sample. |
| Method | kill |
Kill the streams now as the server is shutting down. |
| Method | record |
Record MJPEG stream framerate statistics. |
| Method | save |
Save an image that has been captured to memory. |
| Method | set |
Grab an image, and use its statistics to set the background. |
| Method | settle |
Sleep for the settling time, ready to provide a fresh frame. |
| Async Method | snapshot |
Return a snapshot from the microscope. |
| Class Variable | downsampled |
The downsampling factor when calling capture_downsampled_array. |
| Class Variable | lores |
Undocumented |
| Class Variable | mjpeg |
Undocumented |
| Class Variable | settling |
The settling time when calling the settle() method. |
| Class Variable | supported |
Undocumented |
| Property | background |
The active background detector instance. |
| Method | _add |
Add the EXIF metadata for a JPEG image. |
| Method | _collect |
Return the metadata for a capture. |
| Async Method | _monitor |
Asynchronously monitor the timing on incoming frames. |
| Method | _validate |
Check input capture mode exists, always returns a valid mode. |
| Class Variable | _all |
Undocumented |
| Class Variable | _class |
Undocumented |
| Class Variable | _memory |
Undocumented |
| Instance Variable | _background |
Undocumented |
| Instance Variable | _default |
Undocumented |
| Instance Variable | _framerate |
Undocumented |
Inherited from OFMThing (via StreamingPiCamera2, BaseCamera):
| Method | create |
Create a RelativeDataPath object with this Thing set as the saving Thing. |
| Property | data |
The data directory for this thing. |
| Property | show |
Whether to show in the Gallery. |
| Class Variable | _show |
Undocumented |
| Instance Variable | _data |
Undocumented |