vpgl_camera_homographies.h
Go to the documentation of this file.
1 // This is core/vpgl/algo/vpgl_camera_homographies.h
2 #ifndef vpgl_camera_homographies_h_
3 #define vpgl_camera_homographies_h_
4 //:
5 // \file
6 // \brief Various miscellaneous methods involving cameras
7 // \author J.L. Mundy
8 // \date January 2, 2008
9 //
10 // \verbatim
11 // Modifications
12 // <none>
13 // \endverbatim
14 
15 #include <vpgl/vpgl_proj_camera.h>
18 #include <vgl/vgl_plane_3d.h>
19 
21 {
22  public:
23  // The following four methods compute a homography with respect to a
24  // world plane. The homography is computed by transforming the plane
25  // to the X-Y plane and applying the inverse transformation to the camera.
26  // Columns 0, 1, and 3 of the transformed camera matrix are extracted
27  // to form the homography.
28 
29  //: create a plane projective transformation from the camera image plane to the specified plane
32  vgl_plane_3d<double> const& plane);
33 
34  //: create a plane projective transformation from the camera image plane to the specified plane
37  vgl_plane_3d<double> const& plane);
38 
39 
40  //: create a plane projective transformation from the specified plane to the camera image plane
43  vgl_plane_3d<double> const& plane);
44 
45  //: create a plane projective transformation from the specified plane to the camera image plane
48  vgl_plane_3d<double> const& plane);
49 
50  //: transform a camera so that its world coordinate system has the specified plane as the world X-Y plane
53  vgl_plane_3d<double> const& plane);
54 
55  //: transform a camera so that its world coordinate system has the specified plane as the world X-Y plane
58  vgl_plane_3d<double> const& plane);
59 
60  //: transform a point cloud so that its coordinate system has the specified plane as the world X-Y plane
61  static std::vector<vgl_point_3d<double> >
63  vgl_point_3d<double> const& ref_point,
64  std::vector<vgl_point_3d<double> > const& pts );
65  private:
66  //: no public constructor - static methods only
67  vpgl_camera_homographies() = default;
68 };
69 
70 #endif // vpgl_camera_homographies_h_
A class for the perspective camera model.
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.
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.
This class implements the perspective camera class as described in Hartley & Zisserman as a finite ca...
A camera model using the standard 3x4 matrix representation.
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...
vpgl_camera_homographies()=default
no public constructor - static methods only.