core
vpgl
algo
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
21
#include <
vpgl/vpgl_fundamental_matrix.h
>
22
#include <
vgl/vgl_homg_point_2d.h
>
23
24
class
vpgl_fm_compute_2_point
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,
37
vpgl_fundamental_matrix<double>
& fm );
38
39
protected
:
40
bool
precondition_
;
41
};
42
43
#endif // vpgl_fm_compute_2_point_h_
vpgl_fundamental_matrix.h
A class for the fundamental matrix between two projective cameras.
vpgl_fm_compute_2_point
Definition:
vpgl_fm_compute_2_point.h:24
vpgl_fm_compute_2_point::precondition_
bool precondition_
Definition:
vpgl_fm_compute_2_point.h:40
vgl_homg_point_2d.h
vpgl_fundamental_matrix
Definition:
vpgl_fundamental_matrix.h:42
vpgl_fm_compute_2_point::compute
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.
Definition:
vpgl_fm_compute_2_point.cxx:22
vpgl_fm_compute_2_point::vpgl_fm_compute_2_point
vpgl_fm_compute_2_point(bool precondition=true)
If precondition = true, points are conditioned prior to computation.
Definition:
vpgl_fm_compute_2_point.h:28
vgl_homg_point_2d
Generated by
1.8.15