forked from Kitware/kwant
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscore_core.h
More file actions
67 lines (54 loc) · 2.35 KB
/
score_core.h
File metadata and controls
67 lines (54 loc) · 2.35 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*ckwg +5
* Copyright 2010-2016 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef INCL_SCORE_CORE_H
#define INCL_SCORE_CORE_H
#include <vital/vital_config.h>
#include <scoring_framework/score_core_export.h>
#include <utility>
#include <vgl/vgl_box_2d.h>
#include <track_oracle/core/track_oracle_core.h>
#include <track_oracle/core/track_base.h>
#include <track_oracle/core/track_field.h>
#include <track_oracle/data_terms/data_terms.h>
// The central scoring framework assumption is: Everything you need to
// know in order to score two sets of tracks can be localized to two
// locations: the track itself and the phase-specific contexts. For example:
// timestamps and bounding boxes are in the track. Normalization constants
// and AOI filters and so forth are in the contexts.
//
// This file defines the track-specific knowledge. As long as your track
// defines these three fields, we can score it.
//
namespace kwiver {
namespace kwant {
namespace kwto = ::kwiver::track_oracle;
typedef std::pair< kwto::track_handle_type, kwto::track_handle_type > track2track_type;
typedef unsigned long long ts_type;
typedef std::pair<ts_type,ts_type> ts_frame_range;
// state of the frame-has-been-matched flag: outside aoi, in_aoi_unmatched, in_aoi_matched
// order so that IN_AOI_UNMATCHED is zero (default).
enum FRAME_MATCH_STATE { IN_AOI_UNMATCHED = 0, OUTSIDE_AOI, IN_AOI_MATCHED };
struct SCORE_CORE_EXPORT scorable_track_type: public kwto::track_base< scorable_track_type >
{
kwto::track_field< kwto::dt::tracking::external_id > external_id;
kwto::track_field< kwto::dt::tracking::bounding_box > bounding_box;
kwto::track_field< kwto::dt::tracking::frame_number > timestamp_frame;
kwto::track_field< kwto::dt::tracking::timestamp_usecs > timestamp_usecs;
kwto::track_field< int >& frame_has_been_matched;
kwto::track_field< unsigned >& frames_in_aoi;
scorable_track_type()
: frame_has_been_matched( Frame.add_field< int >( "frame_has_been_matched" )),
frames_in_aoi(Track.add_field< unsigned >("frames_in_aoi"))
{
Track.add_field( external_id );
Frame.add_field( bounding_box );
Frame.add_field( timestamp_frame );
Frame.add_field( timestamp_usecs );
}
};
} // ...kwiver
} // ...kwant
#endif