pi_video_stream module¶
-
class
pi_video_stream.pi_video_stream(data_path, recorder)¶ Bases:
object-
__init__(data_path, recorder)¶ Constructor for
pi_video_streamobject. Creates aPiCameraobject and loads the settings from ‘config.ini’ for camera.- Parameters
data_path (string) – path to and name of the folder where video(s) will be saved
recorder (
recorderobject) – recorder object; contains information of RFID readers
-
post_process(fps)¶ Takes the ‘raw.avi’ video and produces a new video ‘fps_corrected.avi’ such that the latter video has the specified FPS
- Parameters
fps (integer) – frame rate (frames per second) to be matched towards
-
record(duration=None)¶ Starts a video stream that captures frame by frame and compiles into a video. Also writes the frame count, time stamp, and RFID readings into a text file.
- Parameters
duration (integer, optional) – time of record duration in seconds, defaults to None
-
setdown()¶ Saves the recording and text file, stops camera preview, and display time and FPS on terminal.
-