#include <vpgl_affine_camera.h>
Public Member Functions | |
vpgl_affine_camera () | |
Default constructor creates the canonical affine camera. | |
vpgl_affine_camera (const vnl_vector_fixed< T, 4 > &row1, const vnl_vector_fixed< T, 4 > &row2) | |
Construct from the first two rows. | |
vpgl_affine_camera (const vnl_matrix_fixed< T, 3, 4 > &camera_matrix) | |
Construct from a 3x4 matrix, sets the last row to 0001. | |
vpgl_affine_camera (vgl_vector_3d< T > ray, vgl_vector_3d< T > up, vgl_point_3d< T > stare_pt, T u0, T v0, T su, T sv) | |
Construct from a ray direction, up vector, 3-d stare point: vgl interface. | |
vpgl_affine_camera (vnl_vector_fixed< T, 3 > ray, vnl_vector_fixed< T, 3 > up, vnl_vector_fixed< T, 3 > stare_pt, T u0, T v0, T su, T sv) | |
Construct from a ray direction, up vector, 3-d stare point: vnl interface. | |
virtual vcl_string | type_name () const |
class identity functions for casting. | |
void | set_rows (const vnl_vector_fixed< T, 4 > &row1, const vnl_vector_fixed< T, 4 > &row2) |
Set the top two rows. | |
void | set_viewing_distance (T dist) |
set a finite viewing distance to allow the methods below to return finite objects. | |
T | viewing_distance () const |
bool | operator== (vpgl_affine_camera< T > const &that) const |
Equality test. | |
virtual vgl_homg_point_3d< T > | camera_center () const |
Find the 3d coordinates of the center of the camera. Will be an ideal point with the sense of the ray direction. | |
virtual vgl_homg_line_3d_2_points< T > | backproject (const vgl_homg_point_2d< T > &image_point) const |
Find the 3d ray that goes through the camera center. | |
virtual vgl_homg_plane_3d< T > | principal_plane () const |
Find the world plane perpendicular to the camera rays at viewing distance from the origin. | |
virtual vpgl_proj_camera< T > * | clone (void) const |
Clone `this': creation of a new object and initialization. | |
bool | operator== (vpgl_proj_camera< T > const &that) const |
Equality test. | |
virtual void | project (const T x, const T y, const T z, T &u, T &v) const |
Projection from base class. | |
virtual vgl_homg_point_2d< T > | project (const vgl_homg_point_3d< T > &world_point) const |
Project a point in world coordinates onto the image plane. | |
vgl_homg_point_2d< T > | project (const vgl_point_3d< T > &world_point) const |
Non-homogeneous version of the above. | |
vgl_line_segment_2d< T > | project (const vgl_line_segment_3d< T > &world_line) const |
Project a line in the world onto a line in the image plane. | |
vgl_line_2d< T > | project (const vgl_infinite_line_3d< T > &world_line) const |
Project an infinite line in the world onto an infinite line in the image plane. | |
vgl_homg_point_2d< T > | operator() (const vgl_homg_point_3d< T > &world_point) const |
A shortcut to the above function. | |
vgl_line_segment_2d< T > | operator() (const vgl_line_segment_3d< T > &world_line) const |
Standard () forward projection operator. | |
vgl_line_2d< T > | operator() (const vgl_infinite_line_3d< T > &world_line) const |
Standard () forward projection operator. | |
virtual vgl_ray_3d< T > | backproject_ray (const vgl_homg_point_2d< T > &image_point) const |
Find the 3d ray that goes through the camera center and the provided image point. | |
vgl_homg_plane_3d< T > | backproject (const vgl_homg_line_2d< T > &image_line) const |
Find the 3d plane that contains the camera center and the provided line in the image plane. | |
vgl_homg_point_2d< T > | x_vanishing_point () const |
Find the image coordinates of the vanishing points of the world coordinate axes. | |
vgl_homg_point_2d< T > | y_vanishing_point () const |
vgl_homg_point_2d< T > | z_vanishing_point () const |
const vnl_matrix_fixed< T, 3, 4 > & | get_matrix () const |
Return a copy of the camera matrix. | |
vnl_svd< T > * | svd () const |
Get a copy of the svd of the get_matrix. | |
virtual bool | set_matrix (const vnl_matrix_fixed< T, 3, 4 > &new_camera_matrix) |
Setters mirror the constructors and return true if the setting was successful. | |
virtual bool | set_matrix (const T *new_camera_matrix) |
virtual void | save (vcl_string cam_path) |
Save in ascii format. | |
vcl_string | is_a () const |
bool | is_class (vcl_string const &name) const |
void | ref () |
void | unref () |
int | get_references () const |
bool | is_referenced () const |
Private Attributes | |
T | view_distance_ |
vgl_vector_3d< T > | ray_dir_ |
Definition at line 24 of file vpgl_affine_camera.h.
vpgl_affine_camera< T >::vpgl_affine_camera | ( | ) |
Default constructor creates the canonical affine camera.
Definition at line 17 of file vpgl_affine_camera.txx.
vpgl_affine_camera< T >::vpgl_affine_camera | ( | const vnl_vector_fixed< T, 4 > & | row1, |
const vnl_vector_fixed< T, 4 > & | row2 | ||
) |
Construct from the first two rows.
Definition at line 31 of file vpgl_affine_camera.txx.
vpgl_affine_camera< T >::vpgl_affine_camera | ( | const vnl_matrix_fixed< T, 3, 4 > & | camera_matrix | ) |
Construct from a 3x4 matrix, sets the last row to 0001.
The bottom right entry had better not be 0.
Definition at line 44 of file vpgl_affine_camera.txx.
vpgl_affine_camera< T >::vpgl_affine_camera | ( | vgl_vector_3d< T > | ray, |
vgl_vector_3d< T > | up, | ||
vgl_point_3d< T > | stare_pt, | ||
T | u0, | ||
T | v0, | ||
T | su, | ||
T | sv | ||
) |
Construct from a ray direction, up vector, 3-d stare point: vgl interface.
p projects to (u0, v0), su and sv are calibration scale factors
Definition at line 59 of file vpgl_affine_camera.txx.
vpgl_affine_camera< T >::vpgl_affine_camera | ( | vnl_vector_fixed< T, 3 > | ray, |
vnl_vector_fixed< T, 3 > | up, | ||
vnl_vector_fixed< T, 3 > | stare_pt, | ||
T | u0, | ||
T | v0, | ||
T | su, | ||
T | sv | ||
) | [inline] |
Construct from a ray direction, up vector, 3-d stare point: vnl interface.
p projects to (u0, v0), su and sv are calibration scale factors
Definition at line 46 of file vpgl_affine_camera.h.
vgl_homg_line_3d_2_points< T > vpgl_affine_camera< T >::backproject | ( | const vgl_homg_point_2d< T > & | image_point | ) | const [virtual] |
Find the 3d ray that goes through the camera center.
Find the 3d ray that goes through the camera center and the provided image point.
The finite point of the ray is at the viewing distance from the origin
Reimplemented from vpgl_proj_camera< T >.
Definition at line 140 of file vpgl_affine_camera.txx.
vgl_homg_plane_3d< T > vpgl_proj_camera< T >::backproject | ( | const vgl_homg_line_2d< T > & | image_line | ) | const [inherited] |
Find the 3d plane that contains the camera center and the provided line in the image plane.
Definition at line 175 of file vpgl_proj_camera.txx.
vgl_ray_3d< T > vpgl_proj_camera< T >::backproject_ray | ( | const vgl_homg_point_2d< T > & | image_point | ) | const [virtual, inherited] |
Find the 3d ray that goes through the camera center and the provided image point.
Definition at line 159 of file vpgl_proj_camera.txx.
vgl_homg_point_3d< T > vpgl_affine_camera< T >::camera_center | ( | ) | const [virtual] |
Find the 3d coordinates of the center of the camera. Will be an ideal point with the sense of the ray direction.
Reimplemented from vpgl_proj_camera< T >.
Definition at line 131 of file vpgl_affine_camera.txx.
vpgl_proj_camera< T > * vpgl_proj_camera< T >::clone | ( | void | ) | const [virtual, inherited] |
Clone `this': creation of a new object and initialization.
See Prototype pattern
Reimplemented in vpgl_perspective_camera< T >.
Definition at line 72 of file vpgl_proj_camera.txx.
const vnl_matrix_fixed<T,3,4>& vpgl_proj_camera< T >::get_matrix | ( | ) | const [inline, inherited] |
Return a copy of the camera matrix.
Definition at line 153 of file vpgl_proj_camera.h.
vcl_string vpgl_camera< T >::is_a | ( | ) | const [inline, inherited] |
Reimplemented in vpgl_geo_camera.
Definition at line 37 of file vpgl_camera.h.
bool vpgl_camera< T >::is_class | ( | vcl_string const & | name | ) | const [inline, inherited] |
Reimplemented in vpgl_geo_camera.
Definition at line 38 of file vpgl_camera.h.
vgl_homg_point_2d<T> vpgl_proj_camera< T >::operator() | ( | const vgl_homg_point_3d< T > & | world_point | ) | const [inline, inherited] |
A shortcut to the above function.
Definition at line 111 of file vpgl_proj_camera.h.
vgl_line_segment_2d<T> vpgl_proj_camera< T >::operator() | ( | const vgl_line_segment_3d< T > & | world_line | ) | const [inline, inherited] |
Standard () forward projection operator.
Definition at line 118 of file vpgl_proj_camera.h.
vgl_line_2d<T> vpgl_proj_camera< T >::operator() | ( | const vgl_infinite_line_3d< T > & | world_line | ) | const [inline, inherited] |
Standard () forward projection operator.
Definition at line 125 of file vpgl_proj_camera.h.
bool vpgl_affine_camera< T >::operator== | ( | vpgl_affine_camera< T > const & | that | ) | const [inline] |
Equality test.
Definition at line 66 of file vpgl_affine_camera.h.
bool vpgl_proj_camera< T >::operator== | ( | vpgl_proj_camera< T > const & | that | ) | const [inline, inherited] |
Equality test.
Definition at line 95 of file vpgl_proj_camera.h.
vgl_homg_plane_3d< T > vpgl_affine_camera< T >::principal_plane | ( | ) | const [virtual] |
Find the world plane perpendicular to the camera rays at viewing distance from the origin.
Find the world plane parallel to the image plane intersecting the camera center.
Reimplemented from vpgl_proj_camera< T >.
Definition at line 162 of file vpgl_affine_camera.txx.
void vpgl_proj_camera< T >::project | ( | const T | x, |
const T | y, | ||
const T | z, | ||
T & | u, | ||
T & | v | ||
) | const [virtual, inherited] |
Projection from base class.
Implements vpgl_camera< T >.
Definition at line 101 of file vpgl_proj_camera.txx.
vgl_homg_point_2d< T > vpgl_proj_camera< T >::project | ( | const vgl_homg_point_3d< T > & | world_point | ) | const [virtual, inherited] |
Project a point in world coordinates onto the image plane.
Definition at line 82 of file vpgl_proj_camera.txx.
vgl_homg_point_2d<T> vpgl_proj_camera< T >::project | ( | const vgl_point_3d< T > & | world_point | ) | const [inline, inherited] |
Non-homogeneous version of the above.
Definition at line 107 of file vpgl_proj_camera.h.
vgl_line_segment_2d< T > vpgl_proj_camera< T >::project | ( | const vgl_line_segment_3d< T > & | world_line | ) | const [inherited] |
Project a line in the world onto a line in the image plane.
Definition at line 118 of file vpgl_proj_camera.txx.
vgl_line_2d< T > vpgl_proj_camera< T >::project | ( | const vgl_infinite_line_3d< T > & | world_line | ) | const [inherited] |
Project an infinite line in the world onto an infinite line in the image plane.
Definition at line 131 of file vpgl_proj_camera.txx.
void vpgl_proj_camera< T >::save | ( | vcl_string | cam_path | ) | [virtual, inherited] |
Save in ascii format.
Reimplemented in vpgl_perspective_camera< T >.
Definition at line 264 of file vpgl_proj_camera.txx.
bool vpgl_proj_camera< T >::set_matrix | ( | const vnl_matrix_fixed< T, 3, 4 > & | new_camera_matrix | ) | [virtual, inherited] |
Setters mirror the constructors and return true if the setting was successful.
In subclasses these should be redefined so that they won't allow setting of matrices with improper form.
Definition at line 217 of file vpgl_proj_camera.txx.
bool vpgl_proj_camera< T >::set_matrix | ( | const T * | new_camera_matrix | ) | [virtual, inherited] |
Definition at line 227 of file vpgl_proj_camera.txx.
void vpgl_affine_camera< T >::set_rows | ( | const vnl_vector_fixed< T, 4 > & | row1, |
const vnl_vector_fixed< T, 4 > & | row2 | ||
) |
Set the top two rows.
Definition at line 116 of file vpgl_affine_camera.txx.
void vpgl_affine_camera< T >::set_viewing_distance | ( | T | dist | ) | [inline] |
set a finite viewing distance to allow the methods below to return finite objects.
Definition at line 62 of file vpgl_affine_camera.h.
vnl_svd< T > * vpgl_proj_camera< T >::svd | ( | ) | const [inherited] |
Get a copy of the svd of the get_matrix.
The svd is cached when first computed and automatically recomputed when the matrix is changed.
Definition at line 200 of file vpgl_proj_camera.txx.
virtual vcl_string vpgl_affine_camera< T >::type_name | ( | ) | const [inline, virtual] |
class identity functions for casting.
Reimplemented from vpgl_proj_camera< T >.
Definition at line 53 of file vpgl_affine_camera.h.
T vpgl_affine_camera< T >::viewing_distance | ( | ) | const [inline] |
Definition at line 63 of file vpgl_affine_camera.h.
vgl_homg_point_2d<T> vpgl_proj_camera< T >::x_vanishing_point | ( | ) | const [inline, inherited] |
Find the image coordinates of the vanishing points of the world coordinate axes.
Definition at line 146 of file vpgl_proj_camera.h.
vgl_homg_point_2d<T> vpgl_proj_camera< T >::y_vanishing_point | ( | ) | const [inline, inherited] |
Definition at line 147 of file vpgl_proj_camera.h.
vgl_homg_point_2d<T> vpgl_proj_camera< T >::z_vanishing_point | ( | ) | const [inline, inherited] |
Definition at line 148 of file vpgl_proj_camera.h.
vgl_vector_3d<T> vpgl_affine_camera< T >::ray_dir_ [private] |
Definition at line 84 of file vpgl_affine_camera.h.
T vpgl_affine_camera< T >::view_distance_ [private] |
Definition at line 83 of file vpgl_affine_camera.h.