1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
| #ifndef TRACK_H
| #define TRACK_H
|
| #include "../encoder_tools/dataType.h"
|
| #include "kalmfilter.h"
| #include "../encoder_tools/model.h"
| #include "time.h"
| #include "stdio.h"
| #include "stdlib.h"
| #include <iostream>
| #include<sys/time.h>
|
| class Track
| {
|
| enum TrackState {Tentative = 1, Confirmed, Deleted};
|
| public:
| Track();
| ~Track();
| Track(KAL_MEAN& mean, KAL_COVA& covariance, int track_id,
| int n_init, int max_age, const FEATURE& feature);
| void predit(KalmFilter *kf);
| void update(KalmFilter * const kf, const DETECTION_ROW &detection);
| bool mark_missed();
| bool is_confirmed();
| bool is_deleted();
| bool is_tentative();
| DETECTBOX to_tlwh();
| int time_since_update;
| int track_id;
| FEATURESS features;
| KAL_MEAN mean;
| KAL_COVA covariance;
|
| int hits;
| int age;
| int _n_init;
| int _max_age;
| TrackState state;
|
| private:
| struct timeval start,stop,diff;
| double sum_timer;
| bool init_t;
| void init_track_time();
| void featuresAppendOne(const FEATURE& f);
| int time_substract(struct timeval *result, struct timeval *begin,struct timeval *end);
| };
|
| #endif // TRACK_H
|
|