Python library for point cloud processing. The main emphasis is on discrete curvature measures, for now.
The main approach (used in run.py) for calculating the approximate discrete curvatures is essentially:
- A k-dimensional tree is constructed from the input point cloud to organize the data spatially.
- For each point, the k nearest neighbors are determined using the k-d tree, supporting both distance-based and epsilon-ball queries.
- The singular value decomposition (SVD) is employed on each neighborhood to ascertain the characteristic plane, aligning with the first two eigenvectors.
- The neighborhood is rotated to align this plane with the xy-axis, repositioning the central point at the origin. The z-axis is approximated as the normal.
- Consistency in curvature signs is ensured by adjusting the orientation based on the dot product between the z-axis and vectors in the neighborhood.
- A quadratic surface is fitted to the neighborhood points using least-squares regression on a cost-function learning basis, yielding an explicit function F(x, y) = z, represented by using weights as coefficients.
- Curvatures are computed using classical differential geometry sources such as Do Carmo, Spivak, and Gauss
The utilities live within the PointCloud class in pointCloudToolbox.py, you can see the implementation of known expressions for curvature within.
The work presented here is part of active research at the University of Nevada, Reno - please contact me if you would like to talk about the tools within. rhutton@unr.edu
Below are some point clouds I have scanned/generated/downloaded which represent hypersurfaces in Euclidian 3-space. The points have been colored according to the calculated curvatures at the point.