Macros | Functions
vpgl_proj_camera.hxx File Reference
#include <iostream>
#include <fstream>
#include "vpgl_proj_camera.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.

Macros

#define vpgl_PROJ_CAMERA_INSTANTIATE(T)
 

Functions

template<class Type >
std::ostream & operator<< (std::ostream &s, vpgl_proj_camera< Type > const &p)
 Write vpgl_perspective_camera to stream. More...
 
template<class Type >
std::istream & operator>> (std::istream &s, vpgl_proj_camera< Type > &p)
 Read vpgl_perspective_camera from stream. More...
 
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]. More...
 
template<class T >
void fix_cheirality (vpgl_proj_camera< T > &)
 Scale the camera matrix so determinant of first 3x3 is 1. More...
 
template<class T >
void make_canonical (vpgl_proj_camera< T > &camera)
 Set the camera matrix to [ I | 0 ]. More...
 
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. More...
 
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. More...
 
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. More...
 
template<class T >
std::vector< vnl_matrix_fixed< T, 2, 3 > > image_jacobians (const vpgl_proj_camera< T > &camera, const std::vector< vgl_point_3d< T > > &pts)
 Compute the image projection Jacobians at each point. More...
 

Macro Definition Documentation

◆ vpgl_PROJ_CAMERA_INSTANTIATE

#define vpgl_PROJ_CAMERA_INSTANTIATE (   T)
Value:
template class vpgl_proj_camera<T >; \
template void fix_cheirality( vpgl_proj_camera<T >& camera ); \
template void make_canonical( vpgl_proj_camera<T >& camera ); \
const vnl_matrix_fixed<T,3,3>& transform ); \
const vnl_matrix_fixed<T,4,4>& transform ); \
const vgl_point_2d<T >& x1, \
const vpgl_proj_camera<T >& c2, \
const vgl_point_2d<T >& x2); \
template std::vector<vnl_matrix_fixed<T,2,3> > \
image_jacobians(const vpgl_proj_camera<T >& camera, \
const std::vector<vgl_point_3d<T > >& pts); \
template std::ostream& operator<<(std::ostream&, const vpgl_proj_camera<T >&); \
template std::istream& operator>>(std::istream&, vpgl_proj_camera<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].
std::istream & operator>>(std::istream &is, vpgl_local_rational_camera< T > &p)
Read from stream.
void fix_cheirality(vpgl_proj_camera< T > &)
Scale the camera matrix so determinant of first 3x3 is 1.
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.
std::ostream & operator<<(std::ostream &s, const vpgl_local_rational_camera< T > &p)
Write to stream.
void make_canonical(vpgl_proj_camera< T > &camera)
Set the camera matrix to [ I | 0 ].
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.
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 409 of file vpgl_proj_camera.hxx.

Function Documentation

◆ fix_cheirality()

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

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

Definition at line 298 of file vpgl_proj_camera.hxx.

◆ get_canonical_h()

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 280 of file vpgl_proj_camera.hxx.

◆ image_jacobians()

template<class T >
std::vector<vnl_matrix_fixed<T,2,3> > image_jacobians ( const vpgl_proj_camera< T > &  camera,
const std::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 356 of file vpgl_proj_camera.hxx.

◆ make_canonical()

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

Set the camera matrix to [ I | 0 ].

Definition at line 305 of file vpgl_proj_camera.hxx.

◆ operator<<()

template<class Type >
std::ostream& operator<< ( std::ostream &  s,
vpgl_proj_camera< Type > const &  p 
)

Write vpgl_perspective_camera to stream.

Definition at line 245 of file vpgl_proj_camera.hxx.

◆ operator>>()

template<class Type >
std::istream& operator>> ( std::istream &  s,
vpgl_proj_camera< Type > &  p 
)

Read vpgl_perspective_camera from stream.

Definition at line 256 of file vpgl_proj_camera.hxx.

◆ postmultiply()

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 322 of file vpgl_proj_camera.hxx.

◆ premultiply()

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 314 of file vpgl_proj_camera.hxx.

◆ triangulate_3d_point()

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 330 of file vpgl_proj_camera.hxx.