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-2018, 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/math/types_math.h> // Eigen must be included first via MRPT to enable the plugin system
11 #include <Eigen/Dense>
12 
13 namespace mrpt::vision::pnp
14 {
15 /** \addtogroup pnp Perspective-n-Point pose estimation
16  * \ingroup mrpt_vision_grp
17  * @{
18  */
19 
20 /**
21  * @class ppnp
22  * @author Chandra Mangipudi
23  * @date 10/08/16
24  * @file ppnp.h
25  * @brief Procrustes - PnP
26  */
27 class ppnp
28 {
29  public:
30  //! Constructor for the P-PnP class
31  ppnp(
32  const Eigen::MatrixXd& obj_pts, const Eigen::MatrixXd& img_pts,
33  const Eigen::MatrixXd& cam_intrinsic);
34 
35  /**
36  * @brief Function to compute pose
37  * @param[out] R Rotation matrix
38  * @param t Trnaslation Vector
39  * @param n Number of 2d/3d correspondences
40  * @return
41  */
42  bool compute_pose(Eigen::Matrix3d& R, Eigen::Vector3d& t, int n);
43 
44  private:
45  Eigen::MatrixXd P; //! Image points in pixels
46  Eigen::MatrixXd S; //! Object points in Camera Co-ordinate system
47  Eigen::MatrixXd C; //! Camera intrinsic matrix
48 };
49 
50 /** @} */ // end of grouping
51 }
52 
GLdouble GLdouble t
Definition: glext.h:3689
Eigen::MatrixXd P
Definition: ppnp.h:45
Perspective n Point (PnP) Algorithms toolkit for MRPT mrpt_vision_grp.
Definition: pnp_algos.h:23
Eigen::MatrixXd S
Image points in pixels.
Definition: ppnp.h:46
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
Eigen::MatrixXd C
Object points in Camera Co-ordinate system.
Definition: ppnp.h:47
const float R



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020