[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56415] branches/soc-2011-tomato/extern/ libmv/libmv/simple_pipeline/bundle.cc: Add check for points behind camera in euclidan BA cost functor
Sergey Sharybin
sergey.vfx at gmail.com
Tue Apr 30 15:10:14 CEST 2013
Revision: 56415
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56415
Author: nazgul
Date: 2013-04-30 13:10:14 +0000 (Tue, 30 Apr 2013)
Log Message:
-----------
Add check for points behind camera in euclidan BA cost functor
In cases keyframes are no so good, algebraic two frames construction
could produce result, for which more aggressive Ceres-based BA code
will fall to a solution for which points goes behind the camera,
which is not so nice.
Seems in newer Ceres returning false from cost functor wouldn't
abort solution, but will restrict solver from moving points behind
the camera.
Works fine in own tests, but requires more tests.
Modified Paths:
--------------
branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/bundle.cc
Modified: branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/bundle.cc
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/bundle.cc 2013-04-30 12:20:31 UTC (rev 56414)
+++ branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/bundle.cc 2013-04-30 13:10:14 UTC (rev 56415)
@@ -83,6 +83,10 @@
x[1] += R_t[4];
x[2] += R_t[5];
+ // Prevent points from going 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