37
Normal Estimation in Point Clouds 2D/3D Shape Manipulation, 3D Printing March 13, 2013 Slides from Olga Sorkine

2D/3D Shape Manipulation, 3D Printing

  • Upload
    duante

  • View
    110

  • Download
    0

Embed Size (px)

DESCRIPTION

2D/3D Shape Manipulation, 3D Printing. Normal Estimation in Point Clouds. Slides from Olga Sorkine. Implicit Surface Reconstruction. Implicit function from point clouds Need consistently oriented normals. 0. < 0. > 0. Normal Estimation. - PowerPoint PPT Presentation

Citation preview

Page 1: 2D/3D Shape Manipulation, 3D Printing

Normal Estimation in Point Clouds

2D/3D Shape Manipulation,3D Printing

March 13, 2013

Slides from Olga Sorkine

Page 2: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Implicit Surface Reconstruction

● Implicit function from point clouds

● Need consistently oriented normals

< 0 > 00

March 13, 2013 2

Page 3: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 3

Page 4: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

March 13, 2013 4

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

Page 5: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 5

Page 6: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 6

Page 7: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 7

Page 8: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 8

Page 9: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 9

Page 10: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 10

Page 11: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 11

Page 12: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 12

Page 13: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 13

Page 14: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 14

Page 15: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 15

Page 16: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 16

Page 17: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Estimation

● Assign a normal vector n at each point cloud point x Estimate the direction

by fitting a local plane Find consistent global

orientation by propagation (spanning tree)

March 13, 2013 17

Page 18: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Local Plane Fitting

● For each point x in the cloud, pick k nearest neighbors or all points in r-ball:

● Find a plane Π that minimizes the sum of square distances:

March 13, 2013 18

Page 19: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Local Plane Fitting

March 13, 2013 19

● For each point x in the cloud, pick k nearest neighbors or all points in r-ball:

● Find a plane Π that minimizes the sum of square distances:

Page 20: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Linear Least Squares?

x

y

March 13, 2013 20

Page 21: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Linear Least Squares?

● Find a line y = ax+b s.t.

x

y

March 13, 2013 21

Page 22: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Linear Least Squares?

● Find a line y = ax+b s.t.

● But we would like true orthogonal distances

x

y

March 13, 2013 22

Page 23: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Best Fit with SSD

x

y

x

y

March 13, 2013 23

Page 24: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Principle Component Analysis (PCA)

● PCA finds an orthogonal basis that best represents a given data set

● PCA finds the best approximating line/plane/orientation… (in terms of distances2)

x y

z

x

yx

y

March 13, 2013 24

Page 25: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Notations

• Input points:

• Looking for a (hyper) plane passing through c with normal n s.t.

March 13, 2013 25

Page 26: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Notations

• Input points:

• Centroid:

• Vectors from the centroid:

m

March 13, 2013 26

Page 27: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

• It can be shown that:

• m minimizes SSD• m will be the origin of

the (hyper)-plane• Our problem becomes:

Centroid: 0-dim Approximation

m

March 13, 2013 27

Page 28: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

● Solution with Principal Components Analysis (PCA): Just use PCA

● Input:● Compute centroid = plane origin● Compute SVD of

● Singular Value Decomposition: Y = UΣV* ● Plane normal n is last column vector of U.

Best Fitting Plane Recipe -- PCA

March 13, 2013 34

Page 29: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Relation between SVD / Eigenvectors

● If we have a Singular Value Decomposition of a matrix Y:

Y = UΣV*

● Then the column vectors of U are the eigenvectors of YY*.

March 13, 2013 35

Page 30: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

● Input:● Compute centroid = plane origin● Solution using Eigenvectors:● Compute scatter matrix

● The plane normal n is the eigenvector of S with the smallest eigenvalue

Best Fitting Plane Recipe -- Eigenvectors

March 13, 2013 36

Page 31: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

What does Scatter Matrix do?

• Let’s look at a line l through the center of mass m with direction vector v, and project our points xi onto it. The variance of the projected points xi is:

Original set Small variance Large variance

l l l l

vm

xi

xi

l

yi

March 13, 2013 37

Page 32: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

What does Scatter Matrix do?

Original set Small variance Large variance

l l l l

vm

xi

xi

l

yi

March 13, 2013 38

● The scatter matrix measures the variance of our data points along the direction v

Page 33: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Principal Components

• Eigenvectors of S that correspond to big eigenvalues are the directions in which the data has strong components (= large variance).

• If the eigenvalues are more or less the same – there is no preferable direction.

March 13, 2013 39

Page 34: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Principal Components

• There’s no preferable direction

• S looks like this:

• Any vector is an eigenvector

● There’s a clear preferable direction

● S looks like this:

is close to zero, much smaller than

March 13, 2013 40

Page 35: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

Normal Orientation

● PCA may return arbitrarily oriented eigenvectors

● Wish to orient consistently

● Neighboring points should have similar normals

March 13, 2013 41

Page 36: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

● Build graph connecting neighboring points Edge (i,j) exists if xi kNN(∈ xj) or xj kNN(∈ xi)

● Propagate normal orientation through graph For neighbors xi, xj : Flip nj if ni

Tnj < 0 Fails at sharp edges/corners

● Propagate along “safe” paths (parallel normals) Minimum spanning tree with angle-based edge

weights wij = 1- | niTnj |

Normal Orientation

March 13, 2013 42

Page 37: 2D/3D Shape Manipulation, 3D Printing

Olga Sorkine-Hornung #

• Build graph connecting neighboring points– Edge (i,j) exists if xi kNN(∈ xj) or xj kNN(∈ xi)

• Propagate normal orientation through graph– For neighbors xi, xj : Flip nj if ni

Tnj < 0– Fails at sharp edges/corners

• Propagate along “safe” paths (parallel normals)– Minimum spanning tree with angle-based edge

weights

Normal Orientation

March 13, 2013 43