7.2 Surface Reconstruction Hao Li http://cs621.hao-li.com 1 - - PowerPoint PPT Presentation

7 2 surface reconstruction
SMART_READER_LITE
LIVE PREVIEW

7.2 Surface Reconstruction Hao Li http://cs621.hao-li.com 1 - - PowerPoint PPT Presentation

Spring 2019 CSCI 621: Digital Geometry Processing 7.2 Surface Reconstruction Hao Li http://cs621.hao-li.com 1 Surface Reconstruction physical captured reconstructed model point cloud model 2 Input Data Set of irregular sample points


slide-1
SLIDE 1

CSCI 621: Digital Geometry Processing

Hao Li

http://cs621.hao-li.com

1

Spring 2019

7.2 Surface Reconstruction

slide-2
SLIDE 2

Surface Reconstruction

2

physical model captured point cloud reconstructed model

slide-3
SLIDE 3

Input Data

3

Set of irregular sample points

  • with or without normals
  • examples: multi-view stereo, union of

range scan vertices

Set of range scans

  • each scan is a regular quad or tri-

mesh

  • normal vectors can be obtained

through local connectivity

slide-4
SLIDE 4

Problem

Given a set of points P = {p1, . . . , pn} with pi ∈ R3

slide-5
SLIDE 5

Problem

Find a manifold surface S ⊂ R3 which approximates P

slide-6
SLIDE 6

Two Approaches Explicit Implicit

Local surface connectivity estimation Point interpolation Signed distance function estimation Mesh approximation

slide-7
SLIDE 7

Two Approaches

– Ball pivoting algorithm – Delaunay triangulation – Alpha shapes – Zippering... – Distance from tangent planes – SDF estimation via RBF – ... – Image space triangulation

Explicit Implicit

slide-8
SLIDE 8

Explicit Reconstruction

  • Connect sample points by triangles
  • Exact interpolation of sample points
  • Bad for noisy or misaligned data
  • Can lead to holes or non-manifold situations
slide-9
SLIDE 9

Implicit Reconstruction

Given a set of points P = {p1, . . . , pn} with pi ∈ R3 Find a manifold surface S ⊂ R3 which approximates P where S = {x | d(x) = 0} with d(x) a signed distance function

slide-10
SLIDE 10

Data Flow

Point cloud Signed distance function estimation Evaluation of distances on uniform grid Mesh extraction via marching cubes Mesh

d(x) d(i), i = [i, j, k] ∈ Z3

slide-11
SLIDE 11

Implicit Surface Reconstruction Methods

Mainly differ in their signed distance function

slide-12
SLIDE 12

Implicit Reconstruction

  • Estimate signed distance function (SDF)
  • Extract Zero isosurface by Marching Cubes
  • Approximation of input points
  • Result is closed two-manifold surface
slide-13
SLIDE 13

Outline

13

  • Explicit Reconstruction
  • Zippering range scans
  • Implicit Reconstruction
  • SDF from point clouds
  • SDF from range scans
  • Poisson surface reconstruction
slide-14
SLIDE 14

Explicit Reconstruction

14

“Zipper” several scans to one single model

slide-15
SLIDE 15

Explicit Reconstruction

15

“Zipper” several scans to one single model

Project & insert boundary vertices

slide-16
SLIDE 16

Explicit Reconstruction

16

“Zipper” several scans to one single model

Intersect boundary edges

slide-17
SLIDE 17

Explicit Reconstruction

17

“Zipper” several scans to one single model

Discard overlap region

slide-18
SLIDE 18

Explicit Reconstruction

18

“Zipper” several scans to one single model

Locally optimize triangulation

slide-19
SLIDE 19

Explicit Reconstruction

19

“Zipper” several scans to one single model Problems for intricate geometries…

explicit implicit input model

slide-20
SLIDE 20

Mesh Zippering Summary

20

Pros:

  • Preserves regular structure of each scan
  • No additional data structures

Cons:

  • Zippering can be numerically difficult
  • Problems with complex, noisy, incomplete data
slide-21
SLIDE 21

Outline

21

  • Explicit Reconstruction
  • Zippering range scans
  • Implicit Reconstruction
  • SDF from point clouds
  • SDF from range scans
  • Poisson surface reconstruction
slide-22
SLIDE 22

Implicit Reconstruction

  • Estimate signed distance function (SDF)
  • Extract Zero isosurface by Marching Cubes
  • Approximation of input points
  • Watertight manifold by construction

22

slide-23
SLIDE 23

Signed Distance Function

Construct SDF from point samples

  • Distance to points is not enough
  • Need inside/outside information
  • Requires normal vectors

23

slide-24
SLIDE 24

Normal Estimation

Find normal for each sample point

  • Examine local neighborhood for each point
  • Set of nearest neighbors
  • Compute best approximating tangent plane
  • Covariance analysis
  • Determine normal orientation
  • Minimal Spanning Tree propagation

ni pi k

24

slide-25
SLIDE 25

Normal Estimation

Find normal for each sample point

  • Examine local neighborhood for each point
  • Set of nearest neighbors
  • Compute best approximating tangent plane
  • Covariance analysis
  • Determine normal orientation
  • Minimal Spanning Tree propagation

ni pi k

25

slide-26
SLIDE 26

Normal Estimation

Find closest point of a query point

  • Find closest point of a query point
  • Brute force: complexity

O(n)

Use Hierarchical BSP tree

  • Binary space partitioning tree (general version of kD-tree)
  • Recursively partition 3D space by planes
  • Tree should be balanced, put plane at median
  • tree levels, complexity

log(n) log(n)

26

slide-27
SLIDE 27

Normal Estimation

Find normal for each sample point

  • Examine local neighborhood for each point
  • Set of nearest neighbors
  • Compute best approximating tangent plane
  • Covariance analysis
  • Determine normal orientation
  • Minimal Spanning Tree propagation

ni pi k

27

slide-28
SLIDE 28

Plane Fitting

Fit a plane with center and normal to a set of points

c n

Minimize least squares error

{p1, . . . , pm} E(c, n) =

m

i=1

  • nT (pi − c)

⇥2

Subject to non-linear constraint

n = 1

28

slide-29
SLIDE 29

Plane Fitting

Reformulate error function

E(c, n) =

m

i=1

  • nT (pi − c)

⇥2 =

m

i=1

  • nT ˆ

pi ⇥2 (with ˆ pi := pi − c) =

m

i=1

ˆ pT

i nnT ˆ

pi (version 1) =

m

i=1

nT ˆ piˆ pT

i n

(version 2)

29

slide-30
SLIDE 30

Determine c from version 1

Derivative of w.r.t. has to vanish

∂E(c, n) ∂c =

m

  • i=1

−2 nnT ˆ pi = −2 nnT

m

  • i=1

ˆ pi

!

= 0

This is only possible for Plane center is barycenter of points

E(c, n) c

m

  • i=1

ˆ pi = 0 ⇒ c = 1 m

m

  • i=1

pi

pi

30

slide-31
SLIDE 31

Determine n from version 2

Represent in basis Since has unit length we get

e1, e2, e3 n n = α1e1 + α2e2 + α3e3 1 = n>n = α2

1 + α2 2 + α2 3

n

Insert into energy formulation

nT Cn = α2

1λ1 + α2 2λ2 + α2 3λ3 ≥ α2 1λ3 + α2 2λ3 + α2 3λ3 = λ3

Minimum is achieved for α1 = α2 = 0, α3 = 1

⇒ n = e3

31

slide-32
SLIDE 32

Principal Component Analysis

32

Plane center is barycenter of points Normal is eigenvector w.r.t. smallest eigenvalue of covariance matrix

c = 1 m

m

  • i=1

pi C =

m

  • i=1

(pi − c)(pi − c)T

slide-33
SLIDE 33

Normal Estimation

Find normal for each sample point

  • Examine local neighborhood for each point
  • Set of nearest neighbors
  • Compute best approximating tangent plane
  • Covariance analysis
  • Determine normal orientation
  • Minimal Spanning Tree propagation

ni pi k

33

slide-34
SLIDE 34

Normal Orientation

Riemannian graph connects neighboring points

  • Edge exists if or

Propagate normal orientation through graph

  • For neighbors Flip if
  • Fails at sharp edges/corners

Propagate along “save” paths (parallel normals)

  • Minimum spanning tree with angle-based edge weights

34

(ij) pi ∈ kNN(pj) pj ∈ kNN(pi) pi, pj nj n>

i nj < 0

wij = 1 − |n>

i nj|

slide-35
SLIDE 35

Normal Estimation

Find normal for each sample point

  • Examine local neighborhood for each point
  • Set of nearest neighbors
  • Compute best approximating tangent plane
  • Covariance analysis
  • Determine normal orientation
  • Minimal Spanning Tree propagation

ni pi k

35

slide-36
SLIDE 36

Normal Estimation

36

Distance from tangent planes [Hoppe 92]

  • Points + normals determine local tangent planes
  • Use distance from closest point’s tangent plane
  • Linear approximation in Voronoi cell
  • Simple and efficient, but SDF is only C−1
slide-37
SLIDE 37

Hoppe ’92 Reconstruction

37

150 samples reconstruction

  • n 503 grid
slide-38
SLIDE 38

Smooth SDF Approximation

38

Scattered data interpolation problem

  • On-surface constraints
  • Avoid trivial solution
  • Off-surface constraints

dist(pi) = 0 dist ≡ 0 dist(pi + ni) = 1

Radial basis functions (RBFs)

  • Well suited for smooth interpolation
  • Sum of shifted, weighted kernel functions

dist(x) =

  • i

wi · ϕ(⇤x ci⇤)

slide-39
SLIDE 39

RBF Interpolation

39

Interpolate on- and off-surface constraints

dist(xj) =

n

  • i=1

wi · ϕ(⇤xj ci⇤)

!

= dj, j = 1, . . . , n

Choose centers as constrained points Solve symmetric linear system for weights

   ϕ(⇤x1 x1⇤) · · · ϕ(⇤x1 xn⇤) . . . ... . . . ϕ(⇤xn x1⇤) · · · ϕ(⇤xn xn⇤)       w1 . . . wn    =    d1 . . . dn   

wi ci xi

slide-40
SLIDE 40

RBF Interpolation

Wendland basis functions

ϕ(r) =

  • 1 − r

σ ⇥4

+

  • 4 r

σ + 1 ⇥

  • Compactly supported in
  • Leads to sparse, symm. pos. def. linear system
  • Resulting SDF is smooth
  • But surface is not necessarily fair
  • Not suited for highly irregular sampling

[0, σ] C2

slide-41
SLIDE 41

Comparison

Hoppe ‘92 Compact RBF Wendland C2

slide-42
SLIDE 42

RBF Basis Functions

Triharmonic basis functions

φ(r) = r3

  • Globally supported function
  • Leads to dense linear system
  • SDF is smooth
  • Provably optimal fairness (see smoothing lecture)
  • Works well for irregular sampling

C2

⇤ I R

3

∂3dist ∂x ∂x ∂x ⇥2 + ∂3dist ∂x ∂x ∂y ⇥2 + · · · + ∂3dist ∂z ∂z ∂z ⇥2 dx dy dz → min

slide-43
SLIDE 43

Comparison

Hoppe ‘92 Compact RBF Wendland C2 Global RBF Triharmonic

slide-44
SLIDE 44

Complexity Considerations

Solve the linear system for RBF weights

  • Hard to solve for large number of samples

Compactly supported RBFs

  • Sparse linear system
  • Efficient CG or sparse Cholesky solver (later…)

Greedy RBF fitting [Carr01]

  • Start with a few RBFs only
  • Add more RBFs in region of large error
slide-45
SLIDE 45

SDF From Points

45

Pros:

  • Result is a closed 2-manifold surface
  • Suitable for noisy input data

Cons:

  • Solve linear system of RBF weights
  • Result is uniformly over-tessellated → mesh decimation
  • Can contain poorly shaped triangles → remeshing
slide-46
SLIDE 46

Outline

46

  • Explicit Reconstruction
  • Zippering range scans
  • Implicit Reconstruction
  • SDF from point clouds
  • SDF from range scans
  • Poisson surface reconstruction
slide-47
SLIDE 47

Weighted Average of SDFs

47

Individual SDFs of each scan:

  • Distance along scanner’s line of sight

Respective weighting functions:

  • Take scanning angle into account

Global SDF as weighted average

D(x) =

  • i wi(x) di(x)
  • i wi(x)

wi(x) di(x)

slide-48
SLIDE 48

Weighted Average of SDFs

48

d1 d2 w1 w2 w1+w2 (w1d1+w2d2)/(w1+w2)

SDFs Weight Functions

[Curless,Levoy96]

slide-49
SLIDE 49

Automatic Hole Filling

[Curless,Levoy96]

49

Classify grid voxel into three states

  • Empty: Between scanner and surface (space carving)
  • Unseen: Behind surface
  • Near surface: Close to scanned surface

Marching Cubes automatically fill holes

slide-50
SLIDE 50

Volumetric Reconstruction

50

[Curless,Levoy96]

slide-51
SLIDE 51

Digital Michelangelo Project

51

4G sample points → 8M triangles 1G sample points → 8M triangles

slide-52
SLIDE 52

SDF From Range Scans

52

Pros:

  • Result is a closed 2-manifold surface
  • Can take scanning information into account

Cons:

  • Result is uniformly over-tesselated → mesh decimation
  • Can contain poorly shaped triangles → remeshing
slide-53
SLIDE 53

References

53

Reconstruction from point sets

  • Hoppe et al.: Surface Reconstruction from Unorganized Points,

SIGGRAPH 1992

  • Carr etl a.: Reconstruction and representation of 3D objects with

radial basis functions, SIGGRAPH 2001

Reconstruction of range scans

  • Curless, Levoy: A Volumetric Method for Building Complex

Models from Range Images, SIGGRAPH 1996.

  • Levoy et al.: Digital Michalangelo Project: 3D Scanning of Large

Statues, SIGGRAPH 2000.

slide-54
SLIDE 54

Outline

54

  • Explicit Reconstruction
  • Zippering range scans
  • Implicit Reconstruction
  • SDF from point clouds
  • SDF from range scans
  • Poisson surface reconstruction
slide-55
SLIDE 55

Poisson Surface Reconstruction

  • Michael Kazhdan, M. Bolitho, and H. Hoppe, SGP 2006
  • Source Code available at:
  • http://www.cs.jhu.edu/~misha/
  • Implementation included in Meshlab

55

slide-56
SLIDE 56

Poisson Surface Reconstruction

56

Indicator Function

  • reconstruct the surface by solving for the indicator function of

the shape

χM

Indicator function

1 1 1

slide-57
SLIDE 57

Challenge

57

How to construct the indicator function?

χM

Indicator function Oriented points

slide-58
SLIDE 58

Gradient Relationship

58

There is a relationship between the normal field and gradient of indicator function

Oriented points

∇χM

Indicator gradient

slide-59
SLIDE 59

Integration

59

Represent the points by a vector field Find the function whose gradient best approximates

min

χ kr ~

V k χ ~ V ~ V

slide-60
SLIDE 60

Integration as a Poisson Problem

60

Represent the points by a vector field Find the function whose gradient best approximates

min

χ kr ~

V k χ ~ V ~ V

Applying the divergence operator, we can transform this into a Poisson problem:

r ⇥ (r) = r ⇥ ~ V , ∆ = r ⇥ ~ V

slide-61
SLIDE 61

Implementation: Adaptive Octree

61

Given the Points:

  • Set Octree
  • Compute vector field
  • Compute indicator function
  • Extract iso-surface
slide-62
SLIDE 62

Implementation: Adaptive Octree

62

Given the Points:

  • Set Octree
  • Compute vector field
  • Compute indicator function
  • Extract iso-surface
slide-63
SLIDE 63

Implementation: Vector Field

63

Given the Points:

  • Set Octree
  • Compute vector field
  • Define a function space
  • Splat the samples
  • Compute indicator function
  • Extract iso-surface
slide-64
SLIDE 64

Implementation: Vector Field

64

Given the Points:

  • Set Octree
  • Compute vector field
  • Define a function space
  • Splat the samples
  • Compute indicator function
  • Extract iso-surface
slide-65
SLIDE 65

Implementation: Vector Field

65

Given the Points:

  • Set Octree
  • Compute vector field
  • Define a function space
  • Splat the samples
  • Compute indicator function
  • Extract iso-surface
slide-66
SLIDE 66

Implementation: Vector Field

66

Given the Points:

  • Set Octree
  • Compute vector field
  • Define a function space
  • Splat the samples
  • Compute indicator function
  • Extract iso-surface
slide-67
SLIDE 67

Implementation: Vector Field

67

Given the Points:

  • Set Octree
  • Compute vector field
  • Define a function space
  • Splat the samples
  • Compute indicator function
  • Extract iso-surface
slide-68
SLIDE 68

Implementation: Vector Field

68

Given the Points:

  • Set Octree
  • Compute vector field
  • Define a function space
  • Splat the samples
  • Compute indicator function
  • Extract iso-surface
slide-69
SLIDE 69

Implementation: Vector Field

69

Given the Points:

  • Set Octree
  • Compute vector field
  • Define a function space
  • Splat the samples
  • Compute indicator function
  • Extract iso-surface
slide-70
SLIDE 70

Implementation: Vector Field

70

Given the Points:

  • Set Octree
  • Compute vector field
  • Define a function space
  • Splat the samples
  • Compute indicator function
  • Extract iso-surface
slide-71
SLIDE 71

Implementation: Indicator Function

71

Given the Points:

  • Set Octree
  • Compute vector field
  • Compute indicator function
  • Compute divergence
  • Solve Poisson Equation
  • Extract iso-surface
slide-72
SLIDE 72

Implementation: Indicator Function

72

Given the Points:

  • Set Octree
  • Compute vector field
  • Compute indicator function
  • Compute divergence
  • Solve Poisson Equation
  • Extract iso-surface
slide-73
SLIDE 73

Implementation: Indicator Function

73

Given the Points:

  • Set Octree
  • Compute vector field
  • Compute indicator function
  • Compute divergence
  • Solve Poisson Equation
  • Extract iso-surface
slide-74
SLIDE 74

Implementation: Iso-Surface

Given the Points:

  • Set Octree
  • Compute vector field
  • Compute indicator function
  • Extract iso-surface
slide-75
SLIDE 75

Summary

slide-76
SLIDE 76

Michelangelo’s David

  • 215 million data points from 1000

scans

  • 22 million triangle reconstruction
  • Compute Time: 2.1 hours
  • Peak Memory: 6600MB
slide-77
SLIDE 77

David – Chisel marks

slide-78
SLIDE 78

David – Drill marks

slide-79
SLIDE 79

David – Drill marks

slide-80
SLIDE 80

Scalability – Buddha Model

Time (s) / Peak Memory (MB) 200 400 600 800 Triangles 175,000 350,000 525,000 700,000 Time Taken Peak Memory Usage

slide-81
SLIDE 81

Stanford Bunny

Power Crust FastRBF MPU VRIP FFT Reconstruction Poisson Reconstruction

slide-82
SLIDE 82

VRIP Comparison

VRIP Poisson Reconstruction

slide-83
SLIDE 83

Next Time

83

Surface Smoothing

slide-84
SLIDE 84

http://cs621.hao-li.com

Thanks!

84