Skip to main content

SingleObjectTracker

Struct SingleObjectTracker 

Source
pub struct SingleObjectTracker { /* private fields */ }
Expand description

The single-object tracker. Holds at most one track at a time.

Implementations§

Source§

impl SingleObjectTracker

Source

pub fn new(cfg: TrackerConfig) -> Self

A tracker with the model-free interim appearance backend (HistogramAppearance).

Source

pub fn with_appearance_model( cfg: TrackerConfig, appearance: Box<dyn AppearanceModel>, ) -> Self

A tracker with a chosen appearance backend. A learned re-id / siamese embedding implementing AppearanceModel plugs in here with no other change.

Source

pub fn current_id(&self) -> Option<u64>

The id the lock currently holds, if confirmed or coasting.

Source

pub fn state(&self) -> TrackState

The lifecycle state.

Source

pub fn needs_redesignation(&self) -> bool

True while the tracker is asking the operator to re-designate the target because the identity could not be resolved safely (two appearance- ambiguous candidates). Composes with an operator re-acknowledge step: the operator layer should require an explicit re-confirm before trusting the lock again. The flag clears on a clean re-association or an explicit Self::redesignate.

Source

pub fn redesignate(&mut self)

Operator re-designation hook: clear the ambiguity latch (the operator has re-confirmed the target out of band). Does not move the lock; the next frame re-associates from the held state.

Source

pub fn designate(&mut self, detection: &Detection) -> Option<u64>

Operator designation: drop any current lock and seed a fresh track onto a specific detection (the box the operator clicked), instead of the most-confident one, the operator’s pick overrides the confidence floor. Returns the new track id. The next update associates from this seed. Used by the click-to-follow path so the operator picks the target rather than the tracker’s auto-lock.

Source

pub fn update(&mut self, detections: &[Detection]) -> TrackUpdate

Advance one frame on a list of wire detections, motion-only (no appearance descriptors). Each detection is wrapped as a Candidate with no appearance, so association falls back to the motion gate plus the class-continuity guard. Kept for callers / tests that have no descriptor source; the appearance defence is inactive on this path.

Source

pub fn update_with_appearance( &mut self, candidates: &[Candidate], ) -> TrackUpdate

Advance one frame on a list of Candidates carrying appearance descriptors. This is the real path: the caller extracts a descriptor per candidate from the frame pixels, or a synthetic harness supplies one. Association is appearance-first (the most appearance-similar admissible candidate wins; motion + confidence only break an appearance tie), the appearance gate rejects shadowing distractors, and the ambiguity guard refuses to silently pick between two appearance-indistinguishable objects.

Trait Implementations§

Source§

impl Debug for SingleObjectTracker

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more