pub struct RectangleTracker { /* private fields */ }Available on crate feature
tracking only.Expand description
Tracks a known rectangle observation across a sequence of frames.
Implementations§
Source§impl RectangleTracker
impl RectangleTracker
Sourcepub fn new(
image_path: impl AsRef<Path>,
rect_observation: &RectangleObservation,
) -> Result<Self, VisionError>
pub fn new( image_path: impl AsRef<Path>, rect_observation: &RectangleObservation, ) -> Result<Self, VisionError>
Create a new rectangle tracker seeded from image_path and the
known rectangle observation for that frame.
§Errors
Returns VisionError if the image path is invalid, the image
fails to load, or Vision rejects the tracking request.
Sourcepub fn track(
&mut self,
image_path: impl AsRef<Path>,
) -> Result<RectangleObservation, VisionError>
pub fn track( &mut self, image_path: impl AsRef<Path>, ) -> Result<RectangleObservation, VisionError>
Track the rectangle into image_path and return the updated
rectangle observation.
§Errors
Returns VisionError if the image path is invalid, the image
fails to load, or Vision rejects the tracking request.
Trait Implementations§
Source§impl Drop for RectangleTracker
impl Drop for RectangleTracker
Auto Trait Implementations§
impl Freeze for RectangleTracker
impl RefUnwindSafe for RectangleTracker
impl !Send for RectangleTracker
impl !Sync for RectangleTracker
impl Unpin for RectangleTracker
impl UnsafeUnpin for RectangleTracker
impl UnwindSafe for RectangleTracker
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