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 (or neighbors within radius)
- Computing the normal using Principal Component Analysis (PCA)
- The normal is the eigenvector corresponding to the smallest eigenvalue
- Optionally enforcing orientation consistency towards a viewpoint
§Arguments
cloud
- Reference to the point cloudk
- Number of nearest neighbors to use (typically 10-30)
§Returns
Result<PointCloud<NormalPoint3f>>
- A new point cloud with normals