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

they are updated at least once with a detection.
This commit is contained in:
Davis King 2014-02-20 19:40:17 -05:00
parent 3c6cdf50c4
commit a7d236c04e
2 changed files with 3 additions and 0 deletions

View File

@ -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();

View File

@ -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