Skip to content

Latest commit

 

History

History
74 lines (47 loc) · 2.24 KB

File metadata and controls

74 lines (47 loc) · 2.24 KB

RayAlign

RayAlign is a tool for aligning ray clouds either to each other or to coordinate axes. It performs rigid transformation alignment and can optionally apply non-rigid (quadratic) transformations for more complex alignment scenarios.

Usage

The rayalign tool can be used in two main modes: cross-alignment and self-alignment.

Cross-Alignment

Aligns one ray cloud (raycloudA) onto another ray cloud (raycloudB) using rigid transformation:

rayalign raycloudA.ply raycloudB.ply [options]
  • raycloudA.ply: The source ray cloud to be aligned.
  • raycloudB.ply: The target ray cloud to align onto.

This method requires approximately 30% or more overlap between the two clouds for successful alignment.

Self-Alignment (Axis Alignment)

Aligns a ray cloud to coordinate axes, positioning major walls appropriately:

rayalign raycloud.ply
  • Places major walls at (0,0,0) with the biggest wall aligned along the y-axis.

Options

  • --nonrigid or -n: Applies non-rigid (quadratic) alignment instead of rigid transformation.
  • --verbose or -v: Outputs additional debug information including FFT images and the coarse alignment cloud.
  • --local or -l: Performs fine alignment only, assuming clouds are already approximately aligned.

Output

The tool generates an aligned version of the input ray cloud with the suffix _aligned.ply. For cross-alignment, it outputs transformation details including:

  • Rotation angles in degrees
  • Translation vector
  • Approximation notice for non-rigid transformations

Examples

Align cloud A onto cloud B with rigid transformation:

rayalign forest_scan1.ply forest_scan2.ply

Perform non-rigid alignment with verbose output:

rayalign scan1.ply scan2.ply --nonrigid --verbose

Axis-align a room scan to coordinate system:

rayalign room_scan.ply

Fine-tune alignment of pre-aligned clouds:

rayalign cloud1.ply cloud2.ply --local

Additional Information

  • The alignment process uses FFT-based coarse alignment followed by fine alignment optimization.
  • For more detailed information on command usage and implementation details, refer to the RayAlign source code at raycloudtools/rayalign/rayalign.cpp.