pub struct KeyframeIndex { /* private fields */ }Implementations§
Source§impl KeyframeIndex
impl KeyframeIndex
pub fn new() -> Self
Sourcepub fn add(
&mut self,
id: &str,
layer: &str,
frame: u32,
descriptors: &[[u32; 8]],
)
pub fn add( &mut self, id: &str, layer: &str, frame: u32, descriptors: &[[u32; 8]], )
Posts keyframe id (of layer, at frame) under the words of its features’ descriptors. A keyframe at a
frame that already has one in a posting replaces it there.
Sourcepub fn retrieve(
&mut self,
layer: &str,
frame: u32,
descriptors: &[[u32; 8]],
exclude: Option<&str>,
min_gap: Option<u32>,
) -> Retrieval
pub fn retrieve( &mut self, layer: &str, frame: u32, descriptors: &[[u32; 8]], exclude: Option<&str>, min_gap: Option<u32>, ) -> Retrieval
Candidate keyframes of layer for a query at frame with these feature descriptors, by word votes. Each
sampled word votes for the earliest POSTING_SPREAD keyframes in its posting and, when the posting is
longer, the latest ones too (so recent keyframes still get found on a long recording); exclude never gets
a vote. min_gap (default DEFAULT_MIN_GAP) is what Retrieval::admits checks.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyframeIndex
impl RefUnwindSafe for KeyframeIndex
impl Send for KeyframeIndex
impl Sync for KeyframeIndex
impl Unpin for KeyframeIndex
impl UnsafeUnpin for KeyframeIndex
impl UnwindSafe for KeyframeIndex
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> 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