optris::sdk::view::TrackedDetection
Public snapshot of one track returned by BlobTracker::Update.
Public attributes
id
uint32_t id = 0
Identity of the track, stable for as long as it lives.
Handed out from 1 and never reused by the tracker that issued it, except after Reset(), which starts over at 1. A track is dropped once it has gone TrackerConfig::max_age frames without a match, and a blob that comes back after that is a new object with a new id -- so an occlusion longer than max_age renumbers whatever emerges from behind it, and max_age is really the answer to "how
long may this disappear and still be the same thing". Ids from two BlobTracker instances are unrelated.
detection
Detection detection
Last matched detection.
predicted
Detection predicted
Kalman-predicted position this frame.
state
TrackState state = TrackState::Tentative
Where the track sits in its lifecycle this frame.
Tentative until it has been matched TrackerConfig::min_hits times, then Confirmed. Any track that went unmatched this frame is marked Lost, a still-Tentative one included, and a Lost track that is matched again jumps straight to Confirmed whether or not it ever reached min_hits -- so a blob that flickers can be Confirmed after two frames. Draw Confirmed; treat Tentative as a maybe, and Lost as coasting on prediction alone.
age
uint32_t age = 0
How many Update() calls the track has existed for.
Counts calls, not seconds and not matches, and keeps rising while a track coasts unmatched. Convert with your own frame interval, remembering that a caller who runs detection on every fourth frame is counting those and not camera frames. age minus hits is how often the track was missed.
hits
uint32_t hits = 0
How many Update() calls matched a detection to this track.
Monotonic -- a miss never decrements it -- so it is a lifetime total rather than a measure of current quality, and what TrackerConfig::min_hits is compared against for promotion. hits against age is the rough reliability figure.
velocity_x
float velocity_x = 0.0F
Horizontal speed, in frame widths per Update() call.
Per call and not per second: multiply by the rate at which you actually call Update(). See KalmanFilter6::GetVelocityX for how it is derived and why it under-reads a steady mover by roughly a fifth at the default noise settings. It is 0 on a track's first frame and holds its last value while a track coasts unmatched.
velocity_y
float velocity_y = 0.0F
Vertical speed, in frame heights per Update() call. Same construction as velocity_x.
history
std::vector< TrackHistoryPoint > history
The motion trail, oldest point first.
A fresh copy of the track's trail on every Update(), capped at 60 points, oldest dropped once full. A point is appended only on a frame where the track was matched, so the trail is a history of sightings and its points are not evenly spaced in time. Ready to draw as a polyline, with TrackHistoryPoint::alpha as the opacity.
contour
std::vector< ContourPoint > contour
Outline of the last detection matched to this track.
Whatever the caller put in Detection::contour, forwarded unchanged -- so it is empty unless detections carried outlines. It is neither predicted nor moved with the filter: while a track coasts unmatched the outline stays where it last was and drifts away from the box in detection.