Choosing Basis Functions and Shape Parameters for Radial ...
Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions...
-
Upload
lauren-blackburn -
Category
Documents
-
view
241 -
download
0
Transcript of Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions...
![Page 1: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/1.jpg)
Radial Basis Functions for Computer Graphics
![Page 2: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/2.jpg)
Contents
1. Introduction to Radial Basis Functions
2. Math
3. How to fit a 3D surface
4. Applications
![Page 3: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/3.jpg)
What can Radial Basis Functions do for me?
(A short introduction)
![Page 4: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/4.jpg)
An RBF takes these points:
![Page 5: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/5.jpg)
And gives you this surface:
![Page 6: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/6.jpg)
Scattered Data Interpolation
• RBF’s are a solution to the Scattered Data Interpolation Problem– N point samples, want to interpolate/extrapolate
• This problem occurs in many areas:– Mesh repair– Surface reconstruction
• Range scanning, geographic surveys, medical data
– Field Visualization (2D and 3D)– Image warping, morphing, registration– AI
![Page 7: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/7.jpg)
History Lesson
• Discovered by Duchon in 77• Applications to Graphics:
– Savchenko, Pasko, Okunev, Kunii – 1995• Basic RBF, complicated topology bits
– Turk & O’Brien – 1999• ‘variational implicit surfaces’ • Interactive modeling, shape transformation
– Carr et al• 1997 – Medical Imaging• 2001 – Fast Reconstruction
![Page 8: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/8.jpg)
2D RBF
• Implicit Curve
• Parametric Height Field
![Page 9: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/9.jpg)
3D RBF
• Implicit Surface
• Scalar Field
![Page 10: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/10.jpg)
Extrapolation (Hole-Filling)
• Mesh repair– Fit surface to vertices of mesh
– RBF will fill holes if it minimizes curvature !!
![Page 11: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/11.jpg)
Smoothing
• Smooth out noisy range scan data
• Repair my rough segmentation
![Page 12: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/12.jpg)
Now a bit of math…
(don’t panic)
![Page 13: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/13.jpg)
The Scattered Data Interpolation Problem
• We wish to reconstruct a function S(x), given N samples (xi, fi), such that S(xi)=fi
– xi are the centres– Reconstructed function
is denoted s(x)
• infinite solutions
• We have specific constraints:– s(x) should be continuous over the entire domain– We want a ‘smooth’ surface
![Page 14: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/14.jpg)
The RBF Solution
)()(1
xxxx PsN
iii
normEuclidean theis
polynomial degree-low a is )(
theis (r)
centre of theis
x
x
x
P
function basic
weight ii
![Page 15: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/15.jpg)
Terminology: Support
• Support is the ‘footprint’ of the function
• Two types of support matter to us:
– Compact or Finite support: function value is zero outside of a certain interval
– Non-Compact or Infinite support: not compact (no interval, goes to )
3xy
2xey
![Page 16: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/16.jpg)
Basic Functions ( )
• Can be any function– Difficult to define properties of the RBF for an
arbitrary basic function
• Support of function has major implications– A non-compactly supported basic function implies a
global solution, dependent on all centres!• allows extrapolation (hole-filling)
![Page 17: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/17.jpg)
Standard Basic Functions
• Polyharmonics (Cn continuity)– 2D:– 3D:
• Multiquadric:
• Gaussian:– compact support, used in AI
)log()( 2 rrr n12)( nrr
22)( crr
2
)( crer
![Page 18: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/18.jpg)
Polyharmonics
• 2D Biharmonic:– Thin-Plate Spline
• 3D Biharmonic: – C1 continuity, Polynomial is degree 1– Node Restriction: nodes not colinear
• 3D Triharmonic:– C2 continuity, Polynomial is degree 2
• Important Bit: Can provide Cn continuity
)log()( 2 rrr
3)( rr
rr )(
![Page 19: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/19.jpg)
Guaranteeing Smoothness
• RBF’s are members of , the Beppo-Levi space of distributions on R3 with square integrable second derivatives
• has a rotation-invariant semi-norm:
• Semi-norm is a measure of energy of s(x)– Functions with smaller semi-norm are ‘smoother’– Smoothest function is the RBF (Duchon proved this)
xdsssssss yzxzxyzzyyxx222222 222
)(BL 3)2( R
)(BL 3)2( R
![Page 20: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/20.jpg)
What about P(x) ?
• P(x) ensures minimization of the curvature
• 3D Biharmonic: P(x) = a + bx + cy + dz• Must solve for coefficients a,b,c,d
– Adds 4 equations and 4 variables to the linear system
• Additional solution constraints:
0111 1
i
N
iii
N
ii
N
ii
N
iii zyx
![Page 21: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/21.jpg)
Finding an RBF Solution
• The weights and polynomial coefficients are unknowns
• We know N values of s(x):
• We also have 4 side conditions
)()(0
j
N
iijij Ps xxxx
jjjNjNjj dzcybxaf xxxx 11
0111 1
i
N
iii
N
ii
N
ii
N
iii zyx
![Page 22: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/22.jpg)
The Linear System Ax = b
0
0
0
0
0000
0000
0000
000011
1
1 11
1
1
1
1
111111
NN
N
N
N
NNNNNN
N
f
f
d
c
b
a
zz
yy
xx
zyx
zyx
ij
jii
fxP
)(
0 i
0 ii x
0 ii y
0 ii z
ijji xx where
![Page 23: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/23.jpg)
Properties of the Matrix
• Depends heavily on the basic function
• Polyharmonics:– Diagonal elements are zero – not diagonally dominant– Matrix is symmetric and positive semi-definite– Ill-conditioned if there are near-coincident centres
• Compactly-supported basic functions have a sparse matrix– Introduce surface artifacts– Can be numerically unstable
![Page 24: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/24.jpg)
Analytic Gradients
• Easy to calculate• Continuous depending on basic function
• Partial derivatives for biharmonic gradient can be calculated in parallel:
b
xxc
x
s N
i
ii
1 ixx
c
yyc
y
s N
i
ii
1 ixx
d
zzc
z
s N
i
ii
1 ixx
![Page 25: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/25.jpg)
Fitting 3D RBF Surfaces
(it’s tricky)
![Page 26: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/26.jpg)
Basic Procedure
1. Acquire N surface points
2. Assign them all the value 0(This will be the iso-value for the surface)
3. Solve the system, polygonize, and render:
![Page 27: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/27.jpg)
Off-Surface Points
• Why did we get a blank screen? – Matrix was Ax = 0– Trivial solution is s(x) = 0– We need to constrain the system
• Solution: Off-Surface Points– Points inside and outside of surface
• Project new centres along point normals• Assign values: <0 inside; >0 outside• Projection distance has a large effect on smoothness
![Page 28: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/28.jpg)
Invalid Off-Surface Points
• Have to make sure that off-surface points stay inside/outside surface!– Nearest-Neighbor test
![Page 29: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/29.jpg)
… Point Normals?
• Easy to get from polygonal meshes
• Difficult to get from anything else
• Can guess normal by fitting a plane to local neighborhood of points– Need outward-pointing vector to determine orientation
• Range scanner position, black pixels
– For ambiguous cases, don’t generate off-surface point
![Page 30: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/30.jpg)
Computational Complexity
• How long will it take to fit 1,000,000 centres?– Forever (more or less)
• 3.6 TB of memory to hold matrix• O(N3) to solve the matrix• O(N) to evaluate a point
– Infeasible for more than a few thousand centres
• Fast Multipole Methods make it feasible– O(N) storage, O(NlogN) fitting and O(1) evaluation– Mathematically complex
![Page 31: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/31.jpg)
Centre Reduction
• Remove redundant centres
• Greedy algorithm
• Buddha Statue:– 543,652 surface points
– 80,518 centres
– 5 x 10-4 accuracy
![Page 32: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/32.jpg)
FastRBF
• FarFieldTechnology (.com)
• Commercial implementation – 3D biharmonic fitter with Fast Multipole Methods– Adaptive Polygonizer that generates optimized triangles– Grid and Point-Set evaluation
• Expensive– They have a free demo limited to 30k centres
• Use iterative reduction to fit surfaces with more points
![Page 33: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/33.jpg)
Applications
(and eye candy)
![Page 34: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/34.jpg)
Cranioplasty (Carr 97)
![Page 35: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/35.jpg)
Molded Cranial Implant
![Page 36: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/36.jpg)
Morphing
• Turk99 (SIGGRAPH)
• 4D Interpolation between two surfaces
![Page 37: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/37.jpg)
Morphing With Influence Shapes
![Page 38: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/38.jpg)
Statue of Liberty• 3,360,300 data points
• 402,118 centres
• 0.1m accuracy
![Page 39: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/39.jpg)
Credits
• Pictures shamelessly copied from:– Papers by J.C. Carr and Greg Turk– FastRBF.com
• References:
![Page 40: Radial Basis Functions for Computer Graphics. Contents 1.Introduction to Radial Basis Functions 2.Math 3.How to fit a 3D surface 4.Applications.](https://reader033.fdocuments.net/reader033/viewer/2022061306/55146aac550346b0158b4d3c/html5/thumbnails/40.jpg)
FinAny Questions?