Region representation: Quadtrees from binary arrays

Abstract An algorithm is presented for constructing a quadtree from the array representation of a binary image. The algorithm examines each pixel in the image once and only once. In addition, as the tree is constructed, only maximal sized nodes are ever created. Thus the algorithm never requires temporary nodes. The execution time of the algorithm is equal to the number of pixels in the image. The amount of space, in addition to that necessary for the final quadtree, is proportional to the log of the image diameter.