1 // This is bbas/bpgl/bpgl_reg_fundamental_matrix.h
2 #ifndef bpgl_reg_fundamental_matrix_h_
3 #define bpgl_reg_fundamental_matrix_h_
4 //:
5 // \file
6 // \brief A class for the fundamental matrix between two affine cameras registered to a ground plane.
7 // \author Thomas Pollard
8 // \date June 8, 2005
9 // \author Joseph Mundy, Matt Leotta, Vishal Jain
10 //
11 // The fundamental matrix for two registered images has a simplified form and can be
12 // written as:
13 // \verbatim
14 // |  0  0  a |
15 // |  0  0 -b |
16 // | -a  b  0 |
17 // \endverbatim
18 
19 #include <vgl/vgl_fwd.h>
20 #include <vpgl/vpgl_fundamental_matrix.h>
21 
22 template <class T>
23 class bpgl_reg_fundamental_matrix : public vpgl_fundamental_matrix<T>
24 {
25  public:
26   // Constructors:----------------------
27 
28   //: Default constructor creates dummy matrix.
29   bpgl_reg_fundamental_matrix();
30 
31   //: Main constructor takes corresponding points from right and left images.
32   bpgl_reg_fundamental_matrix( const vgl_point_2d<T>& pr, const vgl_point_2d<T>& pl );
33 
34   //: Cast up from a regular bpgl_fundamental_matrix.
35   bpgl_reg_fundamental_matrix( const vpgl_fundamental_matrix<T>& fm );
36 
37   // Getters and Setters:----------------
38 
39   //: Form the matrix from corresponding points from right and left images.
40   bool set_from_points( const vgl_point_2d<T>& pr, const vgl_point_2d<T>& pl );
41 
42   //: Form the matrix from its free parameters.
43   void set_from_params( T a, T b );
44 };
45 
46 #endif // bpgl_reg_fundamental_matrix_h_
47