pub struct KeyframeRetrieval { /* private fields */ }Expand description
A map’s keyframes, described by the words of the landmarks they observe.
Implementations§
Source§impl KeyframeRetrieval
impl KeyframeRetrieval
Sourcepub fn new(map: &VisualMap, index: &BinaryLandmarkIndex, bits: u8) -> Self
pub fn new(map: &VisualMap, index: &BinaryLandmarkIndex, bits: u8) -> Self
Describes every keyframe of map that observes landmarks of index,
with bits-bit words (Basalt’s mapper uses 16; fewer bits make
coarser words that survive more descriptor noise).
pub fn is_empty(&self) -> bool
Sourcepub fn query(&self, query: &PackedDescriptors, top_k: usize) -> Vec<(u64, f32)>
pub fn query(&self, query: &PackedDescriptors, top_k: usize) -> Vec<(u64, f32)>
The ids and scores of the top_k keyframes most like query, best
first.
Sourcepub fn candidate_landmarks(
&self,
query: &PackedDescriptors,
top_k: usize,
) -> Vec<usize>
pub fn candidate_landmarks( &self, query: &PackedDescriptors, top_k: usize, ) -> Vec<usize>
The landmarks (indices into the BinaryLandmarkIndex) observed by
the top_k keyframes most like query, ascending, for
BinaryLandmarkIndex::match_among.
Trait Implementations§
Source§impl Clone for KeyframeRetrieval
impl Clone for KeyframeRetrieval
Auto Trait Implementations§
impl Forget for KeyframeRetrieval
impl Freeze for KeyframeRetrieval
impl Move for KeyframeRetrieval
impl RefUnwindSafe for KeyframeRetrieval
impl Send for KeyframeRetrieval
impl Sync for KeyframeRetrieval
impl Unpin for KeyframeRetrieval
impl UnsafeUnpin for KeyframeRetrieval
impl UnwindSafe for KeyframeRetrieval
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.