Computational and Digital Geometrypb/convex-hull-talk-nit-dgp-2014a.pdf · GEOMETRY P Bhowmick...

Post on 25-Sep-2020

2 views 0 download

Transcript of Computational and Digital Geometrypb/convex-hull-talk-nit-dgp-2014a.pdf · GEOMETRY P Bhowmick...

GEOMETRY

P Bhowmick Computational and Digital GeometryConvex Hulls and Ortho-convex Hulls

Partha BhowmickAssociate Professor

Department of Computer Science and EngineeringIndian Institute of Technology, Kharagpur

India

NIT Durgapur 23 Jan 2014

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex hull

Input: Point set P on xy-plane.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex hull

convex hullOutput: Convex hull, CP = a sequence of vertices/edges.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex hull

Edge of CP ?

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex hull

Left 6= empty

Right 6= empty

No, it’s not an edge of CP .

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex hull

Yes, it’s an edge of CP .

Right = empty

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex hull

|P | = n⇒ O(n2) pairs ⇒ O(n3) time

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex hull

|CP | = O(n): O(n3) time is quite high!

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Better observations

pL pR

Obs 1The leftmost point pL and the rightmost point pR of P formthe leftmost and the rightmost vertices of CP .

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Better observations

pL pR

Obs 2Clockwise traversal along the boundary of CP always yields aright turn at each vertex of CP .

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Better observations

The clueUse turn type to decide whether a triplet of points forms apair of consecutive edges of CP .

But how?We have O(n3) triplets of points!We can avoid checking so many triplets if we use incrementalapproach.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Better observations

A questionLet CP,i = vertices of upper hull up to pi.Then what’s the relation between CP,i+1 and CP,i?

pRpi

pi+1

CP,i

pL

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Better observations

The answerCP,i+1 ⊆ CP,i ∪ {pi+1}.It’s a strong observation ⇒ Incremental algorithm!

pRpL pi

CP,i+1

pi+1

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

pL pR

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

After lexicographic sorting(x = primary key, y = secondary key)

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pRpL pR

1

2

4

5

6

7

8

9

10

11

12

13

14

15

3

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

pL pR

1

2

5

6

7

8

9

10

11

12

13

14

15

3

4

L

not in CP

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

pL pR

1

2

5

6

7

8

9

10

11

12

13

14

15

3

4

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

4

6

7

8

9

10

11

12

13

14

15

pL pR

1

2

6

7

8

9

10

11

12

13

14

15

3

4

55R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

4

7

8

9

10

11

12

13

14

15

pL pR

1

2

7

8

9

10

11

12

13

14

15

3

4

66

55L

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

10

11

12

13

14

15

pL pR

1

2

7

8

9

10

11

12

13

14

15

3

4

66

55

L

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

10

11

12

13

14

15

pL pR

1

2

7

8

9

10

11

12

13

14

15

3

4

66

55

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

10

11

12

13

14

15

pL pR

1

2

7

8

9

10

11

12

13

14

15

3

4

66

55

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

10

11

12

13

14

15

pL pR

1

2

7

8

9

10

11

12

13

14

15

3

4

66

55

L

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

10

11

12

13

14

15

pL pR

1

2

7

8

9

10

11

12

13

14

15

3

4

66

55

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

10

11

12

13

14

15

pL pR

1

2

7

8

9

10

11

12

13

14

15

3

4

66

55

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

10

11

12

13

14

15

pL pR

1

2

7

8

9

10

11

12

13

14

15

3

4

66

55

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

11

12

13

14

15

pL pR

1

2

7

8

9

10

11

12

13

14

15

3

4

66

55

L

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

11

12

13

14

15

pL pR

1

2

7

8

9

10

11

12

13

14

15

3

4

66

55

L

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

11

12

13

14

15

pL pR

1

2

7

8

9

10

11

12

13

14

15

3

4

66

55

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

12

13

14

15

pL pR

1

2

7

8

10

11

12

13

14

15

3

4

66

55L

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

8

9

12

13

14

15

pL pR

1

2

7

8

10

11

12

13

14

15

3

4

66

55

L

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

9

12

13

14

15

pL pR

1

2

7

8

10

11

12

13

14

15

3

4

66

55

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

9

12

13

14

15

pL pR

1

2

7

8

10

11

12

13

14

15

3

4

66

55

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

9

12

14

15

pL pR

1

2

7

8

10

11

12

13

14

15

3

4

66

55

L

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

9

14

15

pL pR

1

2

7

8

10

11

12

13

14

15

3

4

66

55

L

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

9

14

15

pL pR

1

2

7

8

10

11

12

13

14

15

3

4

66

55

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

9

14

15

pL pR

1

2

7

8

10

11

12

13

14

15

3

4

66

55

R

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

9

14

15

pL pR

1

2

7

8

10

11

12

13

14

15

3

4

66

55

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Incremental algorithm: Graham scan

pL pR

1

2

3

7

9

14

15

pL pR

1

2

7

8

10

11

12

13

14

15

3

4

66

55

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time complexity

pi

CP,i+1

pi+1CP,i

Let pj ∈ CP,i.If pj 6∈ CP,i+1, then pj 6∈ CP,i+2, pj 6∈ CP,i+3, . . . , pj 6∈ CP,n,since CP,i+1 ⊆ CP,i ∪ {pi+1}.So, once pj is removed from the upper hull, it’s neverreconsidered.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time complexity

pi

CP,i+1

pi+1CP,i

Let pj ∈ CP,i.If pj 6∈ CP,i+1, then pj 6∈ CP,i+2, pj 6∈ CP,i+3, . . . , pj 6∈ CP,n,since CP,i+1 ⊆ CP,i ∪ {pi+1}.So, once pj is removed from the upper hull, it’s neverreconsidered.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time complexity

pi

CP,i+1

pi+1CP,i

Let pj ∈ CP,i.If pj 6∈ CP,i+1, then pj 6∈ CP,i+2, pj 6∈ CP,i+3, . . . , pj 6∈ CP,n,since CP,i+1 ⊆ CP,i ∪ {pi+1}.So, once pj is removed from the upper hull, it’s neverreconsidered.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time complexity

pi

CP,i+1

pi+1CP,i

Let pj ∈ CP,i.If pj 6∈ CP,i+1, then pj 6∈ CP,i+2, pj 6∈ CP,i+3, . . . , pj 6∈ CP,n,since CP,i+1 ⊆ CP,i ∪ {pi+1}.So, once pj is removed from the upper hull, it’s neverreconsidered.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time complexity

pi

CP,i+1

pi+1CP,i

Let pj ∈ CP,i.If pj 6∈ CP,i+1, then pj 6∈ CP,i+2, pj 6∈ CP,i+3, . . . , pj 6∈ CP,n,since CP,i+1 ⊆ CP,i ∪ {pi+1}.So, once pj is removed from the upper hull, it’s neverreconsidered.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time complexity

pi

CP,i+1

pi+1CP,i

Data structure: Stack, whose top = pi.If top two vertices in stack and pi+1 do not form a right turnat pi, then pi is popped out for ever!⇒ #pushes = n and #pops < n⇒ T (n) = O(n) ← no best, average, or worst case!For lexicographic sorting, it takes O(n log n) time.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time complexity

pi

CP,i+1

pi+1CP,i

Data structure: Stack, whose top = pi.If top two vertices in stack and pi+1 do not form a right turnat pi, then pi is popped out for ever!⇒ #pushes = n and #pops < n⇒ T (n) = O(n) ← no best, average, or worst case!For lexicographic sorting, it takes O(n log n) time.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time complexity

pi

CP,i+1

pi+1CP,i

Data structure: Stack, whose top = pi.If top two vertices in stack and pi+1 do not form a right turnat pi, then pi is popped out for ever!⇒ #pushes = n and #pops < n⇒ T (n) = O(n) ← no best, average, or worst case!For lexicographic sorting, it takes O(n log n) time.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time complexity

pi

CP,i+1

pi+1CP,i

Data structure: Stack, whose top = pi.If top two vertices in stack and pi+1 do not form a right turnat pi, then pi is popped out for ever!⇒ #pushes = n and #pops < n⇒ T (n) = O(n) ← no best, average, or worst case!For lexicographic sorting, it takes O(n log n) time.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time complexity

pi

CP,i+1

pi+1CP,i

Data structure: Stack, whose top = pi.If top two vertices in stack and pi+1 do not form a right turnat pi, then pi is popped out for ever!⇒ #pushes = n and #pops < n⇒ T (n) = O(n) ← no best, average, or worst case!For lexicographic sorting, it takes O(n log n) time.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Reference of Algorithms

1 Incremental — O(n logn) . n = #pointsR. Graham, An Efficient Algorithm for Determining the ConvexHull of a Finite Point Set, Info. Proc. Letters, 1, pp. 132–133,1972.

2 Gift wrapping — O(nh) . h = #hull verticesR. A. Jarvis, On the Identification of the Convex Hull of a FiniteSet of Points in the Plane, Info. Proc. Letters, 2, pp. 18–21, 1973.

3 Divide and Conquer — O(n logn)F. P. Preparata and S. J. Hong, Convex Hulls of Finite Sets ofPoints in Two and Three Dimensions, Commun. ACM, 20,pp. 87–93, 1977.

4 Marriage before Conquest — O(n log h)D. G. Kirkpatrick and R. Seidel, The Ultimate Planar ConvexHull Algorithm?, SIAM J. Comput., 15, pp. 287–299, 1986.

5 Simpler optimal output-sensitive — O(n log h)T. M. Chan, Optimal Output-Sensitive Convex Hull Algorithmsin Two and Three Dimensions, Discrete & ComputationalGeometry, 16, pp. 361–368, 1996.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex hull of a polygon

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Linear-time algorithms

1 1979 McCallum-Avis, IPL

2 1983 Lee, Intl. J. Computers & Info. Sc.

3 1983 Graham-Yao, J. Algorithms

4 1983 ElGindy-Avis-Toussaint, Computing

5 1984 Bhattacharya-ElGindy, IEEE Trans. Info. Thy.

6 1985 Preparata-Shamos, Computational Geometry, Ch. 4

7 1985 Orlowski, Pattern Rec.

8 1986 Shin-Woo, Pattern Rec.

9 1987 Melkman, IPL

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex Hull versus Orthogonal Hull

Digital object(A = set/connected component of integer points)

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex Hull versus Orthogonal Hull

Convex hull CA

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex Hull versus Orthogonal Hull

Any straight line has at most one segment of intersection(a necessary property)

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex Hull versus Orthogonal Hull

Object A imposed on a grid G of size g = 4

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex Hull versus Orthogonal Hull

Orthogonal hull CA

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Convex Hull versus Orthogonal Hull

Any horizontal or vertical line has at most one segment ofintersection (a necessary property)

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Observations

R L

R R

R

R

R

RR

R

R

L

L

L

L

L

There are both left and right turns!(clockwise)

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Observations

L R

L L

L

L

L

LL

L

L

R

R

R

R

R

or, both right and left turns(anticlockwise)

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Observations

or, 900 (Type 1) and 2700 (Type 3) vertices

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Observations

But no two consecutive Type 3 vertices

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Observations

Two consecutive Type 3 vertices defy the necessary propertyof line intersection

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Algorithm

Step 1: Traverse the border of isothetic cover of A

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Algorithm

Step 2: If 33, then process to remove the concavity.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Algorithm

Step 2: If 33, then process to remove the concavity.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Algorithm

Step 2: If 33, then process to remove the concavity.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Algorithm

Step 2: If 33, then process to remove the concavity.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Combinatorial cases

13331331

Just 1331 and 1333 (= 1333+)

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Pattern 1331 (1)

0

v0v

4l

0

l

0

2

4

4v l + l

+ l

3v2

1

v2

ll

l

1v

3

Rule R11 (l1 = l3):〈v0(t0, l0), v1(1, l1), v2(3, l2), v3(3, l3), v4(1, l4)〉 →〈v0(t0, l0 + l2 + l4)〉

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Pattern 1331 (2)

v3

v2v

0

v

2

4l 2

l 4

l 0

1

v4

l 3

l − l

l +

l

1 3

l 0

v

v2

1 l 1

v0

Rule R12 (l1 > l3):〈v0(t0, l0), v1(1, l1), v2(3, l2), v3(3, l3), v4(1, l4)〉 →〈v0(t0, l0), v1(1, l1 − l3), v2(3, l2 + l4)〉

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Pattern 1331 (3)

4l

4

2

3v

1l1

v

v

v

l

2v

0

2

l + l

3l3v

4l

3 1

0

l − l4

l

0

v

0v

Rule R13 (l1 < l3):〈v0(t0, l0), v1(1, l1), v2(3, l2), v3(3, l3), v4(1, l4)〉 →〈v0(t0, l0 + l2), v3(3, l3 − l1), v4(1, l4)〉

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Pattern 1333 (1)

0

2

4

3 1 l − l

2l

2v

3l

3v

1l

0v

4l

3v4v4l

1v

0l0v

l + l

v

Rule R21 (l1 < l3):〈v0(t0, l0), v1(1, l1), v2(3, l2), v3(3, l3), v4(3, l4)〉 →〈v0(t0, l0 + l2), v3(3, l3 − l1), v4(3, l4)〉

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Pattern 1333 (2)

(ini

t)(init)

l

Vl

1l

0

3v4

v1,2

v1,1

v1,4

= l

4l

//

v2

l 2 l − 2

// l

l 3

v

v

v0

l

/l1v

4,2v

4,1v

1,3v

2v

H 1v /l

0l 0

Let v = current vertex (under traversal).lH = horizontal line thru’ v2, lV = vertical line thru’ v4.l−H ∩ l−V = region lying below lH and left of lV .if v ∈ l−H ∩ l−V , then apply R22; else traverse ahead to get v.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Pattern 1333 (3)

(ini

t)(init)

l

Vl

1l

0

3v4

v1,2

v1,1

v1,4

= l

4l

//

v2

l 2 l − 2

// l

l 3

v

v

v0

l

/l1v

4,2v

4,1v

1,3v

2v

H 1v /l

0l 0

Rule R22 (l1 > l3 and d = d2):〈v0(t0, l0), v1(1, l1), v2(3, l2), v3(3, l3), v4(3, l4)〉 →〈v0(t0, l0), v1(1, l′), v2(3, l2 − l′′)〉d = direction from v, d2 = direction from v2.

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Pattern 1333 (4)

(ini

t)

(init)

l3v

l

= l

3

l

v

2l

Vl

4v

H

//

l

0l

2

2v1 1lv

/

0

//l

v

l

1v0l

4

v

0v

3

/

if v ∈ l−H ∩ l−V , then apply R23; else traverse ahead to get v.

Rule R23 (l1 > l3 and d = d3):〈v0(t0, l0), v1(1, l1), v2(3, l2), v3(3, l3), v4(3, l4)〉 →〈v0(t0, l0), v1(1, l1 − l3), v2(3, (l2 − l′′), v3(3, (l1 − l3 − l′)〉

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Demo

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Demo

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Demo

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Demo

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Demo

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time Complexity

Let n = #points on object border, g = grid size.

1 Checking object containment in a cell: O(g) time.

2 #grid points visited: O(n/g)⇒ Visiting all vertices: O(n/g) ·O(g) = O(n) time.

3 Removal of a concavity (applying Rule): O(1) time.

4 Maximum #reductions: O(n/g)− 4.⇒ Total #operations: (O(n/g)− 4) ·O(1) = O(n/g).

5 Total time complexity: O(n) +O(n/g) = O(n).

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time Complexity

Let n = #points on object border, g = grid size.

1 Checking object containment in a cell: O(g) time.

2 #grid points visited: O(n/g)⇒ Visiting all vertices: O(n/g) ·O(g) = O(n) time.

3 Removal of a concavity (applying Rule): O(1) time.

4 Maximum #reductions: O(n/g)− 4.⇒ Total #operations: (O(n/g)− 4) ·O(1) = O(n/g).

5 Total time complexity: O(n) +O(n/g) = O(n).

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time Complexity

Let n = #points on object border, g = grid size.

1 Checking object containment in a cell: O(g) time.

2 #grid points visited: O(n/g)⇒ Visiting all vertices: O(n/g) ·O(g) = O(n) time.

3 Removal of a concavity (applying Rule): O(1) time.

4 Maximum #reductions: O(n/g)− 4.⇒ Total #operations: (O(n/g)− 4) ·O(1) = O(n/g).

5 Total time complexity: O(n) +O(n/g) = O(n).

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time Complexity

Let n = #points on object border, g = grid size.

1 Checking object containment in a cell: O(g) time.

2 #grid points visited: O(n/g)⇒ Visiting all vertices: O(n/g) ·O(g) = O(n) time.

3 Removal of a concavity (applying Rule): O(1) time.

4 Maximum #reductions: O(n/g)− 4.⇒ Total #operations: (O(n/g)− 4) ·O(1) = O(n/g).

5 Total time complexity: O(n) +O(n/g) = O(n).

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time Complexity

Let n = #points on object border, g = grid size.

1 Checking object containment in a cell: O(g) time.

2 #grid points visited: O(n/g)⇒ Visiting all vertices: O(n/g) ·O(g) = O(n) time.

3 Removal of a concavity (applying Rule): O(1) time.

4 Maximum #reductions: O(n/g)− 4.⇒ Total #operations: (O(n/g)− 4) ·O(1) = O(n/g).

5 Total time complexity: O(n) +O(n/g) = O(n).

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time Complexity

Let n = #points on object border, g = grid size.

1 Checking object containment in a cell: O(g) time.

2 #grid points visited: O(n/g)⇒ Visiting all vertices: O(n/g) ·O(g) = O(n) time.

3 Removal of a concavity (applying Rule): O(1) time.

4 Maximum #reductions: O(n/g)− 4.⇒ Total #operations: (O(n/g)− 4) ·O(1) = O(n/g).

5 Total time complexity: O(n) +O(n/g) = O(n).

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Time Complexity

Let n = #points on object border, g = grid size.

1 Checking object containment in a cell: O(g) time.

2 #grid points visited: O(n/g)⇒ Visiting all vertices: O(n/g) ·O(g) = O(n) time.

3 Removal of a concavity (applying Rule): O(1) time.

4 Maximum #reductions: O(n/g)− 4.⇒ Total #operations: (O(n/g)− 4) ·O(1) = O(n/g).

5 Total time complexity: O(n) +O(n/g) = O(n).

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Result

digital object = 10541 points

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Result

Isothetic cover

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Result

Orthogonal hull

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Result

g = 4, 8, 14

#vertices = 18, 16, 16

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Result

g = 4, 8, 14

#vertices = 120, 60, 32

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

Result

g = 4, 8, 14

#vertices = 88, 44, 32

Feature analysisConcavity strength and concavity relation

Narrow mouthed concavity

Concavity complexity

GEOMETRY

P Bhowmick

Convex hull

Algorithm

Hull ofPolygon

Orthogonalhull

Observations

Algorithm

Result

References

A. Biswas, P. Bhowmick, M. Sarkar, B. B. Bhattacharya, Alinear-time combinatorial algorithm to find the orthogonal hull ofan object on the digital plane, Information Sciences, 216,pp. 176–195, 2012.

A. Biswas, P. Bhowmick, B. B. Bhattacharya, Construction ofisothetic covers of a digital object: A combinatorial approach,Journal of Visual Communication and Image Representation, 21,pp. 295–310, 2010.

Thank you