[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50744] trunk/blender/extern/libmv/libmv/ tracking/track_region.cc: Fix crash when tracking in planar motion model ( and maybe some other)

Sergey Sharybin sergey.vfx at gmail.com
Wed Sep 19 14:43:40 CEST 2012


Revision: 50744
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50744
Author:   nazgul
Date:     2012-09-19 12:43:39 +0000 (Wed, 19 Sep 2012)
Log Message:
-----------
Fix crash when tracking in planar motion model (and maybe some other)

It was an Abort() caused by check for solver result not equal to USER_ABORT.

In some cases solver returns USER_ABORT due to BoundaryCheckingCallback
detects coordinates does not belong to image.

Somehow this callback wasn't called in previous version of Ceres and
in the same case marker was jumping. Now when the callback is called
it seems we could simply return failure of tracking without aborting
Blender.

Probably this is in fact some issue somewhere else, would double
check with Keir about this.

Modified Paths:
--------------
    trunk/blender/extern/libmv/libmv/tracking/track_region.cc

Modified: trunk/blender/extern/libmv/libmv/tracking/track_region.cc
===================================================================
--- trunk/blender/extern/libmv/libmv/tracking/track_region.cc	2012-09-19 12:43:32 UTC (rev 50743)
+++ trunk/blender/extern/libmv/libmv/tracking/track_region.cc	2012-09-19 12:43:39 UTC (rev 50744)
@@ -1364,7 +1364,12 @@
   // TODO(keir): Update the result statistics.
   // TODO(keir): Add a normalize-cross-correlation variant.
 
-  CHECK_NE(summary.termination_type, ceres::USER_ABORT) << "Libmv bug.";
+  // TODO(sergey): in previous bundled Ceres from Windows branch our callback
+  //               wasn't called, so USER_ABORT was never happen.
+  //               now callback is calling and in some cases it returns SOLVER_ABORT
+  //               not sure if it's bug somewhere or we could just mark tracking
+  //               result as failed without causing general panic
+  // CHECK_NE(summary.termination_type, ceres::USER_ABORT) << "Libmv bug.";
   if (summary.termination_type == ceres::USER_ABORT) {
     result->termination = TrackRegionResult::FELL_OUT_OF_BOUNDS;
     return;




More information about the Bf-blender-cvs mailing list