![]() |
PosturePerfection
|
This class handles representations of the user's pose and calculates any updates to their pose that is required. More...
#include <posture_estimator.h>

Public Member Functions | |
| PostureEstimator () | |
Construct a new PostureEstimator object. More... | |
| ~PostureEstimator () | |
Destroy a PostureEstimator object. More... | |
| void | update_ideal_pose (PostureEstimating::Pose pose) |
Calibrate the user's ideal_pose with a pose object. The ideal_pose is only updated if the posture_state is not Undefined. More... | |
| bool | set_pose_change_threshold (float threshold) |
Set the pose_change_threshold to allow user configuration. Note that this threshold is in radians and we set a maximum configurable value of 0.5 radians (28.64 degrees) More... | |
| float | get_pose_change_threshold (void) |
Get the currently set pose_change_threshold. Note that this threshold is in radians and we set a maximum configurable value of 0.5 radians (28.64 degrees) More... | |
| PoseStatus | runEstimator (PostProcessing::ProcessedResults results) |
Return a PoseStatus of the user's pose. More... | |
| void | analysePosture (PostureEstimating::PoseStatus pose_status, cv::Mat current_frame) |
Analyse the posture_state field of PostureEstimating::PoseStatus and use it as follows: More... | |
Data Fields | |
| Pose | current_pose |
The user's current Pose from most recent data provided. More... | |
| Pose | ideal_pose |
The user's ideal Pose, expected to be generated during user calibration. More... | |
| Pose | pose_changes |
A representation of what changes are needed to get back to ideal Pose. More... | |
| float | pose_change_threshold |
| A representation of what absolute value changes for a pose is acceptably still a good pose. More... | |
| PostureEstimating::PostureState | posture_state = UndefinedAndUnset |
Whether the user is currently in a Good, Bad, Unset, Undefined or UndefinedAndUnset posture. (Unset means that the ideal_pose has not yet been set, and Undefined is if pose estimation has not found any successive co-ordinates which are Trustworthy) More... | |
This class handles representations of the user's pose and calculates any updates to their pose that is required.
It stores representations of the users current pose and their calibrated ideal pose, from the PostProcessing::ProcessedResult.
This class handles:
current_pose and user's ideal_poseConnectedJointcurrent_pose and user's ideal_pose.General use should just consist of runEstimator.
| PostureEstimating::PostureEstimator::PostureEstimator | ( | ) |
Construct a new PostureEstimator object.
| PostureEstimating::PostureEstimator::~PostureEstimator | ( | ) |
Destroy a PostureEstimator object.
| void PostureEstimating::PostureEstimator::analysePosture | ( | PostureEstimating::PoseStatus | pose_status, |
| cv::Mat | current_frame | ||
| ) |
Analyse the posture_state field of PostureEstimating::PoseStatus and use it as follows:
Unset then indicate this to user by displaying the current pose as blue lines.Undefined then display any Trustworthy segments as grey lines.Good then display current pose as green lines.Bad then use pose_change_threshold and pose_changes to indicate which direction the user needs to move in order to return to a good posture.| pose_status | PostureEstimating::PoseStatus The pose status for the current frame |
| current_frame | cv::Mat The current frame to overlay lines on to |
| float PostureEstimating::PostureEstimator::get_pose_change_threshold | ( | void | ) |
Get the currently set pose_change_threshold. Note that this threshold is in radians and we set a maximum configurable value of 0.5 radians (28.64 degrees)
float The current threshold in the range [0..0.5] (radians) | PoseStatus PostureEstimating::PostureEstimator::runEstimator | ( | PostProcessing::ProcessedResults | results | ) |
Return a PoseStatus of the user's pose.
| results | PostProcessing::ProcessedResults struct containing user's pose data. |
| bool PostureEstimating::PostureEstimator::set_pose_change_threshold | ( | float | threshold | ) |
Set the pose_change_threshold to allow user configuration. Note that this threshold is in radians and we set a maximum configurable value of 0.5 radians (28.64 degrees)
| threshold | The updated threshold in the range [0..0.5] (radians) |
true If updating threshold succeeded false If updating threshold failed | void PostureEstimating::PostureEstimator::update_ideal_pose | ( | PostureEstimating::Pose | pose | ) |
Calibrate the user's ideal_pose with a pose object. The ideal_pose is only updated if the posture_state is not Undefined.
| results | PostureEstimating::Pose struct containing user's pose data. |
| Pose PostureEstimating::PostureEstimator::current_pose |
The user's current Pose from most recent data provided.
| Pose PostureEstimating::PostureEstimator::ideal_pose |
The user's ideal Pose, expected to be generated during user calibration.
| float PostureEstimating::PostureEstimator::pose_change_threshold |
A representation of what absolute value changes for a pose is acceptably still a good pose.
| Pose PostureEstimating::PostureEstimator::pose_changes |
A representation of what changes are needed to get back to ideal Pose.
| PostureEstimating::PostureState PostureEstimating::PostureEstimator::posture_state = UndefinedAndUnset |
Whether the user is currently in a Good, Bad, Unset, Undefined or UndefinedAndUnset posture. (Unset means that the ideal_pose has not yet been set, and Undefined is if pose estimation has not found any successive co-ordinates which are Trustworthy)