This repository provides an example application that implements the curvature estimators on oriented point clouds presented at Symposium on Geometry Processing 2023, Genova, Italy, July 3-7:
Jacques-Olivier Lachaud, David Coeurjolly, Céline Labart, Pascal Romon, Boris Thibert, Lightweight Curvature Estimation on Point Clouds with Randomized Corrected Curvature Measures, Comput. Graph. Forum, 42(5), 2023.
Authors of the code:
- Jacques-Olivier Lachaud
- David Coeurjolly
Once cloned, proceed as follows on Linux/macos:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j 8
It will automatically fetch and install the dependencies polyscope and eigen.
./curvatures
Run the program with a GUI that allows you to generate point clouds approximating simple shapes (sphere, torus, cube, dodecahedron).
./curvatures ../data/bearded-man-xyz-nxyz.pts
Text file should be composed of lines of the form x y z nx ny nz
for each point, determining the coordinates (x,y,z) of each point and the components (nx,ny,nz) of its oriented normal vector.
./curvatures ../data/bunnyhead.obj
The OBJ file should contained the vertices as v x y z
and normal vectors as vn nx ny nz
.
-
Shape generation
Sphere
generates a sphere of sizeR
withN
pointsTorus
generates a torus of great radiusR
and small radiusr
withN
pointsCube
generates a cube of sizeR
withN
pointsDodecahedron
generates a dodecahedron of sizeR
withN
pointsInputFile
generates a set of points from the given input file- all shapes can be perturbated in position (parameter
x
) and in normals (parameterxi
) - you may toggle between fast display (better when N > 5 millions) or nice display
-
Curvature computation
Curvatures
computes all curvature information (mean, Gaussian, principal curvatures and directions.- parameter
K
is the chosen number of nearest neighbors - parameter
L
is the chosen number of triangles (only forUniform
generation) - you may choose for triangle random generation methods among
Uniform
,Independent
,Hexagram
,Avg-Hexagram
(see paper for details) - method
Avg-Hexagram
is the fastest, very accurate while staying robust to noise - parameter
W
balances between the normal to the points and the average normals of its neighbors to define the local sampling plane, 0.5 works well.
-
Information
- the total computation time of curvatures is displayed
- l2 and loo errors are displayed for
Sphere
andTorus
shape.
We provide additional datasets to be able to reproduce the paper results. To exactly get the paper visual after clicking on Curvatures
the button, for each interested curvature quantity, change polyscope's colormap from viridis
to coolwarm
and use the clamping values given in the following table (to specify the colormap min/max values, just CTRL-click to the min/max text area for the selected curvature quantities).
Pointcloud | Paper figure | Params | curvature colormap clamping ranges |
---|---|---|---|
./curvatures ../data/goursat/goursat_025000.pts |
Fig6 | K=50, L=100 | Mean: [-0.107, 0.345], Gaussian: [-0.034, 0.119] |
./curvatures ../data/torus/torus_025000.pts |
supplem Fig2 | K=50, L=100 | Mean: [ 0.125, 0.32], Gaussian: [-0.125, 0.0625] |
./curvatures ../data/goursat/goursat_025000.pts |
supplem Fig3 | K=50, L=200 | Mean: [-0.107, 0.345], Gaussian: [-0.034, 0.119] |
./curvatures ../data/torus/torus_025000.pts |
supplem Fig4 | K=50, L=200 | Mean: [ 0.125, 0.32], Gaussian: [-0.125, 0.0625] |
./curvatures ../data/anisotropic/goursat-filter.pts |
supplem Fig5 | K=50, L=200 | Mean: [-0.107, 0.345], Gaussian: [-0.034, 0.119] |
./curvatures ../data/anisotropic/torus-filter.pts |
supplem Fig6 | K=50, L=200 | Mean: [ 0.125, 0.32], Gaussian: [-0.125, 0.0625] |
./curvatures ../data/lidarSim/goursat-lidar.pts |
supplem Fig5 | K=50, L=200 | Mean: [-0.107, 0.345], Gaussian: [-0.034, 0.119] |
./curvatures ../data/lidarSim/torus-lidar.pts |
supplem Fig6 | K=50, L=200 | Mean: [ 0.125, 0.32], Gaussian: [-0.125, 0.0625] |
Mean curvature (Avg-Hexagram, N=20) |
Mean curvature on torus (N=10000, N=20) | First principal direction | Second principal direction |