31
A spatial data representation: An adaptive 2D-H string

A spatial data representation: An adaptive 2D-H string

  • View
    223

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A spatial data representation: An adaptive 2D-H string

A spatial data representation:

An adaptive 2D-H string

Page 2: A spatial data representation: An adaptive 2D-H string

Pixel-oriented and vector-based(1984-5)Insufficient to deal with complicated operations in more intelligent, fast, and flexible databases.

Object-oriented data structures have been proposed:2D-string(1987)

Construct iconic or spatial indexes

Perform the symbolic information retrieval from an image database

Symbolic pictures obtained from an orthogonal relation approach.

Page 3: A spatial data representation: An adaptive 2D-H string

Quadtree(1984)-a useful data structure in representing and manipulating hierarchical picture.

Page 4: A spatial data representation: An adaptive 2D-H string

2D-H string(combines 2D string和quadtree,1988)

Combines advantages of both,leading to an effective data structure in terms of space complexity and cooperativeness with other spatial relation operators.

Adaptive 2D-H string

Page 5: A spatial data representation: An adaptive 2D-H string

2. A review of 2D-H string

The hierarchical symbolic pictures can be represented efficiently in terms of space complexity.Recursive decomposition processGiven an m x n symbolic picture

P:{1,2,…,m} x {1,2,…,n} 2s

- s is a set of symbols or corresponding vocabularies - P is subdivided into four quadrants

Q1,Q2,Q3,andQ4.

Page 6: A spatial data representation: An adaptive 2D-H string

Pi=2D-H( Qi ),i = 1,2,3,4

A 2D-H string of a picture p,denoted as 2D-H(P) is defined recursively as

Page 7: A spatial data representation: An adaptive 2D-H string
Page 8: A spatial data representation: An adaptive 2D-H string
Page 9: A spatial data representation: An adaptive 2D-H string

3. A new representation for symbolic picture

Disadvantage of 2D-H string: redundancies existing in those data representations

For most non-square images,such pictures must first be extended to square picture of size 2L x2L by padding them with a minimum number of dummy cells.

If P is a symbolic picture of size m*n, then the corresponding extended picture is a square picture with length 2[log2 max(m,n)]( 上高斯 )

Page 10: A spatial data representation: An adaptive 2D-H string

2D-H string

Example 1. let P be a 4*5 symbolic picture. In order to obtain its 2D-H string representation, extend P to an 8*8 square picture P by adding some dummy cells.

Page 11: A spatial data representation: An adaptive 2D-H string

We use four bits as an index to indicate whether or not the corresponding quadrants NW, SW, NE and SE are empty.

2D-H string

Page 12: A spatial data representation: An adaptive 2D-H string

An adaptive 2D-H string 和 2D-H string 的不同

The preprocess of 2D-H strings extends an original image of size m1*m2 to a square image 2L*2L , but the proposed method uses the original image.

Different decomposition process

Adaptive 2D-H string ( compare with 2D-H string)It can be useful for any size of images.Algorithm for converting an image into its corresponding adaptive 2D-H stringRequire less storage space in some cases

Page 13: A spatial data representation: An adaptive 2D-H string

Adaptive 2D-H string

Decomposition methodquadrant segmentation =>NW,SW,NE,SE

row segmentation =>N,S

column segmentation =>W,E

Page 14: A spatial data representation: An adaptive 2D-H string

Adaptive 2D-H string

We use a four-bit string(b1b2b3b4)2 to index type-1

That is ,bi is set to “1” when location i is occupied,otherwise it is set to “0”,when i =1,2,3,4.

So the index string for type-2 and type-3 subimages is (b1b2)2 and one bit for type-4 subimages can be ignored.

Page 15: A spatial data representation: An adaptive 2D-H string

Adaptive 2D-H string

From example 1. P is 4*5, m=4 and n=5,the size of subpictures in quadrants NW,SW,NE and SE are 2*3, 2*3, 2*2, 2*2.

Picture in NW and SW can be partitioned into W and E subpictures with sizes 2*2, 2*1.

NW

SW

NE

SE

Page 16: A spatial data representation: An adaptive 2D-H string

Adaptive 2D-H string

Page 17: A spatial data representation: An adaptive 2D-H string

Adaptive 2D-H string

The following algorithm is devised to implement the transformation from a symbolic picture “ f ” with size m*n to its corresponding adaptive 2D-H string S.

Procedure adaptive 2D-H string (f,m,n,S) Input:a symbolic picture f with m*n

Output:the adaptive 2D-H string representation S of the picture f

Initialize S to be null

Page 18: A spatial data representation: An adaptive 2D-H string

Adaptive 2D-H string NW NE

SW SE

Page 19: A spatial data representation: An adaptive 2D-H string

Adaptive 2D-H string

Page 20: A spatial data representation: An adaptive 2D-H string

4. Space complexity analysis

Theorem 4.1.Let “ f ” be a symbolic picture with size m*n,and B(m,n) be the number of bits needed by the indexing strings in f.Then B(m,n) satisfies the following recursive relation:

Page 21: A spatial data representation: An adaptive 2D-H string

Space complexity analysis

Theorem 4.2. Let “ f ” be a square symbolic picture with size m*m,

where it takes k bits for the indexing string.

If m = 2L and N=m*m,then k satisfies

Page 22: A spatial data representation: An adaptive 2D-H string

the upper bound(from Theorem 4.1.)

Because 2L*2L=N, it becomes

Where B(N) represents the number of bits for image size N. It can be easily solved by an iteration method. So we have

Therefore, the upper bound is equal to 4(N-1)/3

Page 23: A spatial data representation: An adaptive 2D-H string

The lower boundThe lower bound situation only occurs when least number of objects exist in the images.

A diagonal symbolic picture and its string representation only takes two quadrants,SW and NE or NW and SE.

Page 24: A spatial data representation: An adaptive 2D-H string

The lower boundTherefore, the recursive relation for B(m,m) is

It can be rewritten as

From Theorem 4.2 shown above,the storage space of 2D-H strings and adaptive 2D-H strings for a square image with size 2L*2L are exactly equal.

Page 25: A spatial data representation: An adaptive 2D-H string

Theorem 4.3.Let “ f ” be a square symbolic picture with size m*m, where m <> 2s. Then the number of bits k needed by the indexing string of 2D-H string satisfies

The original picture f with size m*m must be extended to a picture with size 2L*2L,where L= 上高斯 [log2 m].

Page 26: A spatial data representation: An adaptive 2D-H string

Example 2.Consider any image with size 5*5 to compare the maximum number of bits needed by the indexing for

2D-H strings and adaptive 2D-H strings.

(1) 2D-H strings . From Theorem 4.3. We get

(2) adaptive 2D-H strings. From Theorem4.1.

Page 27: A spatial data representation: An adaptive 2D-H string

Theorem 4.4.

Let “ f ” be a symbolic picture with size m*n. Then the number of bits k needed by the indexing part of 2D-H strings satisfies

Page 28: A spatial data representation: An adaptive 2D-H string

Example 3.

Consider any image with 5*9 to compare the maximum number of bits needed by the indexing part of 2D-H strings and adaptive 2D-H strings.

(1) 2D-H strings. From Theorem 4.4. We get

(2) adaptive 2D-H strings. From Theorem4.1,

Page 29: A spatial data representation: An adaptive 2D-H string

5. Experiments

In tables 1-3

m is the number of partitions along the x-axis

n is the number of partitions along the y-axis

k is the number of bits needed by the indexing part for a 2D-H string

k’ is the number of bits needed by the indexing part for an adaptive 2D-H string.

Page 30: A spatial data representation: An adaptive 2D-H string

when n or m is small enough,our adaptive 2D-H string always uses less storage space than the 2D-H string.

But,when the symbolic pictures start getting larger, the 2D-H string has the better performance in space needed than the adaptive 2D-H string.

Page 31: A spatial data representation: An adaptive 2D-H string

6.Conclusions

The adaptive 2D-H stringMore flexibility

Support all functions supported by 2D-H strings.

Inherits the advantages of a hierarchical data structure

In fact, adaptive 2D-H string which frequently exist in a real environment.

symbolic picture contain only a limited number

Work well in applications where non-square pictures.

For example:Chinese character retrival