OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
jointAngleEstimation.hpp
Go to the documentation of this file.
1 #ifdef USE_3D_ADAM_MODEL
2 #ifndef OPENPOSE_3D_JOINT_ANGLE_ESTIMATION_HPP
3 #define OPENPOSE_3D_JOINT_ANGLE_ESTIMATION_HPP
4 
5 #ifdef USE_EIGEN
6  #include <Eigen/Core>
7 #endif
8 #ifdef USE_3D_ADAM_MODEL
9  #include <adam/totalmodel.h>
10 #endif
11 #include <openpose/core/common.hpp>
12 
13 namespace op
14 {
15  OP_API int mapOPToAdam(const int oPPart);
16 
17  class OP_API JointAngleEstimation
18  {
19  public:
20  static const std::shared_ptr<const TotalModel> getTotalModel();
21 
22  JointAngleEstimation(const bool returnJacobian);
23 
24  virtual ~JointAngleEstimation();
25 
26  void initializationOnThread();
27 
28  void adamFastFit(Eigen::Matrix<double, 62, 3, Eigen::RowMajor>& adamPose,
29  Eigen::Vector3d& adamTranslation,
30  Eigen::Matrix<double, Eigen::Dynamic, 1>& vtVec,
31  Eigen::Matrix<double, Eigen::Dynamic, 1>& j0Vec,
32  Eigen::VectorXd& adamFacecoeffsExp,
33  const Array<float>& poseKeypoints3D,
34  const Array<float>& faceKeypoints3D,
35  const std::array<Array<float>, 2>& handKeypoints3D);
36 
37  private:
38  // PIMPL idiom
39  // http://www.cppsamples.com/common-tasks/pimpl.html
40  struct ImplJointAngleEstimation;
41  std::shared_ptr<ImplJointAngleEstimation> spImpl;
42 
43  // PIMP requires DELETE_COPY & destructor, or extra code
44  // http://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero.html
45  DELETE_COPY(JointAngleEstimation);
46  };
47 }
48 
49 #endif // OPENPOSE_3D_JOINT_ANGLE_ESTIMATION_HPP
50 #endif
#define OP_API
Definition: macros.hpp:18
#define DELETE_COPY(className)
Definition: macros.hpp:32