Class trifinger_object_tracking::PoseDetector¶
- 
class PoseDetector¶
- Public Types - 
typedef std::array<std::vector<std::vector<cv::Point>>, PoseDetector::N_CAMERAS> MasksPixels¶
 - 
typedef std::array<std::vector<std::vector<cv::Point>>, PoseDetector::N_CAMERAS> MasksPixels
 - Public Functions - 
PoseDetector(BaseCuboidModel::ConstPtr cube_model, const std::array<trifinger_cameras::CameraParameters, N_CAMERAS> &camera_parameters)¶
 - 
Pose find_pose(const std::array<std::vector<FaceColor>, N_CAMERAS> &dominant_colors, const std::array<std::vector<cv::Mat>, N_CAMERAS> &masks)¶
 - 
std::vector<std::vector<cv::Point2f>> get_projected_points() const¶
 - 
std::vector<std::pair<FaceColor, std::array<unsigned int, 4>>> get_visible_faces(unsigned int camera_idx, const cv::Affine3f &cube_pose_world) const¶
- Get corner indices of the visible faces. - Determines which faces of the object is visible to the camera and returns the corner indices of these faces. - Parameters:
- camera_idx – Index of the camera. 
- cube_pose_world – Pose of the cube in the world frame. 
 
- Returns:
- For each visible face a pair of the face color and the list of the corner indices of the four corners of that face. 
 
 - 
std::vector<std::pair<FaceColor, std::array<unsigned int, 4>>> get_visible_faces(unsigned int camera_idx) const¶
- Get corner indices of the visible faces. - Overloaded version that used the last detected pose for the cube. Call find_pose() first, otherwise the result is undefined! - Parameters:
- camera_idx – Index of the camera. 
- Returns:
- For each visible face a pair of the face color and the list of the corner indices of the four corners of that face. 
 
 - 
inline unsigned int get_num_misclassified_pixels() const¶
 - 
inline float get_segmented_pixels_ratio() const¶
 - 
inline float get_confidence() const¶
 - 
PoseDetector(BaseCuboidModel::ConstPtr cube_model, const std::array<trifinger_cameras::CameraParameters, N_CAMERAS> &camera_parameters)
 - 
Pose find_pose(const std::array<std::vector<FaceColor>, N_CAMERAS> &dominant_colors, const std::array<std::vector<cv::Mat>, N_CAMERAS> &masks)
 - 
std::vector<std::vector<cv::Point2f>> get_projected_points() const
 - 
std::vector<std::pair<FaceColor, std::array<unsigned int, 4>>> get_visible_faces(unsigned int camera_idx, const cv::Affine3f &cube_pose_world) const
- Get corner indices of the visible faces. - Determines which faces of the object is visible to the camera and returns the corner indices of these faces. - Parameters:
- camera_idx – Index of the camera. 
- cube_pose_world – Pose of the cube in the world frame. 
 
- Returns:
- For each visible face a pair of the face color and the list of the corner indices of the four corners of that face. 
 
 - 
std::vector<std::pair<FaceColor, std::array<unsigned int, 4>>> get_visible_faces(unsigned int camera_idx) const
- Get corner indices of the visible faces. - Overloaded version that used the last detected pose for the cube. Call find_pose() first, otherwise the result is undefined! - Parameters:
- camera_idx – Index of the camera. 
- Returns:
- For each visible face a pair of the face color and the list of the corner indices of the four corners of that face. 
 
 - 
inline unsigned int get_num_misclassified_pixels() const
 - 
inline float get_segmented_pixels_ratio() const
 - 
inline float get_confidence() const
 - 
void set_pose(const Pose &pose)
 - Public Static Attributes - 
static constexpr unsigned int N_CAMERAS = 3¶
- Number of cameras. 
 
- 
typedef std::array<std::vector<std::vector<cv::Point>>, PoseDetector::N_CAMERAS> MasksPixels¶