[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56319] trunk/blender/extern/libmv/libmv/ simple_pipeline/bundle.cc: Fix for BA possible move bundles behind the camera

Sergey Sharybin sergey.vfx at gmail.com
Fri Apr 26 17:43:21 CEST 2013


Revision: 56319
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56319
Author:   nazgul
Date:     2013-04-26 15:43:20 +0000 (Fri, 26 Apr 2013)
Log Message:
-----------
Fix for BA possible move bundles behind the camera

In some cases (was noticed on not good enough keyframe
pair) bundle adjuster could have moved bundles behind
the camera.

This could indeed lead to lower rewprojection error but
this is just pointless thing to do.

Now added check to residuals functor which will return
false to Ceres in cases point moved behind the camera
to prevent such issues.

Modified Paths:
--------------
    trunk/blender/extern/libmv/libmv/simple_pipeline/bundle.cc

Modified: trunk/blender/extern/libmv/libmv/simple_pipeline/bundle.cc
===================================================================
--- trunk/blender/extern/libmv/libmv/simple_pipeline/bundle.cc	2013-04-26 15:05:19 UTC (rev 56318)
+++ trunk/blender/extern/libmv/libmv/simple_pipeline/bundle.cc	2013-04-26 15:43:20 UTC (rev 56319)
@@ -83,6 +83,10 @@
     x[1] += R_t[4];
     x[2] += R_t[5];
 
+    // Prevent bundles from being moved behind the camera.
+    if (x[2] < T(0))
+      return false;
+
     // Compute normalized coordinates: x /= x[2].
     T xn = x[0] / x[2];
     T yn = x[1] / x[2];




More information about the Bf-blender-cvs mailing list