00001 // This is oxl/mvl/FDesignMatrix.h 00002 #ifndef FDesignMatrix_h_ 00003 #define FDesignMatrix_h_ 00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE 00005 #pragma interface 00006 #endif 00007 //: 00008 // \file 00009 // \brief Design matrix for linear FMatrix least squares 00010 // 00011 // FDesignMatrix is a subclass of Matrix that, given $n$ pairs of homogeneous 00012 // 2D points, creates the $n \times 9$ design matrix for the linear least squares 00013 // problem $(m_2^\top F m_1)^2 = 0$ where $F$ is the fundamental matrix. 00014 // 00015 // As the design matrix is common to a number of algorithms, this reduces 00016 // code duplication. 00017 // 00018 // \author 00019 // Andrew W. Fitzgibbon, Oxford RRG, 21 Aug 96 00020 // 00021 // \verbatim 00022 // Modifications 00023 // 22 Oct 2002 - Peter Vanroose - added vgl_homg_point_2d interface 00024 // \endverbatim 00025 //----------------------------------------------------------------------------- 00026 00027 #include <vnl/vnl_matrix.h> 00028 #include <vcl_vector.h> 00029 #include <mvl/HomgPoint2D.h> 00030 #include <vgl/vgl_homg_point_2d.h> 00031 00032 class FDesignMatrix : public vnl_matrix<double> 00033 { 00034 typedef vnl_matrix<double> base; 00035 public: 00036 // Constructors/Destructors-------------------------------------------------- 00037 00038 FDesignMatrix(vcl_vector<HomgPoint2D> const& points1, 00039 vcl_vector<HomgPoint2D> const& points2); 00040 00041 FDesignMatrix(vcl_vector<vgl_homg_point_2d<double> > const& points1, 00042 vcl_vector<vgl_homg_point_2d<double> > const& points2); 00043 }; 00044 00045 #endif // FDesignMatrix_h_