Main MRPT website > C++ reference for MRPT 1.5.9
List of all members | Public Member Functions | Private Member Functions | Private Attributes
mrpt::vision::pnp::dls Class Reference

Detailed Description

Author
Chandra Mangipudi
Date
12/08/16

Definition at line 35 of file dls.h.

#include <pnp/dls.h>

Public Member Functions

 dls (const cv::Mat &opoints, const cv::Mat &ipoints)
 Constructor for DLS class. More...
 
 ~dls ()
 
bool compute_pose (cv::Mat &R, cv::Mat &t)
 OpenCV function for computing pose. More...
 

Private Member Functions

template<typename OpointType , typename IpointType >
void init_points (const cv::Mat &opoints, const cv::Mat &ipoints)
 Initialization of object points and image points. More...
 
cv::Mat LeftMultVec (const cv::Mat &v)
 Create a matrix from vector. More...
 
void run_kernel (const cv::Mat &pp)
 Main function to run DLS-PnP. More...
 
void build_coeff_matrix (const cv::Mat &pp, cv::Mat &Mtilde, cv::Mat &D)
 Build the Maucaulay matrix co-efficients. More...
 
void compute_eigenvec (const cv::Mat &Mtilde, cv::Mat &eigenval_real, cv::Mat &eigenval_imag, cv::Mat &eigenvec_real, cv::Mat &eigenvec_imag)
 Eigen Value Decomposition. More...
 
void fill_coeff (const cv::Mat *D)
 Fill the hessian functions. More...
 
cv::Mat cayley_LS_M (const std::vector< double > &a, const std::vector< double > &b, const std::vector< double > &c, const std::vector< double > &u)
 Fill the Maucaulay matrix with co-efficients. More...
 
cv::Mat Hessian (const double s[])
 Compute the Hessian matrix for the polynomial co-efficient vector s. More...
 
cv::Mat cayley2rotbar (const cv::Mat &s)
 Cayley parameters to Rotation Matrix. More...
 
cv::Mat skewsymm (const cv::Mat *X1)
 Create a skwy-symmetric matrix from a vector. More...
 
cv::Mat rotx (const double t)
 Rotation matrix along x-axis by angle t. More...
 
cv::Mat roty (const double t)
 Rotation matrix along y-axis by angle t. More...
 
cv::Mat rotz (const double t)
 Rotation matrix along z-axis by angle t. More...
 
cv::Mat mean (const cv::Mat &M)
 Column-wise mean of matrix M. More...
 
bool is_empty (const cv::Mat *v)
 Check for negative values in vector v. More...
 
bool positive_eigenvalues (const cv::Mat *eigenvalues)
 check for positive eigenvalues More...
 

Private Attributes

cv::Mat p
 
cv::Mat z
 
cv::Mat mn
 
int N
 object-image points More...
 
std::vector< double > f1coeff
 number of input points More...
 
std::vector< double > f2coeff
 
std::vector< double > f3coeff
 
std::vector< double > cost_
 
std::vector< cv::Mat > C_est_
 coefficient for coefficients matrix More...
 
std::vector< cv::Mat > t_est_
 
cv::Mat C_est__
 optimal candidates More...
 
cv::Mat t_est__
 
double cost__
 optimal found solution More...
 

Constructor & Destructor Documentation

◆ dls()

mrpt::vision::pnp::dls::dls ( const cv::Mat &  opoints,
const cv::Mat &  ipoints 
)

Constructor for DLS class.

◆ ~dls()

mrpt::vision::pnp::dls::~dls ( )

Member Function Documentation

◆ build_coeff_matrix()

void mrpt::vision::pnp::dls::build_coeff_matrix ( const cv::Mat &  pp,
cv::Mat &  Mtilde,
cv::Mat &  D 
)
private

Build the Maucaulay matrix co-efficients.

Parameters
[in]pp
[out]Mtilde
[out]D

◆ cayley2rotbar()

cv::Mat mrpt::vision::pnp::dls::cayley2rotbar ( const cv::Mat &  s)
private

Cayley parameters to Rotation Matrix.

Parameters
[in]s
Returns
Rotation Matrix

◆ cayley_LS_M()

cv::Mat mrpt::vision::pnp::dls::cayley_LS_M ( const std::vector< double > &  a,
const std::vector< double > &  b,
const std::vector< double > &  c,
const std::vector< double > &  u 
)
private

Fill the Maucaulay matrix with co-efficients.

Parameters
[in]a
[in]b
[in]c
[in]u
Returns
Maucaulay matrix M

◆ compute_eigenvec()

void mrpt::vision::pnp::dls::compute_eigenvec ( const cv::Mat &  Mtilde,
cv::Mat &  eigenval_real,
cv::Mat &  eigenval_imag,
cv::Mat &  eigenvec_real,
cv::Mat &  eigenvec_imag 
)
private

Eigen Value Decomposition.

Parameters
MtildeMatrix to be decomposed
eigenval_realReal eigenvalues
eigenval_imagImaginary eigenvalues
eigenvec_realEigen Vectors corresponding to real eigen values
eigenvec_imagEigen Vectors corresponding to imaginary eigen values

◆ compute_pose()

bool mrpt::vision::pnp::dls::compute_pose ( cv::Mat &  R,
cv::Mat &  t 
)

OpenCV function for computing pose.

Referenced by mrpt::vision::pnp::CPnP::dls().

◆ fill_coeff()

void mrpt::vision::pnp::dls::fill_coeff ( const cv::Mat *  D)
private

Fill the hessian functions.

Parameters
[in]D

◆ Hessian()

cv::Mat mrpt::vision::pnp::dls::Hessian ( const double  s[])
private

Compute the Hessian matrix for the polynomial co-efficient vector s.

Parameters
[in]s
Returns

◆ init_points()

template<typename OpointType , typename IpointType >
void mrpt::vision::pnp::dls::init_points ( const cv::Mat &  opoints,
const cv::Mat &  ipoints 
)
inlineprivate

Initialization of object points and image points.

Parameters
[in]opoints
[in]ipoints

Definition at line 53 of file dls.h.

References mn, and N.

◆ is_empty()

bool mrpt::vision::pnp::dls::is_empty ( const cv::Mat *  v)
private

Check for negative values in vector v.

Parameters
[in]v
Returns
False if v[i] < 0 else True

◆ LeftMultVec()

cv::Mat mrpt::vision::pnp::dls::LeftMultVec ( const cv::Mat &  v)
private

Create a matrix from vector.

Parameters
[in]v
Returns
Matrix containing vector v as columns

◆ mean()

cv::Mat mrpt::vision::pnp::dls::mean ( const cv::Mat &  M)
private

Column-wise mean of matrix M.

Parameters
[in]M
Returns
Mean vector

◆ positive_eigenvalues()

bool mrpt::vision::pnp::dls::positive_eigenvalues ( const cv::Mat *  eigenvalues)
private

check for positive eigenvalues

Parameters
[in]eigenvalues
Returns
True if positivie eigenvalues are found else False

◆ rotx()

cv::Mat mrpt::vision::pnp::dls::rotx ( const double  t)
private

Rotation matrix along x-axis by angle t.

Parameters
[in]t
Returns
Rotation Matrix

◆ roty()

cv::Mat mrpt::vision::pnp::dls::roty ( const double  t)
private

Rotation matrix along y-axis by angle t.

Parameters
[in]t
Returns
Rotation Matrix

◆ rotz()

cv::Mat mrpt::vision::pnp::dls::rotz ( const double  t)
private

Rotation matrix along z-axis by angle t.

Parameters
[in]t
Returns
Rotation Matrix

◆ run_kernel()

void mrpt::vision::pnp::dls::run_kernel ( const cv::Mat &  pp)
private

Main function to run DLS-PnP.

Parameters
[in]pp

◆ skewsymm()

cv::Mat mrpt::vision::pnp::dls::skewsymm ( const cv::Mat *  X1)
private

Create a skwy-symmetric matrix from a vector.

Parameters
[in]X1
Returns
Skew-symmetric matrix

Member Data Documentation

◆ C_est_

std::vector<cv::Mat> mrpt::vision::pnp::dls::C_est_
private

coefficient for coefficients matrix

Definition at line 196 of file dls.h.

◆ C_est__

cv::Mat mrpt::vision::pnp::dls::C_est__
private

optimal candidates

Definition at line 197 of file dls.h.

◆ cost_

std::vector<double> mrpt::vision::pnp::dls::cost_
private

Definition at line 195 of file dls.h.

◆ cost__

double mrpt::vision::pnp::dls::cost__
private

optimal found solution

Definition at line 198 of file dls.h.

◆ f1coeff

std::vector<double> mrpt::vision::pnp::dls::f1coeff
private

number of input points

Definition at line 195 of file dls.h.

◆ f2coeff

std::vector<double> mrpt::vision::pnp::dls::f2coeff
private

Definition at line 195 of file dls.h.

◆ f3coeff

std::vector<double> mrpt::vision::pnp::dls::f3coeff
private

Definition at line 195 of file dls.h.

◆ mn

cv::Mat mrpt::vision::pnp::dls::mn
private

Definition at line 193 of file dls.h.

Referenced by init_points().

◆ N

int mrpt::vision::pnp::dls::N
private

object-image points

Definition at line 194 of file dls.h.

Referenced by init_points().

◆ p

cv::Mat mrpt::vision::pnp::dls::p
private

Definition at line 193 of file dls.h.

◆ t_est_

std::vector<cv::Mat> mrpt::vision::pnp::dls::t_est_
private

Definition at line 196 of file dls.h.

◆ t_est__

cv::Mat mrpt::vision::pnp::dls::t_est__
private

Definition at line 197 of file dls.h.

◆ z

cv::Mat mrpt::vision::pnp::dls::z
private

Definition at line 193 of file dls.h.




Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020