OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
point_tracker.hpp File Reference

Detailed Description

Generic multi-object point tracker: turns per-frame sets of bare detections (positions with an optional confidence) into stable identified tracks over time. This is the association + filtering + lifecycle layer between a detector (blobs, keypoints, TUIO/OSC points...) and whatever maps object identity to sound or visuals.

Ingredients, and where they come from:

  • per-track constant-velocity Kalman over real elapsed time (tracking.hpp),
  • two-stage association by detection confidence (ByteTrack: low-confidence detections may sustain an existing track but never start one),
  • OC-SORT touches: velocity-direction consistency in the cost, velocity re-seeding after a gap, and observation-centric re-update along a virtual trajectory when a lost track is revived (kills the post-occlusion lurch),
  • M-of-N + minimum-time confirmation, so confirmation latency is stable in milliseconds across frame rates instead of being a frame count,
  • two-tier lifecycle: provisional tracks exist (and can be emitted, flagged) from the very first detection - waiting for confirmation costs ~100 ms of onset latency, an order of magnitude over the ~10 ms budget of musical control - while confirmed tracks are the stable set for continuous mappings,
  • persistent ids (monotonic, never reused) plus dense reusable slots with a quarantine hold, for mapping to a fixed bank of voices/parameters,
  • per-track One-Euro output smoothing (filters.hpp), owned per identity so two crossing objects never bleed into each other's history.

All time is real seconds passed in by the caller; nothing assumes a fixed frame rate. Coordinates are whatever space the caller uses consistently; every threshold with a unit (max_speed, meas_std...) is in that same space.

The hot path does not allocate once the scratch buffers are warm, except when a new track is born.

Go to the source code of this file.

Classes

struct  ossia::track_events
 Lifecycle notifications of one step. Ids, not indices: by the time an exit is reported the track is no longer in tracks(). More...
 

Namespaces

namespace  ossia
 

Enumerations

enum class  ossia::track_state : std::uint8_t {
  ossia::provisional , ossia::confirmed , ossia::coasting , ossia::revived ,
  ossia::lost , ossia::expired
}
 
enum class  ossia::track_motion_gate : std::uint8_t { ossia::off , ossia::max_speed , ossia::mahalanobis }
 
enum class  ossia::track_slot_allocation : std::uint8_t { ossia::lowest_free , ossia::round_robin , ossia::nearest_vacated }
 
enum class  ossia::track_slot_steal : std::uint8_t { ossia::never , ossia::stalest , ossia::lowest_confidence }