Improved tracker parametrization.

This commit is contained in:
Daniel
2025-04-23 10:40:59 +02:00
parent 98399cc00e
commit cc8b75b8bf
3 changed files with 59 additions and 13 deletions

View File

@ -24,7 +24,7 @@ struct Track
class PoseTracker
{
public:
PoseTracker(float fps);
PoseTracker(float max_movement_speed, float max_distance);
std::vector<std::tuple<size_t, std::vector<std::array<float, 4>>>> track_poses(
const std::vector<std::vector<std::array<float, 4>>> &poses_3d,
@ -35,15 +35,9 @@ public:
private:
float max_distance;
float max_movement_speed;
size_t history_size = 3;
// Approach speed of EN ISO 13855 with 2000 mm/sec for hand speed
// and an additional factor to compensate for noise-based jumps
float max_movement_speed = 2.0 * 1.5;
// The size of an A4 sheet of paper which is assumed to fit between two different persons
float max_base_distance = 0.3;
std::vector<double> timestamps;
std::vector<Track> pose_tracks;
@ -70,9 +64,10 @@ private:
// =================================================================================================
// =================================================================================================
PoseTracker::PoseTracker(float fps)
PoseTracker::PoseTracker(float max_movement_speed, float max_distance)
{
this->max_distance = max_base_distance + max_movement_speed / fps;
this->max_movement_speed = max_movement_speed;
this->max_distance = max_distance;
}
// =================================================================================================