1 // This is core/vpgl/vpgl_affine_fundamental_matrix.h
2 #ifndef vpgl_affine_fundamental_matrix_h_
3 #define vpgl_affine_fundamental_matrix_h_
4 //:
5 // \file
6 // \brief A class for the fundamental matrix between two affine cameras..
7 // \author Thomas Pollard
8 // \date June 8, 2005
9 // \author Joseph Mundy, Matt Leotta, Vishal Jain
10 //
11 // The fundamental matrix has the form (using Hartly and Zisserman convention for a-e as of Nov. 2018):
12 // \verbatim
13 // | 0  0  a |
14 // | 0  0  b |
15 // | c  d  e |
16 // \endverbatim
17 
18 #include <vnl/vnl_fwd.h>
19 #include "vpgl_fundamental_matrix.h"
20 #include "vpgl_affine_camera.h"
21 
22 template <class T>
23 class vpgl_affine_fundamental_matrix : public vpgl_fundamental_matrix<T>
24 {
25  public:
26 
27   // Constructors:----------------------
28 
29   //: Default constructor creates dummy matrix.
30   vpgl_affine_fundamental_matrix();
31 
32   //: Construct from a fundamental matrix in vnl form.
33   vpgl_affine_fundamental_matrix( const vnl_matrix_fixed<T,3,3>& F );
34 
35   //: Cast up from a regular vpgl_fundamental_matrix.
36   vpgl_affine_fundamental_matrix( const vpgl_fundamental_matrix<T>& fm );
37 
38   //: construct from two affine cameras (Ar, the camera with image points on the right of F, and Al on the left of F)
39   vpgl_affine_fundamental_matrix( const vpgl_affine_camera<T>& Ar, const vpgl_affine_camera<T>& Al);
40 
41   // Getters and Setters:----------------
42 
43   //: Form the matrix from 3x3 vnl_fixed_matrix
44   void set_matrix( const vnl_matrix_fixed<T,3,3>& F );
45 
46   //: Form the matrix from its free parameters. (JLM changed to H&Z convention 11/12/2018)
47   void set_from_params( T a, T b, T c, T d, T e );
48 };
49 
50 #endif // vpgl_affine_fundamental_matrix_h_
51