pub fn estimate_normals(
cloud: &PointCloud<Point3f>,
k: usize,
) -> Result<PointCloud<NormalPoint3f>>
Expand description
Estimate normals for a point cloud using k-nearest neighbors
This function computes surface normals for each point in the cloud by:
- Finding k nearest neighbors for each point
- Computing the normal using Principal Component Analysis (PCA)
- The normal is the eigenvector corresponding to the smallest eigenvalue
§Arguments
cloud
- Mutable reference to the point cloudk
- Number of nearest neighbors to use (typically 10-30)
§Returns
Result<PointCloud<NormalPoint3f>>
- A new point cloud with normals