pub struct IcpRegistration { /* private fields */ }Expand description
Point-to-point ICP registration.
Implementations§
Source§impl IcpRegistration
impl IcpRegistration
Sourcepub fn align_with_gpu_reduction(
&self,
runtime: &WgpuRuntime,
source: &PointCloud,
target: &PointCloud,
) -> SpatialResult<GpuIcpReductionDiagnostics>
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.
Sourcepub fn align_with_gpu_trimmed_reduction(
&self,
runtime: &WgpuRuntime,
source: &PointCloud,
target: &PointCloud,
) -> SpatialResult<GpuIcpReductionDiagnostics>
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.
Sourcepub fn align_with_gpu_trimmed_reduction_with_precision(
&self,
runtime: &WgpuRuntime,
source: &PointCloud,
target: &PointCloud,
precision: GpuIcpTrimPrecision,
) -> SpatialResult<GpuIcpReductionDiagnostics>
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
impl IcpRegistration
Sourcepub const fn config(&self) -> IcpConfig
pub const fn config(&self) -> IcpConfig
Returns the base ICP config; explicit convergence overrides are separate.
Sourcepub const fn with_convergence_criteria(
self,
criteria: IcpConvergenceCriteria,
) -> Self
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.
Sourcepub const fn convergence_criteria(&self) -> IcpConvergenceCriteria
pub const fn convergence_criteria(&self) -> IcpConvergenceCriteria
Returns the effective stopping thresholds, including overrides.
Sourcepub const fn with_trim_fraction(self, fraction: f64) -> Self
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.
Sourcepub const fn trim_fraction(&self) -> f64
pub const fn trim_fraction(&self) -> f64
Returns the fraction of gated pairs retained for transform estimation.
Sourcepub fn align_with_diagnostics(
&self,
source: &PointCloud,
target: &PointCloud,
) -> SpatialResult<RegistrationResult>
pub fn align_with_diagnostics( &self, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<RegistrationResult>
Aligns source to target using iterative closest point.
Sourcepub fn align_with_trace(
&self,
source: &PointCloud,
target: &PointCloud,
) -> SpatialResult<IcpDiagnostics>
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.
Sourcepub fn align_with_gpu_correspondences(
&self,
runtime: &WgpuRuntime,
source: &PointCloud,
target: &PointCloud,
) -> SpatialResult<GpuIcpDiagnostics>
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
impl Clone for IcpRegistration
Source§fn clone(&self) -> IcpRegistration
fn clone(&self) -> IcpRegistration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for IcpRegistration
Source§impl Debug for IcpRegistration
impl Debug for IcpRegistration
Source§impl PartialEq for IcpRegistration
impl PartialEq for IcpRegistration
Source§impl PointCloudRegistration for IcpRegistration
impl PointCloudRegistration for IcpRegistration
Source§fn align(
&self,
source: &PointCloud,
target: &PointCloud,
) -> SpatialResult<RegistrationResult>
fn align( &self, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<RegistrationResult>
source to target and returns the estimated transform.