90
Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Embed Size (px)

Citation preview

Page 1: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Curve fitting to point clouds

Reporter: Lincong Fang

Oct 18, 2006

Page 2: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Curve fitting

The data points are ordered.

Page 3: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Curve fitting to point clouds

The data points are unorganized.

Page 4: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Applications

Some applications: Reverse engineering Curve design Surface reconstruction Etc.

Page 5: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Approaches overview Preprocess the point clouds

Thin the point clouds (Levin98, Lee00) Point clusters (Lin 04) Map into a digital image (Goshtasby00)

Mathematical model Parameteric curves Implicit curves

Other methods

Page 6: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Curve Reconstruction from unorganized points

In-Kwon LeeCAGD 2000

Page 7: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Least squares

2{P ( , ) | 1,..., }i i iS x y i N

2

1

Min ( )N

l i ii

D ax b y

A regression line,L:y=ax+b

Page 8: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Moving Least Squares

2

1

Min ( )i i

N

l ii

D ax b y w

2 /r H

iw e2

*|| P P ||ir

: prescribed real constantH

*

*

For a point P ,

a local regression line, L : y ax b

Page 9: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Moving Least Squares

*

*

New origin: P

axis: parallel to Lx

ˆ ˆ ˆ ˆ{P ( , ) | 1,..., }: transformed point seti i iS x y i N 2

* *ˆˆ ˆ ˆQ : for P :y ax bx c

2 2

1

ˆ ˆ ˆMin ( )N

q i ii ii

D ax bx c y w

*P̂

(0, )c

Page 10: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Moving Least Squares

2 2

1

ˆ ˆ ˆMin ( )N

q i ii ii

D ax bx c y w

3 2

3 22 3 1, if ,

0 if ,

(wyvill et al.,1986)

i

r rr H

w H Hr H

Page 11: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Moving Least Squares

Page 12: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

The choice of H

Page 13: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Improved Moving Least Squares

Delaunay triangulationEuclidean minimumspanning tree (EMSP)

Page 14: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006
Page 15: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Correlation

Covariance:

( , ) [( ( ))( ( ))]

= ( ) ( ) ( )

Cov X Y E X E X Y E Y

E XY E X E Y

( , )( , )

( ) ( )

Cov X YX Y

SD X SD Y

, : random variablesX Y

Page 16: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Correlation

Page 17: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006
Page 18: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006
Page 19: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Refining

*P||P Q ||

|A|

*j

jA

Page 20: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Compare with and without EMST

Page 21: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Ordering points

Page 22: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Example

Page 23: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Approaches overview Preprocess the point clouds

Thin the point clouds (Levin98, Lee00) Point clusters (Lin 04) Map into a digital image (Goshtasby00)

Mathematical model Parameteric curves Implicit curves

Other methods

Page 24: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Curve reconstruction based on interval B-spline curve

Hongwei Lin, Wei Chen, Guojin Wang

The Visual Computer,21(6), 418-427,2005

Page 25: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Overview

Page 26: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

max : the largest edge length of adjecent

edges of in (Delaunay triangulation)

pd

p M

max

max

Average sampling radius:

pp S

d

rN

Page 27: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006
Page 28: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Shape-based joining scheme

Page 29: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006
Page 30: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006
Page 31: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006
Page 32: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006
Page 33: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Sequence Joining Method

Page 34: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Boundary sequence

Page 35: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Example

Page 36: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Example

Page 37: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Approaches overview Preprocess the point clouds

Thin the point clouds (Levin98, Lee00) Point clusters (Lin 04) Map into a digital image (Goshtasby00)

Mathematical model Parameteric curves Implicit curves

Other methods

Page 38: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Grouping and parameterizing irregularly spaced points for curve fitting

Ardeshir GoshtasbyACM Transactions on Graphics, 1

9:185--203, 2000

Page 39: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

,Inverse distance between ( , ,) and ( ) :i ix y x y

2 2 1/ 2[( ) ( ) ]i ix x y y

2 2 2 1/ 2

1

A surface

( , ) [( ) ( ) ]N

i ii

g x y x x y y r

Page 40: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Minor and major ridges

Page 41: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Map into a digital image

Page 42: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Minor and major ridges

Page 43: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Example

Page 44: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Example

Page 45: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Approaches overview Preprocess the point clouds

Thin the point clouds (Levin98, Lee00) Point clusters (Lin 04) Map into a digital image (Goshtasby00)

Mathematical model Parameteric curves Implicit curves

Other methods

Page 46: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Multidimensional curve fitting to unorganized data points by nonlinear minimization

Lian Fang, David C GossardCAD 95

Page 47: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

2

1 1

Min

( ) ( ) ( ) || || || ( ) ||

mM N

m i imCm i

d w uE w u P w u

du

1 2( ) ( ( ), ( ),..., ( ))dw u x u x u x u

Page 48: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Physical analogy2 2 2

N2

i=1

( ) ( || ' || || '' || || ''' || )

+ ( , ( ))

C

i i

E w w w w du

D P w u

2

2

|| ' || : strain energy of stretching

|| '' || : strain energy of bending

error term: strain energy stored in springs

w

w

Page 49: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

1

( ) ( )n

Ti i

i

w u q u Q

: a set of vectorsiq

( ) : a set of functionsi u

1 2[ , ,..., ]TnQ q q q

1 2[ , ,..., ]Tn

Page 50: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Error term

2Min ( ) || ( ) || ,0G u P w u u h

( ) : ( ) 0g u G u

,0 0

( ) ( )M M

ii j j M

i j

g u a u g B t

Page 51: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Example

Page 52: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Fitting B-spline curves to point clouds by curvature-based squared distance minimization

Wenping Wang, Helmut Pottmann, Yang LiuToG 2006

Page 53: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

2

1

1Min ( ) ( ( ), )

2

n

k sk

f t d P t X f

1

( ) ( )m

i ii

P t PB t

( ( ), ) min || ( ) ||k ktd P t X P t X

: regularization termsf

Page 54: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

,1

( ) ( ) : current fitting curvem

c i c ii

P t B t P

1 2

,1

( , ,..., )

( ) ( )( ) : updated curves

m

c

m

i c i ii

D D D D

P P D

P t B t P D

Page 55: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Point distance minimization

21ˆ || ( ) ||2 k k s

k

f P t X f ( ) : foot point

of on ( )c k

k c

P t

X P t2

, || ( ) ||PD k k ke P t X

Page 56: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Tangent distance minimization

2, || ( ( ) ) ||T

TD k k k ke P t X N

,

1

2TD TD k sk

f e f

Page 57: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Squared distance minimization

Pottman 2003

2 2( , )d

g x y x yd

0( , ) ( , )X x y N X

2 2| |ˆ ( , )

| |

dg x y x y

d

Page 58: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Squared distance minimization

/( ) max{0, /( )}d d d d

2

2,

2

[( ( ) ) ]

[( ( ) ) ] ,if 0

[( ( ) ) ] , if 0

Tk k k

TSD k k k k

Tk k k

dP t X T

d

e P t X N d

P t X N d

Page 59: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Squared distance minimization

1 21

1

2

n

kk

f e F F

2

1

22

|| '( ) ||

|| ''( ) ||

F P t dt

F P t dt

Page 60: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Comparison

PDM has slow convergence TDM has fast but unstable

convergence SDM yields a more balanced

performance between efficiency and stability

Page 61: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Comparison

Initial curve The fitting curve generated by PDM, TDM, SDM in 50 iterations

Page 62: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Foot point computation

2 1 1 2 1 2( ) /( )kt d t d t d d

Page 63: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Open curves

,0 ,0 ,0cos (1 cos )outer PD SDe e e

Page 64: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Initial curves and control points

Specify by user

Compute a quadtree partition ofthe data points

Automatic or specify by user, and adjustment (Yang 2004)

Page 65: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Example

Page 66: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Reconstructing B-spline curves from point clouds—A tangential flow approach using least squares minimization

Yang Liu, Huaiping Yang, Wenping Wang

Shape Modeling and Applications, 2005 International Conference

Page 67: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

( )k k kV X P t 2 2 2( , ( )) ( ) ( )T T

k k k k k kd X P t V T V N

2 2

0

1( ( ) ( ) )

1

1

1

NT T

k k k k kk

s

F V T V NN

fn

21 12

0 0|| '( ) || (1 ) || ''( ) ||sf P t dt P t

Page 68: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Input

Unacceptable point clouds.

Page 69: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Data Analysis

mUniform cells{B ,m=0,...,M}

Thickness mw

Page 70: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Initialization and approximation

Random point S

10S il wI

Fitting line LB-spline curve

Page 71: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Growing

Page 72: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Knot insertion

All points are handled, add a knot where the maximum error occurs

Else insert a knot and redistribute all the knots and make them equally spaced

Page 73: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Finding projection points

*2

( ( )) '( )

( ( )) "( ) '( )i i i

i ii i i i

X P t P tt t

X P t P t P t

Sharp corners

Page 74: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Filtering points

*

* *8

* *

satisfies

|| ( ) || / 2

| ( ( )) '( ) |10

|| ( ) |||| '( ) ||

will not involved

i

i i i

i i i

i i i

X

X P t w

X P t P t

X P t P t

T

*( )iP t

iX

Page 75: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Other cases

Less control pointsEMST with wrong topologyVery sharp corner

Page 76: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Example

Page 77: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Example

Page 78: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Approaches overview Preprocess the point clouds

Thin the point clouds (Levin98, Lee00) Point clusters (Lin 04) Map into a digital image (Goshtasby00)

Mathematical model Parameteric curves Implicit curves

Other methods

Page 79: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Fitting unorganized point clouds with active implicit B-spline curves

Zhouwang Yang, Jiansong Deng, Falai Chen

Visual Computer 2005

Page 80: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

,

( , ) ( ) ( )rs r sr s

f x y c M x N y

2

Implicit B-spline curve

( ) {( , ) | ( , ) 0}V f x y f x y

Page 81: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

2

1

Min ( ) ( , ( )) ( )M

i Ti

R f d P V f wEng f

2 2 2( ) ( )T xx xy yyEng f f f f dxdy

( )( , ( )) min || ||

Y V fd P V f P Y

Page 82: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

( ) 0

0 1( ) ( ) 0

1 0T

f X

P X f X

( )( , ( )) min || ||

Y V fd P V f P Y

Page 83: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

0

0

f f g

X X X

Page 84: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Example

Page 85: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006
Page 86: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006
Page 87: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Approaches overview Preprocess the point clouds

Thin the point clouds (Levin98, Lee00) Point clusters (Lin 04) Map into a digital image (Goshtasby00)

Mathematical model Parameteric curves Implicit curves

Other methods

Page 88: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Conclusion

Complex topology Digital image Implicit curves Tangential flow

Initial curves Parameteric curves Implicit curves

Page 89: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006

Problems and future work

Knot insertion Foot point compute Singular points Surface reconstruction

Page 90: Curve fitting to point clouds Reporter: Lincong Fang Oct 18, 2006