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



Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020