Align/Rotate Point Cloud Along Z direction based on PCA

Align point cloud of arbitrary shape and direction along z-axis based on PCA analysis.
233 Downloads
Updated 24 Aug 2020

View License

This function rotates the point cloud of the highest eigenvector
to be along z-direction.
For the 2nd highest eigenvector, the user can choose to align either
along x or y direction

parameters:
inputs:
pc: point cloud of size N * 3 size
direction: 'x' or 'y' (align the 2nd highest eigenvector along 'x' or
'y' direction

output:
pc2: rotated point cloud

Cite As

Kin Sung Chan (2024). Align/Rotate Point Cloud Along Z direction based on PCA (https://www.mathworks.com/matlabcentral/fileexchange/79472-align-rotate-point-cloud-along-z-direction-based-on-pca), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0