From a7d236c04e0f4bdc09dfc4fc901292178b596984 Mon Sep 17 00:00:00 2001 From: Davis King Date: Thu, 20 Feb 2014 19:40:17 -0500 Subject: [PATCH] Added a guarantee that tracks won't be asked for their feature vector until they are updated at least once with a detection. --- dlib/svm/structural_track_association_trainer.h | 1 + dlib/svm/track_association_function_abstract.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dlib/svm/structural_track_association_trainer.h b/dlib/svm/structural_track_association_trainer.h index 47db2bf03..e5f8daf31 100644 --- a/dlib/svm/structural_track_association_trainer.h +++ b/dlib/svm/structural_track_association_trainer.h @@ -222,6 +222,7 @@ namespace dlib if (samples[i][j].size() > 0) { track_type new_track; + new_track.update_track(samples[i][j][0].first); typename track_type::feature_vector_type feats; new_track.get_similarity_features(samples[i][j][0].first, feats); return feats.size(); diff --git a/dlib/svm/track_association_function_abstract.h b/dlib/svm/track_association_function_abstract.h index dc5da84d8..40d098a46 100644 --- a/dlib/svm/track_association_function_abstract.h +++ b/dlib/svm/track_association_function_abstract.h @@ -58,6 +58,8 @@ namespace dlib feature_vector_type& feats ) const; /*! + requires + - update_track() has been called on this track at least once. ensures - #feats == A feature vector that contains information describing how likely it is that det is a detection from the object corresponding to