Public Member Functions | Protected Attributes | List of all members
vpgl_essential_matrix< T > Class Template Reference

#include <vpgl_essential_matrix.h>

Inheritance diagram for vpgl_essential_matrix< T >:
Inheritance graph
[legend]

Public Member Functions

 vpgl_essential_matrix ()
 Default constructor creates dummy rank 2 matrix. More...
 
 vpgl_essential_matrix (const vpgl_fundamental_matrix< T > &F, const vpgl_calibration_matrix< T > &K_left, const vpgl_calibration_matrix< T > &K_right)
 construct from a fundamental matrix and left and right calibration matrices. More...
 
 vpgl_essential_matrix (const vpgl_perspective_camera< T > &cr, const vpgl_perspective_camera< T > &cl)
 Main constructor takes two perspective cameras. More...
 
 vpgl_essential_matrix (const vnl_matrix_fixed< T, 3, 3 > &E)
 Construct from an essential matrix in vnl form. More...
 
 vpgl_essential_matrix (const vpgl_essential_matrix< T > &other)
 Copy Constructor. More...
 
const vpgl_essential_matrix< T > & operator= (const vpgl_essential_matrix< T > &em)
 Assignment. More...
 
 ~vpgl_essential_matrix () override
 Destructor. More...
 
void get_epipoles (vgl_homg_point_2d< T > &er, vgl_homg_point_2d< T > &el) const
 Put the coordinates of the epipoles in er, el. More...
 
vgl_homg_line_2d< T > r_epipolar_line (const vgl_homg_point_2d< T > &pl) const
 Given a point in one image, find the corresponding epipolar line in the other image. More...
 
vgl_homg_line_2d< T > r_epipolar_line (const vgl_homg_line_2d< T > &epiline_l) const
 Given an epipolar line in one image, find the corresponding epipolar line in the other image. More...
 
vgl_homg_line_2d< T > l_epipolar_line (const vgl_homg_point_2d< T > &pr) const
 
vgl_homg_line_2d< T > l_epipolar_line (const vgl_homg_line_2d< T > &epiline_r) const
 
vpgl_proj_camera< T > extract_left_camera (const vnl_vector_fixed< T, 3 > &v, T lambda) const
 Gives the left camera matrix corresponding to the fundamental matrix. More...
 
vpgl_proj_camera< T > extract_left_camera (const std::vector< vgl_point_3d< T > > &world_points, const std::vector< vgl_point_2d< T > > &image_points) const
 Alternative left camera extractor. More...
 
const vnl_matrix_fixed< T, 3, 3 > & get_matrix () const
 Get a copy of the FM in vnl form. More...
 
const vnl_svd< T > & svd () const
 Get a copy of the svd of the fundamental matrix. More...
 
void set_matrix (const vpgl_proj_camera< T > &cr, const vpgl_proj_camera< T > &cl)
 
void set_matrix (const vnl_matrix_fixed< T, 3, 3 > &F)
 

Protected Attributes

vnl_matrix_fixed< T, 3, 3 > F_
 Internal representation of the fundamental matrix. More...
 
vnl_svd< T > * cached_svd_
 Cached copy of the svd. More...
 

Detailed Description

template<class T>
class vpgl_essential_matrix< T >

Definition at line 32 of file vpgl_essential_matrix.h.

Constructor & Destructor Documentation

◆ vpgl_essential_matrix() [1/5]

template<class T >
vpgl_essential_matrix< T >::vpgl_essential_matrix ( )
default

Default constructor creates dummy rank 2 matrix.

◆ vpgl_essential_matrix() [2/5]

template<class T >
vpgl_essential_matrix< T >::vpgl_essential_matrix ( const vpgl_fundamental_matrix< T > &  F,
const vpgl_calibration_matrix< T > &  K_left,
const vpgl_calibration_matrix< T > &  K_right 
)

construct from a fundamental matrix and left and right calibration matrices.

Definition at line 29 of file vpgl_essential_matrix.hxx.

◆ vpgl_essential_matrix() [3/5]

template<class T >
vpgl_essential_matrix< T >::vpgl_essential_matrix ( const vpgl_perspective_camera< T > &  cr,
const vpgl_perspective_camera< T > &  cl 
)

Main constructor takes two perspective cameras.

Compute from Euclidean properties of perspective cameras.

The RHS of the essential matrix will correspond to cr and the LHS to cl.

Definition at line 43 of file vpgl_essential_matrix.hxx.

◆ vpgl_essential_matrix() [4/5]

template<class T>
vpgl_essential_matrix< T >::vpgl_essential_matrix ( const vnl_matrix_fixed< T, 3, 3 > &  E)
inline

Construct from an essential matrix in vnl form.

Definition at line 52 of file vpgl_essential_matrix.h.

◆ vpgl_essential_matrix() [5/5]

template<class T >
vpgl_essential_matrix< T >::vpgl_essential_matrix ( const vpgl_essential_matrix< T > &  other)

Copy Constructor.

Definition at line 60 of file vpgl_essential_matrix.hxx.

◆ ~vpgl_essential_matrix()

template<class T >
vpgl_essential_matrix< T >::~vpgl_essential_matrix ( )
overridedefault

Destructor.

Member Function Documentation

◆ extract_left_camera() [1/2]

template<class T >
vpgl_proj_camera< T > vpgl_fundamental_matrix< T >::extract_left_camera ( const vnl_vector_fixed< T, 3 > &  v,
lambda 
) const
inherited

Gives the left camera matrix corresponding to the fundamental matrix.

The right camera matrix is assumed to be identity. The variables v, lambda are free parameters as described in H&Z 2nd ed p. 256.

Definition at line 162 of file vpgl_fundamental_matrix.hxx.

◆ extract_left_camera() [2/2]

template<class T >
vpgl_proj_camera< T > vpgl_fundamental_matrix< T >::extract_left_camera ( const std::vector< vgl_point_3d< T > > &  world_points,
const std::vector< vgl_point_2d< T > > &  image_points 
) const
inherited

Alternative left camera extractor.

Takes corresponding lists of image points with their world locations to determine the correct camera. Must give at least 2 pairs of correspondences. This is not a robust algorithm but this shouldn't be a problem as these correspondences will usually be picked by hand.

Definition at line 187 of file vpgl_fundamental_matrix.hxx.

◆ get_epipoles()

template<class T >
void vpgl_fundamental_matrix< T >::get_epipoles ( vgl_homg_point_2d< T > &  er,
vgl_homg_point_2d< T > &  el 
) const
inherited

Put the coordinates of the epipoles in er, el.

Definition at line 88 of file vpgl_fundamental_matrix.hxx.

◆ get_matrix()

template<class T>
const vnl_matrix_fixed<T,3,3>& vpgl_fundamental_matrix< T >::get_matrix ( ) const
inlineinherited

Get a copy of the FM in vnl form.

Definition at line 107 of file vpgl_fundamental_matrix.h.

◆ l_epipolar_line() [1/2]

template<class T >
vgl_homg_line_2d< T > vpgl_fundamental_matrix< T >::l_epipolar_line ( const vgl_homg_point_2d< T > &  pr) const
inherited

Definition at line 111 of file vpgl_fundamental_matrix.hxx.

◆ l_epipolar_line() [2/2]

template<class T >
vgl_homg_line_2d< T > vpgl_fundamental_matrix< T >::l_epipolar_line ( const vgl_homg_line_2d< T > &  epiline_r) const
inherited

Definition at line 142 of file vpgl_fundamental_matrix.hxx.

◆ operator=()

template<class T >
const vpgl_essential_matrix< T > & vpgl_essential_matrix< T >::operator= ( const vpgl_essential_matrix< T > &  em)

Assignment.

Definition at line 68 of file vpgl_essential_matrix.hxx.

◆ r_epipolar_line() [1/2]

template<class T >
vgl_homg_line_2d< T > vpgl_fundamental_matrix< T >::r_epipolar_line ( const vgl_homg_point_2d< T > &  pl) const
inherited

Given a point in one image, find the corresponding epipolar line in the other image.

Definition at line 100 of file vpgl_fundamental_matrix.hxx.

◆ r_epipolar_line() [2/2]

template<class T >
vgl_homg_line_2d< T > vpgl_fundamental_matrix< T >::r_epipolar_line ( const vgl_homg_line_2d< T > &  epiline_l) const
inherited

Given an epipolar line in one image, find the corresponding epipolar line in the other image.

H&Z 2nd ed p. 247

Definition at line 122 of file vpgl_fundamental_matrix.hxx.

◆ set_matrix() [1/2]

template<class T >
void vpgl_fundamental_matrix< T >::set_matrix ( const vpgl_proj_camera< T > &  cr,
const vpgl_proj_camera< T > &  cl 
)
inherited

Definition at line 228 of file vpgl_fundamental_matrix.hxx.

◆ set_matrix() [2/2]

template<class T >
void vpgl_fundamental_matrix< T >::set_matrix ( const vnl_matrix_fixed< T, 3, 3 > &  F)
inherited

Definition at line 250 of file vpgl_fundamental_matrix.hxx.

◆ svd()

template<class T>
const vnl_svd<T>& vpgl_fundamental_matrix< T >::svd ( ) const
inlineinherited

Get a copy of the svd of the fundamental matrix.

The svd is computed when the matrix is first set, so this just accesses a cached version.

Definition at line 111 of file vpgl_fundamental_matrix.h.

Member Data Documentation

◆ cached_svd_

template<class T>
vnl_svd<T>* vpgl_fundamental_matrix< T >::cached_svd_
mutableprotectedinherited

Cached copy of the svd.

Definition at line 123 of file vpgl_fundamental_matrix.h.

◆ F_

template<class T>
vnl_matrix_fixed<T,3,3> vpgl_fundamental_matrix< T >::F_
protectedinherited

Internal representation of the fundamental matrix.

Definition at line 120 of file vpgl_fundamental_matrix.h.


The documentation for this class was generated from the following files: