00001 #ifndef _HMatrix2DComputeLinear_h 00002 #define _HMatrix2DComputeLinear_h 00003 //: 00004 // \file 00005 // 00006 // HMatrix2DComputeLinear contains a linear method to calculate 00007 // the plane projectivity which relates four 2D point correspondences. 00008 // The returned $H$ is such that 00009 // $H ~ [p_1 ~ p_2 ~ p_3 ~ p_4 ] \sim [p'_1 ~ p'_2 ~ p'_3 ~ p'_4 ]$ 00010 // where the $p_i$ are the homogeneous points in the first view, and the 00011 // $p'_i$ their images. 00012 // 00013 // \verbatim 00014 // Modifications: 00015 // 200598 FSM added checks for degenerate or coincident points. 00016 // \endverbatim 00017 00018 #include "HMatrix2DCompute.h" 00019 00020 class HMatrix2DComputeLinear : public HMatrix2DCompute 00021 { 00022 bool allow_ideal_points_; 00023 00024 protected: 00025 bool compute_p(PointArray const&, 00026 PointArray const&, 00027 HMatrix2D* H); 00028 00029 public: 00030 HMatrix2DComputeLinear(bool allow_ideal_points = false); 00031 int minimum_number_of_correspondences() const { return 4; } 00032 }; 00033 00034 #endif // _HMatrix2DComputeLinear_h