field trees and loose quadtrees kenny weiss cmsc828s spring 2005

30
Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Post on 20-Dec-2015

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Field Trees and Loose Quadtrees

Kenny Weiss

CMSC828S

Spring 2005

Page 2: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Images vs. Objects

• Image Based– Given a cell (location) find the object(s) of

which it is a member– What features are at a location?

• Object Based– Given an object, find its constituent cells

(locations)– Where is an object located?

Page 3: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Loosen Quadtree Restrictions

• Up until now…– Each cell only contained one object and

objects cannot overlap

• Loosen this restriction– Cell need not be entirely covered by and

object– Several objects may occupy a single cell

• may also overlap

– Arbitrary shapes allowed

Page 4: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Limits to decomposition• Arbitrary shape may be decomposed infinitely

• If placed in certain locations– Use Min Bounding Box to simplify representation

• Coverage based– Restrict number of blocks that can cover an object

• Density based– Restrict number of objects that can be covered by a

block

We will focus on Coverage based limits on image based representation

Page 5: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Quadtree Space PartitionMotivation

• Store the bounding box of objects in hierarchy– Must check every match (at all levels) to see if

point is in object

• Goal: try to put objects in block at lowest possible level to minimize unnecessary computation– Prune as much as possible

Page 6: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

MX-CIF Quadtree

• Object must be covered by at most ONE block– Minimum enclosing

quadtree block– Resolve collisions

• Use two 1-dimMX-CIF structures

F

A

E

G

B

D

C

{A,E}

{B,C,D}

{G}

{F}

Key:

Page 7: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Problems

• Large blocks

• “Orphan” nodes– Small nodes covering

several blocks– Artifacts of (arbitrary)

choice of origin– Every query will

include x in its results

{A,E,X}

{B,C,D}

{G}

{F}

F

A

E

G

B

D

C

X

Key:

Page 8: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Loose Quadtree/Cover FieldtreeFrank and Barrera, Ulrich

• Problem: For object o, the min bounding box is not related to size of o

• Uniformly expand size of space spanned by each block, b, of width, w, by a positive factor, p– Object associated with the min. enclosing expanded

block– Expanded width of block, b = (1+p)*w

• Each object still covered by only one block– Similar to QMAT (quadtree medial axis transform)

Key result radius of min bounding box of object in b is larger than p*w/4

Page 9: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

MX-CIF vs. Loose Quadtree

F

A

E

G

B

D

C

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 10: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

MX-CIF vs. Loose Quadtree

F

A

E

G

B

D

C

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:B is completely enclosed by this block

Page 11: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

MX-CIF vs. Loose Quadtree

F

A

E

G

B

D

C

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 12: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 13: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 14: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:C and D are contained at this level

Page 15: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 16: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 17: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIF

{A}

{C,D}{G}

{E}

{B}

Key:

? 20

10

30 35

15

F = {(31,15), (35,19)}Window = {(27.5, 12.5), (37.5,22.5)}

{F}

Page 18: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 19: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 20: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 21: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 22: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 23: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:A fits into the top hierarchy

Page 24: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

F

A

E

G

B

D

C

MX-CIF vs. Loose Quadtree

{A,E}

{B,C,D}

{G}

{F}

MX-CIFLoose Quadtreep=1, width = (1+p)w = 2w

{A}

{C,D}{G}

{F}

{E}

{B}

Key:

Page 25: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Partition Fieldtree

• Hierarchy of grids whose registration are shifted– Each cell is called a field– Each level forms a non-overlapping partitioning of the

space– For each block, b, of width, w, that is being subdivided

• origins are shifted by w/2

• A new node is stored in the smallest field in which it completely fits– Object never has to be stored more than three levels

above its proper size

Page 26: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Partition FieldtreeProperties

Source: www.gdmc.nl/oosterom/slc.ps

• Boundaries of blocks at different levels will never coincide

• Grids at different levels have a different origin

• Blocks at different levels do not form a refinement of those at a previous level

Page 27: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Bound on size of enclosure

• Partition– Always bounded by three levels

• 8x object size

• Cover– Radius must be larger than p*w/4

• As p decreases, the minimum radius decreases– p = 1/2, ratio is at most 4– p = 1/4, ratio is at most 8– P = 1/8, ratio is at most 16 tighter than partition

Page 28: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Comparison

• Goal of both– Expand the area spanned by the subblocks to reduce

size of minimum enclosing quadtree block• When an object overlaps the axes that pass through the

center of the block

• Cover– Area spanned by four subblocks is expanded

• Partition– Number of subblocks is enlarged by offsetting their

position while retaining their size

Page 29: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

Comparison (2)

• Subblocks span an area that overlaps the partition lines– Always for partition fieldtree– Not always for Cover fieldtree

• some values of p will have partition lines coincide– i.e. p =1, powers of 2

– Differs from regular quadtree, where successive levels are collinear

Page 30: Field Trees and Loose Quadtrees Kenny Weiss CMSC828S Spring 2005

References

• Foundations of Multidimensional and Metric Data StructuresSamet, Hananto appear in 2005.

• A Survey Of Hierarchical Partitioning Methods For Vector Images,

Noronha, Valerian Tdgrc.ca/publicns/syd8808/syd8808.pdf

• The Spatial Location Code van Oosterom, Peter

www.gdmc.nl/oosterom/slc.ps