gbvision.utils.recorders package

Submodules

gbvision.utils.recorders.opencv_recorder module

class gbvision.utils.recorders.opencv_recorder.OpenCVRecorder(file_name, fps, width=None, height=None)[source]

Bases: cv2.VideoWriter, gbvision.utils.recorders.recorder.Recorder

A basic implementation of the recorder class using OpenCV

Parameters:
  • file_name – The path to the output file
  • fps – The fps of the video
  • width – Optional. The width of the video (will be set automatically if not given)
  • height – Optional. The height of the video (will be set automatically if not given)
is_opened() → bool[source]

Checks if this releasable is open and can be read from

Returns:True if the releasable is opened, False otherwise
release() → None[source]

. @brief Closes the video writer. . . The method is automatically called by subsequent VideoWriter::open and by the VideoWriter . destructor.

write(image) → None[source]

. @brief Writes the next video frame . . @param image The written frame. In general, color images are expected in BGR format. . . The function/method writes the specified image to video file. It must have the same size as has . been specified when opening the video writer.

gbvision.utils.recorders.recorder module

class gbvision.utils.recorders.recorder.Recorder(file_name)[source]

Bases: gbvision.utils.releasable.Releasable, abc.ABC

An abstract recorder class Records a given feed of frames into a file

Parameters:file_name – the file name
write(frame: Optional[numpy.ndarray]) → Optional[numpy.ndarray][source]

Writes the given frame to the file

Parameters:frame – the frame to write

Module contents