[4cca03]: contrib / gel / mrc / vpgl / algo / vpgl_camera_homographies.h  Maximize  Restore  History

Download this file

67 lines (55 with data), 2.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// This is gel/mrc/vpgl/algo/vpgl_camera_homographies.h
#ifndef vpgl_camera_homographies_h_
#define vpgl_camera_homographies_h_
//:
// \file
// \brief Various miscellaneous methods involving cameras
// \author J.L. Mundy
// \date January 2, 2008
//
// \verbatim
// Modifications
// none
// \endverbatim
#include <vpgl/vpgl_proj_camera.h>
#include <vpgl/vpgl_perspective_camera.h>
#include <vgl/algo/vgl_h_matrix_2d.h>
#include <vgl/vgl_plane_3d.h>
class vpgl_camera_homographies
{
public:
// The following four methods compute a homography with respect to a
// world plane. The homography is computed by transforming the plane
// to the X-Y plane and applying the inverse transformation to the camera.
// Columns 0, 1, and 3 of the transformed camera matrix are extracted
// to form the homography. There are two possible homographies:
// 1) the transformed plane normal is in the + Z direction;
// 2) the transformed plane normal is in the - Z direction.
// Both transformations exclude column 2 of the camera matrix.
// The plane transformation is defined so that the transformed
// plane normal is along the positive Z axis.
//: create a plane projective transformation from the camera image plane to
// the specified 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
static vgl_h_matrix_2d<double>
homography_from_camera(vpgl_perspective_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 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 vgl_h_matrix_2d<double>
homography_to_camera(vpgl_perspective_camera<double> const& cam,
vgl_plane_3d<double> const& plane);
private:
//: no constructor - static methods only
vpgl_camera_homographies();
};
#endif // vpgl_camera_homographies_h_

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks