Main MRPT website > C++ reference for MRPT 1.9.9
ppnp.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #include <iostream>
10 #include <mrpt/utils/types_math.h> // Eigen must be included first via MRPT to enable the plugin system
11 #include <Eigen/Dense>
12 
13 namespace mrpt
14 {
15 namespace vision
16 {
17 namespace pnp
18 {
19 /** \addtogroup pnp Perspective-n-Point pose estimation
20  * \ingroup mrpt_vision_grp
21  * @{
22  */
23 
24 /**
25  * @class ppnp
26  * @author Chandra Mangipudi
27  * @date 10/08/16
28  * @file ppnp.h
29  * @brief Procrustes - PnP
30  */
31 class ppnp
32 {
33  public:
34  //! Constructor for the P-PnP class
35  ppnp(
36  const Eigen::MatrixXd& obj_pts, const Eigen::MatrixXd& img_pts,
37  const Eigen::MatrixXd& cam_intrinsic);
38 
39  /**
40  * @brief Function to compute pose
41  * @param[out] R Rotation matrix
42  * @param t Trnaslation Vector
43  * @param n Number of 2d/3d correspondences
44  * @return
45  */
46  bool compute_pose(Eigen::Matrix3d& R, Eigen::Vector3d& t, int n);
47 
48  private:
49  Eigen::MatrixXd P; //! Image points in pixels
50  Eigen::MatrixXd S; //! Object points in Camera Co-ordinate system
51  Eigen::MatrixXd C; //! Camera intrinsic matrix
52 };
53 
54 /** @} */ // end of grouping
55 }
56 }
57 }
GLdouble GLdouble t
Definition: glext.h:3689
Eigen::MatrixXd P
Definition: ppnp.h:49
Eigen::MatrixXd S
Image points in pixels.
Definition: ppnp.h:50
ppnp(const Eigen::MatrixXd &obj_pts, const Eigen::MatrixXd &img_pts, const Eigen::MatrixXd &cam_intrinsic)
Constructor for the P-PnP class.
Definition: ppnp.cpp:19
GLenum GLsizei n
Definition: glext.h:5074
bool compute_pose(Eigen::Matrix3d &R, Eigen::Vector3d &t, int n)
Function to compute pose.
Definition: ppnp.cpp:28
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Eigen::MatrixXd C
Object points in Camera Co-ordinate system.
Definition: ppnp.h:51
const float R



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019