33 #include "../FMatrix.hh"
34 #include "../FMatrixEstimation.hh"
35 #include "../PMatrixEstimation.hh"
36 #include "../PMatrixLinear.hh"
37 #include "../Triangulation.hh"
38 #include "../../Base/Math/Random.hh"
50 std::vector<FMatrix> vecF;
54 for (
unsigned int i=0; i<1; i++) {
56 for (
unsigned int x=0; x<4; x++)
57 for (
unsigned int y=0; y<3; y++) {
65 vector<HomgPoint3D> points;
66 vector<HomgPoint2D> p1,p2;
67 cout <<
"Randomized correspondences are "<<endl;
68 for (
unsigned int p=0; p<7; p++) {
75 p1.push_back(P1 * points[p]); p1[p].Homogenize();
76 cout <<
"{ "<<p1[p]<<
" ";
77 p2.push_back(P2 * points[p]); p2[p].Homogenize();
78 cout << p2[p]<<
" } "<<endl;
80 bool NormalizeHartley =
true;
84 FEstimator.SevenPoint(vecF,p1,p2);
115 cout <<
"Computing epipoles "<<endl;
117 for (
unsigned int s=0; s<vecF.size(); s++) {
119 vecF[s].GetEpipolesHomogenized(e1, e2);
120 cout <<
"True epipoles are "<<theoe1<<
" and "<<theoe2<<endl;
121 cout <<
"est. epipoles are "<<e1<<
" and "<<e2<<endl;
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.
double GetUniformDistributed(const double min, const double max)
on succesive calls return uniform distributed random variable between min and max ...
class representing a Fundamental matrix
void InvalidateDecomposition()
to re-Decompose_() after filling with data use this.
functions for estimating a fundamental matrix (FMatrix) given a set of 2d-2d correspondences (no outl...
void ComputeFromPMatrices(BIAS::PMatrix &P1, BIAS::PMatrix &P2)
computes an F matrix from two cameras (defined by arbitrary P matrices, not only metric ones) ...
void GetEpipolesHomogenized(HomgPoint2D &E1, HomgPoint2D &E2) const
same as above, additionally homogenizes epipoles
describes a projective 3D -> 2D mapping in homogenous coordinates
class for producing random numbers from different distributions
class BIASGeometryBase_EXPORT HomgPoint3D