#pragma once #include #include #include "camera.hpp" // ================================================================================================= // Forward declaration of the class, that swig does not try to parse all its dependencies. class TriangulatorInternal; // ================================================================================================= class Triangulator { public: /** * Triangulator to predict poses from multiple views. * * * @param min_score Minimum score to consider a triangulated joint as valid. * @param min_group_size Minimum number of camera pairs that need to see a person. */ Triangulator( float min_score = 0.95, size_t min_group_size = 1); /** * Calculate a triangulation. * * * @param poses_2d List of shape [views, persons, joints, 3], containing the 2D poses. * @param cameras List of cameras. * @param roomparams Room parameters (room size, room center). * @param joint_names List of 2D joint names. * * @return List of shape [persons, joints, 4], containing the 3D poses. */ std::vector>> triangulate_poses( const std::vector>>> &poses_2d, const std::vector &cameras, const std::array, 2> &roomparams, const std::vector &joint_names); /** Reset the triangulator. */ void reset(); /** Print triangulation statistics. */ void print_stats(); private: TriangulatorInternal *triangulator; };