#include "vpgl_perspective_camera.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 <vul/vul_file.h>
#include <vul/vul_file_iterator.h>
#include <vcl_cassert.h>
#include <vcl_iostream.h>
#include <vcl_fstream.h>
#include <vcl_algorithm.h>
#include <vnl/vnl_trace.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 Type > | |
void | vrml_write (vcl_ostream &str, vpgl_perspective_camera< Type > const &p, double rad) |
Write vpgl_perspective_camera to a vrml file. | |
template<class T > | |
vcl_vector < vpgl_perspective_camera< T > > | cameras_from_directory (vcl_string dir, T) |
Return a list of camera's, loaded from the (name sorted) files from the given directory. | |
template<class T > | |
double | vpgl_persp_cam_distance (const vpgl_perspective_camera< T > &cam1, const vpgl_perspective_camera< T > &cam2) |
Definition in file vpgl_perspective_camera.txx.
#define vpgl_PERSPECTIVE_CAMERA_INSTANTIATE | ( | T | ) |
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 vpgl_perspective_camera<T > postmultiply(const vpgl_perspective_camera<T >& in_cam, \ const vgl_h_matrix_3d<T >& euclid_trans); \ template double vpgl_persp_cam_distance(const vpgl_perspective_camera<T >& cam1, \ const vpgl_perspective_camera<T >& cam2); \ template void vrml_write(vcl_ostream &s, const vpgl_perspective_camera<T >&, double rad); \ template vcl_vector<vpgl_perspective_camera<T > > cameras_from_directory(vcl_string dir, T); \ template vcl_ostream& operator<<(vcl_ostream&, const vpgl_perspective_camera<T >&); \ template vcl_istream& operator>>(vcl_istream&, vpgl_perspective_camera<T >&)
Definition at line 578 of file vpgl_perspective_camera.txx.
#define vpgl_perspective_camera_txx_ |
Definition at line 3 of file vpgl_perspective_camera.txx.
vcl_vector<vpgl_perspective_camera<T> > cameras_from_directory | ( | vcl_string | dir, |
T | |||
) |
Return a list of camera's, loaded from the (name sorted) files from the given directory.
Definition at line 528 of file vpgl_perspective_camera.txx.
vcl_ostream& operator<< | ( | vcl_ostream & | s, |
vpgl_perspective_camera< Type > const & | p | ||
) |
Write vpgl_perspective_camera to stream.
Definition at line 423 of file vpgl_perspective_camera.txx.
vcl_istream& operator>> | ( | vcl_istream & | s, |
vpgl_perspective_camera< Type > & | p | ||
) |
Read camera from stream.
Read vpgl_perspective_camera from stream.
Definition at line 438 of file vpgl_perspective_camera.txx.
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 337 of file vpgl_perspective_camera.txx.
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 356 of file vpgl_perspective_camera.txx.
double vpgl_persp_cam_distance | ( | const vpgl_perspective_camera< T > & | cam1, |
const vpgl_perspective_camera< T > & | cam2 | ||
) |
Definition at line 565 of file vpgl_perspective_camera.txx.
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 267 of file vpgl_perspective_camera.txx.
void vrml_write | ( | vcl_ostream & | str, |
vpgl_perspective_camera< Type > const & | p, | ||
double | rad | ||
) |
Write vpgl_perspective_camera to a vrml file.
Write vpgl_perspective_camera to a vrml file, does not write a vrml header, only the camera, the camera center sphere has radius rad.
Definition at line 470 of file vpgl_perspective_camera.txx.