vpgl_fm_compute_2_point.h
Go to the documentation of this file.
1 // This is core/vpgl/algo/vpgl_fm_compute_2_point.h
2 #ifndef vpgl_fm_compute_2_point_h_
3 #define vpgl_fm_compute_2_point_h_
4 //:
5 // \file
6 // \brief A 2 point algorithm for computing the fundamental matrix for translation from point correspondences
7 // \author J. L. Mundy
8 // \date March 21, 2007
9 //
10 // The point correspondences in relation to F are defined by
11 // \verbatim
12 // [0 tz -ty]
13 // pl^t[-tz 0 tx]pr = 0
14 // [ty -tx 0]
15 // \endverbatim
16 // This computation assumes that the cameras differ by only a translation
17 // Normalization of point coordinates is performed if precondition is true
18 // In this case, the computation is modified to account for the normalization
19 // so that F is expressed in the original coordinate system.
20 
22 #include <vgl/vgl_homg_point_2d.h>
23 
25 {
26  public:
27  //: If precondition = true, points are conditioned prior to computation.
28  vpgl_fm_compute_2_point( bool precondition = true )
29  : precondition_(precondition) {}
30 
31  //: Compute from two sets of corresponding points.
32  // Put the resulting matrix into fm, return true if successful.
33  // Points pr are associated with the RHS of the fundamental matrix
34  // while the points pl are associated with the LHS.
35  bool compute( const std::vector< vgl_homg_point_2d<double> >& pr,
36  const std::vector< vgl_homg_point_2d<double> >& pl,
38 
39  protected:
41 };
42 
43 #endif // vpgl_fm_compute_2_point_h_
A class for the fundamental matrix between two projective cameras.
bool compute(const std::vector< vgl_homg_point_2d< double > > &pr, const std::vector< vgl_homg_point_2d< double > > &pl, vpgl_fundamental_matrix< double > &fm)
Compute from two sets of corresponding points.
vpgl_fm_compute_2_point(bool precondition=true)
If precondition = true, points are conditioned prior to computation.