surface reconstruction from point clouds

56
Surface reconstruction from point clouds Based on: Surface reconstruction, by Nina Amenta, Section 4.1 in: Point- Based Graphics Slides by Marc van Kreveld for DDM 1

Upload: jasia

Post on 23-Feb-2016

70 views

Category:

Documents


0 download

DESCRIPTION

Surface reconstruction from point clouds. Based on: Surface reconstruction, by Nina Amenta , Section 4.1 in: Point-Based Graphics Slides by Marc van Kreveld for DDM. Surface reconstruction. Converting a point cloud in a more explicit representation, like a triangle mesh - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Surface reconstruction from point clouds

Surface reconstruction from point clouds

Based on: Surface reconstruction, by Nina Amenta, Section 4.1 in: Point-Based Graphics

Slides by Marc van Kreveldfor DDM

1

Page 2: Surface reconstruction from point clouds

Surface reconstruction

• Converting a point cloud in a more explicit representation, like a triangle mesh

• Needs a dense enough point set– especially in areas with much detail– especially in areas with high curvature

• Sometimes outliers must be dealt with• Many different approaches

2

Page 3: Surface reconstruction from point clouds

Surface reconstruction

• Often begins with normal estimation at all points• Basic method types:

– Implicit surface methods– Voronoi/Delaunay methods– Surface evolution methods

3

Page 4: Surface reconstruction from point clouds

Implicit surface methods

4

Page 5: Surface reconstruction from point clouds

Implicit surface methods

• Voxel-based method of Hoppe et al. (1992)– Estimate normal at each point p of the set P– Make all normals point outwards– Define f(x) to be the distance to the tangent plane of p,

where p is the point of P closest to x– Use marching cubes to extract the zero-set of f

5

Page 6: Surface reconstruction from point clouds

Implicit surface methods

• Voxel-based method of Hoppe et al. (1992)– Estimate normal at each point p of the set P– Make all normals point outwards– Define f(x) to be the distance to the tangent plane of p,

where p is the point of P closest to x– Use marching cubes to extract the zero-set of f

within the 3D Voronoi cell of p, the surface is the tangent plane at p !

6

Page 7: Surface reconstruction from point clouds

Implicit surface methods

• Voxel-based method of Hoppe et al. (1992)– Estimate normal at each point p of the set P– Make all normals point outwards– Define f(x) to be the distance to the tangent plane of p,

where p is the point of P closest to x– Use marching cubes to extract the zero-set of f

within the 3D Voronoi cell of p, the surface is the tangent plane at p !

f is a discontinuous function !

7

Page 8: Surface reconstruction from point clouds
Page 9: Surface reconstruction from point clouds
Page 10: Surface reconstruction from point clouds
Page 11: Surface reconstruction from point clouds
Page 12: Surface reconstruction from point clouds
Page 13: Surface reconstruction from point clouds

Implicit surface methods

• Exact computation of the zero-set of f involves computing the 3D Voronoi diagram of P and intersecting each cell with the local tangent plane

• Hoppe et al. use marching cubes which can take care of many of the (smaller) gaps between pieces of surface

13

Page 14: Surface reconstruction from point clouds

Implicit surface methods

• Marching cubes algorithm (Lorensen and Cline, 1987)– method to determine the level-0 set of an implicit function– uses a grid of cubes and evaluates the function only at the

corners– from the eight corners of each cube and their status

inside/outside (function is negative/positive), a piece of surface is made inside the cube

14

Page 15: Surface reconstruction from point clouds

Implicit surface methods

• Marching squares (for level-5 set)• Four corners give 16 cases; two

are ambiguous

15

allinside

alloutside

Page 16: Surface reconstruction from point clouds

Implicit surface methods

• Locally, we cannot know how to resolve an ambiguous case

16

Page 17: Surface reconstruction from point clouds

Implicit surface methods

• Marching cubes is the 3D equivalent idea

• Eight corners of the square give 256 cases,

many of which are symmetric or inverted 15 cases remain

17

Page 18: Surface reconstruction from point clouds

18

Page 19: Surface reconstruction from point clouds

Implicit surface methods

• Two cubes that share an ambiguous facet must use compatible solutions: imagine case 3 (2 red and 6 blue vertices) and its inverted form (6 red and 2 blue vertices) share an ambiguous facet

19

Page 20: Surface reconstruction from point clouds

Implicit surface methods

• A solution was given by Nielson and Hammann (1991), called asymptotic decider

• It includes different ways to treat certain inverted forms (so they are not inverted but new cases)

20

Page 21: Surface reconstruction from point clouds

Implicit surface methods

21

Page 22: Surface reconstruction from point clouds

Implicit surface methods

• Instead of choosing the surface to go through the middle of an edge with an inside and an outside endpoint, it is better to use interpolation (linear)

22

f(.) = –2

f(.) = 5

let surface intersect the edge here

Page 23: Surface reconstruction from point clouds

Implicit surface methods

• Back to Hoppe et al.’s voxel-based method and how marching cubes (squares) applies– Estimate normal at each point p of the set P– Make all normals point outwards– Define f(x) to be the distance to the tangent plane of p,

where p is the point of P closest to x– Use marching cubes to extract the zero-set of f

23

Page 24: Surface reconstruction from point clouds

Implicit surface methods

24

Page 25: Surface reconstruction from point clouds

Implicit surface methods

25

Page 26: Surface reconstruction from point clouds

Implicit surface methods

26

Page 27: Surface reconstruction from point clouds

Implicit surface methods

27

Page 28: Surface reconstruction from point clouds

Implicit surface methods

• Hoppe et al.’s method resolves the gaps resulting from discontinuities in the implicit function

• It can give holes in the reconstruction

28

Page 29: Surface reconstruction from point clouds

Implicit surface methods

• Hoppe et al.’s method, missing step: outward normal orientation:– make a Euclidean minimum spanning tree EMST on all points– find the topmost point in the EMST and make it the root of

the tree– orient the root so that its normal is upwards (dot product

with vertical upward direction is positive)– pre-order traverse the spanning tree and assign the

normal of a node by letting it be consistent with its parent (their dot product should be positive)

29

Page 30: Surface reconstruction from point clouds
Page 31: Surface reconstruction from point clouds

root

flip 1stflip 2nd

flip 3rd

flip 4th

flip 5th

Page 32: Surface reconstruction from point clouds
Page 33: Surface reconstruction from point clouds

Implicit surface methods

• Hoppe et al.’s method, missing step: outward normal orientation:– make a Euclidean minimum spanning tree on all points

• Take all n choose 2 pairs of points and sort them by distance• Start with n points as sets with only one element• Loop over the point pairs by increasing distance: accept a pair as

an edge in the EMST if the points are in different sets, then unite their sets (stop when there is only one set)

– we can take only the pairs of points whose Voronoi cells are neighbors (typically fewer than quadratically many)

33

Page 34: Surface reconstruction from point clouds

Implicit surface methods

• Hoppe et al.’s method: outward normal orientation:– Problem: the method may make mistakes when sampling

is low near areas with high curvature

34

Page 35: Surface reconstruction from point clouds

Implicit surface methods

• Hoppe et al.’s method: outward normal orientation:– Problem: the method may make mistakes when sampling

is low near areas with high curvature– Solution:

• First make a graph G where every point is connected to its k nearest neighbors (k is a small constant to be chosen)

• Give every edge a weight depending on to what extent the normals are parallel (including inverted): 1 – [the absolute value of the dot product of the normalized normals at these points]

• Compute the minimum spanning tree of G using these weights

35

[ normalized = scaled to have unit length ]

Page 36: Surface reconstruction from point clouds

Implicit surface methods

• All of this works in 3D too• Note that in 3D the desired spanning tree will not

have such a simple path structure as you would expect in 2D

36

Page 37: Surface reconstruction from point clouds

Implicit surface methods

• More advanced: Let f be composed of the sum of many “local” implicit functions fi, one for each pi

• These local implicit functions are blended into f• The weight wi of fi at a point x depends on the

distance between x and pi; it decreases monotonically with the distance

• The weights must make an unbiased interpolator/ estimator of the local implicit functions

37

Page 38: Surface reconstruction from point clouds

Implicit surface methods

• The functions fi could be chosen as in Hoppe et al.: the signed distance to the normal plane at pi

• The weights wi can also be chosen to be a linear fall-off function, or a Gaussian fall-off function

• If for any point x, f(x) isinfluenced by only few fi

(with weight wi > 0), thenthe surface can be recon-structed efficiently

• In Gaussian case, use cut-off38

wi

distance

Page 39: Surface reconstruction from point clouds

Voronoi and Delaunay methods

• The Voronoi diagram and Delaunay triangulation of a set of points sampled on a surface have a lot of structure that can be used for reconstruction

39

Page 40: Surface reconstruction from point clouds

Reconstructing with Delaunay

• Possibilities:– Let the object be the union of Delaunay triangles (2D) or

tetrahedra (3D) that are deemed to be inside the shape– Decide of edges (2D) or triangles (3D) that they are part of

the boundary of the shape α-shape

40

Page 41: Surface reconstruction from point clouds

Reconstructing with Voronoi

• Possibilities:– Use the Voronoi

diagram to estimate normals as the diameters of the Voronoi cells

– Extract the medial axis from the Voronoi diagram of the points; it resembles the medial axis of the reconstruction

41

Page 42: Surface reconstruction from point clouds

The α-shape

• The α-shape is a general shape descriptor for a set of points [ Edelsbrunner, Kirkpatrick, Seidel 1983]

42

Page 43: Surface reconstruction from point clouds

• The α-shape is the straight-line graph with the α-extreme points as the vertices and the α-neighbors as the edges

radius α-disk

α-extreme point

α-neighbors

The α-shape

43

Page 44: Surface reconstruction from point clouds

• Every α-shape edge is also a Delaunay triangulation edge (it has an empty circle through its endpoints)

radius α-disk

α-extreme point

α-neighbors

The α-shape

44

Page 45: Surface reconstruction from point clouds

• The choice of α is important– bigger α: avoids holes and separate components in shape,

but also less detail– smaller α: more detail but risk of holes and separate

components• How to determine the right α?• Can we make α adaptive: smaller where point density

is higher and larger where point density is lower?

The α-shape

45

Page 46: Surface reconstruction from point clouds

α-shapes

46

Page 47: Surface reconstruction from point clouds

α-shapes in 3D

47

Page 48: Surface reconstruction from point clouds

α-shapes in 3D

48

Page 49: Surface reconstruction from point clouds

The α-shape

• We can compute the 2D α-shape from the Delaunay triangulation by testing every edge: determine the radius of the smallest and largest empty circle through its endpoints

49

p

q

Circles containing p and q have their centers on the bisector of p and q

Empty circles containing p and q have their centers between the centers of the circumcircles of the two triangles incident to edge pq

Page 50: Surface reconstruction from point clouds

The α-shape

50

p

qp

q

This center realizes the smallest circle

This center realizes the smallest circle

largest

largest

Page 51: Surface reconstruction from point clouds

The α-shape

• The 2D α-shape can be computed from a given Delaunay triangulation on n points in just O(n) time (assuming the Delaunay triangulation is stored in a suitable triangle mesh representation!)

• From the points: O(n log n) time is possible

51

Page 52: Surface reconstruction from point clouds

The α-shape in 3D

• In 3D everything is analogous:– Triangles of the α-shape are defined by empty balls of

radius α– These triangles occur in the Delaunay tetrahedrilization– For any triangle in the Delaunay tetrahedrilization,

the centers of balls throughits vertices lie on a line andwe can decide in O(1) timewhether a triangle occursin the α-shape by inspectingthe two incident tetrahedra(their circumspheres)

52

Page 53: Surface reconstruction from point clouds

Another Voronoi/Delaunay method

• Delaunay filtering; co-cone algorithm (Amenta et al.)– Estimate normals at points using the Voronoi diagram

diameters– Choose all triangles of the Delaunay tetrahedrilization

whose normal is close to the normals of its three vertices

• Works for sufficiently smooth and densely sampled manifolds

• Extensions can handle sharp features and manifolds with boundaries

• Other extensions deal with noise53

Page 54: Surface reconstruction from point clouds

Surface evolution methods

• Start with a small triangle mesh inside the point cloud (e.g. an octahedron)

• Move its vertices by forces: – inflation in the outward normal direction– spring forces between adjacent mesh vertices

• When triangles get large, they get subdivided• When a vertex gets close to a point, it is snapped and

no longer moved

54

Page 55: Surface reconstruction from point clouds

Summary, concluding remarks

• Reconstruction from point samples can be done by three basic approaches: implicit surface, Delaunay/ Voronoi, and evolution surface

• It is important to deal with noise (depending on the data source)

• Delaunay methods compute a large tetrahedrilization and then throw most of it away again

• Memory efficiency is sometimes more relevant than computation time

55

Page 56: Surface reconstruction from point clouds

Questions1. Does the voxel-based method work when the input has sharp

corners? Consider a square with five points on each edge and draw what the 2D voxel-based method would produce.

2. For 2D Delaunay based reconstruction, even a simple approach like: “for each point, choose the shortest two incident edges” seems to work (slide 39). When does this idea work poorly? Can you resolve this by a simple extension, so that it works for sufficiently densely sampled smooth curves that have no narrow parts?

3. Normal estimation can be done using the diameter (direction) of a Voronoi cell. Show that a curve with a number of points nearly on a horizontal straight line can have normals that oscillate between upward and downward

56