SuperimposeMesh
All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
SISkeleton.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2019 Istituto Italiano di Tecnologia (IIT)
3  *
4  * This software may be modified and distributed under the terms of the
5  * BSD 3-Clause license. See the accompanying LICENSE file for details.
6  */
7 
8 #ifndef SUPERIMPOSESKELETON_H
9 #define SUPERIMPOSESKELETON_H
10 
11 #include "Superimpose.h"
12 
13 #include <list>
14 #include <string>
15 
16 #include <glm/glm.hpp>
17 
18 
19 class SISkeleton : public Superimpose
20 {
21 public:
22  SISkeleton(const std::list<std::string>& skeleton_part, const float cam_fx, const float cam_fy, const float cam_cx, const float cam_cy);
23 
24  ~SISkeleton();
25 
26  bool superimpose(const ModelPoseContainer& objpos_map, const double* cam_x, const double* cam_o, cv::Mat& img) override;
27 
28  bool setProjectionMatrix(const float cam_fx, const float cam_fy, const float cam_cx, const float cam_cy);
29 
30 protected:
31  glm::vec2 getWorldToPixel(const double* world_point);
32 
33 private:
34  const std::string log_ID_ = "[SI::SISkeleton]";
35 
36  std::list<std::string> skeleton_part_;
37 
38  glm::mat3 projection_;
39 
40  glm::mat3 root_to_eye_;
41 
42  glm::vec3 cam_pos_;
43 };
44 
45 #endif /* SUPERIMPOSESKELETON_H */
SISkeleton(const std::list< std::string > &skeleton_part, const float cam_fx, const float cam_fy, const float cam_cx, const float cam_cy)
Definition: SISkeleton.cpp:21
glm::vec2 getWorldToPixel(const double *world_point)
Definition: SISkeleton.cpp:98
const std::string log_ID_
Definition: SISkeleton.h:34
glm::mat3 root_to_eye_
Definition: SISkeleton.h:40
glm::vec3 cam_pos_
Definition: SISkeleton.h:42
std::multimap< std::string, ModelPose > ModelPoseContainer
Definition: Superimpose.h:25
std::list< std::string > skeleton_part_
Definition: SISkeleton.h:36
bool setProjectionMatrix(const float cam_fx, const float cam_fy, const float cam_cx, const float cam_cy)
Definition: SISkeleton.cpp:77
glm::mat3 projection_
Definition: SISkeleton.h:38
bool superimpose(const ModelPoseContainer &objpos_map, const double *cam_x, const double *cam_o, cv::Mat &img) override
Definition: SISkeleton.cpp:41