DIGITAL GEOMETRY PROCESSING Algorithms for Representing, Analyzing - - PowerPoint PPT Presentation

digital geometry processing
SMART_READER_LITE
LIVE PREVIEW

DIGITAL GEOMETRY PROCESSING Algorithms for Representing, Analyzing - - PowerPoint PPT Presentation

DIGITAL GEOMETRY PROCESSING Algorithms for Representing, Analyzing and Comparing 3D shapes Today Surface Scanning, Processing and Reconstruction 3D shape acquisition (scanning) Shape alignment: Iterative Closest Point (ICP) Point


slide-1
SLIDE 1

DIGITAL GEOMETRY PROCESSING

Algorithms for Representing, Analyzing and Comparing 3D shapes

slide-2
SLIDE 2

Today

Surface Scanning, Processing and Reconstruction

  • 3D shape acquisition (scanning)
  • Shape alignment: Iterative Closest Point (ICP)
  • Point cloud processing; normal and outlier estimation
  • Reconstruction: Marching Cubes
slide-3
SLIDE 3

2D Imaging Pipeline

slide-4
SLIDE 4

3D Scanning Pipeline

slide-5
SLIDE 5

Two main digitization approaches

slide-6
SLIDE 6

Modeling zoo

source: Michael Wand

slide-7
SLIDE 7

Point Clouds

  • Simplest representation: only points, no connectivity.
  • Collection of (x,y,z) coordinates, possibly with normals
slide-8
SLIDE 8

Point Clouds

  • Simplest representation: only points, no connectivity.
  • Collection of (x,y,z) coordinates, possibly with normals.
  • Points with orientation are called surfels.

Filip Van Bouwel

slide-9
SLIDE 9

Point Clouds

  • Simplest representation: only points, no connectivity.
  • Collection of (x,y,z) coordinates, possibly with normals.
  • Points with orientation are called surfels.
  • Severe limitations:
  • no Simplification or subdivision
  • no direct smooth rendering
  • no topological information

?

  • r
slide-10
SLIDE 10

Point Clouds

  • Simplest representation: only points, no connectivity.
  • Collection of (x,y,z) coordinates, possibly with normals.
  • Points with orientation are called surfels.
  • Severe limitations:
  • no Simplification or subdivision
  • no direct smooth rendering
  • no topological information
  • Weak approximation power:
slide-11
SLIDE 11

Point Clouds

  • Simplest representation: only points, no connectivity.
  • Collection of (x,y,z) coordinates, possibly with normals.
  • Points with orientation are called surfels.
  • Severe limitations:
  • no Simplification or subdivision
  • no direct smooth rendering
  • no topological information
  • Weak approximation power:

for point clouds.

  • Need square number of points for the same approximation power as

meshes.

O(h)

slide-12
SLIDE 12

Point Clouds

  • Simplest representation: only points, no connectivity.
  • Collection of (x,y,z) coordinates, possibly with normals.
  • Points with orientation are called surfels.
  • Severe limitations:
  • no Simplification or subdivision
  • no direct smooth rendering
  • no topological information
  • Weak approximation power.
  • Noise and outliers
slide-13
SLIDE 13

Why Point Clouds?

1) Typically, that’s the only thing that’s available

Nearly all 3d scanning devices produce point clouds

slide-14
SLIDE 14

Why Point Clouds?

1) Typically, that’s the only thing that’s available 2) Locality: sometimes, easier to handle (esp. in hardware).

MeshlessAnimation of Fracturing Solids Pauly et al., SIGGRAPH ‘05

Fracturing Solids Fluid Simulation

Adaptively sampled particle fluids, Adams et al. SIGGRAPH ‘07

slide-15
SLIDE 15

Typical Scanning and Reconstruction Pipeline

Registration

registered point cloud s!

slide-16
SLIDE 16

Single View Scanners

Major types of 3d scanners

  • Range (emission-based) scanners

§ Time-of-flight laser scanner § Phase-based laser scanner

  • Triangulation

§ Laser line sweep § Structured light

  • Stereo / computer vision

§ Passive stereo § Active stereo / space time stereo

slide-17
SLIDE 17

Time of Flight scanners

  • 1. Emit a short short pulse of laser
  • 2. Capture the reflection.
  • 3. Measure the time it took to come back.

D = cT 2

c: speed of light (≈ 299 792 458 m/s) Need a very fast clock: e.g. 1GHz achieves 0.15m (15cm) accuracy.

slide-18
SLIDE 18

Time of Flight scanners

  • 1. Emit a short short pulse of laser
  • 2. Capture the reflection.
  • 3. Measure the time it took to come back.
  • 4. Need a very fast clock.
  • 5. Main advantage: can be done over long distances.
  • 6. Used in terrain scanning.
slide-19
SLIDE 19

Time of Flight scanners

source: Michael Wand

slide-20
SLIDE 20

Phase-Based range-scanners

  • 1. Instead of a pulse, emit a continuous phase-modulated beam.
  • 2. Capture the reflection.
  • 3. Measure the phase-shift between the output and input signals.
slide-21
SLIDE 21

Phase-Based range-scanners

T

  • Emitted signal:
  • Received signal:
  • Cross-correlation between emitted and received signals:

C(x) = lim

T →∞

1 T Z T/2

−T/2

r(t)s(t + x)dt

s(t) = a cos(2πft)

r(t) = A cos(2πf(t − τ)) + B

slide-22
SLIDE 22

Phase-Based range-scanners

T

  • Emitted signal:
  • Received signal:
  • Compute cross-correlation between emitted and received signals.

s(t) = a cos(2πft)

Unknowns:

  • Four bucket trick: sample 4 different times in a period. Solve for unknowns.

A, B, τ

  • Compute depth (up to integer of wavelength): d = 1

2cτ r(t) = A cos(2πf(t − τ)) + B

slide-23
SLIDE 23

Phase-Based range-scanners

  • 1. Instead of a pulse, emit a continuous phase-modulated beam.
  • 2. Capture the reflection.
  • 3. Measure the phase-shift between the output and input signals.
  • 4. From the phase-shift, the distance can be computed up to integer wavelength.
  • 5. Greater frequency and accuracy but shorter range.

T

e.g. 1,016,727 vs. 50,000 (TOF) points per second up to 79 meters vs. hundreds of meters

slide-24
SLIDE 24

Range-scanners

  • 1. Typically, range scanners by themselves provide limited accuracy

(noise, outliers, uneven sampling).

  • 2. May require a lot of post-processing to get good sampling.
slide-25
SLIDE 25

Advanced Time-of-Flight.

Izadi et al., SIGGRAPH 2014 Course on: 3D Imaging with Time-of-Flight cameras

slide-26
SLIDE 26

Triangulation-based approaches

  • 1. Add a photometric sensor (e.g. camera)
  • 2. Record the position for a reference plane.
  • 3. Change in recording position can be used

to recover the depth. Intuition: the depth is related to the shift in the camera plane.

slide-27
SLIDE 27

Triangulation-based approaches

  • 1. Add a photometric sensor (e.g. camera)
  • 2. Record the position for a reference plane.
  • 3. Change in recording position can be used

to recover the depth. Intuition: the depth is related to the shift in the camera plane. Need to compute DZ using DZ.

slide-28
SLIDE 28

Triangulation-based approaches

A B C D E L

  • 1. Add a photometric sensor (e.g. camera)
  • 2. Record the position for a reference plane.
  • 3. Change in recording position can be used

to recover the depth. Intuition: the depth is related to the shift in the camera plane. Need to compute DZ using DZ. Given lengths of LB, LC, BC, CE, DZ. Compute DZ.

slide-29
SLIDE 29

Triangulation-based approaches

  • 1. Add a photometric sensor (e.g. camera)
  • 2. Record the position for a reference plane.
  • 3. If well-calibrated, can lead to extreme accurate depth measurements.
  • 4. Main problem: slow and expensive.

David’s left eye: source Levoy et al.

“The digital Michelangelo project: 3D scanning of large statues”, Levoy et al., 2000

David statue scan: over 1 billion points.

slide-30
SLIDE 30

Structured-Light scanners

Same general idea as Triangulation based scanner. Main Idea: Replace laser with projector. Project stripes instead of sheets. Challenge: Need to identify which (input/output) lines correspond. vs.

slide-31
SLIDE 31

Structured-Light scanners

Same idea as Triangulation based scanner. Main Idea: Project multiple stripes to identify the position of a point. log(N) projections are sufficient to identify N stripes.

slide-32
SLIDE 32

Structured-Light scanners

Same idea as Triangulation based scanner. Main Idea: Project multiple stripes to identify the position of a point. log(N) projections are sufficient to identify N stripes. Advantage: cost and speed Disadvantage: need controlled conditions & projector calibration.

slide-33
SLIDE 33

Computer Vision based Techniques

Depth from stereo: Given 2 images, shift in the x-axis is related to the depth. Main challenge: establishing corresponding points across images: very difficult.

P’

slide-34
SLIDE 34

Computer Vision based Techniques

Depth from blur: Can approximate depth by detecting how blurry part of the image is for known focal length.

slide-35
SLIDE 35

Multitude of other methods

Non-exhaustive taxonomy of 3d acquisition methods. Rocchini et al. ‘01

slide-36
SLIDE 36

Microsoft Kinect 1 (2009)

Low-cost (100$) 3d scanner – gadget for Xbox.

Allows to acquire Image (640 x 480) and 3d geometry (300k points) at 30 FPS. Uses infrared active illumination with an infrared sensor and depth-from blur. accuracy of ~1mm (at 0.5m distance) to 4cm (at 2m distance).

slide-37
SLIDE 37

Modern Mobile Devices (2017)

Typically use a combination of structured (infrared) light + stereo based depth. Apple iPhone X Sony Xperia XZ1 Asus Zenfone AR

slide-38
SLIDE 38

3d Point Cloud Processing

Typically point cloud sampling of a shape is insufficient for most

  • applications. Main stages in processing:

1. Shape scanning (acquisition) 2. If have multiple scans, align them. 3. Smoothing – remove local noise. 4. Estimate surface normals. 5. Surface reconstruction

  • Implicit representation (today).
  • Triangle mesh (today).
slide-39
SLIDE 39

Fundamental Registration Problem

Given (at least) two shapes with partially overlapping geometry, find an alignment between them.

slide-40
SLIDE 40

Why Registration?

Fundamental problem in geometry analysis Appears in many shape analysis applications ICP: one of the best-known algorithms in computer graphics and computational geometry. Widely used in industry. For you: very nice programming exercise. Quick introduction to an active research area. …

slide-41
SLIDE 41

Local Alignment

  • Simplest instance of the registration problem

Given two shapes that are approximately aligned (e.g. by a human) we want to find the optimal tranformation.

slide-42
SLIDE 42

Other Applications

Manufacturing: One shape is a model and the other is a scan of a

  • product. Finding defects.

Medicine: Finding correspondences between 3D MRI scans of the same person or different people. Animation Reconstruction & 3D Video. Statistical Shape Analysis: Building models for a collection of shapes.

slide-43
SLIDE 43

Local Alignment

  • What does it mean for an alignment to be good?

Intuition: want corresponding points to be close after transformation. Problems

  • 1. We don’t know what points correspond.
  • 2. We don’t know the optimal alignment.
slide-44
SLIDE 44

Iterative Closest Point (ICP)

  • Approach: iterate between finding correspondences and

finding the transformation:

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

x1

x2

y1

y2

N

X

i=1

kRxi + t yik2

2

slide-45
SLIDE 45

Iterative Closest Point (ICP)

  • Approach: iterate between finding correspondences and

finding the transformation:

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

N

X

i=1

kRxi + t yik2

2

slide-46
SLIDE 46

Iterative Closest Point

  • Approach: iterate between finding correspondences and

finding the transformation:

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

N

X

i=1

kRxi + t yik2

2

slide-47
SLIDE 47

Iterative Closest Point

  • Approach: iterate between finding correspondences and

finding the transformation:

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

N

X

i=1

kRxi + t yik2

2

slide-48
SLIDE 48

Iterative Closest Point

  • Approach: iterate between finding correspondences and

finding the transformation:

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

N

X

i=1

kRxi + t yik2

2

slide-49
SLIDE 49
  • Approach: iterate between finding correspondences and

finding the transformation:

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

Iterative Closest Point

N

X

i=1

kRxi + t yik2

2

slide-50
SLIDE 50
  • Approach: iterate between finding correspondences and

finding the transformation:

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

Iterative Closest Point

N

X

i=1

kRxi + t yik2

2

slide-51
SLIDE 51
  • Approach: iterate between finding correspondences and

finding the transformation:

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

Iterative Closest Point

N

X

i=1

kRxi + t yik2

2

slide-52
SLIDE 52

Iterative Closest Point

  • Approach: iterate between finding correspondences and

finding the transformation:

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

N

X

i=1

kRxi + t yik2

2

slide-53
SLIDE 53

Iterative Closest Point

  • Requires two main computations:
  • 1. Computing nearest neighbors.
  • 2. Computing the optimal transformation
slide-54
SLIDE 54

ICP: Nearest Neighbor Computation

Closest points

n How to find closest points efficiently? n Straightforward complexity: number of points on , number of points on . n divides the space into Voronoi cells n Given a query point , determine to which cell it belongs.

yi = arg min

y∈Y ky xik

V (y 2 Y ) = {z 2 R3 : ky zk < ky0 zk 8 y0 2 Y 6= y}

slide-55
SLIDE 55

ICP: Nearest Neighbor Computation

Closest points

n How to find closest points efficiently? n Straightforward complexity: number of points on , number of points on .

yi = arg min

y∈Y ky xik

slide-56
SLIDE 56

Closest points: Voronoi Cells

Source:

  • M. Bronstein
  • 1
  • 0.8
  • 0.6
  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1

  • 1

.8 .6 .4 .2 0.2 0.4 0.6 0.8 1

V (y)

V (y 2 Y ) = {z 2 R3 : ky zk < ky0 zk 8 y0 2 Y 6= y}

slide-57
SLIDE 57

Closest points: Voronoi Cells

Approximate nearest neighbors

n To reduce search complexity, approximate Voronoi cells. n Use binary space partition trees (e.g. kd-trees or octrees). n Approximate nearest neighbor search complexity: .

  • 1
  • 0.8
  • 0.6
  • 0.4
  • 0.2
0.2 0.4 0.6 0.8 1
  • 1
.8 .6 .4 .2 0.2 0.4 0.6 0.8 1
  • 1
  • 0.8
  • 0.6
  • 0.4
  • 0.2
0.2 0.4 0.6 0.8 1
  • 1
.8 .6 .4 .2 0.2 0.4 0.6 0.8 1
  • M. Bronstein
slide-58
SLIDE 58

ICP: Optimal Transformation

Problem Formulation: 1. Given two sets points: in . Find the rigid transform: that minimizes:

{xi}, {yi}, i = 1..n

R, t

N

X

i=1

kRxi + t yik2

2

slide-59
SLIDE 59

ICP: Optimal Transformation

Problem Formulation: 1. Given two sets points: in . Find the rigid transform: that minimizes:

{xi}, {yi}, i = 1..n

R, t

N

X

i=1

kRxi + t yik2

2

slide-60
SLIDE 60

ICP: Optimal Transformation

Problem Formulation: 1. Given two sets points: in . Find the rigid transform: that minimizes: 2. Closed form solution with rotation matrices: 1. Construct: , where 2. Compute the SVD of C: 1. If 2. Else 3. Set Note that C is a 3x3 matrix. SVD is very fast.

{xi}, {yi}, i = 1..n

R, t

Arun et al., Least-Squares Fitting

  • f Two 3-D Point Sets

C = UΣV T

det(UV T ) = 1, Ropt = UV T

Ropt = U ˜ ΣV T , ˜ Σ = diag(1, 1, . . . , −1)

C = PN

i=1(yi − µY )(xi − µX)T

µX = 1

N

P

i xi, µ

topt = µY − RoptµX

, µY = 1

N

P

i yi,

N

X

i=1

kRxi + t yik2

2

slide-61
SLIDE 61

Iterative Closest Point.

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

N

X

i=1

kRxi + t yik2

2

Convergence:

  • at each iteration decreases.
  • Converges to local minimum
  • Good initial guess: global minimum.

PN

i=1 d2(xi, Y )

[Besl&McKay92]

slide-62
SLIDE 62

Variations of ICP

  • 1. Selecting source points (from one or both scans): sampling
  • 2. Matching to points in the other mesh
  • 3. Weighting the correspondences
  • 4. Rejecting certain (outlier) point pairs
  • 5. Assigning an error metric to the current transform
  • 6. Minimizing the error metric w.r.t. transformation
slide-63
SLIDE 63

Iterative Closest Point.

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

N

X

i=1

kRxi + t yik2

2

slide-64
SLIDE 64

Iterative Closest Point.

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

N

X

i=1

kRxi + t yik2

2

Problem: uneven sampling

slide-65
SLIDE 65

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

Solution: Minimize distance to the tangent plane

N

X

i=1

d(Rxi + t, P(yi))2 =

N

X

i=1

Iterative Closest Point.

Chen, Medioni, ‘91

  • (Rxi + t − yi)T nyi

2

slide-66
SLIDE 66

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

Iterative Closest Point.

Kok-Lim Low, ‘04

Solution: Minimize distance to the tangent plane

N

X

i=1

d(Rxi + t, P(yi))2 =

N

X

i=1

  • (Rxi + t − yi)T nyi

2

slide-67
SLIDE 67

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

=

N

X

i=1

  • Iterative Closest Point.

Question: How to minimize the error? Challenge: Although the error is quadratic (linear derivative), the space of rotation matrices is not linear. Problem: No closed form solution!

Ropt, topt = arg min

RT R=Id, t

  • (Rxi + t − yi)T nyi

2

slide-68
SLIDE 68

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

Iterative Closest Point.

Common Solution: Linearize rotation. Assume rotation angle is small.

Rxi ≈ xi + r × xi

: axis, : angle of rotation.

krk2

krk

Note: follows from Rodrigues’s formula R(r, α)xi = xi cos(α) + (r × xi) sin(α) + r(rT xi)(1 − cos(α)) And first order approximations: sin(α) ≈ α, cos(α) ≈ 1

=

N

X

i=1

  • Ropt, topt = arg min

RT R=Id, t

  • (Rxi + t − yi)T nyi

2

slide-69
SLIDE 69

Given a pair of shapes, X and Y, iterate:

  • 1. For each

find nearest neighbor .

  • 2. Find deformation

minimizing:

Iterative Closest Point.

r, t

N

X

i=1

  • (xi + r × xi + t − yi)T nyi
  • E(r, t) =

∂ ∂rE(r, t) = 0

∂ ∂tE(r, t) = 0 Setting: and leads to a 6x6 linear system

Ax = b

A = X ✓ xi × nyi nyi ◆ ✓ xi × nyi nyi ◆T

x = ✓ r t ◆

b = X (yi − xi)T nyi ✓ xi × nyi nyi ◆

2

slide-70
SLIDE 70

Iterative Closest Point.

Aligning the bunny to itself.

slide-71
SLIDE 71

3d Point Cloud Processing

Typically point cloud sampling of a shape is insufficient for most

  • applications. Main stages in processing:

1. Shape scanning (acquisition) 2. If have multiple scans, align them. 3. Smoothing – remove local noise and outliers. 4. Estimate surface normals. 5. Surface reconstruction

  • Implicit representation
  • Triangle mesh
slide-72
SLIDE 72

Normal Estimation and Outlier Removal

Fundamental problems in Point cloud processing. Although seemingly very different, can be solved with the same general approach.

slide-73
SLIDE 73

Normal Estimation

Assume we have a clean sampling of the surface. Our goal is to find the best approximation of the tangent direction, and thus the normal to the line.

slide-74
SLIDE 74

Normal Estimation

Assume we have a clean sampling of the surface. Our goal is to find the best approximation of the tangent direction, and thus the normal to the line.

slide-75
SLIDE 75

Normal Estimation

Assume we have a clean sampling of the surface. Goal: find best approximation of the normal at P. Method: Given line l through P with normal n, for another point pi:

P n Pi

d(Pi, l)

l

d(pi, l)2 = ((pi P)T n)2 nT n = ((pi P)T n)2 if knk = 1

slide-76
SLIDE 76

Normal Estimation

Assume we have a clean sampling of the surface. Goal: find best approximation of the normal at P. Method: Find n, minimizing for a set of k points (e.g. k nearest neighbors of P.

P n Pi

d(Pi, l)

l

k

X

i=1

d(pi, l)2

nopt = arg min

knk=1 k

X

i=1

((pi − P)T n)2

slide-77
SLIDE 77

Normal Estimation

Assume we have a clean sampling of the surface. Using Lagrange multiplier:

P n Pi

d(Pi, l)

l

∂ ∂n k X

i=1

((pi − P)T n)2 ! − λ ∂ ∂n

  • nT n
  • = 0

k

X

i=1

2(pi − P)(pi − P)T n = 2λn

slide-78
SLIDE 78

Normal Estimation

Assume we have a clean sampling of the surface. Using Lagrange multiplier:

P n Pi

d(Pi, l)

l

∂ ∂n k X

i=1

((pi − P)T n)2 ! − λ ∂ ∂n

  • nT n
  • = 0

Cn = λn

k X

i=1

(pi − P)(pi − P)T ! n = λn

slide-79
SLIDE 79

Normal Estimation

Assume we have a clean sampling of the surface. The normal n must be an eigenvector of the matrix: Moreover, since:

P n Pi

d(Pi, l)

l

Cn = λn

C =

k

X

i=1

(pi − P)(pi − P)T

nopt = arg min

knk=1 k

X

i=1

((pi − P)T n)2 = arg min

knk=1 nT Cn

slide-80
SLIDE 80

Normal Estimation

Assume we have a clean sampling of the surface. The normal n must be an eigenvector of the matrix: Moreover, nopt must be the eigenvector corresponding to the smallest eigenvalue of C.

P n Pi

d(Pi, l)

l

Cn = λn

C =

k

X

i=1

(pi − P)(pi − P)T

slide-81
SLIDE 81

Normal Estimation

Method Outline (PCA): 1. Given a point P in the point cloud, find its k nearest neighbors. 2. Compute 3. n: eigenvector corresponding to the smallest eigenvalue of C.

P

C = Pk

i=1 (pi − P)(pi − P)T

n

slide-82
SLIDE 82

Normal Estimation

Method Outline (PCA): 1. Given a point P in the point cloud, find its k nearest neighbors. 2. Compute 3. n: eigenvector corresponding to the smallest eigenvalue of C.

P

C = Pk

i=1 (pi − P)(pi − P)T

n

Variant on the theme: use

C =

k

X

i=1

(pi − P)(pi − P)T , P = 1 k

k

X

i=1

pi

slide-83
SLIDE 83

Normal Estimation

Critical parameter: k. Because of uneven sampling typically fix a radius r, and use all points inside a ball of radius r. How to pick an optimal r?

P n r

slide-84
SLIDE 84

Normal Estimation

Due to curvature, large r can lead to estimation bias.

Curvature effect

Due to noise, small r can lead to errors

slide-85
SLIDE 85

Normal Estimation

Estimation error under Gaussian noise for different values of curvature (2D) source: Mitra et al. ‘04 For sufficiently dense sampling:

slide-86
SLIDE 86

Normal Estimation – Neighborhood Size

2x noise 1x noise

source: Mitra et al. ‘04 Unfortunately, the curvature is not known in practice. Difficult to pick optimal size.

slide-87
SLIDE 87

Normal and Curvature Estimation

Use a variety of clean 3D models to train a deep learning- based method to estimate normals and curvature.

PCPNET: Learning Local Shape Properties from Raw Point Clouds, Proc. Eurographics 2018, Guerrero, Kleiman, O., Mitra

Estimated Curvature Estimated normals Training set of 3D triangle meshes

slide-88
SLIDE 88

Outlier Removal

Goal: remove points that do not lie close to a surface.

slide-89
SLIDE 89

Outlier Estimation – PCA

Since the covariance matrix: For any vector v, the Releigh quotient: Intuitively, vmin, maximizes the sum of angles to each vector . P Pi

C =

k

X

i=1

(pi − P)(pi − P)T

vT Cv vT v =

k

X

i=1

  • (pi P)T v

2 if kvk = 1

=

k

X

i=1

(kpi Pk cos(θi))2

v Pj

θi

(pi − P)

θj

slide-90
SLIDE 90

Outlier Estimation

If all the points are on a line, then and is large. There exists a direction along which the point cloud has no variability. P Pi

θi

v

min

v

vT Cv vT v = λmin(C) = 0

λmax(C)

If points are scattered randomly, then: .

λmax(C) ≈ λmin(C)

λ1 λ2 small

λ1 λ2 ≈ 1

slide-91
SLIDE 91

Outlier Estimation – PCA

If all the points are on a line, then and is large. There exists a direction along which the point cloud has no variability. P Pi

θi

v

min

v

vT Cv vT v = λmin(C) = 0

λmax(C)

If points are scattered randomly, then: .

λmax(C) ≈ λmin(C)

Thus, can remove points where for some threshold. 1 2 > ✏ In 3d we expect two zero eigenvalues, so use for some threshold.

2 3 > ✏

slide-92
SLIDE 92

3d Point Cloud Processing

Typically point cloud sampling of a shape is insufficient for most

  • applications. Main stages in processing:

1. Shape scanning (acquisition) 2. If have multiple scans, align them. 3. Smoothing – remove local noise and outliers. 4. Estimate surface normals. 5. Surface reconstruction

  • Implicit representation
  • Triangle mesh
slide-93
SLIDE 93

3d Point Cloud Reconstruction

Main Goal: Construct a polygonal (e.g. triangle mesh) representation of the point cloud. PCD curve/ surface

Reconstruction algorithm

slide-94
SLIDE 94

3d Point Cloud Reconstruction

Main Problem: Data is unstructured. E.g. in 2D the points are not ordered. PCD curve/ surface

Reconstruction algorithm

slide-95
SLIDE 95

3d Point Cloud Reconstruction

Main Problem: Data is unstructured. E.g. in 2D the points are not ordered. Inherently ill-posed (aka difficult) problem. PCD curve/ surface

Reconstruction algorithm

slide-96
SLIDE 96

3d Point Cloud Reconstruction

Today: Reconstruction through Implicit models.

slide-97
SLIDE 97

f(x) < 0

{x, s.t.f(x) = 0}

f(x, y) = x2 + y2 − r2

Implicit surfaces

Given a function f(x), the surface is defined as:

f(x) > 0

slide-98
SLIDE 98

Implicit surfaces

Some 3d scanning technologies (e.g. CT, MRI) naturally produce implicit representations

CT scans of human brain

slide-99
SLIDE 99

Converting from a point cloud to an implicit surface: Simplest method: 1. Given a point x in space, find nearest point p in PCD. 2. Set – signed distance to the tangent plane.

x

p

f(x) = (x − p)T np

x − p

(x − p)T np

Implicit surfaces

Hugues Hoppe: Surface reconstruction from unorganized points

slide-100
SLIDE 100

Converting from a point cloud to an implicit surface: Simplest method: 1. Given a point x in space, find nearest point p in PCD. 2. Set – signed distance to the tangent plane.

x

p

f(x) = (x − p)T np

x − p

(x − p)T np

f(x) < 0

f(x) > 0

Implicit surfaces

Hugues Hoppe: Surface reconstruction from unorganized points

slide-101
SLIDE 101

Implicit surfaces

Converting from a point cloud to an implicit surface: Simplest method: 1. Given a point x in space, find nearest point p in PCD. 2. Set – signed distance to the tangent plane. 3. Note: need consistently oriented normals. PCA only gives normals up to orientation

f(x) = (x − p)T np

Hugues Hoppe: Surface reconstruction from unorganized points

slide-102
SLIDE 102

Implicit surfaces

Converting from a point cloud to an implicit surface: Simplest method: 1. Given a point x in space, find nearest point p in PCD. 2. Set – signed distance to the tangent plane. 3. Note: need consistently oriented normals. In general, difficult problem, but can try to locally connect points and fix orientations.

f(x) = (x − p)T np

Hugues Hoppe: Surface reconstruction from unorganized points

slide-103
SLIDE 103

Converting from a point cloud to an implicit surface: Simplest method: 1. Given a point x in space, find nearest point p in PCD. 2. Set – signed distance to the tangent plane.

x

p

f(x) = (x − p)T np

x − p

(x − p)T np

f(x) < 0

f(x) > 0

Implicit surfaces

Note: distance function is created locally. Can be noisy.

slide-104
SLIDE 104

Poisson Surface Reconstruction

Main Goal: construct an indicator function of a surface

Poisson surface reconstruction, Kazhdan, Bolitho, Hoppe, SGP '06

slide-105
SLIDE 105

Poisson Surface Reconstruction

Observation: The gradient of the indicator function should agree with the vector field of oriented points.

slide-106
SLIDE 106

Poisson Surface Reconstruction

Solving for the indicator function:

min

χ krχ V k

slide-107
SLIDE 107

Poisson Surface Reconstruction

Solving for the indicator function:

Or, applying the divergence operator:

min

χ k∆χ div(V )k

slide-108
SLIDE 108

Poisson Surface Reconstruction

Given the indicator function – extract the isosurface.

Poisson surface reconstruction, Kazhdan, Bolitho, Hoppe, SGP '06

slide-109
SLIDE 109

Marching Cubes

Converting from implicit to explicit representations. Goal: Given an implicit representation: Create a triangle mesh that approximates the surface.

{x, s.t.f(x) = 0}

One of the most cited computer graphics papers of all time. Lorensen and Cline, SIGGRAPH ‘87

slide-110
SLIDE 110

Marching Squares (2D)

Given a function:

  • inside
  • utside

f(x) < 0 f(x) > 0

f(x)

1. Discretize space. 2. Evaluate

  • n a grid.

f(x)

slide-111
SLIDE 111

Marching Squares (2D)

Given a function:

  • inside
  • utside

f(x) < 0 f(x) > 0

f(x)

1. Discretize space. 2. Evaluate

  • n a grid.

3. Classify grid points (+-) 4. Classify grid edges 5. Compute Intersections 6. Connect Intersections

f(x)

slide-112
SLIDE 112

Marching Squares (2D)

Computing the intersections:

  • Edges with a sign switch contain

intersections.

  • Simplest way to compute t: assume

f is linear between x1 and x2: f(x1) < 0, f(x2) > 0 ⇒ f(x1 + t(x2 − x1)) = 0 for some 0 ≤ t ≤ 1

t = f(x1) f(x2) − f(x1)

slide-113
SLIDE 113

Marching Squares (2D)

Connecting the intersections:

  • Grand principle: treat each cell

separately!

  • Enumerate all possible

inside/outside combinations.

slide-114
SLIDE 114

Marching Squares (2D)

Connecting the intersections:

  • Grand principle: treat each cell separately!
  • Enumerate all possible inside/outside combinations.
  • Group those leading to the same intersections
slide-115
SLIDE 115

Marching Squares (2D)

Connecting the intersections:

  • Grand principle: treat each cell separately!
  • Enumerate all possible inside/outside combinations.
  • Group those leading to the same intersections.
  • Group equivalent after rotation.
  • Connect intersections
slide-116
SLIDE 116

Marching Squares (2D)

Connecting the intersections: Ambiguous cases: 2 options: 1) Can resolve ambiguity by subsampling inside the cell. 2) If subsampling is impossible, pick one of the two possibilities.

slide-117
SLIDE 117

Marching Cubes (3D)

Same basic machinery applies to 3d. cells become cubes (voxels) lines become triangles

  • 256 different cases
  • 14 after symmetries
slide-118
SLIDE 118

Marching Cubes (3D)

Same basic machinery applies to 3d. cells become cubes (voxels) lines become triangles

  • 256 different cases
  • 14 after symmetries
  • 6 ambiguous cases (in boxes)
slide-119
SLIDE 119

Marching Cubes (3D)

Same basic machinery applies to 3d. cells become cubes (voxels) lines become triangles

  • 256 different cases
  • 14 after symmetries
  • 6 ambiguous cases (in boxes)
  • Inconsistent triangulations can lead to holes and wrong topology.
slide-120
SLIDE 120

Marching Cubes (3D)

Same basic machinery applies to 3d. cells become cubes (voxels) lines become triangles

  • 256 different cases
  • 14 after symmetries
  • 6 ambiguous cases (in boxes)
  • Inconsistent triangulations can lead to holes and wrong topology.
  • More subsampling rules – leads to 33 unique cases.

Chernyaev, Marching Cubes 33,’95

slide-121
SLIDE 121

Marching Cubes (3D)

Main Strengths:

  • Very multi-purpose.
  • Extremely fast and parallelizable.
  • Relatively simple to implement.
  • Virtually parameter-free

Main Weaknesses:

  • Can create badly shaped (skinny) triangles.
  • Basic versions do not provide topological guarantees.
  • Many special cases (implemented as big lookup tables).
  • No sharp features.
slide-122
SLIDE 122

Marching Cubes – Extensions

Marching Tetrahedra. Instead of cubes (grid) use Tetrahedra.

  • 6 Tetrahedra per voxel
  • 16 cases (8 after symmetry)
  • Up to 2 triangles per tet
  • No ambiguities.

Can be used when input is discretized as tetrahedra.

slide-123
SLIDE 123

Conclusions

Wide variety of 3d scanning techniques. Majority of reconstruction methods require normal information. Reconstruction is a difficult, highly data-dependent problem. Marching cubes: classical method for converting an implicit to explicit representation. Many extensions to:

  • Improve topology
  • Handle sharp features
  • Improve quality

Rigid shape registration can be done efficiently with ICP.