Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/extern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-09-19 16:43:39 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-09-19 16:43:39 +0400
commit16a698ad4abdcf77b32ec9c797cdb462eec051c4 (patch)
tree978e7c169e5839008d0648e948b3ba689e9beca4 /extern
parent5a3e474cc6c1d8dd290c0a1077de2e1812de7cea (diff)
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.
Diffstat (limited to 'extern')
-rw-r--r--extern/libmv/libmv/tracking/track_region.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/extern/libmv/libmv/tracking/track_region.cc b/extern/libmv/libmv/tracking/track_region.cc
index aef448eb2b6..8973a8d0148 100644
--- a/extern/libmv/libmv/tracking/track_region.cc
+++ b/extern/libmv/libmv/tracking/track_region.cc
@@ -1364,7 +1364,12 @@ void TemplatedTrackRegion(const FloatImage &image1,
// 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;