DynAIkonTrap.camera#
Provides a simplified interface to the PiCamera
library class. The Camera
class provides the Frame
s from the camera’s stream via a queue. Initialising the Camera
takes care of setting up the necessary motion vector and image streams under the hood.
A Frame
is defined for this system as having the motion vectors, as used in H.264 encoding, a JPEG encode image, and a UNIX-style timestamp when the frame was captured.
Classes
|
Acts as a wrapper class to provide a simple interface to a stream of camera frames. |
|
A frame from the camera consisting of motion and image information as well as the time of capture. |
|
|
|
|
|
- class Camera(settings: CameraSettings)#
Acts as a wrapper class to provide a simple interface to a stream of camera frames. Each frame consists of motion vectors and a JPEG image. The frames are stored on an internal queue, ready to be read by any subsequent stage in the system.
Takes a
CameraSettings
object to initialise and start the camera hardware.- close()#
- empty() bool #
Indicates if the queue of buffered frames is empty
- Returns
True
if there are no more frames, otherwiseFalse
- Return type
bool
- class Frame(image: bytes, motion: ndarray, timestamp: float)#
A frame from the camera consisting of motion and image information as well as the time of capture.
- image: bytes#
- motion: ndarray#
- timestamp: float#
- class PiMotionAnalysis#