pub struct KalmanFilter { /* private fields */ }Expand description
A 2-D Kalman filter for bounding-box tracking.
Implementations§
Source§impl KalmanFilter
impl KalmanFilter
Sourcepub fn new(bbox: BoundingBox) -> Self
pub fn new(bbox: BoundingBox) -> Self
Create a Kalman filter initialized from a bounding box.
Sourcepub fn update(&mut self, measurement: [f32; 4])
pub fn update(&mut self, measurement: [f32; 4])
Update the filter with a measurement [cx, cy, w, h].
Sourcepub fn bbox(&self) -> BoundingBox
pub fn bbox(&self) -> BoundingBox
Get current state as bounding box.
Sourcepub fn predicted_bbox(&self) -> BoundingBox
pub fn predicted_bbox(&self) -> BoundingBox
Get predicted bbox without mutating state.
Trait Implementations§
Source§impl Clone for KalmanFilter
impl Clone for KalmanFilter
Source§fn clone(&self) -> KalmanFilter
fn clone(&self) -> KalmanFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KalmanFilter
impl RefUnwindSafe for KalmanFilter
impl Send for KalmanFilter
impl Sync for KalmanFilter
impl Unpin for KalmanFilter
impl UnsafeUnpin for KalmanFilter
impl UnwindSafe for KalmanFilter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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