Computational Movement Analysis Lecture 3:

Presentation on theme: "Computational Movement Analysis Lecture 3:"— Presentation transcript:

Computational Movement Analysis Lecture 3:
Curve simplification Joachim Gudmundsson

Problem Many algorithms handling movement data are slow, e.g.
- similarity O(nm log nm) - approximate clustering O(n2+nml) - … Observation: Many trajectories can be simplified without losing much information.

Problem Many algorithms handling movement data are slow, e.g similarity O(nm log nm) - approximate clustering O(n2+nml) - … Observation: Many trajectories can be simplified without losing much information. Example:

Problem Many algorithms handling movement data are slow, e.g.
- similarity O(nm log nm) - approximate clustering O(n2+nml) - … Observation: Many trajectories can be simplified without losing much information. Example:

Problem Many algorithms handling movement data are slow, e.g.
- similarity O(nm log nm) - approximate clustering O(n2+nml) - … Observation: Many trajectories can be simplified without losing much information. Example:

Problem Many algorithms handling movement data are slow, e.g.
- similarity O(nm log nm) - approximate clustering O(n2+nml) - … Observation: Many trajectories can be simplified without losing much information. Example:

Problem Many algorithms handling movement data are slow, e.g.
- similarity O(nm log nm) - approximate clustering O(n2+nml) - … Observation: Many trajectories can be simplified without losing much information. Example:

Problem Many algorithms handling movement data are slow, e.g.
- similarity O(nm log nm) - approximate clustering O(n2+nml) - … Observation: Many trajectories can be simplified without losing much information. Example:

Problem Many algorithms handling movement data are slow, e.g.
- similarity O(nm log nm) - approximate clustering O(n2+nml) - … Observation: Many trajectories can be simplified without losing much information. Example:

Problem Many algorithms handling movement data are slow, e.g.
- similarity O(nm log nm) - approximate clustering O(n2+nml) - … Observation: Many trajectories can be simplified without losing much information. Example:

Example Generated trajectory: Universe: 400x400 Number of points: 10K
Error: units  278 points 10 units   174 points Time: ~15ms Car trajectory: Universe: ~20km  20km Number of points: 85K Error: meter  2601 points 10 meter   points Time: ~200ms

Outline Simplifying polygonal curves Ramer–Douglas–Peucker 1973 Driemel, Har-Peled and Wenk, 2010 Imai-Iri 1988 Agarwal, Har-Peled, Mustafa and Wang, 2005 Take time into consideration

Ramer-Douglas-Peucker
1972 by Urs Ramer and 1973 by David Douglas and Thomas Peucker The most successful simplification algorithm. Used in GIS, geography, computer vision, pattern recognition… Very easy to implement and works well in practice. p

Ramer-Douglas-Peucker
Input polygonal path P = p1,…,pn and threshold  Initially i=1 and j=n Algorithm DP(P,i,j) Find the vertex vf between pi and pj farthest from pipj. dist := the distance between vf and pipj. if dist >  then DP(P, vi , vf) DP(P, vf , vj) else Output(vivj) pj pi

Ramer-Douglas-Peucker
Input polygonal path P = p1,…,pn and threshold  Initially i=1 and j=n Algorithm DP(P,i,j) Find the vertex vf between pi and pj farthest from pipj. dist := the distance between vf and pipj. if dist >  then DP(P, vi , vf) DP(P, vf , vj) else Output(vivj) pj pi dist

Ramer-Douglas-Peucker
q > e > e > e > e > e p > e

Ramer-Douglas-Peucker
q p

Ramer-Douglas-Peucker
Time complexity? Testing a shortcut between pi and pj takes O(j-i) time. Worst-case recursion? Algorithm DP(P,i,j) Find the vertex vf farthest from pipj. dist := the distance between vf and pipj. if dist >  then DP(P, vi , vf) DP(P, vf , vj) else Output(vivj) DP(P, vi , vi+1) DP(P, vi+1 , vj) Time complexity T(n) = O(n) + T(n-1) = O(n2)

Summary: Ramer-Douglas-Peucker
Worst-case time complexity: O(n2) In most realistic cases: T(n) = T(n1) +  T(n2) + O(n) = O(n log n), where n1 and n2 are smaller than n/c for some constant c. If the curve is in 2D and it does not self-intersect then the algorithm can be implemented in O(n log* n) time. [Hershberger & Snoeiynk’98] Does not give any bound on the complexity of the simplification!

Driemel et al. Simple simplification(P = p1,…,pn, ) P’:= p1 i:=1
while i<n do q := pi pi := first vertex pi in q,…,pn s.t. |q-pi|>  if no such vertex then set i:=n add pi to P’ end return P’

Driemel et al. Simple simplification(P = p1,…,pn, ) P’:= p1 i:=1
while i<n do q := pi pi := first vertex pi in q,…,pn s.t. |q-pi|>  if no such vertex then set i:=n add pi to P’ end return P’

Driemel et al. Simple simplification(P = p1,…,pn, ) P’:= p1 i:=1
while i<n do q := pi pi := first vertex pi in q,…,pn s.t. |q-pi|>  if no such vertex then set i:=n add pi to P’ end return P’

Driemel et al. Simple simplification(P = p1,…,pn, ) P’:= p1 i:=1
while i<n do q := pi pi := first vertex pi in q,…,pn s.t. |q-pi|>  if no such vertex then set i:=n add pi to P’ end return P’

Driemel et al. Simple simplification(P = p1,…,pn, ) P’:= p1 i:=1
while i<n do q := pi pi := first vertex pi in q,…,pn s.t. |q-pi|>  if no such vertex then set i:=n add pi to P’ end return P’

Driemel et al. Simple simplification(P = p1,…,pn, ) P’:= p1 i:=1
while i<n do q := pi pi := first vertex pi in q,…,pn s.t. |q-pi|>  if no such vertex then set i:=n add pi to P’ end return P’

Driemel et al. Simple simplification(P = p1,…,pn, ) P’:= p1 i:=1
while i<n do q := pi pi := first vertex pi in q,…,pn s.t. |q-pi|>  if no such vertex then set i:=n add pi to P’ end return P’

Driemel et al. Simple simplification(P = p1,…,pn, ) P’:= p1 i:=1
while i<n do q := pi pi := first vertex pi in q,…,pn s.t. |q-pi|>  if no such vertex then set i:=n add pi to P’ end return P’

Driemel et al. Simple simplification(P = p1,…,pn, ) P’:= p1 i:=1
while i<n do q := pi pi := first vertex pi in q,…,pn s.t. |q-pi|>  if no such vertex then set i:=n add pi to P’ end return P’

Driemel et al. Simple simplification(P = p1,…,pn, ) Property 1:
All edges (except the last one) have length at least . Property 2: F(P,P’)  

Driemel et al. Simple simplification(P = p1,…,pn, ) Property 1:
All edges (except the last one) have length at least . Property 2: F(P,P’)   Definition: A curve P is c-packed, if has finite length, and for any ball b(p,r) it holds |P b(p,r)| < cr. Property 3: If P is c-packed then P’ is 6c-packed.

Driemel et al. Aim: Prove Property 3
If P is c-packed then P’ is 6c-packed. We need the following observation: Let P be a curve and let P’ be an -simplification of P |P  B(p,r+ )|  |P’  B(p,r)| for any ball B(p,r) Proof: B(p,r)

Driemel et al. Observation:
Let P be a curve and let P’ be an -simplification of P |P  B(p,r+)|  |P’  B(p,r)| for any ball B(p,r) Proof: Pu B(p,r) u

Driemel et al. Observation:
Let P be a curve and let P’ be an -simplification of P |P  B(p,r+)|  |P’  B(p,r)| for any ball B(p,r) Proof: Hu Pu B(p,r) u Pu must lie inside Hu

Driemel et al. Observation:
Let P be a curve and let P’ be an -simplification of P |P  B(p,r+)|  |P’  B(p,r)| for any ball B(p,r) Proof: |B(p,r)  u| = |v| lv rv Hu Pu B(p,r) u v Pu must intersect lv and rv  |PuHv|  |v|

Driemel et al. Observation:
Let P be a curve and let P’ be an -simplification of P |P  B(p,r+)| v |P’  B(p,r)| for any ball B(p,r) Proof: |B(p,r)  u| = |v| lv rv Hu Pu B(p,r) u v v  B(p,r)

Driemel et al. Observation:
Let P be a curve and let P’ be an -simplification of P |P  B(p,r+)|  |P’  B(p,r)| for any ball B(p,r) Proof: |B(p,r)  u| = |v| B(p,r+) lv rv Hu Hv Pu B(p,r) u v v  B(p,r)

Driemel et al. Observation:
Let P be a curve and let P’ be an -simplification of P |P  B(p,r+)|  |P’  B(p,r)| for any ball B(p,r) Proof: |B(p,r)  u| = |v| B(p,r+) lv rv Hu Hv Pu B(p,r) u v v  B(p,r)  Hv  B(p,r+)

Driemel et al. Observation:
Let P be a curve and let P’ be an -simplification of P |P  B(p,r+)|  |P’  B(p,r)| for any ball B(p,r) Proof: |B(p,r)  u| = |v| B(p,r+) lv rv Hu Hv Pu B(p,r) u v v  B(p,r)  Hv  B(p,r+)  Pu  Hv  B(p,r+)

Driemel et al. Observation:
Let P be a curve and let P’ be an -simplification of P |P  B(p,r+)|  |P’  B(p,r)| for any ball B(p,r) Proof: |B(p,r)  u| = |v| B(p,r+) lv rv Hu Hv Pu B(p,r) u v v  B(p,r)  Hv  B(p,r+)  Pu  Hv  B(p,r+)  |Pu  B(p,r+)|  |v|

Driemel et al. Theorem: If P is c-packed then P’ is 6c-packed.
Observation: Let P be a curve and let P’ be an -simplification of P |P  B(p,r+ )|  |P’  B(p,r)| for any ball B(p,r)

Driemel et al. Theorem: If P is c-packed then P’ is 6c-packed.
Proof: Proof by contradiction. Assume |P’B(p,r)|>6cr for some B(p,r) Two cases: r   or r< Case r  : |P  B(p,2r)|

Driemel et al. Theorem: If P is c-packed then P’ is 6c-packed.
Proof: Proof by contradiction. Assume |P’B(p,r)|>6cr for some B(p,r) Two cases: r   or r< Case r  : |P  B(p,2r)|  |P  B(p,r+)|

According to observation
Driemel et al. Theorem: If P is c-packed then P’ is 6c-packed. Proof: Proof by contradiction. Assume |P’B(p,r)|>6cr for some B(p,r) Two cases: r   or r< Case r  : |P  B(p,2r)|  |P  B(p,r+)|  |P’  B(p,r)| According to observation

According to observation
Driemel et al. Theorem: If P is c-packed then P’ is 6c-packed. Proof: Proof by contradiction. Assume |P’B(p,r)|>6cr for some B(p,r) Two cases: r   or r< Case r  : |P  B(p,2r)|  |P  B(p,r+)|  |P’  B(p,r)| > 6cr According to observation

According to observation
Driemel et al. Theorem: If P is c-packed then P’ is 6c-packed. Proof: Proof by contradiction. Assume |P’B(p,r)|>6cr for some B(p,r) Two cases: r   or r< Case r  : |P  B(p,2r)|  |P  B(p,r+)|  |P’  B(p,r)| > 6cr |P  B(p,2r)| > 6cr |P  B(p,r’)| > 3cr’ which contradicts that P is c-packed According to observation

According to observation
Driemel et al. Theorem: If P is c-packed then P’ is 6c-packed. Proof: Proof by contradiction. Assume |P’B(p,r)|>6cr for some B(p,r) Two cases: r   or r< Case r  : |P  B(p,2r)|  |P  B(p,r+)|  |P’  B(p,r)| > 6cr |P  B(p,2r)| > 6cr |P  B(p,r’)| > 3cr’ which contradicts that P is c-packed Case r < : Proof is similar. According to observation

Summary: Driemel et al. Simple simplification: can be computed in O(n) time Property 1: All edges (except the last one) have length at least . Property 2: F(P,P’)   Definition: A curve P is c-packed, if has finite length, and for any ball b(p,r) it holds |P b(p,r)| < cr. Property 3: If P is c-packed then P’ is 6c-packed.

Imai-Iri Both previous algorithms are simple and fast but do not give a bound on the complexity of the simplification! Imai-Iri 1988 gave an algorithm that produces a -simplification with the minimum number of links.

Imai-Iri Input polygonal path P = p1,…,pn and threshold 
Build a graph G containing all valid shortcuts. Find a minimum link path from p1 to pn in G

Imai-Iri Input polygonal path P = p1,…,pn and threshold 
Build a graph G containing all valid shortcuts. Find a minimum link path from p1 to pn in G

Imai-Iri Find all possible valid shortcuts

Imai-Iri Find all possible valid shortcuts > e

Imai-Iri Find all possible valid shortcuts <e <e

Imai-Iri Find all possible valid shortcuts >e

Imai-Iri Find all possible valid shortcuts >e

Imai-Iri Find all possible valid shortcuts >e

Imai-Iri Find all possible valid shortcuts >e

Imai-Iri Find all possible valid shortcuts >e

Imai-Iri Find all possible valid shortcuts >e

Imai-Iri Find all possible valid shortcuts

Imai-Iri Find all possible valid shortcuts

Imai-Iri Find all possible valid shortcuts

Imai-Iri Find all possible valid shortcuts

Imai-Iri Find all possible valid shortcuts

Imai-Iri Find all possible valid shortcuts

Imai-Iri All possible shortcuts!

Imai-Iri 1. Build a directed graph of valid shortcuts.
2. Compute a shortest path from p1 to pn using breadth-first search.

Imai-Iri 1. Build a directed graph of valid shortcuts.
2. Compute a shortest path from p1 to pn using breadth-first search.

Imai-Iri Brute force running time: ? #possible shortcuts ?

Summary: Imai-Iri Running time: O(n3) O(n2) possible shortcuts
O(n) per shortcut  O(n3) to build graph O(n2) BFS in the graph Output: A path with minimum number of edges Improvements: Chan and Chin’92: O(n2)

Results so far RDP: O(n2) time (simple and fast in practice)
Output: A path with no bound on the size of the path SS: O(n) time (simple and fast in practice) Imai-Iri: O(n2) time by Chan and Chin (complicated) Output: A path with minimum number of edges RDP and II use the Hausdorff error measure, SS use Fréchet Can we get something that is simple, fast and has a worst-case bound using the Fréchet error measure?

Agarwal et al. Agarwal, Har-Peled, Mustafa and Wang, 2002
Time: Running time O(n log n) Measure: Fréchet distance Output: Path has at most the same complexity as a minimum link (/2)-simplification

Analysis - Agarwal et al.
pi pm pj pl Let P = p1, p2, ... , pn be a polygonal curve Notation: Let (pipj) denote the Fréchet distance between (pi,pj) and the subpath (pi,pj) of P between pi and pj.

Algorithm - Agarwal et al.
Algorithm(P = p1,…,pn, ) i := 1 P’= p1 while i < n do find any j>i such that ((pi,pj)   and ((pi,pj+1) > ) or ((pi,pj)   and j=n) P’= concat(P,pj) i := j end return P’

Algorithm - Agarwal et al.
p1 Algorithm(P = p1,…,pn, ) i := 1 P’= p1 while i < n do find any j>i such that ((pi,pj)   and ((pi,pj+1) > ) or ((pi,pj)   and j=n) P’= concat(P,pj) i := j end return P’ pj Pj+1

Algorithm - Agarwal et al.
p1 Algorithm(P = p1,…,pn, ) i := 1 P’= p1 while i < n do find any j>i such that ((pi,pj)   and ((pi,pj+1) > ) or ((pi,pj)   and j=n) P’= concat(P,pj) i := j end return P’ pj Pj+1

Algorithm - Agarwal et al.
pi pj Pj+1 Efficient algorithm? Recall: Computing the Fréchet distance between (pi,pj) and (pi,pj) can be done in O(j-i) time (Lecture 1).

Algorithm - Agarwal et al.
pi pj Pj+1 Efficient algorithm? Recall: Computing the Fréchet distance between (pi,pj) and (pi,pj) can be done in O(j-i) time (Lecture 1). Finding the first j such that (pi,pj)   and (pi,pj+1) >  takes O(n2) time.

Algorithm - Agarwal et al.
How can we speed up the search for pj? Note that it is enough to find any vertex pj such that (pi,pj)   and (pi,pj+1) >  Idea: Search for pj using exponential search followed by binary search!

Algorithm - Agarwal et al.
Exponential search: Test pi+1, pi+2, pi+4, pi+8… until found pi+2k, such that (pi,pi+2k) > . Binary search: Search for pj between pi+2k-1 and pi+2k s.t. (pi,pj)   and (pi,pj+1) > .   >  i+2k-1 i+2k

Algorithm - Agarwal et al.
Exponential search: Test pi+1, pi+2, pi+4, pi+8… until found pi+2k, such that (pi,pi+2k) > . Binary search: Search for pj between pi+2k-1 and pi+2k s.t. (pi,pj)   and (pi,pj+1) > . if   then search right   >  i+2k-1 i+2k

Algorithm - Agarwal et al.
Exponential search: Test pi+1, pi+2, pi+4, pi+8… until found pi+2k, such that (pi,pi+2k) > . Binary search: Search for pj between pi+2k-1 and pi+2k s.t. (pi,pj)   and (pi,pj+1) > . if >  then search left   >  i+2k-1 i+2k

Algorithm - Agarwal et al.
Exponential search: Test pi+1, pi+2, pi+4, pi+8… until found pi+2k, such that (pi,pi+2k) > . Binary search: Search for pj between pi+2k-1 and pi+2k s.t. (pi,pj)   and (pi,pj+1) > .   >   > pj pj+1 i+2k-1 i+2k

Algorithm - Agarwal et al.
Exponential search: Test pi+1, pi+2, pi+4, pi+8… until found pi+2k, such that (pi,pi+2k) > . Iterations: O(log n) Binary search: Search for pj between pi+2k-1 and pi+2k s.t. (pi,pj)   and (pi,pj+1) > . Iterations: O(log n) Total time: O(n log n)

Analysis - Agarwal et al.
pi pm pj pl Lemma 1: Let P = p1, p2, ... , pn be a polygonal curve. For l ≤ i ≤ j ≤ m, (pipj) ≤ 2·(plpm).

Analysis - Agarwal et al.
pi pm pj pl Lemma 1: Let P = p1, p2, ... , pn be a polygonal curve. For l ≤ i ≤ j ≤ m, (pipj) ≤ 2·(plpm). Proof: Fix matching that realises (plpm). Set  = (plpm). qi qj

Analysis - Agarwal et al.
pi pm pj pl Lemma 1: Let P = p1, p2, ... , pn be a polygonal curve. For l ≤ i ≤ j ≤ m, (pipj) ≤ 2·(plpm). Proof: Fix matching that realises (plpm). Set  = (plpm). ((pipj),(qiqj)) ≤  qi qj

Analysis - Agarwal et al.
Lemma 1: Let P = p1, p2, ... , pn be a polygonal curve. For l ≤ i ≤ j ≤ m, (pipj) ≤ 2·(plpm). Proof: Fix matching that realises (plpm). Set  = (plpm). ((pipj),(qiqj)) ≤  qi pi pj (pipj) qj

Analysis - Agarwal et al.
pi pm pj pl Lemma 1: Let P = p1, p2, ... , pn be a polygonal curve. For l ≤ i ≤ j ≤ m, (pipj) ≤ 2·(plpm). Proof: Fix matching that realises (plpm). Set  = (plpm). ((pipj),(qiqj)) ≤  ((qiqj),(pipj)) ≤  qi qj

Analysis - Agarwal et al.
Lemma 1: Let P = p1, p2, ... , pn be a polygonal curve. For l ≤ i ≤ j ≤ m, (pipj) ≤ 2·(plpm). Proof: Fix matching that realises (plpm). Set  = (plpm). ((pipj),(qiqj)) ≤  ((qiqj),(pipj)) ≤  ≤  qi pi pj qj ≤ 

Analysis - Agarwal et al.
pi pm pj pl Lemma 1: Let P = p1, p2, ... , pn be a polygonal curve. For l ≤ i ≤ j ≤ m, (pipj) ≤ 2·(plpm). Proof: Fix matching that realises (plpm). Set  = (plpm). ((pipj),(qiqj)) ≤  ((qiqj),(pipj)) ≤  ((pipj),pipj) ≤ ≤ ((pipj),(qiqj)) + ((qiqj),(pipj)) ≤ 2 qi (pipj) qj

Analysis - Agarwal et al.
Theorem: (P,P’)   and |P’|  Popt(/2) Proof: (P,P’)   follows by construction.

Analysis - Agarwal et al.
pim-1 Theorem: |P’|  Popt(/2) Proof: Q = p1= pj1,…, pjl=pn - optimal (/2)-simplification P’ = p1= pi1,…, pik=pn Prove (by induction) that im  jm , m  1. pjm pim

Analysis - Agarwal et al.
pjm-1 pim-1 Theorem: |P’|  Popt(/2) Proof: Q = p1= pj1,…, pjl=pn - optimal (/2)-simplification P’ = p1= pi1,…, pik=pn Prove (by induction) that im  jm , m  1. Assume im-1  jm-1 and let i’ = im+1. pjm pim pi’

Analysis - Agarwal et al.
pjm-1 pim-1 Theorem: |P’|  Popt(/2) Proof: Q = p1= pj1,…, pjl=pn - optimal (/2)-simplification P’ = p1= pi1,…, pik=pn Prove (by induction) that im  jm , m  1. Assume im-1  jm-1 and let i’ = im+1. By construction we have: (pim-1pi’) >  and (pim-1pi’-1)    > pjm pim If i’ > jm then we are done! pi’

Analysis - Agarwal et al.
pjm-1 pim-1 Theorem: |P’|  Popt(/2) Proof: Q = p1= pj1,…, pjl=pn - optimal (/2)-simplification P’ = p1= pi1,…, pik=pn (pim-1pi’) >  and (pim-1pi’-1)   Assume the opposite i.e. i’  jm pim pi’ pjm

Analysis - Agarwal et al.
pjm-1 pim-1 Theorem: |P’|  Popt(/2) Proof: Q = p1= pj1,…, pjl=pn - optimal (/2)-simplification P’ = p1= pi1,…, pik=pn (pim-1pi’) >  and (pim-1pi’-1)   Assume the opposite i.e. i’  jm Q is an (/2)-simplification  (pjm-1pjm)  /2 pim pi’ pjm

Analysis - Agarwal et al.
pjm-1 pim-1 Theorem: |P’|  Popt(/2) Proof: Q = p1= pj1,…, pjl=pn - optimal (/2)-simplification P’ = p1= pi1,…, pik=pn (pim-1pi’) >  and (pim-1pi’-1)   Assume the opposite i.e. i’  jm Q is an (/2)-simplification  (pjm-1pjm)  /2 According to Lemma 1: (pim-1pi’)  2 (pjm-1pjm)   pim pi’ pjm

Analysis - Agarwal et al.
pjm-1 pim-1 Theorem: |P’|  Popt(/2) Proof: Q = p1= pj1,…, pjl=pn - optimal (/2)-simplification P’ = p1= pi1,…, pik=pn According to Lemma 1: (pim-1pi’)  2 (pjm-1pjm)   This is a contradiction since (pjm-1pjm) >  by construction.  i’ > jm and we are done! pjm pim pi’

Summary - Agarwal et al. Theorem:
Given a polygonal curve P in Rd and a parameter   0, an -simplification of P of size at most Popt(/2) can be constructed in O(n log n) time and O(n) space.

Summary Ramer–Douglas–Peucker 1973
Used very often in practice. Easy to implement and fast in practice. Hausdorff error Simple Simplification O(n) time - simple and fast Several nice properties. Fréchet error Imai-Iri 1988 Gives an optimal solution but slow. Hausdorff error Agarwal, Har-Peled, Mustafa and Wang 2005 Fast and easy to implement. Gives a worst-case performance guarantee. Fréchet error

Handle time? Compress trajectories s.t. standard database queries are “sound” after compression. The five standard database operations on a trajectory T are: where-at(T,t): location of e at time t. when-at(T,(x,y),L): time at which e is within distance L of (x,y) intersect: nearest-neighbour: spatial-join:

time at which e is within distance L of (x,y).
Handle time? where-at(T,t): location of e at time t. time t when-at(T,(x,y),L): time at which e is within distance L of (x,y). point (x,y)

Define distance between simplification and original trajectory.
Soundness  Define distance between simplification and original trajectory. Definition: A distance function is sound for a query q, if for each >0 there exists a >0, s.t. for every trajectory T and its -simplification T’ we have ||q(T)-q(T’)||< . [Cao, Wolfson & Trajcevski’06]

Path simplification Input path Traditional path simplification Aim 1 2
7 6 1 4 5 3 2 7 6 1 2 7 6? Input path Traditional path simplification Aim

Soundness Theorem: Trajectory = Polygonal path in 3D (x,y,time)
Transform time units into space units (x,y,z), where z = time   and  is the maximum speed along the trajectory. Use the Euclidean distance function. Theorem: Where-at, spatial-join, NN, intersect are sound When-at is NOT sound p q r t Where-at(T,t): Spatial error = |pq| = |pr|/sin(rqp)  2  

Soundness Theorem: Where-at, spatial-join, NN, intersect are sound
When-at is approximately sound Apx-When-at(T,(x,y),L): When within distance L from (x,y)? Set-Apx-when-at(T,(x,y),L) Set of time points when T is within distance L from (x, y) Given a query point q=(x, y), let t1 be the time reported by apx-when-at(T’,(x, y), L+). There exists a time point t2 in set-apx-when-at (T, (x, y), L+2) such that |t1 − t2| / and |T(t1) − T’(t2)|  .

Simplifying polygonal curves
Summary Simplifying polygonal curves Ramer–Douglas–Peucker 1973 Driemel, Har-Peled and Wenk 2010 Imai-Iri 1988 Agarwal, Har-Peled, Mustafa and Wang 2005 Take time into consideration Other interesting simplification algorithms Abam, de Berg, Hachenberger, Zarei 2007

Constraint FSD Recall the free space diagram (fsd)
Consider the fsd of two curves P and Q with respect to a distance r. (qQ,pP) in the fsd is in the free space iff dist(q,p)  r. Can we use it for other measures? (q1,p1) (qm,pn) P Q q p

Constraint FSD Example: (qQ,pP) in the fsd is in the free space iff p can “see” q. q p Can the owner and the dog walk along P and Q such that they always see each other?

Constraint FSD Example: (qQ,pP) in the fsd is in the free space iff p can “see” q. q p Can the owner and the dog walk along P and Q such that they always see each other? Yes!

Constraint FSD Example: The entities must walk with similar speed
(similar ~ within a factor of 2?). P Q Can the entities walk along P and Q with similar speed while keeping a distance of at most r?

Constraint FSD Example: The entities must walk with similar speed
(similar ~ within a factor of 2?). P Q Can the entities walk along P and Q with similar speed while keeping a distance of at most r?

Constraint FSD Example: The entities must walk with similar speed
(similar ~ within a factor of 2?). P Q Can the entities walk along P and Q with similar speed while keeping a distance of at most r?

Constraint FSD Example: The entities must walk with similar speed
(similar ~ within a factor of 2?). P Q Can the entities walk along P and Q with similar speed while keeping a distance of at most r?

Constraint FSD Example: The entities must walk with similar speed
(similar ~ within a factor of 2?). P Q Can the entities walk along P and Q with similar speed while keeping a distance of at most r? No!

Open Problem Can we find a subquadtratic algorithm that computed a simplification with a minimal number of edges, or within a constant factor?

References A. Driemel, S. Har-Peled and C. Wenk. Approximating the Fréchet Distance for Realistic Curves in Near Linear Time. Discrete & Computational Geometry , 2012. H. Cao, O. Wolfson, and G. Trajcevski. Spatio-temporal data reduction with deterministic error bounds. The VLDB Journal, 2006. W. S. Chan and F. Chin. Approximation of polygonal curves with minimum number of line segments. In Proceedings of the 3rd International Symposium on Algorithms and Computation, 1992. D. H. Douglas and T. K. Peucker. Algorithms for the reduction of the number of points required to represent a digitized line or its caricature. The Canadian Cartographer, 1973. J. Gudmundsson, J. Katajainen, D. Merrick, C. Ong and T. Wolle. Compressing spatio- temporal trajectories. Computational Geometry - Theory and Applications, 2009. P. K. Agarwal, S. Har-Peled, N. Mustafa, and Y. Wang. Near-linear time approximation algorithms for curve simplication in two and three dimensions. Algorithmica, 2005.

Similar presentations