tu emdberg/onderwijs/advalg_material/course notes/aa-geom-lecture4.pdftu e gps data, rfid tags,...

75
Computational Geometry Mark de Berg TU Eindhoven TU e (Two) Selected Topics

Upload: others

Post on 16-Mar-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

Computational Geometry

Mark de BergTU Eindhoven

TU e

(Two) Selected Topics

Page 2: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Reconstructing Terrainsfrom Elevantion Data

Page 3: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Reconstructing terrains from elevation data

931

942

927

899

912

922

=⇒

given: terrain elevation at sample points

goal: construct terrain surface

Page 4: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e reconstructing terrains from elevation data

931

942

927

899

912

922elevation?

Page 5: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e reconstructing terrains from elevation data

931

942

927

899

912

922elevation?

Idea: use elevation ofnearest sample point

Voronoi diagram

Page 6: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e reconstructing terrains from elevation data

931

942

927

899

912

922elevation?

Idea: use elevation ofnearest sample point

Voronoi diagram

Does not give good result:surface not continuous

Page 7: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Better: determine elevation using interpolation

reconstruction using triangulation

Page 8: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

triangulation

Better: determine elevation using interpolation

reconstruction using triangulation

Page 9: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

triangulation

Better: determine elevation using interpolation

reconstruction using triangulation

Page 10: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

triangulation

Better: determine elevation using interpolation

gives continuous surface

reconstruction using triangulation

Page 11: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

What is a good triangulation?

or or . . .

reconstruction using triangulation

Page 12: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

What is a good triangulation?

or or . . .

long and thin triangles are bad =⇒ try to avoid small angles

reconstruction using triangulation

Page 13: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

What is a good triangulation?

or or . . .

long and thin triangles are bad =⇒ try to avoid small angles

Algorithmic problem: how can we quickly computea triangulation that maximizes the angles?

reconstruction using triangulation

Page 14: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Voronoi diagram

connect points whoseVoronoi cells are neighbors

Voronoi diagrams and Delaunay triangulations

Page 15: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Voronoi diagram

connect points whoseVoronoi cells are neighbors

Voronoi diagrams and Delaunay triangulations

Page 16: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Voronoi diagram

connect points whoseVoronoi cells are neighbors

Voronoi diagrams and Delaunay triangulations

Page 17: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Voronoi diagram

connect points whoseVoronoi cells are neighbors

Voronoi diagrams and Delaunay triangulations

Page 18: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Voronoi diagram

connect points whoseVoronoi cells are neighbors

Voronoi diagrams and Delaunay triangulations

Page 19: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Voronoi diagram

connect points whoseVoronoi cells are neighbors

Voronoi diagrams and Delaunay triangulations

Page 20: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Voronoi diagram

connect points whoseVoronoi cells are neighbors

Delaunay triangulation:

triangulation that maximizesthe minimum angle!

Voronoi diagrams and Delaunay triangulations

Page 21: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e computing the Delaunay triangulation

∆(p, q, r) is triangle in Delaunay triangulation

Circle(p, q, r) does not contain any other point

⇐⇒

Page 22: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e computing the Delaunay triangulation

∆(p, q, r) is triangle in Delaunay triangulation

Circle(p, q, r) does not contain any other point

⇐⇒

Page 23: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e computing the Delaunay triangulation

∆(p, q, r) is triangle in Delaunay triangulation

Circle(p, q, r) does not contain any other point

⇐⇒

Page 24: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e computing the Delaunay triangulation

∆(p, q, r) is triangle in Delaunay triangulation

Circle(p, q, r) does not contain any other point

⇐⇒

Page 25: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e computing the Delaunay triangulation

∆(p, q, r) is triangle in Delaunay triangulation

Circle(p, q, r) does not contain any other point

⇐⇒

Page 26: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e computing the Delaunay triangulation

∆(p, q, r) is triangle in Delaunay triangulation

Circle(p, q, r) does not contain any other point

⇐⇒

Page 27: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e computing the Delaunay triangulation

∆(p, q, r) is triangle in Delaunay triangulation

Circle(p, q, r) does not contain any other point

⇐⇒

Algorithm for computing Delaunay triangulations:

1. for every triple of points2. do if all other points lie outside Circle(p, q, r)3. then Add triangle ∆(p, q, r) to DT

Page 28: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e computing the Delaunay triangulation

∆(p, q, r) is triangle in Delaunay triangulation

Circle(p, q, r) does not contain any other point

⇐⇒

Algorithm for computing Delaunay triangulations:

1. for every triple of points2. do if all other points lie outside Circle(p, q, r)3. then Add triangle ∆(p, q, r) to DT

• running time O(n4): very slow!

• can we do better? yes: there are algorithms running in O(n log n) time

Page 29: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Analyzing Trajectoriesof Moving Objects

Page 30: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

• GPS data, RFID tags, surveillance cameras, simulations

Moving objects (spatio-temporal data): now widely available

Movement data can be considered in two ways:

Page 31: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

• GPS data, RFID tags, surveillance cameras, simulations

Moving objects (spatio-temporal data): now widely available

Movement data can be considered in two ways:

=⇒

• Individual locations, which change over time, are relevant

Page 32: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

• GPS data, RFID tags, surveillance cameras, simulations

Moving objects (spatio-temporal data): now widely available

Movement data can be considered in two ways:

=⇒

• Individual locations, which change over time, are relevant

• Trajectories are relevant

Page 33: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Trajectory analysis

• given two trajectories, how similar are they?

• given a collection of trajectories, report all subtrajectories similar toa query trajectory

• is there a certain motion pattern? (leader following, flocking, . . . )

Analyzing trajectories: examples of interesting questions

• behavorial studies on animals

• analysis of sports games

• analyzing traffic

Analyzing trajectories: applications

Page 34: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Basic question: how to measure similarity of two trajectories

A

B

We need a distance function dist(·, ·) on the trajectories:the smaller dist(A,B), the more similar A and B are

Page 35: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Basic question: how to measure similarity of two trajectories

A

B

We need a distance function dist(·, ·) on the trajectories:the smaller dist(A,B), the more similar A and B are

First attempt: Hausdorff distance

dist(A,B) = max ( , )maxa∈A

minb∈B

d(a, b) maxb∈B

mina∈a

d(b, a)

Page 36: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Basic question: how to measure similarity of two trajectories

A

B

We need a distance function dist(·, ·) on the trajectories:the smaller dist(A,B), the more similar A and B are

First attempt: Hausdorff distance

dist(A,B) = max ( , )maxa∈A

minb∈B

d(a, b) maxb∈B

mina∈a

d(b, a)

Page 37: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Basic question: how to measure similarity of two trajectories

A

B

We need a distance function dist(·, ·) on the trajectories:the smaller dist(A,B), the more similar A and B are

First attempt: Hausdorff distance

dist(A,B) = max ( , )maxa∈A

minb∈B

d(a, b) maxb∈B

mina∈a

d(b, a)

Page 38: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Is the Hausdorff distance a good measure for trajectory similarity?

Hausdorff distance:

Page 39: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Is the Hausdorff distance a good measure for trajectory similarity?

Hausdorff distance:Hausdorff distance:

Page 40: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Is the Hausdorff distance a good measure for trajectory similarity?

Hausdorff distance does not takecontinuity of trajectories into account

Hausdorff distance:Hausdorff distance:

Hausdorff distance can be small, evenwhen trajectories are very different

Page 41: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

A better measure: Frechet distance

A

B

• take continuous mapping µ : A→ B

• take as distance maxa∈A d(a, µ(a))

a

µ(a)

Page 42: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

A better measure: Frechet distance

A

B

• take continuous mapping µ : A→ B

• take as distance maxa∈A d(a, µ(a))

a

µ(a)

Page 43: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

A better measure: Frechet distance

A

B

• take continuous mapping µ : A→ B

• take as distance maxa∈A d(a, µ(a))

a

µ(a)

Which mapping? Take the best one:

Frechet-dist(A,B) = minµ

maxa∈A

d(a, µ(a)),

where min is taken over all continuous 1-to-1 mappings

Page 44: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Page 45: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Hausdorff distance:

Page 46: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Hausdorff distance:

Page 47: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Frechet distance:

Page 48: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Frechet distance:

Page 49: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Frechet distance:

Page 50: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Frechet distance:

Page 51: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Frechet distance:

Page 52: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Frechet distance:

Page 53: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Frechet distance:

Page 54: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Frechet distance:

Page 55: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Frechet distance:

Page 56: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Frechet distance:

Page 57: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Computing similarity: deciding if Frechet-dist(A,B) ≤ ε

A

B b1b2

b3

b4

a1 a2a3 a4

free-space diagram (for given ε)

b1 b2 b3 b4a1

a2

a3

a4

Page 58: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Computing similarity: deciding if Frechet-dist(A,B) ≤ ε

A

B b1b2

b3

b4

a1 a2a3 a4

free-space diagram (for given ε)

b1 b2 b3 b4a1

a2

a3

a4

what does continuous 1-to-1 mappingcorrespond to in diagram?

Page 59: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Computing similarity: deciding if Frechet-dist(A,B) ≤ ε

A

B b1b2

b3

b4

a1 a2a3 a4

free-space diagram (for given ε)

b1 b2 b3 b4a1

a2

a3

a4

what does continuous 1-to-1 mappingcorrespond to in diagram?

xy-monotone path from lower left to upper right

Page 60: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Computing similarity: deciding if Frechet-dist(A,B) ≤ ε

A

B b1b2

b3

b4

a1 a2a3 a4

free-space diagram (for given ε)

b1 b2 b3 b4a1

a2

a3

a4

what does continuous 1-to-1 mappingcorrespond to in diagram?

xy-monotone path from lower left to upper right

must decide if monotone path existssuch that distance is always ≤ ε

Page 61: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Computing similarity: deciding if Frechet-dist(A,B) ≤ ε

A

B b1b2

b3

b4

a1 a2a3 a4

free-space diagram (for given ε)

b1 b2 b3 b4a1

a2

a3

a4

forbidden region in diagram:(a, b) such that d(a, b) > ε

ε

Page 62: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Computing similarity: deciding if Frechet-dist(A,B) ≤ ε

A

B b1b2

b3

b4

a1 a2a3 a4

free-space diagram (for given ε)

b1 b2 b3 b4a1

a2

a3

a4

forbidden region in diagram:(a, b) such that d(a, b) > ε

ε

Page 63: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Computing similarity: deciding if Frechet-dist(A,B) ≤ ε

A

B b1b2

b3

b4

a1 a2a3 a4

free-space diagram (for given ε)

b1 b2 b3 b4a1

a2

a3

a4

forbidden region in diagram:(a, b) such that d(a, b) > ε

ε

ε

Page 64: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Computing similarity: deciding if Frechet-dist(A,B) ≤ ε

A

B b1b2

b3

b4

a1 a2a3 a4

free-space diagram (for given ε)

b1 b2 b3 b4a1

a2

a3

a4

forbidden region in diagram:(a, b) such that d(a, b) > ε

ε

Algorithm:Compute decomposition into free andforbidden regions, and check if mono-tone path exists in free region.

Page 65: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

Computing similarity: deciding if Frechet-dist(A,B) ≤ ε

A

B b1b2

b3

b4

a1 a2a3 a4

free-space diagram (for given ε)

b1 b2 b3 b4a1

a2

a3

a4

forbidden region in diagram:(a, b) such that d(a, b) > ε

ε

Algorithm:Compute decomposition into free andforbidden regions, and check if mono-tone path exists in free region.

Can be done in O(nm) time

Page 66: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

ε

Partial matching: what if we want to decide if there is aconnected of B similar to A?

A

B

subcurve

Page 67: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

ε

Partial matching: what if we want to decide if there is aconnected of B similar to A?

A

B B′

A

B

subcurve

Page 68: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

ε

Partial matching: what if we want to decide if there is aconnected of B similar to A?

A

B B′

A

B

subcurve

Page 69: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

ε

Partial matching: what if we want to decide if there is aconnected of B similar to A?

A

B B′

A

B

B′

subcurve

Page 70: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

ε

Partial matching: what if we want to decide if there is aconnected of B similar to A?

A

B B′

A

B

mapping from B′ ⊆ B to A

path from bottom to top in diagram

B′

subcurve

Page 71: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e Measuring the similarity of trajectories

ε

Partial matching: what if we want to decide if there is a con-nected subcurve of B that is similar to A?

A

B B′

mapping from B′ ⊆ B to A

path from bottom to top in diagram

B′

Page 72: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

what if exact locations are not important?

Recall definition of Frechet distance:

Frechet-dist(A,B) = minµ

maxa∈A

d(a, µ(a)),

where min is taken over all continuous 1-to-1 mappings

Page 73: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

what if exact locations are not important?

Recall definition of Frechet distance:

Frechet-dist(A,B) = minµ

maxa∈A

d(a, µ(a)),

where min is taken over all continuous 1-to-1 mappings

Euclidean distance

Page 74: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

what if exact locations are not important?

Recall definition of Frechet distance:

Frechet-dist(A,B) = minµ

maxa∈A

d(a, µ(a)),

where min is taken over all continuous 1-to-1 mappings

Euclidean distancedifference in direction of movement

Page 75: TU emdberg/Onderwijs/AdvAlg_Material/Course Notes/AA-geom-lecture4.pdfTU e GPS data, RFID tags, surveillance cameras, simulations Moving objects (spatio-temporal data): now widely

TU e

Fr’echet distance: summary

• good measuring similarity of curves (e.g. trajectories)

• can be computed fairly efficiently for polygonal curves

• many variations (partial matching, directional Frechet distance, . . . )