A Simple, Fast, and Effective Scattered Data Interpolation using

Download Report

Transcript A Simple, Fast, and Effective Scattered Data Interpolation using

A Simple, Fast, and Effective
Scattered Data Interpolation using
Multilevel Local B-spline Approximation
KSIAM 2004, Gyungju, Dec. 3~4
Lee Byung Gook, Lee Joon Jae
Dongseo University, Busan, Korea
4th Dec. 2004
Outline

Overview

B-spline approximation




Global approximation
Quasi-interpolants
Multilevel B-spline approximation
Multiresolution applications
 Image representation and compression
 Surface approximation
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Overview



Uniform data(image, range data)
Scatter data(3D scanner, PCB)
Algorithms





m
f ( x)   ci Bi ,d
i 1
B-spline approximation
Radial basis function interpolation
1 n
Moving least square method
min{  ( y j  f ( x j ))2    f '' ( x)2 dx}
n j 1
Thin plate spline
Multilevel B-spline approximation with quasi-interpolation
n
min{ ( y j  p( x j ))  ( x, x j )}
n
s( x)    j (|| x  x j ||)  p( x)
2
j 1
 ( x  xi )  exp(
KSIAM 2004, Gyungju, Dec. 3~4
|| x  xi ||
), p  m
h2
2
j 1
n
  j p( x j )  0, p m
 ( x)  ( x 2   )  / 2
j 1
[email protected]
B-spline Approximation

Cubic B-spline approximation





Scatter data points : P = {Pi }in= 1, Pi = (x i , y i , z i ) Î R 3
Rectangular domain : W= {(x , y ) | 0 £ x < m x , 0 £ y < m y }
Set hx,hy as the knot interval, where n x = m x / hx , n y = m y / hy
x-direction:  x  3hx , , 0, hx , , nx hx , , (nx  3)hx 
y-direction:  y  3hy , , 0, hy , , ny hy , , (ny  3)hy 
Set (nx +3)x(ny +3) control lattice, 
Let ij as control point on lattice , located at (ihx, jhy) for
i = -1,0,1,…,mx+1 and j = -1,0,1,…,my+1
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Initial Approximation Function


Formulate approximate function f as a uniform bicubic
B-spline function, defined by a control lattice 
Approximation function f is defined as
nx 1 n y 1
f ( x, y )    ij Bi ,3 ( x) B j ,3 ( y )
i 1 j 1

Bi and Bj are uniform cubic B-spline basis functions,
where the knot vector are
 ix  {(i  2)hx ,(i  1)hx , ihx ,(i  1)hx ,(i  2)hx }
 jy  {( j  2)hy ,( j  1)hy , jhy ,( j  1)hy ,( j  2)hy }
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Cubic B-spline Basis Function

B-spline basis function of degree 3 on a uniform
partition (-2,-1,0,1,2) is defined as the piecewise
polynomial,
(t+2)3/6,
(-3t3 – 6t2 + 4)/6,
B( t | -2, -1, 0, 1, 2) =
(3t3 – 6t2 + 4)/6,
(2 – t)3/6,
KSIAM 2004, Gyungju, Dec. 3~4
-2 < t · -1
-1· t < 0
0·t<1
1·t<2
[email protected]
Control Lattice Configuration
(my+3)hy
(my+2)hy
Legend:
(my+1)hy
ny
Control Point
Data Point
(my-1)hy
Domain
Knot Vector
……
In x-y axis:
mx=hxnx
my=hyny
hy
0
-hy
-2hy
-3hy
-3hx
-2hx
KSIAM 2004, Gyungju, Dec. 3~4
-hx
0
hx
……
(mx-1)hx
nx (mx+1)hx (mx+2)hx (mx+3)hx
[email protected]
Using Global – curve case

Linear system solution B = Z
 B1,3 (0)
 B (1)
 1,3


 B1,3 (n)

B0,3 (0)
B0,3 (1)
B0,3 (n)
Bm 1,3 (0)   1   z0 
Bm 1,3 (1)   0   z1 

 

  

  
Bm 1,3 (n)  m 1   zn 
Least-square solution to find control points
 = (BTB)-1BTZ
-1
KSIAM 2004, Gyungju, Dec. 3~4
0
1
m-1 m m+1
[email protected]
Using Global – surface case

Linear system solution involves all data points B = Z
B1,3 (0) B0,3 (0)
 B1,3 (0) B1,3 (0)

B1,3 (0) B0,3 (1)
 B1,3 (0) B1,3 (1)

B1,3 (0) B0,3 (2)
 B1,3 (0) B1,3 (2)


 B (n ) B (n ) B (n ) B (n )
1,3
x
0,3
y
 1,3 x 1,3 y


Bmx 1,3 (0) Bmy 1,3 (0)   1,1   z00 

 

Bmx 1,3 (0) Bmy ,3 (1)
Bmx 1,3 (0) Bmy 1,3 (1)   1,0   z01 

 

Bmx 1,3 (0) Bmy ,3 (2)
Bmx 1,3 (0) Bmy 1,3 (2)   1,1    z02 

 


 





Bmx 1,3 (nx ) Bm y ,3 (n y ) Bmx 1,3 (nx ) Bm y 1,3 (n y )  mx 1, m y 1   znxn y 
Bmx 1,3 (0) Bmy ,3 (0)
Least-square solution to find control points
 = (BTB)-1BTZ
Becomes complex to solve the least-square solution
when number of data points increase
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
B-Spline Algorithm Result
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Quasi-Interpolation




Introduce by deBoor and Fix
Local property
Constructs a B-spline curve to approximate another curve
Exact where possible, otherwise best-fitting
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Quasi-interpolation

We shall approximate f by an approximation Pd f in a spline
space Sd, on the form
n
Pd f ( x)   ( j f ) B j ,d
j 1
where {Bj,d} is a sequence of B–spline of order d for the knot
vector  =( j )nj 1d 1

j f are appropriate linear functional chosen so that:


Pd f can be applied to a large class of functions including, for example,
continuous functions
Pd f is local in the sense that (Pd f )(x) depends only on values of f in a
small neighborhood of x
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
How to construct j f

We shall construct j f on the
form
m
j
 j f   w j ,k f ( x j ,k )
mj
k 1
k 1
where {x j ,k } are given data points in the vicinity of the
support [j , j+d+1] of the B-spline Bj,d

Pf  f
for all f in the spline space
S d ,
mj
 j ( Bi ,d )   w j ,k Bi ,d ( x j ,k )   i , j
k 1
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Using Quasi-Interpolation
– curve case

To compute the i get sub linear system, Bii = Zi
 Bi 3,3 ((i  2)h)
B
 i 3,3 ((i  2)h  1)


 Bi 3,3 ((i  2)h)


Bi 3,3 ((i  2) h)  i 3   z(i  2) h 
Bi 3,3 ((i  2) h  1)  i  2   z( i  2) h 1 




 


 
Bi 3,3 ((i  2)h)  i 3   z(i  2) h 
Bi  2,3 ((i  2)h)
Bi  2,3 ((i  2)h  1)
Bi  2,3 ((i  2)h)
Least-square solution, i = (BiTBi)-1BiTZi
Choose the middle control point i from the set of i
i-3
KSIAM 2004, Gyungju, Dec. 3~4
i-2
i-1
i
i+1
i+2
i+3
[email protected]
Uniform data : Curve Case

when h=1, weight w
 156 -666 2520 -666 156 


,
,
,
,
 1459 1459 1459 1459 1459 

when h=2, weight w
 -134 1072 -15997 2884 14498 2884 -15997 1072 -134 


,
,
,
,
,
,
,
,
 3299 3299 19794 9897 9897 9897 19794 3299 3299 
i-3
i-2
i-1
i
i+1
i+2
i+3
h=1
KSIAM 2004, Gyungju, Dec. 3~4
h=2
[email protected]
Using Quasi-Interpolation
– surface case
s j+5
s j+4
Pij,m
ij
s j+3
s j+2
s j+1
Pij,2
sj
Pij,1
s j-1
t i-1
KSIAM 2004, Gyungju, Dec. 3~4
ti
t i+1
t i+2
t i+3
t i+4
t i+5
[email protected]
Uniform data : Surface Case

when h=1,weighted w
-103896
393120
-103896
24336 
 24336


 2128681 2128681 2128681 2128681 2128681




 -103896 443556 -1678320 443556 -103896 




 2128681 2128681 2128681 2128681 2128681






 393120 -1678320 6350400 -1678320 393120 


 2128681 2128681 2128681 2128681 2128681






 -103896 443556 -1678320 443556 -103896 


 2128681 2128681 2128681 2128681 2128681






 24336
-103896
393120
-103896
24336 

 2128681 2128681 2128681 2128681 2128681



when h=2, weighted w
 17956

10883401


 -143648


10883401


 1071799

32650203


 -386456


32650203


 -1942732

32650203



 -386456

32650203


 1071799

32650203


 -143648


10883401


 17956

10883401
-143648
1071799
-386456
-1942732
-386456
1071799
-143648
10883401
32650203
32650203
32650203
32650203
32650203
10883401
1149184
-8574392
3091648
15541856
3091648
-8574392
1149184
10883401
32650203
32650203
32650203
32650203
32650203
10883401
-8574392
255904009
-23067674 -115962253
-23067674
255904009
-8574392
32650203
391802436
97950609
97950609
97950609
391802436
32650203
3091648
-23067674
8317456
41812232
8317456
-23067674
3091648
32650203
97950609
97950609
97950609
97950609
97950609
32650203
15541856 -115962253
41812232
210192004
41812232
-115962253
15541856
32650203
97950609
97950609
97950609
97950609
97950609
32650203
3091648
-23067674
8317456
41812232
8317456
-23067674
3091648
32650203
97950609
97950609
97950609
97950609
97950609
32650203
-8574392
255904009
-23067674 -115962253
-23067674
255904009
-8574392
32650203
391802436
97950609
97950609
97950609
391802436
32650203
1149184
-8574392
3091648
15541856
3091648
-8574392
1149184
10883401
32650203
32650203
32650203
32650203
32650203
10883401
-143648
1071799
-386456
-1942732
-386456
1071799
-143648
10883401
32650203
32650203
32650203
32650203
32650203
10883401
KSIAM 2004, Gyungju, Dec. 3~4
17956 

10883401

-143648 

10883401


1071799 

32650203

-386456 

32650203


-1942732 

32650203

-386456 

32650203


1071799 

32650203

-143648 

10883401


17956 

10883401
h=1
h=2
[email protected]
Multilevel B-spline Approximation
0 = z 0
fo
0
1
1
f1
…
…
i = i-1 – fi-1,
h
h
KSIAM 2004, Gyungju, Dec. 3~4
f
+
i = 1,2,…,h
fh
f = f0+f1+ …+fh
[email protected]
Multilevel B-Spline
Approximation




Hierarchy control lattices, 0, 1, …, h overlaid on the
domain 
Spacing for 0 is given (m+3)x(n+3) and the spacing
from one lattice to the next lattice is halved where
(2m+3)x(2n+3) lattice
The ij-th control point in k coincides with that of the
(2i, 2j)-th control point in k+1
Begin from coarsest 0 to finest h – serve to
approximate and remove the residual error
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Multilevel B-Splines Lattices








Set h = 6
0 : m0 = n0 = 1
1 : m1 = n1 = 2
2 : m2 = n2 = 4
3 : m3 = n3 = 8
4 : m4 = n4 = 16
5 : m5 = n5 = 32
6 : m6 = n6 = 64
KSIAM 2004, Gyungju, Dec. 3~4
m 2 = n2 = 4
m 1 = n1 = 2
m 0 = n0 = 1
[email protected]
Optimization with B-Spline
Refinement


In Multilevel B-Spline Approximation, the
approximation function f is the sum of each fk from each
k up to h level
B-Spline Refinement is apply progressively to the
control lattice hierarchy to overcome the computation
overhead
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Optimization of Multilevel
B-Splines Algorithm
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Refinement of Bicubic C2
Continuous Splines


Refinement operator R1/2
take fk by inserting grid lines
halfway between the k to
obtain k+1
Let denote Ri(t), i=0,1,2,3,
the univariate B-Spline basis
functions in refined space
Ri(t) = Bi(2t) on the interval
0 · t < 0.5
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Control points in ’




’2i,2j = 1/64[i-1,j-1+i-1,j+1+i+1,j-1+i+1,j+1
+6(i-1,j+i,j-1+i,j+1+i+1,j)+36ij]
’2i,2j+1 = 1/16[i-1,j+i-1,j+1+i+1,j+i+1,j+1
+6(ij+i,j+1)]
’2i+1,2j = 1/16[i,j-1+i,j+1+i+1,j-1+i+1,j+1
+6(ij+i+1,j)]
’2i+1,2j+1 = 1/4[ij+i,j+1+i+1,j+i+1,j+1]
References: Ø. Hjelle. Approximation of Scattered Data with Multilevel
B-splines. Technical Report STF42 A01011, SINTEF 2001
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Experimental Results
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Experimental Results
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]
Reference and Future Work

Reference:





S. Y. Lee, G. Wolberg, and S. Y. Shin. Scattered Data Interpolation with
Multilevel B-Splines, IEEE Transactions on Visualization and Computer
Graphics, 3(3): 229-244, 1997.
Ø. Hjelle. Approximation of Scattered Data with Multilevel B-splines.
Technical Report STF42 A01011, SINTEF 2001
Lyche, T. and Knut Mrken, Spline Methods Draft, 2003, pp. 112–177.
Byung-Gook Lee, Tom Lyche and Knut Morken, Some Examples of
Quasi-Interpolants Constructed from Local Spline Projectors,
Mathematical Methods for Curves and Surfaces Oslo 2000, T. Lyche,
and L.L. Schumaker, (eds.), Vanderbilt Press, Nashville, pp. 243-252,
2001.
Future work


Non-uniform knot vector
Different degree of B-spline Approximation
KSIAM 2004, Gyungju, Dec. 3~4
[email protected]