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: Gerhard Reitmayr
Subject: [Toon-members] tag/src five_point.cpp
Date: Thu, 30 Apr 2009 17:52:21 +0000

CVSROOT:        /cvsroot/toon
Module name:    tag
Changes by:     Gerhard Reitmayr <gerhard>      09/04/30 17:52:21

Modified files:
        src            : five_point.cpp 

Log message:
        use SO3 from vectors constructor

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

Patches:
Index: five_point.cpp
===================================================================
RCS file: /cvsroot/toon/tag/src/five_point.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- five_point.cpp      28 Apr 2009 14:27:43 -0000      1.14
+++ five_point.cpp      30 Apr 2009 17:52:20 -0000      1.15
@@ -1,7 +1,6 @@
 #include <tag/five_point.h>
 #include <tag/stdpp.h>
 #include <tag/helpers.h>
-#include <tag/absorient.h>
 
 #include <TooN/helpers.h>
 #include <TooN/gauss_jordan.h>
@@ -301,12 +300,7 @@
        //   This allows as to have a minimal parameterization as 
        //   Rn * G_0 * [1 0 0]' = 0
        SO3<> Rt = initial.get_rotation();
-       SO3<> Rn; // Identity 
-       Vector<3> normal = X ^ unit(initial.get_translation());
-       // if the initial translation differs from X enough, then 
-       // compute a rotation in Rn that takes X -> initial translation
-       if(norm_sq(normal) > 1e-15)
-               Rn = computeOrientation(X, initial.get_translation(), normal, 
normal);
+       SO3<> Rn(X, initial.get_translation()); // rotation from X -> initial 
translation or Identity 
 
        int count = 0;
        WLS<5> wls;
@@ -329,7 +323,7 @@
                Rt = SO3<>::exp(wls.get_mu().slice<0,3>()) * Rt;
                Rn = Rn * SO3<>::exp(makeVector(0, wls.get_mu()[3], 
wls.get_mu()[4]));
                ++count;
-       } while(norm_sq(wls.get_mu()) > 1e-10 && count < 10);
+       } while(norm_sq(wls.get_mu()) > 1e-15 && count < 10);
        return SE3<>(Rt, Rn * X);
 }
 




reply via email to

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