From 8a46b8454ed1788c1ac17d36187e79c8a4cbb10d Mon Sep 17 00:00:00 2001 From: Keir Mierle Date: Wed, 19 Sep 2012 22:01:42 +0000 Subject: [PATCH] Cleanup for when trackers fall out of the search window. Sergey originally left a TODO() here, but his fix is the correct one. I removed the TODO and fixed some comment issues. --- extern/libmv/libmv/tracking/track_region.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/extern/libmv/libmv/tracking/track_region.cc b/extern/libmv/libmv/tracking/track_region.cc index 8973a8d0148..89f18afd556 100644 --- a/extern/libmv/libmv/tracking/track_region.cc +++ b/extern/libmv/libmv/tracking/track_region.cc @@ -18,7 +18,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. // -// Author: mierle@google.com (Keir Mierle) +// Author: mierle@gmail.com (Keir Mierle) // // TODO(keir): While this tracking code works rather well, it has some // outragous inefficiencies. There is probably a 5-10x speedup to be had if a @@ -41,7 +41,11 @@ #include "libmv/multiview/homography.h" #include "libmv/numeric/numeric.h" +// Expand the Jet functionality of Ceres to allow mixed numeric/autodiff. +// +// TODO(keir): Push this (or something similar) into upstream Ceres. namespace ceres { + // A jet traits class to make it easier to work with mixed auto / numeric diff. template struct JetOps { @@ -113,7 +117,8 @@ struct Chain > { return jet_f; } }; -} + +} // namespace ceres namespace libmv { @@ -1364,12 +1369,6 @@ void TemplatedTrackRegion(const FloatImage &image1, // TODO(keir): Update the result statistics. // TODO(keir): Add a normalize-cross-correlation variant. - // 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;