18 double trans = plane.
d()/mag;
37 m[0][0] = -1.0;
m[1][1] = 1.0;
m[2][2]=-1.0;
128 std::vector<vgl_point_3d<double> > tr_pts;
130 for (
const auto & pt : pts)
135 tr_pts.push_back(trp);
static vpgl_perspective_camera< T > postmultiply(const vpgl_perspective_camera< T > &in_cam, const vgl_h_matrix_3d< T > &euclid_trans)
Post-multiply this perspective camera with a 3-d Euclidean transformation.
vgl_h_matrix_3d get_inverse() const
vnl_vector_fixed< T, num_rows > get_column(unsigned col) const
vgl_h_matrix_3d & set_translation(T tx, T ty, T tz)
static vgl_h_matrix_2d< double > homography_to_camera(vpgl_proj_camera< double > const &cam, vgl_plane_3d< double > const &plane)
create a plane projective transformation from the specified plane to the camera image plane.
static std::vector< vgl_point_3d< double > > transform_points_to_plane(vgl_plane_3d< double > const &plane, vgl_point_3d< double > const &ref_point, std::vector< vgl_point_3d< double > > const &pts)
transform a point cloud so that its coordinate system has the specified plane as the world X-Y plane.
vpgl_perspective_camera< T > postmultiply(const vpgl_perspective_camera< T > &in_cam, const vgl_h_matrix_3d< T > &euclid_trans)
static vgl_h_matrix_2d< double > homography_from_camera(vpgl_proj_camera< double > const &cam, vgl_plane_3d< double > const &plane)
create a plane projective transformation from the camera image plane to the specified plane.
vgl_h_matrix_3d & set_rotation_matrix(vnl_matrix_fixed< T, 3, 3 > const &R)
virtual vgl_homg_point_3d< T > camera_center() const
Find the 3d coordinates of the center of the camera.
vgl_homg_point_3d< T > camera_center() const override
Return the known camera center instead of computing it in the base class.
This class implements the perspective camera class as described in Hartley & Zisserman as a finite ca...
vgl_h_matrix_3d & set_identity()
static vpgl_perspective_camera< double > transform_camera_to_plane(vpgl_perspective_camera< double > const &cam, vgl_plane_3d< double > const &plane)
transform a camera so that its world coordinate system has the specified plane as the world X-Y plane...
const vnl_matrix_fixed< T, 3, 4 > & get_matrix() const
Return a copy of the camera matrix.
vgl_h_matrix_2d get_inverse() const
vnl_matrix_fixed & set_column(unsigned i, T const *v)
Various miscellaneous methods involving cameras.