PosturePerfection
Public Member Functions
Pipeline::FrameGenerator Class Reference

Class to maintain access to the cv::VideoCapture used as the input video stream. This class makes use of the CppTimer wrapper created here to regularly capture input frames at the set frame rate. More...

#include <pipeline.h>

Inheritance diagram for Pipeline::FrameGenerator:
Inheritance graph
[legend]
Collaboration diagram for Pipeline::FrameGenerator:
Collaboration graph
[legend]

Public Member Functions

 FrameGenerator (void)
 Construct a new Frame Generator object. More...
 
 ~FrameGenerator ()
 Destroy the Frame Generator object. More...
 
void updated_framerate (size_t new_frame_delay)
 Notify the FrameGenerator that the frame rate has changed. More...
 
RawFrame next_frame (void)
 Get the newest frame. More...
 

Detailed Description

Class to maintain access to the cv::VideoCapture used as the input video stream. This class makes use of the CppTimer wrapper created here to regularly capture input frames at the set frame rate.

Constructor & Destructor Documentation

◆ FrameGenerator()

Pipeline::FrameGenerator::FrameGenerator ( void  )

Construct a new Frame Generator object.

Exceptions
<tt>std::runtime_error</tt>if the camera cannot be accessed

◆ ~FrameGenerator()

Pipeline::FrameGenerator::~FrameGenerator ( )

Destroy the Frame Generator object.

Blocks until the thread that generates the frames is joined

Member Function Documentation

◆ next_frame()

RawFrame Pipeline::FrameGenerator::next_frame ( void  )

Get the newest frame.

Returns
RawFrame The most up-to-date frame from the camera

◆ updated_framerate()

void Pipeline::FrameGenerator::updated_framerate ( size_t  new_frame_delay)

Notify the FrameGenerator that the frame rate has changed.

The underlying timer is stopped and restarted with the new frame delay

Parameters
new_frame_delayNew delay from one frame to the next in ms

The documentation for this class was generated from the following files: