pub struct Map { /* private fields */ }Expand description
A global map containing all 3D points and their observations
Implementations§
Source§impl Map
impl Map
Sourcepub fn new(intrinsics: CameraIntrinsics) -> Self
pub fn new(intrinsics: CameraIntrinsics) -> Self
Create a new empty map
Sourcepub fn add_points(&mut self, points: Vec<MapPoint>)
pub fn add_points(&mut self, points: Vec<MapPoint>)
Add new points to the map
Sourcepub fn find_matches(
&mut self,
_keypoints: &Vector<KeyPoint>,
descriptors: &Mat,
pose: &(Matrix3<f64>, Vector3<f64>),
matcher: &mut FeatureMatcher,
) -> Result<Vec<(usize, usize)>, Box<dyn Error>>
pub fn find_matches( &mut self, _keypoints: &Vector<KeyPoint>, descriptors: &Mat, pose: &(Matrix3<f64>, Vector3<f64>), matcher: &mut FeatureMatcher, ) -> Result<Vec<(usize, usize)>, Box<dyn Error>>
Find map points visible in current frame and match with features
Sourcepub fn update_observations(&mut self, matches: &[(usize, usize)])
pub fn update_observations(&mut self, matches: &[(usize, usize)])
Update observations for matched points
Sourcepub fn prune_outliers(&mut self) -> usize
pub fn prune_outliers(&mut self) -> usize
Prune bad points (few observations or high reprojection error)
Sourcepub fn stable_points(&self) -> Vec<&MapPoint>
pub fn stable_points(&self) -> Vec<&MapPoint>
Get points with minimum observations (stable points)
Auto Trait Implementations§
impl Freeze for Map
impl RefUnwindSafe for Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnwindSafe for Map
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<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.