a spatial data representation: an adaptive 2d-h string
Post on 21-Dec-2015
218 views
TRANSCRIPT
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.
Quadtree(1984)-a useful data structure in representing and manipulating hierarchical picture.
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
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.
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
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)]( 上高斯 )
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.
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
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
Adaptive 2D-H string
Decomposition methodquadrant segmentation =>NW,SW,NE,SE
row segmentation =>N,S
column segmentation =>W,E
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.
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
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
Adaptive 2D-H string NW NE
SW SE
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:
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
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
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.
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.
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].
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.
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
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,
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.
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.
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