toon-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Toon-members] tag/src five_point.cpp


From: Edward Rosten
Subject: [Toon-members] tag/src five_point.cpp
Date: Thu, 23 Apr 2009 09:22:49 +0000

CVSROOT:        /cvsroot/toon
Module name:    tag
Changes by:     Edward Rosten <edrosten>        09/04/23 09:22:49

Modified files:
        src            : five_point.cpp 

Log message:
        Minor clean up + comments.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/tag/src/five_point.cpp?cvsroot=toon&r1=1.5&r2=1.6

Patches:
Index: five_point.cpp
===================================================================
RCS file: /cvsroot/toon/tag/src/five_point.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- five_point.cpp      23 Apr 2009 09:02:42 -0000      1.5
+++ five_point.cpp      23 Apr 2009 09:22:49 -0000      1.6
@@ -105,23 +105,6 @@
        return val;
 }
 
-template<int N> Vector<N-1> poly_diff(const Vector<N> & v)
-{
-       Vector<N-1> ret;
-       for(int i = 1; i < N; ++i){
-               ret[i-1] = v[i]*i;
-       }
-       return ret;
-}
-
-template<int N> pair<Vector<2>, Vector<N-1> > poly_div(const Vector<N> & num, 
const Vector<N-1> & denom)
-{
-       Vector<2> f;
-       Vector<N-1> r;
-       
-       
-}
-
 Matrix<3, 3, double, Reference::RowMajor> as_matrix(Vector<9>& v)
 {
        return Matrix<3, 3, double, Reference::RowMajor>(&v[0]);
@@ -132,6 +115,7 @@
        //Equations numbers are given with reference to:
        // "An efficient Solution to the Five-Point Relative Pose Problem",
        // D. Nister, IEEE Tran. on Pat. Anal. and Mach. Intel.,  26(6) 2004.
+       // Franctional equations refer to equations between numbered ones.
 
        //Given a pair of corresponding points, p, q, the
        //epipolar constraint gives:
@@ -150,7 +134,7 @@
        //
        // Q E~ = [0 0 0 0 0]'
        //
-       // E~ is in the null space of Q, and so the real E# consists of a
+       // E~ is in the null space of Q, and so the real E consists of a
        // linear sum of the remaining 4 null space vectors.
        // See Eqn 10.
 
@@ -174,8 +158,19 @@
 
 
        //Columns are:
+       //                                            |    poly in x      poly 
in y        poly in 1
+       //     LEFT HAND SIDE                         |  ______________   
_____________   _________________
+       //                                            |  '            '   '     
      '   '               '
+       // x^3 y^3 x^2y xy^2 x^2z x^2 y^2z y^2 xyz xy |  z^2x   zx   x    z^2y  
 zy   y   z^3   z^2   z   1 
+
        gauss_jordan(R);
 
+       // The left side is now the Identity matrix matching Eqn 10 1/2. 
+       //
+       // Due to the careful ordering of the coefficients, performing the
+       // following subtractions (<k>, <l>, <m>) makes all parts on the left 
hand
+       // side become zero, leaving only the right hand side (polynomials in 
x, y
+       // and 1).
 
        //Build the B matrix (Eqn 13 1/2)
        //Polynomials of degree N are stored in a Vector<N+1> with Vector[0] as 
the coefficient of 1.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]