MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
sfm::CameraPose Struct Reference

The camera pose is the 3x4 matrix P = K [R | t]. More...

#include <camera_pose.h>

Collaboration diagram for sfm::CameraPose:
Collaboration graph
[legend]

Public Member Functions

 CameraPose (void)
 
void fill_camera_pos (math::Vector< double, 3 > *camera_pos) const
 Returns the camera position (requires valid camera).
 
void fill_p_matrix (math::Matrix< double, 3, 4 > *result) const
 Returns the P matrix as the product K [R | t].
 
double get_focal_length (void) const
 Returns the focal length as average of x and y focal length.
 
void init_canonical_form (void)
 Initializes R with identity and t with zeros.
 
bool is_valid (void) const
 Returns true if K matrix is valid (non-zero focal length).
 
void set_k_matrix (double flen, double px, double py)
 Initializes the K matrix from focal length and principal point.
 

Public Attributes

math::Matrix< double, 3, 3 > K
 
math::Matrix< double, 3, 3 > R
 
math::Vector< double, 3 > t
 

Detailed Description

The camera pose is the 3x4 matrix P = K [R | t].

K is the 3x3 calibration matrix, R a 3x3 rotation matrix and t a 3x1 translation vector.

  | f  0  px |    The calibration matrix contains the focal length f,

K = | 0 f py | and the principal point px and py. | 0 0 1 |

As the feature coordinates are normalized before pose estimation, the principal point (px, py) is set to 0.0.

For pose estimation, the calibration matrix is assumed to be known. This might not be the case, but even a good guess of the focal length and the principal point set to the image center can produce reasonably good results so that bundle adjustment can recover better parameters.

Definition at line 39 of file camera_pose.h.

Constructor & Destructor Documentation

◆ CameraPose()

sfm::CameraPose::CameraPose ( void  )
inline

Definition at line 66 of file camera_pose.h.

Member Function Documentation

◆ fill_camera_pos()

void sfm::CameraPose::fill_camera_pos ( math::Vector< double, 3 > *  camera_pos) const
inline

Returns the camera position (requires valid camera).

Definition at line 104 of file camera_pose.h.

◆ fill_p_matrix()

void sfm::CameraPose::fill_p_matrix ( math::Matrix< double, 3, 4 > *  result) const
inline

Returns the P matrix as the product K [R | t].

Definition at line 81 of file camera_pose.h.

◆ get_focal_length()

double sfm::CameraPose::get_focal_length ( void  ) const
inline

Returns the focal length as average of x and y focal length.

Definition at line 98 of file camera_pose.h.

◆ init_canonical_form()

void sfm::CameraPose::init_canonical_form ( void  )
inline

Initializes R with identity and t with zeros.

Definition at line 74 of file camera_pose.h.

◆ is_valid()

bool sfm::CameraPose::is_valid ( void  ) const
inline

Returns true if K matrix is valid (non-zero focal length).

Definition at line 110 of file camera_pose.h.

◆ set_k_matrix()

void sfm::CameraPose::set_k_matrix ( double  flen,
double  px,
double  py 
)
inline

Initializes the K matrix from focal length and principal point.

Definition at line 89 of file camera_pose.h.

Member Data Documentation

◆ K

math::Matrix<double, 3, 3> sfm::CameraPose::K

Definition at line 58 of file camera_pose.h.

◆ R

math::Matrix<double, 3, 3> sfm::CameraPose::R

Definition at line 59 of file camera_pose.h.

◆ t

math::Vector<double, 3> sfm::CameraPose::t

Definition at line 60 of file camera_pose.h.


The documentation for this struct was generated from the following file: