Defines | Functions
contrib/gel/mrc/vpgl/vpgl_proj_camera.txx File Reference
#include "vpgl_proj_camera.h"
#include <vcl_iostream.h>
#include <vgl/vgl_point_2d.h>
#include <vgl/vgl_point_3d.h>
#include <vnl/vnl_vector_fixed.h>
#include <vnl/io/vnl_io_matrix_fixed.h>
#include <vsl/vsl_binary_loader.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 >
void vsl_add_to_binary_loader (vpgl_proj_camera< T > const &b)
 Allows derived class to be loaded by base-class pointer.
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_cannonical (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.

Detailed Description

Definition in file vpgl_proj_camera.txx.


Define Documentation

#define vpgl_PROJ_CAMERA_INSTANTIATE (   T)
Value:
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_cannonical( 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 void vsl_add_to_binary_loader(vpgl_proj_camera<T > const& b); \
template vcl_ostream& operator<<(vcl_ostream&, const vpgl_proj_camera<T >&); \
template vcl_istream& operator>>(vcl_istream&, vpgl_proj_camera<T >&)

Definition at line 425 of file vpgl_proj_camera.txx.

#define vpgl_proj_camera_txx_

Definition at line 3 of file vpgl_proj_camera.txx.


Function Documentation

template<class T >
void fix_cheirality ( vpgl_proj_camera< T > &  )

Scale the camera matrix so determinant of first 3x3 is 1.

Definition at line 314 of file vpgl_proj_camera.txx.

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].

Definition at line 296 of file vpgl_proj_camera.txx.

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.

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 372 of file vpgl_proj_camera.txx.

template<class T >
void make_cannonical ( vpgl_proj_camera< T > &  camera)

Set the camera matrix to [ I | 0 ].

Definition at line 321 of file vpgl_proj_camera.txx.

template<class Type >
vcl_ostream& operator<< ( vcl_ostream &  s,
vpgl_proj_camera< Type > const &  p 
)

Write vpgl_perspective_camera to stream.

Definition at line 258 of file vpgl_proj_camera.txx.

template<class Type >
vcl_istream& operator>> ( vcl_istream &  s,
vpgl_proj_camera< Type > &  p 
)

Read vpgl_perspective_camera from stream.

Definition at line 269 of file vpgl_proj_camera.txx.

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.

Definition at line 338 of file vpgl_proj_camera.txx.

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.

Definition at line 330 of file vpgl_proj_camera.txx.

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.

Definition at line 346 of file vpgl_proj_camera.txx.

template<class T >
void vsl_add_to_binary_loader ( vpgl_proj_camera< T > const &  b)

Allows derived class to be loaded by base-class pointer.

A loader object exists which is invoked by calls of the form "vsl_b_read(os,base_ptr);". This loads derived class objects from the stream, places them on the heap and returns a base class pointer. In order to work the loader object requires an instance of each derived class that might be found. This function gives the model class to the appropriate loader.

Definition at line 289 of file vpgl_proj_camera.txx.