#include "vpgl_proj_camera.h"
#include <vcl_iostream.h>
#include <vcl_fstream.h>
#include <vgl/vgl_point_2d.h>
#include <vgl/vgl_point_3d.h>
#include <vgl/vgl_ray_3d.h>
#include <vnl/vnl_vector_fixed.h>
#include <vnl/io/vnl_io_matrix_fixed.h>
Go to the source code of this file.
Defines | |
#define | vpgl_proj_camera_txx_ |
#define | vpgl_PROJ_CAMERA_INSTANTIATE(T) |
Functions | |
template<class Type > | |
vcl_ostream & | operator<< (vcl_ostream &s, vpgl_proj_camera< Type > const &p) |
Write vpgl_perspective_camera to stream. | |
template<class Type > | |
vcl_istream & | operator>> (vcl_istream &s, vpgl_proj_camera< Type > &p) |
Read vpgl_perspective_camera from stream. | |
template<class T > | |
vgl_h_matrix_3d< T > | get_canonical_h (vpgl_proj_camera< T > &camera) |
Return the 3D H-matrix s.t. P * H = [I 0]. | |
template<class T > | |
void | fix_cheirality (vpgl_proj_camera< T > &) |
Scale the camera matrix so determinant of first 3x3 is 1. | |
template<class T > | |
void | make_canonical (vpgl_proj_camera< T > &camera) |
Set the camera matrix to [ I | 0 ]. | |
template<class T > | |
vpgl_proj_camera< T > | premultiply (const vpgl_proj_camera< T > &in_camera, const vnl_matrix_fixed< T, 3, 3 > &transform) |
Pre-multiply this projection matrix with a 2-d projective transform. | |
template<class T > | |
vpgl_proj_camera< T > | postmultiply (const vpgl_proj_camera< T > &in_camera, const vnl_matrix_fixed< T, 4, 4 > &transform) |
Post-multiply this projection matrix with a 3-d projective transform. | |
template<class T > | |
vgl_point_3d< T > | triangulate_3d_point (const vpgl_proj_camera< T > &c1, const vgl_point_2d< T > &x1, const vpgl_proj_camera< T > &c2, const vgl_point_2d< T > &x2) |
Linearly intersect two camera rays to form a 3-d point. | |
template<class T > | |
vcl_vector< vnl_matrix_fixed < T, 2, 3 > > | image_jacobians (const vpgl_proj_camera< T > &camera, const vcl_vector< vgl_point_3d< T > > &pts) |
Compute the image projection Jacobians at each point. |
Definition in file vpgl_proj_camera.txx.
#define vpgl_PROJ_CAMERA_INSTANTIATE | ( | T | ) |
template class vpgl_proj_camera<T >; \ template vgl_h_matrix_3d<T > get_canonical_h( vpgl_proj_camera<T >& camera ); \ template void fix_cheirality( vpgl_proj_camera<T >& camera ); \ template void make_canonical( vpgl_proj_camera<T >& camera ); \ template vpgl_proj_camera<T > premultiply( const vpgl_proj_camera<T >& in_camera, \ const vnl_matrix_fixed<T,3,3>& transform ); \ template vpgl_proj_camera<T > postmultiply(const vpgl_proj_camera<T >& in_camera, \ const vnl_matrix_fixed<T,4,4>& transform ); \ template vgl_point_3d<T > triangulate_3d_point(const vpgl_proj_camera<T >& c1, \ const vgl_point_2d<T >& x1, \ const vpgl_proj_camera<T >& c2, \ const vgl_point_2d<T >& x2); \ template vcl_vector<vnl_matrix_fixed<T,2,3> > \ image_jacobians(const vpgl_proj_camera<T >& camera, \ const vcl_vector<vgl_point_3d<T > >& pts); \ template vcl_ostream& operator<<(vcl_ostream&, const vpgl_proj_camera<T >&); \ template vcl_istream& operator>>(vcl_istream&, vpgl_proj_camera<T >&)
Definition at line 406 of file vpgl_proj_camera.txx.
#define vpgl_proj_camera_txx_ |
Definition at line 3 of file vpgl_proj_camera.txx.
void fix_cheirality | ( | vpgl_proj_camera< T > & | ) |
Scale the camera matrix so determinant of first 3x3 is 1.
Definition at line 295 of file vpgl_proj_camera.txx.
vgl_h_matrix_3d<T> get_canonical_h | ( | vpgl_proj_camera< T > & | camera | ) |
Return the 3D H-matrix s.t. P * H = [I 0].
Definition at line 277 of file vpgl_proj_camera.txx.
vcl_vector<vnl_matrix_fixed<T,2,3> > image_jacobians | ( | const vpgl_proj_camera< T > & | camera, |
const vcl_vector< vgl_point_3d< T > > & | pts | ||
) |
Compute the image projection Jacobians at each point.
The returned matrices map a differential change in 3D to a differential change in the 2D image at each specified 3D point
Definition at line 353 of file vpgl_proj_camera.txx.
void make_canonical | ( | vpgl_proj_camera< T > & | camera | ) |
Set the camera matrix to [ I | 0 ].
Definition at line 302 of file vpgl_proj_camera.txx.
vcl_ostream& operator<< | ( | vcl_ostream & | s, |
vpgl_proj_camera< Type > const & | p | ||
) |
Write vpgl_perspective_camera to stream.
Definition at line 242 of file vpgl_proj_camera.txx.
vcl_istream& operator>> | ( | vcl_istream & | s, |
vpgl_proj_camera< Type > & | p | ||
) |
Read vpgl_perspective_camera from stream.
Definition at line 253 of file vpgl_proj_camera.txx.
vpgl_proj_camera<T> postmultiply | ( | const vpgl_proj_camera< T > & | in_camera, |
const vnl_matrix_fixed< T, 4, 4 > & | transform | ||
) |
Post-multiply this projection matrix with a 3-d projective transform.
Definition at line 319 of file vpgl_proj_camera.txx.
vpgl_proj_camera<T> premultiply | ( | const vpgl_proj_camera< T > & | in_camera, |
const vnl_matrix_fixed< T, 3, 3 > & | transform | ||
) |
Pre-multiply this projection matrix with a 2-d projective transform.
Definition at line 311 of file vpgl_proj_camera.txx.
vgl_point_3d<T> triangulate_3d_point | ( | const vpgl_proj_camera< T > & | c1, |
const vgl_point_2d< T > & | x1, | ||
const vpgl_proj_camera< T > & | c2, | ||
const vgl_point_2d< T > & | x2 | ||
) |
Linearly intersect two camera rays to form a 3-d point.
Definition at line 327 of file vpgl_proj_camera.txx.