toon-members
[Top][All Lists]
Advanced

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

[Toon-members] tag/tag fourpointpose.h


From: Gerhard Reitmayr
Subject: [Toon-members] tag/tag fourpointpose.h
Date: Mon, 27 Aug 2007 11:30:28 +0000

CVSROOT:        /cvsroot/toon
Module name:    tag
Changes by:     Gerhard Reitmayr <gerhard>      07/08/27 11:30:28

Modified files:
        tag            : fourpointpose.h 

Log message:
        refactored

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/tag/tag/fourpointpose.h?cvsroot=toon&r1=1.6&r2=1.7

Patches:
Index: fourpointpose.h
===================================================================
RCS file: /cvsroot/toon/tag/tag/fourpointpose.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- fourpointpose.h     23 Jul 2007 17:51:51 -0000      1.6
+++ fourpointpose.h     27 Aug 2007 11:30:28 -0000      1.7
@@ -81,10 +81,10 @@
     }
 
     template<class Obs, class Tol> inline bool isInlier( const Obs& obs, const 
Tol& tolerance ) const {
-        return getSqError(obs) < tolerance;
+        return score(obs) < tolerance;
     }
 
-    template<class Obs> inline double getSqError(const Obs & obs) const {
+    template<class Obs> inline double score(const Obs & obs) const {
         if(valid){
             TooN::Vector<3> pos = T * obs.position;
             TooN::Vector<2> diff = project(pos) - obs.pixel / ImagePlaneZ;
@@ -94,17 +94,9 @@
         return 100;
     }
 
-    template <class Obs> inline double score(const Obs & obs) const {
-        if(valid){
-            TooN::Vector<3> pos = T * obs.position;
-            TooN::Vector<2> diff = project(pos) - obs.pixel / ImagePlaneZ;
-            double disp = diff*diff;
-            return disp;
-        }
-        return 100;
+    template<class Obs> inline double getSqError(const Obs & obs) const {
+        return score(obs);
     }
-
-
 };
 
 } // namespace tag




reply via email to

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