Go to the documentation of this file.00001 #ifndef vgl_h_matrix_2d_compute_linear_h_
00002 #define vgl_h_matrix_2d_compute_linear_h_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <vgl/algo/vgl_h_matrix_2d_compute.h>
00023
00024 class vgl_h_matrix_2d_compute_linear : public vgl_h_matrix_2d_compute
00025 {
00026 bool allow_ideal_points_;
00027 protected:
00028
00029 virtual
00030 bool compute_p(vcl_vector<vgl_homg_point_2d<double> > const& points1,
00031 vcl_vector<vgl_homg_point_2d<double> > const& points2,
00032 vgl_h_matrix_2d<double>& H);
00033
00034
00035 virtual
00036 bool compute_l(vcl_vector<vgl_homg_line_2d<double> > const& lines1,
00037 vcl_vector<vgl_homg_line_2d<double> > const& lines2,
00038 vgl_h_matrix_2d<double>& H);
00039
00040
00041 virtual
00042 bool compute_l(vcl_vector<vgl_homg_line_2d<double> > const& lines1,
00043 vcl_vector<vgl_homg_line_2d<double> > const& lines2,
00044 vcl_vector<double> const& weights,
00045 vgl_h_matrix_2d<double>& H);
00046
00047
00048 virtual
00049 bool compute_pl(vcl_vector<vgl_homg_point_2d<double> > const& points1,
00050 vcl_vector<vgl_homg_point_2d<double> > const& points2,
00051 vcl_vector<vgl_homg_line_2d<double> > const& lines1,
00052 vcl_vector<vgl_homg_line_2d<double> > const& lines2,
00053 vgl_h_matrix_2d<double>& H);
00054
00055
00056 bool solve_linear_problem(int equ_count,
00057 vcl_vector<vgl_homg_point_2d<double> > const& p1,
00058 vcl_vector<vgl_homg_point_2d<double> > const& p2,
00059 vgl_h_matrix_2d<double>& H);
00060
00061
00062 bool
00063 solve_weighted_least_squares(vcl_vector<vgl_homg_line_2d<double> > const& l1,
00064 vcl_vector<vgl_homg_line_2d<double> > const& l2,
00065 vcl_vector<double> const& w,
00066 vgl_h_matrix_2d<double>& H);
00067
00068 public:
00069 vgl_h_matrix_2d_compute_linear(bool allow_ideal_points = false);
00070 int minimum_number_of_correspondences() const { return 4; }
00071 };
00072
00073 #endif // vgl_h_matrix_2d_compute_linear_h_