2 #ifndef vpgl_affine_camera_h_ 3 #define vpgl_affine_camera_h_ 54 bool set_matrix(
const T* new_camera_matrix )
override;
56 std::string
type_name()
const override {
return "vpgl_affine_camera"; }
73 {
return this == &that ||
100 template <
class Type>
104 template <
class Type>
107 #endif // vpgl_affine_camera_h_
vgl_ray_3d< T > backproject_ray(const vgl_homg_point_2d< T > &image_point) const override
Find the 3d ray that goes through the camera center and the provided image point.
std::istream & operator>>(std::istream &is, vpgl_local_rational_camera< T > &p)
Read from stream.
vgl_vector_3d< T > ray_dir_
vpgl_affine_camera< T > * clone(void) const override
Clone ‘this’: creation of a new object and initialization.
vpgl_affine_camera()
Default constructor creates the canonical affine camera.
std::string type_name() const override
class identity functions for casting.
std::ostream & operator<<(std::ostream &s, const vpgl_local_rational_camera< T > &p)
Write to stream.
vgl_homg_line_3d_2_points< T > backproject(const vgl_homg_point_2d< T > &image_point) const override
Find the 3d ray that goes through the camera center.
A camera model using the standard 3x4 matrix representation.
vgl_homg_point_3d< T > camera_center() const override
Find the 3d coordinates of the center of the camera. Will be an ideal point with the sense of the ray...
void orient_ray_direction(vgl_vector_3d< T > const &look_dir)
flip the ray direction so that dot product with look_dir is positive.
const vnl_matrix_fixed< T, 3, 4 > & get_matrix() const
Return a copy of the camera matrix.
void set_rows(const vnl_vector_fixed< T, 4 > &row1, const vnl_vector_fixed< T, 4 > &row2)
Set the top two rows.
vgl_homg_plane_3d< T > principal_plane() const override
Find the world plane perpendicular to the camera rays at viewing distance from the origin.
void set_viewing_distance(T dist)
set a finite viewing distance to allow the methods below to return finite objects.
bool set_matrix(const vnl_matrix_fixed< T, 3, 4 > &new_camera_matrix) override
Setters mirror the constructors and return true if the setting was successful.
bool operator==(vpgl_affine_camera< T > const &that) const
Equality test.
T viewing_distance() const
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.