Skip to main content

IcpRegistration

Struct IcpRegistration 

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

Point-to-point ICP registration.

Implementations§

Source§

impl IcpRegistration

Source

pub fn align_with_gpu_reduction( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<GpuIcpReductionDiagnostics>

Aligns with explicitly uploaded source/target retained across iterations. GPU transforms original source points, finds bounded correspondences and reduces centered cross-covariance/centroids/fitness. Only 176 moment/status bytes are downloaded per evaluation; pose solving and convergence stay CPU. Reuses post-update moments for the next update and final fitness. No point or correspondence readback, repeated payload upload or CPU fallback occurs. Requires trim_fraction=1; align_with_gpu_trimmed_reduction supports resident trimming. f32 transforms/reductions can change matches, pose, fitness and stopping near numerical/geometry degeneracy compared with CPU f64 sums.

Source

pub fn align_with_gpu_trimmed_reduction( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<GpuIcpReductionDiagnostics>

Aligns using GPU stable distance/source-index trimming and resident moments. floor(trim_fraction * gated_count) pairs contribute to each pose solve. Post-update fitness/stopping use ALL gated pairs. Only 176 bytes cross to CPU per evaluation; source/target/search/selection remain resident. CPU target-tree construction, Horn solve and convergence remain. A fraction of one uses the canonical untrimmed GPU evaluation. f32 device matching/moments can differ from CPU near gates, ties or degeneracy.

Source

pub fn align_with_gpu_trimmed_reduction_with_precision( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, precision: GpuIcpTrimPrecision, ) -> SpatialResult<GpuIcpReductionDiagnostics>

Aligns with an explicit retained-moment precision choice. DoubleSingle (the default resident trimmed route) carries normalized quotient/product residuals in two f32 words. CompensatedF32 retains the earlier lower-cost arithmetic. Transform/search precision, all-gated fitness, CPU solving and explicit fixed-size transfer receipts are the same for both choices.

Source§

impl IcpRegistration

Source

pub const fn new(config: IcpConfig) -> Self

Creates an ICP registration algorithm from config.

Source

pub const fn config(&self) -> IcpConfig

Returns the base ICP config; explicit convergence overrides are separate.

Source

pub const fn with_convergence_criteria( self, criteria: IcpConvergenceCriteria, ) -> Self

Overrides stopping thresholds without changing the base config or defaults. Invalid thresholds are rejected when alignment is called.

Source

pub const fn convergence_criteria(&self) -> IcpConvergenceCriteria

Returns the effective stopping thresholds, including overrides.

Source

pub const fn with_trim_fraction(self, fraction: f64) -> Self

Retains floor(fraction * gated correspondences) lowest-distance pairs for each update. Equal distances keep source input order. The default 1.0 preserves ordinary ICP. Invalid fractions and fewer than the configured minimum retained pairs are rejected during alignment.

Fitness and fitness stopping still evaluate every post-update gated pair; they do not silently use a smaller trimmed denominator. Trimming assumes larger residuals are less useful; it can discard informative correct pairs when the initial pose is poor, and it does not resolve repeated geometry.

Source

pub const fn trim_fraction(&self) -> f64

Returns the fraction of gated pairs retained for transform estimation.

Source

pub fn align_with_diagnostics( &self, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<RegistrationResult>

Aligns source to target using iterative closest point.

Source

pub fn align_with_trace( &self, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<IcpDiagnostics>

Aligns with an opt-in history; errors use the same path as ordinary alignment.

Source

pub fn align_with_gpu_correspondences( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<GpuIcpDiagnostics>

Aligns with explicit GPU query uploads/readbacks and a resident target. Both update matching and post-update fitness matching run on GPU. Transform application, trimming, Kabsch, f64 fitness accumulation and convergence remain on CPU. No automatic CPU fallback is performed.

Trait Implementations§

Source§

impl Clone for IcpRegistration

Source§

fn clone(&self) -> IcpRegistration

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for IcpRegistration

Source§

impl Debug for IcpRegistration

Source§

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

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

impl PartialEq for IcpRegistration

Source§

fn eq(&self, other: &IcpRegistration) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PointCloudRegistration for IcpRegistration

Source§

fn name(&self) -> &'static str

Human-readable registration algorithm name.
Source§

fn align( &self, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<RegistrationResult>

Aligns source to target and returns the estimated transform.
Source§

impl StructuralPartialEq for IcpRegistration

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

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<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,