Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo...

68
1 Shape Matching and Metric Geometry Facundo M´ emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Transcript of Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo...

Page 1: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

1

Shape Matching and Metric

Geometry

Facundo Memoli.

CS 5339, The Ohio State University, Spring

2014.

Monday, January 13, 2014

Page 2: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

https://people.math.osu.edu/memoli.2/courses/cse-topics-2014/

Monday, January 13, 2014

Page 3: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

General stuff:

• class attendance is mandatory

• will post possible papers soon, after we discuss some more.

• a couple of days prior to each class i will update the webpage and postmaterials you should read on your own, before the class.

• you should read the papers so as to gain basic understanding of the ideaproposed by the authors

• in my slides i will use the following tags for the materials listed underthe”resources” section of the class webpage:

– [BBI] will refer to the AMS book by Burago, Burago and Ivanov.

– [Villani] AMS book by Cedric Villani.

– [dGW] my 2011 FoCM paper.

– [M07] my PBG07 paper.

– etc

Monday, January 13, 2014

Page 4: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

office hours etc

send me an email and we’ll set up a meeting.

Monday, January 13, 2014

Page 5: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

a couple of reference books:

Note: these are not textbooks

[BBI] [Villani]

Monday, January 13, 2014

Page 6: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

introduction/motivation: shape matching, shape comparison, shape analysis

Monday, January 13, 2014

Page 7: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

The Problem of Shape/Object Matching

• databases of objects

• objects can be many things:

– proteins– molecules– 2D objects (imaging)– 3D shapes: as obtained via a 3D scanner– 3D shapes: modeled with CAD software– 3D shapes: coming from design of bone protheses– text documents– more complicated structures present

in datasets (things you can’t visualize)Monday, January 13, 2014

Page 8: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 9: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

3D objects: examples

• cultural heritage (Michelangelo project:http://www-graphics.stanford.edu/projects/mich/)

• search of parts in a factory of, say, cars

• face recognition: the face of an individual is a 3D shape...

• proteins: the shape of a protein reflects its function..protein data bank: http://www.rcsb.org

Monday, January 13, 2014

Page 10: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 11: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

• 3D scanners are becoming increasingly cheaper.

• consequence: lots of 3D data are being generated and stored.

• 3D printing!

• How do we organize those datasets?

Monday, January 13, 2014

Page 12: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

http://sketchup.google.com/3dwarehouse/

Monday, January 13, 2014

Page 13: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

MichelangeloSculptorMichelangelo di Lodovico Buonarroti Simoni, commonly known as Michelangelo, was an Italian sculptor, painter, architect, poet, and engineer of the High Renaissance who exerted an unparalleled influence on the development of Western art. Wikipedia

Born: March 6, 1475, Caprese Michelangelo, ItalyDied: February 18, 1564, Rome, ItalyBuried: Basilica of Santa Croce, Florence, ItalyStructures: St. Peter's Basilica, Laurentian Library, MorePeriods: Italian Renaissance, High Renaissance, Renaissance

Monday, January 13, 2014

Page 14: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

https://graphics.stanford.edu/projects/mich/

Monday, January 13, 2014

Page 15: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 16: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 17: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 18: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 19: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 20: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

3D objects: examples

• cultural heritage (Michelangelo project:http://www-graphics.stanford.edu/projects/mich/)

• search of parts in a factory of, say, cars

• face recognition: the face of an individual is a 3D shape...

• proteins: the shape of a protein reflects its function..protein data bank: http://www.rcsb.org

Monday, January 13, 2014

Page 21: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 22: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 23: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 24: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

3D objects: examples

• cultural heritage (Michelangelo project:http://www-graphics.stanford.edu/projects/mich/)

• search of parts in a factory of, say, cars

• face recognition: the face of an individual is a 3D shape...

• proteins: the shape of a protein reflects its function..protein data bank: http://www.rcsb.org

Monday, January 13, 2014

Page 25: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 26: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 27: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 28: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

similarity principle: geometrically similar molecules are likely to have

similar functions

Monday, January 13, 2014

Page 29: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

about 100,000 3D structures of proteins

Monday, January 13, 2014

Page 30: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

similarity ppl: also in chemoinformatics

Monday, January 13, 2014

Page 31: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

similarity ppl: also in chemoinformatics

Monday, January 13, 2014

Page 32: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

similarity ppl: also in chemoinformatics

Monday, January 13, 2014

Page 33: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

2d shapes...

Monday, January 13, 2014

Page 34: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

2d shapes...

MNIST db: handwritten text recognition -- think USPS

segmented real objects -- MPEG 7 db

Monday, January 13, 2014

Page 35: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 36: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 37: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 38: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 39: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 40: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 41: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 42: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 43: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

?Monday, January 13, 2014

Page 44: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 45: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

• We intuitively know when two shapes are similar, and how similar they

are...

• This intrinsic understanding permits grouping/classifying shapes..

• if confronted with zillions of shapes: how do we do that? need a com-

puter...

• How can we extract/define a notion of similarity between shapes that can

be used by a computer?

Monday, January 13, 2014

Page 46: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

typical scenario

Text

Monday, January 13, 2014

Page 47: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

typical scenario

Text

Monday, January 13, 2014

Page 48: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

typical scenario

Text?Monday, January 13, 2014

Page 49: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Typical situation: classification

• assume you have database D of objects.

• assume D is composed by several objects, and that each

of these objects belongs to one of n classes C1, . . . , Cn.

• imagine you are given a new object o, not in your

database, and you are asked to determine whether o belongs

to one of the classes. If yes, you also need to point to the class.

• One simple procedure is to say that you will assign object

o the class of the closest object in D:

class(o) = class(z)

where z ∈ D minimizes dist(o, z)

• in order to do this, one first needs to define a notion

dist of distance or dis-similarity between objects.Monday, January 13, 2014

Page 50: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Typical situation: classification

• assume you have database D of objects.

• assume D is composed by several objects, and that each

of these objects belongs to one of n classes C1, . . . , Cn.

• imagine you are given a new object o, not in your

database, and you are asked to determine whether o belongs

to one of the classes. If yes, you also need to point to the class.

• One simple procedure is to say that you will assign object

o the class of the closest object in D:

class(o) = class(z)

where z ∈ D minimizes dist(o, z)

• in order to do this, one first needs to define a notion

dist of distance or dis-similarity between objects.Monday, January 13, 2014

Page 51: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

So.. first thing we need: a distance between shapes!

• what is, mathematically, a suitable distance between shapes?

• what properties are important?

• we probably want to be able to compute this distance easily .. computa-tional cost..

Monday, January 13, 2014

Page 52: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

X Y

Another important point: invariances

Are these two objects the same?

Monday, January 13, 2014

Page 53: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

XY

this is called invariance to rigid transformations

Another important point: invariances

Are these two objects the same?

Monday, January 13, 2014

Page 54: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Another important points: invariances

what about these two?

roughly speaking, this corresponds to invariance to bending transformations..Monday, January 13, 2014

Page 55: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Bending transformations

the distance, as measured by an ant, does not change

Monday, January 13, 2014

Page 56: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Bending transformations

the distance, as measured by an ant, does not change

Important: this distance is different from the Euclidean distance!!Monday, January 13, 2014

Page 57: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 58: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Geodesic distance vs Euclidean distance

Monday, January 13, 2014

Page 59: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 60: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

invariances...

The measure of dis-similarity dist must capture thetype of invariance you want to encode in your classification system.

= ?dist( , ) = 0 ?

Monday, January 13, 2014

Page 61: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

A Metric Space is a pair (X, d) whereX is a set and d : X ×X → R+, called the metric, s.t.

1. For all x, y, z ∈ X, d(x, y) ≤ d(x, z) + d(z, y).

2. For all x, y ∈ X, d(x, y) = d(y, x).

3. d(x, y) = 0 if and only if x = y.

Remark 1. One example is Rd with the Euclidean metric. Spheres Sn endowed

with the spherical metric provide another example.

Monday, January 13, 2014

Page 62: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Metric Geometry in Shape Matching..

Monday, January 13, 2014

Page 63: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Monday, January 13, 2014

Page 64: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

What is Metric Geometry?

Monday, January 13, 2014

Page 65: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

What is Metric Geometry?

MG is the world of metric spaces..

Monday, January 13, 2014

Page 66: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

What is Metric Geometry?

MG is the world of metric spaces..

what can I say about the geometry of a shape/space using only measurements of distance?

Monday, January 13, 2014

Page 67: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Example/Exercise

You land in a new planet (perfect sphere). You find no-one around.. how do you estimate the (size) radius of the

planet?

Say you only have a (short) measuring tape..

Monday, January 13, 2014

Page 68: Shape Matching and Metric Geometry...Jan 13, 2014  · 1 Shape Matching and Metric Geometry Facundo M´emoli. CS 5339, The Ohio State University, Spring 2014. Monday, January 13, 2014

Summary

• Shapes are being produced at a fast pace. We need methods for organizingcollection of shapes.

• When dealing with databases of objects, one needs a notion of dis-similaritybetween objects.

• This notion must take into account desired invariance (we saw two kinds,bendings and rigid isometries).

• We will model this dis-similarity as a metric or distance between objects– metric space structure!

Monday, January 13, 2014