OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C++ API referencev12.0

optris::sdk::view::Track

Internal track state managed by BlobTracker.

Public attributes

id

uint32_t id = 0

The id copied into TrackedDetection::id. See that field.

filter

KalmanFilter6 filter

Position, size and velocity estimate for this track.

Holds the noise values it was constructed with, which is why BlobTracker::SetConfig() cannot retune a track already running.

state

TrackState state = TrackState::Tentative

Lifecycle state, copied out as TrackedDetection::state.

age

uint32_t age = 0

Update() calls since creation, copied out as TrackedDetection::age.

hits

uint32_t hits = 0

Matched frames, copied out as TrackedDetection::hits.

time_since_update

uint32_t time_since_update = 0

Update() calls since the last match; 0 on a matched frame.

The whole of the lifecycle mechanism sits on this counter: anything above 0 marks the track Lost, and anything above TrackerConfig::max_age deletes it. It has no public counterpart on TrackedDetection, so a caller who wants "how stale is this box" has to keep its own count of the frames since a track last changed.

last_temp

float last_temp = 0.0F

Temperature of the last matched detection, in Celsius.

Kept for the temperature term of the next frame's match cost, and republished as TrackedDetection::detection.temp -- the box a track reports is filtered but the temperature on it is the last raw measurement.

history

std::vector< TrackHistoryPoint > history

The motion trail, oldest first. See TrackedDetection::history.

max_history_length

uint32_t max_history_length = 60

Cap on history, per track.

Nothing in BlobTracker or TrackerConfig sets this, so 60 is the effective value everywhere; it is per track only because the trail lives here. Must be at least 1 -- the eviction loop runs while size() >= max_history_length, which at 0 is always true and walks off the front of an empty vector. Trimming is an erase from the front, so it is linear in the trail length on every matched frame; a much larger value is not free.

latest_contour

std::vector< ContourPoint > latest_contour

Outline of the last matched detection, copied whole.

Replaced on every matched frame and left alone otherwise, so it goes stale while a track coasts. Surfaces as TrackedDetection::contour.

Public functions

Track

Track(uint32_t id, const Detection &det, float process_noise, float measurement_noise)

Open a track on a detection that matched nothing existing.

Seeds the filter with the detection's box, records its temperature and outline, and lays down the first trail point -- which is therefore the raw detection, the only unfiltered point in history. The track starts Tentative with hits at 0, so it needs TrackerConfig::min_hits further matches to be confirmed.

Parameters

Name Description
id Identity to publish; BlobTracker allocates these.
det The detection that opened the track.
process_noise Passed to the filter and frozen there.
measurement_noise Passed to the filter and frozen there.

AddHistoryPoint

void AddHistoryPoint(float x, float y)

Append a position to the motion trail, evicting the oldest entry.