ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::t::geometry::kernel::pcapartition Namespace Reference

Functions

std::tuple< int, core::TensorPCAPartition (core::Tensor &points, int max_points)
 

Function Documentation

◆ PCAPartition()

std::tuple< int, core::Tensor > cloudViewer::t::geometry::kernel::pcapartition::PCAPartition ( core::Tensor points,
int  max_points 
)

Partition the point cloud by recursively doing PCA.

Parameters
pointsPoints tensor with shape (N,3).
max_pointsThe maximum allowed number of points in a partition.
Returns
The number of partitions and an int32 tensor with the partition id for each point. The output tensor uses always the CPU device.

Definition at line 83 of file PCAPartition.cpp.

References AssertTensorDtypes, AssertTensorShape, cloudViewer::core::Tensor::Empty(), cloudViewer::core::Float32, cloudViewer::core::Float64, cloudViewer::core::Tensor::GetDataPtr(), cloudViewer::core::Int32, LogError, cloudViewer::utility::nullopt, and points.

Referenced by cloudViewer::t::geometry::TriangleMesh::PCAPartition(), and cloudViewer::t::geometry::PointCloud::PCAPartition().