A Constant-Time Algorithm for Finding Neighbors in Quadtrees

Quadtrees and linear quadtrees are well-known hierarchical data structures to represent square images of size 2r times 2r. Finding the neighbors of a specific leaf node is a fundamental operation for many algorithms that manipulate quadtree data structures. In quadtrees, finding neighbors takes O(r) computational time for the worst case, where r is the resolution (or height) of a given quadtree. Schrack [1] proposed a constant-time algorithm for finding equal-sized neighbors in linear quadtrees. His algorithm calculates the location codes of equal-sized neighbors; it says nothing, however, about their existence. To ensure their existence, additional checking of the location codes is needed, which usually takes O(r) computational time. In this paper, a new algorithm to find the neighbors of a given leaf node in a quadtree is proposed which requires just O(1) (i.e., constant) computational time for the worst case. Moreover, the algorithm takes no notice of the existence or nonexistence of neighbors. Thus, no additional checking is needed. The new algorithm will greatly reduce the computational complexities of almost all algorithms based on quadtrees.

[1]  Jozef Vörös A strategy for repetitive neighbor finding in images represented by quadtrees , 1997, Pattern Recognit. Lett..

[2]  M. V. Kreveld Computational Geometry , 2000, Springer Berlin Heidelberg.

[3]  Shi-Nine Yang,et al.  Efficient Parallel Neighbor Finding Algorithms for Quadtrees on Hypercubes , 1993, J. Inf. Sci. Eng..

[4]  Hanan Samet,et al.  Distance Transform for Images Represented by Quadtrees , 1982, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[5]  Hanan Samet,et al.  A Top-Down Quadtree Traversal Algorithm , 1985, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[6]  Günther F. Schrack,et al.  Finding neighbors of equal size in linear quadtrees and octrees in constant time , 1991, CVGIP Image Underst..

[7]  Hanan Samet,et al.  A quadtree medial axis transform , 1983, Commun. ACM.

[8]  Daniel R. Fuhrmann,et al.  Quadtree Traversal Algorithms for Pointer-Based and Depth-First Representations , 1988, IEEE Trans. Pattern Anal. Mach. Intell..

[9]  I. Jntroductjon Neighbor Finding Techniques for Images Represented by Quadtrees * , 1980 .

[10]  Jon Louis Bentley,et al.  Quad trees a data structure for retrieval on composite keys , 1974, Acta Informatica.

[11]  Hanan Samet,et al.  Neighbor finding in images represented by octrees , 1989, Comput. Vis. Graph. Image Process..

[12]  Irene Gargantini,et al.  An effective way to represent quadtrees , 1982, CACM.

[13]  Hanan Samet,et al.  Applications of spatial data structures , 1989 .

[14]  Hanan Samet,et al.  Applications of spatial data structures - computer graphics, image processing, and GIS , 1990 .

[15]  Hanan Samet,et al.  The Design and Analysis of Spatial Data Structures , 1989 .