Skip to content

Latest commit

 

History

History
113 lines (81 loc) · 3.11 KB

File metadata and controls

113 lines (81 loc) · 3.11 KB

RaySmooth

RaySmooth is a tool for smoothing ray clouds by moving off-surface points onto their nearest surfaces. It reduces noise while preserving the overall geometric structure of the data.

Usage

raysmooth <raycloud_file>
  • <raycloud_file>: Input ray cloud file to smooth (.ply)

Algorithm

The smoothing algorithm works in two main steps:

1. Surface Analysis

  • Calculates surface normals for each point
  • Identifies 16 nearest neighbors for each point
  • Determines local surface geometry and orientation

2. Point Adjustment

  • Moves points along their normal direction
  • Uses neighbor weighting based on normal similarity
  • Preserves points that are already well-aligned with local surfaces

Method Details

Neighbor Weighting

Points are adjusted using a weighted average of their neighbors, where:

  • Weight decreases with normal direction differences
  • More similar normals contribute more to the adjustment
  • Central point weight prevents over-smoothing

Normal Projection

Final adjustment projects the weighted centroid onto the local surface:

  • Points move only along their surface normal
  • Preserves tangential surface details
  • Maintains overall geometric integrity

Output

The tool generates a smoothed ray cloud with the suffix _smooth.ply.

Applications

Noise Reduction

  • Remove scanning artifacts and noise
  • Smooth irregular surfaces from low-quality sensors
  • Improve point cloud quality for analysis

Surface Reconstruction

  • Prepare data for meshing algorithms
  • Improve surface continuity
  • Reduce jagged edges in geometric features

Data Preprocessing

  • Clean data before feature extraction
  • Improve results for surface-based algorithms
  • Prepare for visualization and rendering

Examples

Smooth a noisy building scan:

raysmooth building_scan.ply

Clean up forest canopy data:

raysmooth forest_canopy.ply

Prepare data for mesh generation:

raysmooth terrain_scan.ply

Considerations

Automatic Parameters

The tool uses automatically determined parameters based on local geometry:

  • Number of neighbors: 16 (fixed)
  • Weighting scheme: Based on normal similarity
  • No user-adjustable parameters required

Preservation

The smoothing process preserves:

  • Overall geometric structure
  • Sharp geometric features (edges, corners)
  • Ray timing and color information
  • Bounded/unbounded ray classification

Limitations

  • Not compatible with rayrestore: Geometric changes cannot be properly restored
  • Best suited for bounded rays (unbounded rays are skipped)
  • May reduce fine surface detail in favor of smoothness

Performance

  • Processes entire cloud in memory for efficiency
  • Uses nearest neighbor search for local geometry analysis
  • Suitable for medium to large datasets
  • Single-threaded operation

Additional Information

  • The algorithm automatically balances smoothing strength with detail preservation
  • Surface normal quality directly affects smoothing results
  • For more detailed information on smoothing algorithms, refer to the RaySmooth source code at raycloudtools/raysmooth/raysmooth.cpp.