# Numerical tools by ewghwehws

VIEWS: 4 PAGES: 47

• pg 1
```									Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   1

Numerical geometry
of non-rigid shapes
Lecture II – Numerical Tools
Alex Bronstein
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   2

Shape matching blueprints

Isometric embedding

A. Elad & R. Kimmel, 2003
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   3

Shape matching blueprints

INTRINSIC SIMILARITY

Compute canonical forms
EXTRINSIC SIMILARITY OF CANONICAL FORMS
= INTRINSIC SIMILARITY

A. Elad & R. Kimmel, 2003
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools         4

Numerical ingredients

EMBEDDING
MATCHING
EMBEDDING

 Shape discretization

 Metric discretization
How to compute geodesic distances?

 Discrete embedding problem
How to compute the canonical forms?

 Can we do better?
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   5

Discrete Geodesics and
Shortest Path Problems
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                      6

Shapes as graphs

+                              =
Cloud of points                             Edges                 Undirected graph
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   7

Discrete geodesic problem
 Local length function

 Path length

Length metric in graph
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                              8

Dijkstra’s algorithm
INPUT: source point

 Initialize                      and                          for the rest of the graph;
Initialize queue of unprocessed vertices                            .
 While
 Find vertex with smallest value of                ,

 For each unprocessed adjacent vertex                                        ,

 Remove           from        .

OUTPUT: distance map                                           .
E.W. Dijkstra, 1959
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   9

Troubles with the metric

Inconsistent metric approximation!
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                  10

Metrication error
SOLUTION 1
Change the shape
Discretized graph
 Discrete metric
Both sampling & connectivity
 Sampling theorems guarantee
consistency for some conditions

Graph induces                                     SOLUTION 2
inconsistent metric                                 Change the metric
Discretized algorithm
 Stick to same sampling
 Discrete surface rather than graph
 New shortest path algorithm
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools          11

Forest fire

Fermat’s Principle (of Least Action):
shortest path to travel.
Fire chooses the quickest path to travel.

Pierre de Fermat
(1601-1665)
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                         12

Eikonal equation                                                      Equidistant contour

Source
Steepest distance
growth direction

Eikonal equation
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                                 13

Fast marching methods (FMM)
 A family of numerical methods for
solving eikonal equation

 Simulates wavefront propagation
from a source set

 A continuous variant of Dijkstra’s
algorithm

 Consistently discretized metric

J.N. Tsitsiklis, 1995; J. Sethian, 1996, R. Kimmel & J. Sethian, 1998; A. Spira & R. Kimmel, 2004
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                  15

Fast marching

Dijkstra’s update                                      Fast marching update
 Vertex          updated from                        Vertex         updated from
 Distance              computed                      Distance           computed
from                                                   from          and
 Path restricted to graph edges                      Path can pass on mesh faces
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                   16

Fast marching update step
 Update          from triangle
 Compute                  from
and
 Model wave front propagating from
planar source

       unit propagation direction
       source offset
 Front hits          at time
 Hits         at time                                                Planar source
 When does the front arrive to                    ?
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                17

Fast marching update step
       is given by the point-to-plane distance

 Solve for parameters               and       using the point-to-plane distance

 …after some algebra

where
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   18
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools             19

Uses of fast marching

Geodesic                   Minimal                  Voronoi       Offset
distances                 geodesics              tessellation &   curves
sampling
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                       20

Marching even faster

Heap-based update                                   Raster scan update
 Inefficient use of cache                           Can be parallelized
 Inherently sequential                              Suitable only for regular grid
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   21

Raster scan fast marching
 Parametric surface
 Parametrization domain                sampled on Cartesian grid
 Four alternating scans
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                  22

Raster scan fast marching

Several
4 scans=1 iteration      iterations required 3 iterations
2 iterations
for non-Euclidean geometries

4 iterations                      5 iterations                6 iterations
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                  23

Marching even faster

Heap-based update                                   Raster scan update
 Sequential                                         Can be parallelized
 Any grid                                           Only regular grids
 Single pass,                                       Data-dependent complexity
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   24

Parallellization

Rotate
by 450

On NVIDIA GPU
50msec per distance map on 10M vertices
200M distances per second!
O. Weber, Y. Devir, A. Bronstein, M. Bronstein & R. Kimmel, 2008
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   25

Embedding Problems
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   26

Isometric embedding
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   27

Mapmaker’s problem
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools           28

Mapmaker’s problem

A sphere has non-zero curvature,
therefore, it is not isometric to the plane
(a consequence of Theorema egregium)

Karl Friedrich Gauss
(1777-1855)
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   29

Minimum distortion embedding

A. Elad & R. Kimmel, 2003
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                   30

Discrete embedding problem
Ingredients:
 Discretized shape
 Discretized metric
 Euclidean embedding space
 Embedding is a configuration of                      points in   represented
as a matrix                        with the Euclidean metric

 Embedding distortion (stress) function

 Numerical procedure to minimize
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   31

Discrete embedding problem

Multidimensional scaling (MDS)
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools     32

where

 Non-linear non-convex function of                         variables
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   33

 Repeat for
 Steepest descent step

 Until convergence
 OUTPUT: canonical form

 Can converge to local minimum
 Minimum defined modulo congruence
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   34

Examples of canonical forms

Near-isometric deformations of a shape

Canonical forms
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                                 35

Examples of canonical forms

Embedding distortion limits
discriminative power!

J.N. Tsitsiklis, 1995; J. Sethian, 1996, R. Kimmel & J. Sethian, 1998; A. Spira & R. Kimmel, 2004
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   36

Non-Euclidean
Embedding
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   37

Euclidean embedding
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   38

Non-Euclidean embedding
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   39

Spherical embedding

 Richer geometry than Euclidean (asymptotically Euclidean).
 Minimum embedding distortion obtained for shape-dependent radius.
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   40

The ultimate embedding space

 Embed one shape directly into the other
 If shapes are isometric, embedding is distortionless
 Otherwise, distortion is the measure of dissimilarity
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   41

Generalized embedding problem

A. Bronstein, M. Bronstein & R. Kimmel, 2006
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                42

Generalized multidimensional scaling

 Representation
How to represent arbitrary points on                 ?

 Metric approximation
How to compute distance terms                               between arbitrary
points on ?

 Numerical procedure
How to minimize stress?

A. Bronstein, M. Bronstein & R. Kimmel, 2006
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                     43

Representation
 How to represent an arbitrary point                      on         ?

Triangular mesh

Triangle
index              +                 Convex
combination            =   Barycentric
coordinates

A. Bronstein, M. Bronstein & R. Kimmel, 2006
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                  44

Metric approximation
 How to approximate distance                                between arbitrary points?

Precompute distances between all pairs of vertices on

A. Bronstein, M. Bronstein & R. Kimmel, 2006
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   45

Generalized stress

 Fix all variables except for

 Convex in
A. Bronstein, M. Bronstein & R. Kimmel, 2006
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   46

Minimization algorithm
 Initialize

 Select            corresponding to maximum gradient

 Compute minimizer

 If constraints are active

 Iterate until convergence…

A. Bronstein, M. Bronstein & R. Kimmel, 2006
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools                 47

GMDS in action

CANONICAL FORMS                          MINIMUM DISTORTION EMBEDDING
(MDS, 500 points)                              (GMDS, 50 points)

A. Bronstein, M. Bronstein & R. Kimmel, 2006
Numerical geometry of non-rigid shapes Lecture II – Numerical Tools   48

Summary
 Discrete geodesic problem
 Dijkstra – inconsistent discrete metric
 Fast marching – consistently
discretized metric
 Discrete embedding problem
 MDS – embedding distortion is an enemy

 Non-Euclidean embedding

 Generalized embedding
 GMDS – embed one surface into the other
 Embedding distortion is the measure ofdissimilarity

```
To top