pub struct Tracker { /* private fields */ }Expand description
Follows blobs across frames, keeping their identities.
Implementations§
Source§impl Tracker
impl Tracker
pub fn new(config: TrackerConfig) -> Self
Sourcepub fn tracks(&self) -> &[Track]
pub fn tracks(&self) -> &[Track]
Tracks currently alive, including any not matched in the most recent frame.
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Forgets every track. Ids continue from where they left off, so a new track can never be confused with an old one in a log.
Sourcepub fn update(&mut self, frame: &EventFrame) -> Result<&[Track], ClusterError>
pub fn update(&mut self, frame: &EventFrame) -> Result<&[Track], ClusterError>
Segments frame, matches the blobs to existing tracks, and returns the live tracks.
Auto Trait Implementations§
impl Freeze for Tracker
impl RefUnwindSafe for Tracker
impl Send for Tracker
impl Sync for Tracker
impl Unpin for Tracker
impl UnsafeUnpin for Tracker
impl UnwindSafe for Tracker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more