ICP

Struct ICP 

Source
pub struct ICP { /* private fields */ }
Expand description

This class implements a very efficient and robust variant of the iterative closest point (ICP) algorithm. The task is to register a 3D model (or point cloud) against a set of noisy target data. The variants are put together by myself after certain tests. The task is to be able to match partial, noisy point clouds in cluttered scenes, quickly. You will find that my emphasis is on the performance, while retaining the accuracy. This implementation is based on Tolga Birdal’s MATLAB implementation in here: http://www.mathworks.com/matlabcentral/fileexchange/47152-icp-registration-using-efficient-variants-and-multi-resolution-scheme The main contributions come from:

  1. Picky ICP: http://www5.informatik.uni-erlangen.de/Forschung/Publikationen/2003/Zinsser03-ARI.pdf
  2. Efficient variants of the ICP Algorithm: http://docs.happycoders.org/orgadoc/graphics/imaging/fasticp_paper.pdf
  3. Geometrically Stable Sampling for the ICP Algorithm: https://graphics.stanford.edu/papers/stabicp/stabicp.pdf
  4. Multi-resolution registration: http://www.cvl.iis.u-tokyo.ac.jp/~oishi/Papers/Alignment/Jost_MultiResolutionICP_3DIM03.pdf
  5. Linearization of Point-to-Plane metric by Kok Lim Low: https://www.comp.nus.edu.sg/~lowkl/publications/lowk_point-to-plane_icp_techrep.pdf

Implementations§

Source§

impl ICP

Source

pub fn default() -> Result<ICP>

Source

pub fn new( iterations: i32, tolerence: f32, rejection_scale: f32, num_levels: i32, sample_type: i32, num_max_corr: i32, ) -> Result<ICP>

\brief ICP constructor with default arguments.

§Parameters
  • iterations:
  • tolerence: Controls the accuracy of registration at each iteration of ICP.
  • rejectionScale: Robust outlier rejection is applied for robustness. This value actually corresponds to the standard deviation coefficient. Points with rejectionScale * &sigma are ignored during registration.
  • numLevels: Number of pyramid levels to proceed. Deep pyramids increase speed but decrease accuracy. Too coarse pyramids might have computational overhead on top of the inaccurate registrtaion. This parameter should be chosen to optimize a balance. Typical values range from 4 to 10.
  • sampleType: Currently this parameter is ignored and only uniform sampling is applied. Leave it as 0.
  • numMaxCorr: Currently this parameter is ignored and only PickyICP is applied. Leave it as 1.
§C++ default parameters
  • tolerence: 0.05f
  • rejection_scale: 2.5f
  • num_levels: 6
  • sample_type: ICP::ICP_SAMPLING_TYPE_UNIFORM
  • num_max_corr: 1
Source

pub fn new_def(iterations: i32) -> Result<ICP>

\brief ICP constructor with default arguments.

§Parameters
  • iterations:
  • tolerence: Controls the accuracy of registration at each iteration of ICP.
  • rejectionScale: Robust outlier rejection is applied for robustness. This value actually corresponds to the standard deviation coefficient. Points with rejectionScale * &sigma are ignored during registration.
  • numLevels: Number of pyramid levels to proceed. Deep pyramids increase speed but decrease accuracy. Too coarse pyramids might have computational overhead on top of the inaccurate registrtaion. This parameter should be chosen to optimize a balance. Typical values range from 4 to 10.
  • sampleType: Currently this parameter is ignored and only uniform sampling is applied. Leave it as 0.
  • numMaxCorr: Currently this parameter is ignored and only PickyICP is applied. Leave it as 1.
§Note

This alternative version of [new] function uses the following default values for its arguments:

  • tolerence: 0.05f
  • rejection_scale: 2.5f
  • num_levels: 6
  • sample_type: ICP::ICP_SAMPLING_TYPE_UNIFORM
  • num_max_corr: 1

Trait Implementations§

Source§

impl Boxed for ICP

Source§

unsafe fn from_raw(ptr: <ICP as OpenCVFromExtern>::ExternReceive) -> Self

Wrap the specified raw pointer Read more
Source§

fn into_raw(self) -> <ICP as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying raw pointer while consuming this wrapper. Read more
Source§

fn as_raw(&self) -> <ICP as OpenCVTypeExternContainer>::ExternSend

Return the underlying raw pointer. Read more
Source§

fn as_raw_mut(&mut self) -> <ICP as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying mutable raw pointer Read more
Source§

impl Debug for ICP

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for ICP

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl ICPTrait for ICP

Source§

fn as_raw_mut_ICP(&mut self) -> *mut c_void

Source§

fn register_model_to_scene( &mut self, src_pc: &impl MatTraitConst, dst_pc: &impl MatTraitConst, residual: &mut f64, pose: &mut Matx44d, ) -> Result<i32>

\brief Perform registration Read more
Source§

fn register_model_to_scene_vec( &mut self, src_pc: &impl MatTraitConst, dst_pc: &impl MatTraitConst, poses: &mut Vector<Pose3DPtr>, ) -> Result<i32>

\brief Perform registration with multiple initial poses Read more
Source§

impl ICPTraitConst for ICP

Source§

impl Send for ICP

Auto Trait Implementations§

§

impl Freeze for ICP

§

impl RefUnwindSafe for ICP

§

impl !Sync for ICP

§

impl Unpin for ICP

§

impl UnwindSafe for ICP

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Mat> ModifyInplace for Mat
where Mat: Boxed,

Source§

unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res

Helper function to call OpenCV functions that allow in-place modification of a Mat or another similar object. By passing a mutable reference to the Mat to this function your closure will get called with the read reference and a write references to the same Mat. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data, but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.