Defines | Functions
contrib/gel/mrc/vpgl/vpgl_perspective_camera.txx File Reference
#include "vpgl_perspective_camera.h"
#include <vcl_cassert.h>
#include <vcl_iostream.h>
#include <vgl/vgl_point_2d.h>
#include <vgl/vgl_vector_3d.h>
#include <vgl/vgl_homg_plane_3d.h>
#include <vgl/vgl_line_3d_2_points.h>
#include <vgl/algo/vgl_h_matrix_3d.h>
#include <vnl/vnl_det.h>
#include <vnl/algo/vnl_qr.h>
#include <vnl/vnl_matrix_fixed.h>
#include <vgl/io/vgl_io_point_3d.h>
#include <vnl/io/vnl_io_matrix_fixed.h>
#include <vnl/io/vnl_io_vector_fixed.h>

Go to the source code of this file.

Defines

#define vpgl_perspective_camera_txx_
#define vpgl_PERSPECTIVE_CAMERA_INSTANTIATE(T)

Functions

template<class T >
bool vpgl_perspective_decomposition (const vnl_matrix_fixed< T, 3, 4 > &camera_matrix, vpgl_perspective_camera< T > &p_camera)
 Decompose camera into parameter blocks.
template<class T >
vpgl_perspective_camera< T > vpgl_align_down (const vpgl_perspective_camera< T > &p0, const vpgl_perspective_camera< T > &p1)
 Changes the coordinate system of camera p1 such that the same change would transform p0 to K[I|0].
template<class T >
vpgl_perspective_camera< T > vpgl_align_up (const vpgl_perspective_camera< T > &p0, const vpgl_perspective_camera< T > &p1)
 Changes the coordinate system of camera p1 such that the same change would transform K[I|0] to p0.
template<class Type >
vcl_ostream & operator<< (vcl_ostream &s, vpgl_perspective_camera< Type > const &p)
 Write vpgl_perspective_camera to stream.
template<class Type >
vcl_istream & operator>> (vcl_istream &s, vpgl_perspective_camera< Type > &p)
 Read camera from stream.
template<class T >
void vsl_b_write (vsl_b_ostream &os, const vpgl_perspective_camera< T > *p)
 Binary save.
template<class T >
void vsl_b_read (vsl_b_istream &is, vpgl_perspective_camera< T > *&p)
 Binary load.

Detailed Description

Definition in file vpgl_perspective_camera.txx.


Define Documentation

#define vpgl_PERSPECTIVE_CAMERA_INSTANTIATE (   T)
Value:
template class vpgl_perspective_camera<T >; \
template bool vpgl_perspective_decomposition(const vnl_matrix_fixed<T,3,4>& camera_matrix, \
                                             vpgl_perspective_camera<T >& p_camera ); \
template vpgl_perspective_camera<T > vpgl_align_down(const vpgl_perspective_camera<T >& p0, \
                                                     const vpgl_perspective_camera<T >& p1 ); \
template vpgl_perspective_camera<T > vpgl_align_up(const vpgl_perspective_camera<T >& p0, \
                                                   const vpgl_perspective_camera<T >& p1 ); \
template void vsl_b_read(vsl_b_istream &is, vpgl_perspective_camera<T >* &p); \
template void vsl_b_write(vsl_b_ostream &os, const vpgl_perspective_camera<T > * p); \
template vcl_ostream& operator<<(vcl_ostream&, const vpgl_perspective_camera<T >&); \
template vcl_istream& operator>>(vcl_istream&, vpgl_perspective_camera<T >&)

Definition at line 501 of file vpgl_perspective_camera.txx.

#define vpgl_perspective_camera_txx_

Definition at line 3 of file vpgl_perspective_camera.txx.


Function Documentation

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

Write vpgl_perspective_camera to stream.

Definition at line 388 of file vpgl_perspective_camera.txx.

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

Read camera from stream.

Read vpgl_perspective_camera from stream.

Definition at line 403 of file vpgl_perspective_camera.txx.

template<class T >
vpgl_perspective_camera<T> vpgl_align_down ( const vpgl_perspective_camera< T > &  p0,
const vpgl_perspective_camera< T > &  p1 
)

Changes the coordinate system of camera p1 such that the same change would transform p0 to K[I|0].

Definition at line 314 of file vpgl_perspective_camera.txx.

template<class T >
vpgl_perspective_camera<T> vpgl_align_up ( const vpgl_perspective_camera< T > &  p0,
const vpgl_perspective_camera< T > &  p1 
)

Changes the coordinate system of camera p1 such that the same change would transform K[I|0] to p0.

Definition at line 333 of file vpgl_perspective_camera.txx.

template<class T >
bool vpgl_perspective_decomposition ( const vnl_matrix_fixed< T, 3, 4 > &  camera_matrix,
vpgl_perspective_camera< T > &  p_camera 
)

Decompose camera into parameter blocks.

Attempts to decompose a 3x4 camera matrix into the parameter blocks that describe a perspective camera, but will only work if the supplied matrix has a left 3x3 submatrix with rank 3.

Definition at line 244 of file vpgl_perspective_camera.txx.

template<class T >
void vsl_b_read ( vsl_b_istream is,
vpgl_perspective_camera< T > *&  p 
)

Binary load.

Binary read.

Definition at line 485 of file vpgl_perspective_camera.txx.

template<class T >
void vsl_b_write ( vsl_b_ostream os,
const vpgl_perspective_camera< T > *  p 
)

Binary save.

Definition at line 471 of file vpgl_perspective_camera.txx.