Commit a7d236c0 authored by Davis King's avatar Davis King

Added a guarantee that tracks won't be asked for their feature vector until

they are updated at least once with a detection.
parent 3c6cdf50
...@@ -222,6 +222,7 @@ namespace dlib ...@@ -222,6 +222,7 @@ namespace dlib
if (samples[i][j].size() > 0) if (samples[i][j].size() > 0)
{ {
track_type new_track; track_type new_track;
new_track.update_track(samples[i][j][0].first);
typename track_type::feature_vector_type feats; typename track_type::feature_vector_type feats;
new_track.get_similarity_features(samples[i][j][0].first, feats); new_track.get_similarity_features(samples[i][j][0].first, feats);
return feats.size(); return feats.size();
......
...@@ -58,6 +58,8 @@ namespace dlib ...@@ -58,6 +58,8 @@ namespace dlib
feature_vector_type& feats feature_vector_type& feats
) const; ) const;
/*! /*!
requires
- update_track() has been called on this track at least once.
ensures ensures
- #feats == A feature vector that contains information describing how - #feats == A feature vector that contains information describing how
likely it is that det is a detection from the object corresponding to likely it is that det is a detection from the object corresponding to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment