vgl_h_matrix_2d_compute_rigid_body.h
Go to the documentation of this file.
1 #ifndef vgl_h_matrix_2d_compute_rigid_body_h_
2 #define vgl_h_matrix_2d_compute_rigid_body_h_
3 //:
4 // \file
5 // \brief contains class vgl_h_matrix_2d_compute_rigid_body
6 // \author Joseph Mundy
7 // \date August 4, 2007
8 // vgl_h_matrix_2d_compute_rigid_body computes the rigid body transformation
9 // between points or lines
10 // \verbatim
11 // Modifications
12 // none
13 // \endverbatim
14 
16 
18 {
19  protected:
20  //: compute from matched points
21 
22  bool compute_p(std::vector<vgl_homg_point_2d<double> > const& points1,
23  std::vector<vgl_homg_point_2d<double> > const& points2,
24  vgl_h_matrix_2d<double>& H) override;
25 
26  //:compute from matched lines
27 
28  bool compute_l(std::vector<vgl_homg_line_2d<double> > const& lines1,
29  std::vector<vgl_homg_line_2d<double> > const& lines2,
30  vgl_h_matrix_2d<double>& H) override;
31 
32  //:compute from matched lines with weight vector (not implemented)
33 
34  bool compute_l(std::vector<vgl_homg_line_2d<double> > const& lines1,
35  std::vector<vgl_homg_line_2d<double> > const& lines2,
36  std::vector<double> const& weights,
37  vgl_h_matrix_2d<double>& H) override;
38 
39  //:compute from matched points and lines
40 
41  bool compute_pl(std::vector<vgl_homg_point_2d<double> > const& points1,
42  std::vector<vgl_homg_point_2d<double> > const& points2,
43  std::vector<vgl_homg_line_2d<double> > const& lines1,
44  std::vector<vgl_homg_line_2d<double> > const& lines2,
45  vgl_h_matrix_2d<double>& H) override;
46  //:Assumes all corresponding points have equal weight
47  bool solve_rigid_body_problem(int equ_count,
48  std::vector<vgl_homg_point_2d<double> >const& p1,
49  std::vector<vgl_homg_point_2d<double> >const& p2,
51 
52 
53  public:
55  int minimum_number_of_correspondences() const override { return 2; }
56 };
57 
58 #endif // vgl_h_matrix_2d_compute_rigid_body_h_
vgl_h_matrix_2d_compute_rigid_body()
Construct a vgl_h_matrix_2d_compute_rigid_body object.
Represents a homogeneous 2D line.
Definition: vgl_fwd.h:14
bool compute_pl(std::vector< vgl_homg_point_2d< double > > const &points1, std::vector< vgl_homg_point_2d< double > > const &points2, std::vector< vgl_homg_line_2d< double > > const &lines1, std::vector< vgl_homg_line_2d< double > > const &lines2, vgl_h_matrix_2d< double > &H) override
compute from matched points and lines.
bool compute_l(std::vector< vgl_homg_line_2d< double > > const &lines1, std::vector< vgl_homg_line_2d< double > > const &lines2, vgl_h_matrix_2d< double > &H) override
compute from matched lines.
bool compute_p(std::vector< vgl_homg_point_2d< double > > const &points1, std::vector< vgl_homg_point_2d< double > > const &points2, vgl_h_matrix_2d< double > &H) override
compute from matched points.
contains class vgl_h_matrix_2d_compute
Represents a homogeneous 2D point.
Definition: vgl_fwd.h:8
bool solve_rigid_body_problem(int equ_count, std::vector< vgl_homg_point_2d< double > >const &p1, std::vector< vgl_homg_point_2d< double > >const &p2, vgl_h_matrix_2d< double > &H)
Assumes all corresponding points have equal weight.