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.
This commit is contained in:
Keir Mierle 2012-09-19 22:01:42 +00:00
parent a09b5c1f20
commit 8a46b8454e

@ -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<typename T>
struct JetOps {
@ -113,7 +117,8 @@ struct Chain<FunctionType, kNumArgs, Jet<T, N> > {
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;