pub struct Icp<T>{ /* private fields */ }Expand description
N dimensional Icp
§Salient features
- Generic Type can be any n dimensional point
- Implement Point Trait for your point
- Uses SVD to find rotation and translation
- Vectorised operations to control time complexity
§Examples
let max_iterations = 100;
let cost_change_threshold = 1e-5;
let icp = Icp::new(
model_point_set.clone(),
max_iterations,
cost_change_threshold,
);
let result = icp.register(&target_point_set);
§TODO:
- Outlier rejection of input data
- Voxel binning to make finding correspondences faster
Implementations§
Source§impl<T> Icp<T>
impl<T> Icp<T>
pub fn new( model_point_set: PointSet<T>, max_iterations: i32, cost_change_threshold: f32, ) -> Self
Sourcepub fn register(&self, target_point_set: &PointSet<T>) -> OMatrix<f32, Dyn, Dyn>
pub fn register(&self, target_point_set: &PointSet<T>) -> OMatrix<f32, Dyn, Dyn>
ICP registration
- Initialises the transformation given number of dimensions
- For each point
- Find closest point in reference cloud
- Remove the means
- Find transformaton and rotation which will minimise the error
- Transform the target cloud
- Iterate until within error threshold or max iterations
Auto Trait Implementations§
impl<T> Freeze for Icp<T>
impl<T> RefUnwindSafe for Icp<T>where
T: RefUnwindSafe,
impl<T> Send for Icp<T>where
T: Send,
impl<T> Sync for Icp<T>where
T: Sync,
impl<T> Unpin for Icp<T>where
T: Unpin,
impl<T> UnwindSafe for Icp<T>where
T: UnwindSafe,
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.