PosturePerfection
Public Member Functions
Pipeline::Pipeline Class Reference

Frame-by-frame pipeline to process video. More...

#include <pipeline.h>

Public Member Functions

void updated_framerate (FramerateSetting new_settings)
 
 Pipeline (uint8_t num_inference_core_threads, void(*callback)(PostureEstimating::PoseStatus, cv::Mat))
 Construct a new Pipeline object. More...
 
 ~Pipeline ()
 Destroy the Pipeline object. More...
 
bool set_confidence_threshold (float threshold)
 Set the confidence threshold. More...
 
float get_confidence_threshold ()
 Get the confidence threshold object. More...
 
float increase_framerate (void)
 Increment the frame rate to the next predefined value. More...
 
float decrease_framerate (void)
 Decrement the frame rate to the next predefined value. More...
 
float get_framerate (void)
 Get the frame rate. More...
 
void set_ideal_posture (PostureEstimating::Pose pose)
 Set the ideal posture. More...
 
bool set_pose_change_threshold (float threshold)
 Set the pose change threshold. More...
 
float get_pose_change_threshold ()
 Get the current pose change threshold. More...
 

Detailed Description

Frame-by-frame pipeline to process video.

The pipeline for performing all frame-by-frame processing steps, including the pose estimation model. The pipeline incorporates the video capturing stage. The pipeline generates output in the form of a callback, which is called once per frame that passes through the pipeline.

Constructor & Destructor Documentation

◆ Pipeline()

Pipeline::Pipeline::Pipeline ( uint8_t  num_inference_core_threads,
void(*)(PostureEstimating::PoseStatus, cv::Mat)  callback 
)
explicit

Construct a new Pipeline object.

The pipeline starts upon construction and starts producing output

Parameters
num_inference_core_threadsThe number of threads to use for the inference core stage
callbackFunction to call for every frame output by the pipeline

◆ ~Pipeline()

Pipeline::Pipeline::~Pipeline ( )

Destroy the Pipeline object.

Stops threads and waits for them to complete

Member Function Documentation

◆ decrease_framerate()

float Pipeline::Pipeline::decrease_framerate ( void  )

Decrement the frame rate to the next predefined value.

If the minimum frame rate of the system is reached, it will not be decreased further and the current (unchanged) frame rate is returned.

Returns
float Currently set frame rate in Hz

◆ get_confidence_threshold()

float Pipeline::Pipeline::get_confidence_threshold ( )

Get the confidence threshold object.

Returns
float Currently set confidence threshold

◆ get_framerate()

float Pipeline::Pipeline::get_framerate ( void  )

Get the frame rate.

Returns
float currently set frame rate in Hz

◆ get_pose_change_threshold()

float Pipeline::Pipeline::get_pose_change_threshold ( )

Get the current pose change threshold.

Returns
float Currently set pose change threshold

◆ increase_framerate()

float Pipeline::Pipeline::increase_framerate ( void  )

Increment the frame rate to the next predefined value.

If the maximum frame rate of the system is reached, it will not be increased further and the current (unchanged) frame rate is returned.

Returns
float Currently set frame rate in Hz

◆ set_confidence_threshold()

bool Pipeline::Pipeline::set_confidence_threshold ( float  threshold)

Set the confidence threshold.

Parameters
thresholdNew threshold to set
Returns
true If updating the threshold succeeded
false If updating the threshold did not succeed

◆ set_ideal_posture()

void Pipeline::Pipeline::set_ideal_posture ( PostureEstimating::Pose  pose)

Set the ideal posture.

Parameters
poseA previous frame's posture that is to be used as the new ideal posture

◆ set_pose_change_threshold()

bool Pipeline::Pipeline::set_pose_change_threshold ( float  threshold)

Set the pose change threshold.

Parameters
thresholdNew threshold to set
Returns
true If updating the threshold succeeded
false If updating the threshold did not succeed

◆ updated_framerate()

void Pipeline::Pipeline::updated_framerate ( FramerateSetting  new_settings)

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