A Bintree Representation of Generalized Binary. Digital Images

Similar documents
Code Transformation of DF-Expression between Bintree and Quadtree

Solid Modelling. Graphics Systems / Computer Graphics and Interfaces COLLEGE OF ENGINEERING UNIVERSITY OF PORTO

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

CSG obj. oper3. obj1 obj2 obj3. obj5. obj4

UPEM Master 2 Informatique SIS. Digital Geometry. Topic 2: Digital topology: object boundaries and curves/surfaces. Yukiko Kenmochi.

A digital pretopology and one of its quotients

However, this is not always true! For example, this fails if both A and B are closed and unbounded (find an example).

Implementation of Hopcroft's Algorithm

We consider the problem of rening quadrilateral and hexahedral element meshes. For

An Eternal Domination Problem in Grids

Topology Proceedings. COPYRIGHT c by Topology Proceedings. All rights reserved.

Graph Theory Questions from Past Papers

Outline. Computer Science 331. Information Hiding. What This Lecture is About. Data Structures, Abstract Data Types, and Their Implementations

reasonable to store in a software implementation, it is likely to be a signicant burden in a low-cost hardware implementation. We describe in this pap

Introduction III. Graphs. Motivations I. Introduction IV

[8] that this cannot happen on the projective plane (cf. also [2]) and the results of Robertson, Seymour, and Thomas [5] on linkless embeddings of gra

Localization in Graphs. Richardson, TX Azriel Rosenfeld. Center for Automation Research. College Park, MD

Chapter 20: Binary Trees

Enhancing Integrated Layer Processing using Common Case. Anticipation and Data Dependence Analysis. Extended Abstract

Topology Homework 3. Section Section 3.3. Samuel Otten

Hamiltonian cycles in bipartite quadrangulations on the torus

On a conjecture of Keedwell and the cycle double cover conjecture

Chapter 11. Topological Spaces: General Properties

Organizing Spatial Data

Introduction. Computer Vision & Digital Image Processing. Preview. Basic Concepts from Set Theory

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

Homework Set #2 Math 440 Topology Topology by J. Munkres

Ray shooting from convex ranges

Linear Quadtree Construction in Real Time *

Two Image-Template Operations for Binary Image Processing. Hongchi Shi. Department of Computer Engineering and Computer Science

Abstract Relaxed balancing of search trees was introduced with the aim of speeding up the updates and allowing a high degree of concurrency. In a rela

BMVC 1996 doi: /c.10.41

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Solutions to Exercises 9

Figure 1: An Area Voronoi Diagram of a typical GIS Scene generated from the ISPRS Working group III/3 Avenches data set. 2 ARRANGEMENTS 2.1 Voronoi Di

1. Meshes. D7013E Lecture 14

Topology - I. Michael Shulman WOMP 2004

PROJECTION MODELING SIMPLIFICATION MARKER EXTRACTION DECISION. Image #k Partition #k

2 ZARKO BIZACA AND JOHN ETNYRE innitely many smooth structures. Our construction of these smooth structures is based on Gompf's [G1] end-sums with exo

THE BASIC TOPOLOGY ISSUES ON SPHERICAL SURFACE QUTERNARY TRANGULAR MESH

A Genus Bound for Digital Image Boundaries

SPERNER S LEMMA MOOR XU

A Vertex Chain Code Approach for Image Recognition

γ 2 γ 3 γ 1 R 2 (b) a bounded Yin set (a) an unbounded Yin set

Load Balancing for Problems with Good Bisectors, and Applications in Finite Element Simulations

Bit Summation on the Recongurable Mesh. Martin Middendorf? Institut fur Angewandte Informatik

7.3 Spanning trees Spanning trees [ ] 61

6 Planar Graphs. 6.1 Euler's Formula

Chapter 4. square sum graphs. 4.1 Introduction

Non-extendible finite polycycles

Orientation of manifolds - definition*

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

arxiv: v2 [math.co] 13 Aug 2013

Hierarchical Representation of 2-D Shapes using Convex Polygons: a Contour-Based Approach

Maximal Monochromatic Geodesics in an Antipodal Coloring of Hypercube

Three applications of Euler s formula. Chapter 10

Egemen Tanin, Tahsin M. Kurc, Cevdet Aykanat, Bulent Ozguc. Abstract. Direct Volume Rendering (DVR) is a powerful technique for

Connected components - 1

9 Connectivity. Contents. 9.1 Vertex Connectivity

Practical Image and Video Processing Using MATLAB

Ray Tracing Acceleration Data Structures

PARALLEL MULTILEVEL TETRAHEDRAL GRID REFINEMENT

1. Introduction to Constructive Solid Geometry (CSG)

An automatic correction of Ma s thinning algorithm based on P-simple points

Well labeled paths and the volume of a polytope

SFWR ENG 3S03: Software Testing

INTRODUCTION TO TOPOLOGY

Topology notes. Basic Definitions and Properties.

In this lecture we introduce the Gauss-Bonnet theorem. The required section is The optional sections are

CAR-TR-990 CS-TR-4526 UMIACS September 2003

SUBDIVISIONS OF TRANSITIVE TOURNAMENTS A.D. SCOTT

Topology 550A Homework 3, Week 3 (Corrections: February 22, 2012)

Solids as point set. Solid models. Solid representation schemes (cont d) Solid representation schemes. Solid representation schemes (cont d)

Data Structure. IBPS SO (IT- Officer) Exam 2017

Basics of Graph Theory

THE BASIC TOPOLOGY MODEL OF SPHERICAL SURFACE DIGITAL SPACE

Points covered an odd number of times by translates

F k G A S S1 3 S 2 S S V 2 V 3 V 1 P 01 P 11 P 10 P 00

Enumeration of Full Graphs: Onset of the Asymptotic Region. Department of Mathematics. Massachusetts Institute of Technology. Cambridge, MA 02139

Digital Image Processing

Nesting points in the sphere. Dan Archdeacon. University of Vermont. Feliu Sagols.

Visualizing and Animating Search Operations on Quadtrees on the Worldwide Web

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

Detection of objects in moving images and implementation of the purification algorithm on Analog CNN and DSP processors

Intersection of sets *

MULTI-REGION SEGMENTATION

Picture Maze Generation by Repeated Contour Connection and Graph Structure of Maze

Lecture 20 : Trees DRAFT

layers in a raster model

CS 245 Midterm Exam Solution Winter 2015

All 0-1 Polytopes are. Abstract. We study the facial structure of two important permutation polytopes

DATA STRUCTURES USING C

Line Graphs and Circulants

II (Sorting and) Order Statistics

Programming Assignment 1: A Data Structure For VLSI Applications 1

Calculating the Hausdorff Distance Between Curves

visual boundary (a) a vector format region (b) a raster format region region b region a Boundary Interior of region a Interior of region b

A Simplied NP-complete MAXSAT Problem. Abstract. It is shown that the MAX2SAT problem is NP-complete even if every variable

Ecient Implementation of Sorting Algorithms on Asynchronous Distributed-Memory Machines

Transcription:

A intree Representation of Generalized inary Digital mages Hanspeter ieri gor Metz 1 inary Digital mages and Hyperimages A d-dimensional binary digital image can most easily be modelled by a d-dimensional binary array. Each element of the array represents a (d-dimensional) pixel which is normally called "black" ("white") if the element's value is 1 (0). For most purposes it is necessary to introduce topological notions (adjacency, connectedness, etc.) for digital images and to study their properties. This is the main topic of digital topology [KR89]. Depending on the specic point of view, pixels are then normally understood as elements of Z d, as points with integer coordinates in R d, or as d-dimensional closed unit cubes. The resulting diculties are well-known and rather easily explained (cf. [Pav82], [N84], and especially [Kov89]). [ie90] avoids these diculties by giving up the requirement that all pixels of a digital image have to be of the same type. As this approach does not conform to the conventional denitions of digital images [Fiu89], the resulting "images" are called generalized binary digital images or hyperimages. [ie90] starts from the pixel understood as a d-dimensional closed unit cube and replaces it by pixels which are relatively open unit cubes of dimensions 0; 1; :::; d. For the case d = 2, Figure 1 shows that an "old" pixel is the disjoint union of 9 "new" pixels of which four are 0-dimensional, four 1-dimensional, and one 2-dimensional. t is practical to distinguish between the "horizontal" and "vertical" 1-dimensional "new" pixels. Consequently we get for d = 2 four types of pixels which we denote by the symbols,, j,. Figure 2 shows a conventional 2-dimensional binary digital image, with its 36 pixels understood as closed unit squares. Figure 3 shows the corresponding hyperimage where the numbers of pixels belonging to the four types are 49, 42, 42, and 36. The two gures clearly show the most important advantage of hyperimages compared to conventional digital images: The "old" pixels in Figure 2 form only a subdivision of the whole image (dierent "old" pixels are not necessarily disjoint sets), whereas the "new" pixels in Figure 3 form a partition of the hyperimage. Like a conventional digital image, also a hyperimage can most easily be modelled by a d-dimensional binary array. Again, every element of the array represents a pixel which is understood as a unit cube R d. ut now, all these unit cubes are relatively open and their dimension is no longer necessarily = d. n order to get a normalized representation, we assume without loss of generality that the rst element in the array (i. e. the element with all its indices = 1) represents a d-dimensional pixel and that the number of elements along each axis is odd. With the rst assumption, an element represents a d-dimensional pixel i all its indices are = 1 mod 2. All other elements represent (relatively open) faces of such d-dimensional unit cubes, with dimensions 2 f0; : : :; d? 1g. They are uniquely determined by the requirement that all pixels together must form a partition of the extent of the whole hyperimage which is a d-dimensional box R d. For a normalized hyperimage this box is an open set. [ie90] shows that the euclidean topology of R d induces on every d-dimensional hyperimage a nite topology which can easily be described, e. g. by characterizing the smallest open neighborhood of every pixel type. This topology allows the design of elegant algorithms. t also represents a natural illustration of the main proposition in [Kov89]. While the concept of hyperimages is not restricted to any specic dimension, the following sections will only deal with algorithms for hyperimages of dimension d = 2. This restriction is insignicant and nstitut fur nformatik und angewandte Mathematik, Universitat ern, Langgassstrasse 51, 3012 ern, Switzerland. Email: bieri@iam.unibe.ch, metz@iam.unibe.ch

Figure 1: An "old" pixel partitioned by 9 "new" pixels. Figure 2: A conventional digital image. Figure 3: A hyperimage (not normalized). Figure 4: A hyperimage to be represented by a bintree. its only purpose is ease of demonstration. The nature of the underlying data structures, i.e. arrays and bintrees, allows likewise an immediate generalization of these algorithms to higher dimensions. 2 Matrix and intree Representations Representing a hyperimage by a binary array is straightforward as we have seen above. Given a mn binary array Mat1 representing a conventional binary image, we generate from it a (2m + 3) (2n + 3) binary array Mat2 which represents the corresponding normalized hyperimage. The conversion procedure works as follows: Allocate a binary array Mat2[1..2m+3, 1..2n+3]. For each element Mat1[i,j] which is set to true, set to true all elements Mat2[u,v] with u 2 f2i; 2i + 1; 2i + 2g, v 2 f2j; 2j + 1; 2j + 2g. Set all other elements to false. After that, to reduce the amount of space used to store hyperimages we are going to use a hierarchical data structure technique to represent this kind of spatial data. We prefer bintrees [ST85] to quadtrees [Sam90] because they allow an elegant implementation of algorithms which perform independently of any specic dimension of image or space. We further decide to use pointer bintrees instead of linear bintrees mainly because it is easier to implement pointer based algorithms. Pointer based algorithms have been viewed as being storage wasters, but fairly compact pointer based implementations are possible [SW89]. A straightforward implementation of a bintree node in C++ might look as follows 1 : enum tnodetype {GRAY, WHTE, LACK}; struct tnode { tnode* left, right; tnodetype NodeType; tnode(tnodetype nt, tnode* l, tnode* r) 1 The record tnode denes a so-called constructor. The constructor is used in conjunction with the new operator for

}; { NodeType = nt; left = l; right = r; } To convert a binary array Mat2 representing a hyperimage which corresponds to a m n binary digital image into a pointer based bintree, we rst embed Mat2 in a 2 k 2 k binary array Mat3 where k = dlog(max(2m + 3; 2n + 3))e. This array can then be converted into a pointer bintree using any known method [Sam90]. The enlarged hyperimage represented by the array Mat3 which is used to construct the bintree for our previous example is shown in Figure 4. 3 A Topological Operation We conne ourselves to the construction of the boundary of a hyperimage which is again a hyperimage (cf. [ie90]). Our algorithm consists of two steps which both include a bintree traversal in preorder. The algorithm tries to avoid checking nodes which do not belong to the boundary. The rst step partitions the given hyperimage into extents which wholly belong to the boundary, to the interior or to the exterior, respectively, of the black part of the image. To do this, the given bintree must possibly be deepend, and the result is an intermediate bintree. The second step converts this intermediate bintree into a bintree representing the boundary of the given hyperimage. Figure 5 refers to the black leaves visited during the traversal in step 1. Every such leaf represents a black extent of the given hyperimage. This extent (rst column) and its surrounding pattern (second column) are examined, and an appropriate action (third or fourth column, respectively) is taken. Either the extent can be marked by a (boundary), an (interior) or an E (exterior), or the considered node is rened by an additional bintree. This latter case is indicated by an arrow. A gray coloring refers to an extent which contains black as well as white pixels. The patterns and actions for white extents are analogous to those of Figure 5, so their presentation is omitted. We will not dicuss all cases shown in Figure 5 in detail. Discussing two of them should be enough to make the procedure evident. 1. Let the leaf reached represent a black extent of type (rst line in Figure 5). f all its neighbours are black, then this leaf is marked as belonging to the interior of the hyperimage. Otherwise it will be marked as belonging to the boundary. 2. Let the leaf reached represent a quadratic black extent of length > 1 (last two lines in Figure 5). f the upper extent is black and the upper right extent and the right extent are gray, then we rene this node, i. e. we replace it by a bintree consisting of three nodes, and recursively check the right leaf. The left leaf will be marked as belonging to the interior. Else if the upper extent or the upper right extent is gray, then we rene this node and recursively check both leaves. Else the node is marked as belonging to the interior of the hyperimage. A little example illustrating this algorithm is shown in Figure 6. Algorithms for determining the interior or the closure of a hyperimage work in a similar way. 4 Conclusions As our experiments have shown [M91], the bintree representation of hyperimages reduces the space requirements signicantly and allows an ecient implementation of several important algorithms for hyperimages. One other positive aspect of using bintrees is, that our algorithms can easily be generalized to higher dimensions. The application of this approach to three- or four-dimensional images should also prove to be of practical use.

Extent Pattern Action Else 1 2 3 4 5 or 6 > 7 7 8 > 9 9 10 > 11 11

Figure 6: The three stages of computing the boundary of a letter : original hyperimage, intermediate result and nal result. Single lines indicate places of bisection, crosses indicate nodes marked by an (interior). References [ie90] H. ieri. Hyperimages - an alternative to the conventional digital images. n C.E. Vandoni and D.A. Duce, editors, Proceedings of EUROGRAPHCS '90, pages 341{352. North- Holland, 1990. [M91] H. ieri and. Metz. Algorithms for generalized digital images represented by bintrees. To appear as Technical Report AM-91-001, nstitut fur nformatik und angewandte Mathematik, Universitat ern, 1991. [N84] H. ieri and W. Nef. Algorithms for the Euler characteristic and related additive functionals of digital objects. Computer Vision, Graphics, and mage Processing, 28:166{175, 1984. [Fiu89] E.L. Fiume. The Mathematical Structure of Raster Graphics. Academic Press, 1989. [Kov89] V.A. Kovalevsky. Finite topology as applied to image analysis. Computer Vision, Graphics, and mage Processing, 46:141{161, 1989. [KR89] T.Y. Kong and A. Rosenfeld. Digital topology: ntroduction and survey. Computer Vision, Graphics, and mage Processing, 48:357{393, 1989. [Pav82] T. Pavlidis. Algorithms for Graphics and mage Processing. Computer Science Press, 1982. [Sam90] H. Samet. Applications of Spatial Data Structures. Addison-Wesley, 1990. [ST85] H. Samet and M. Tamminen. intrees, CSG trees, and time. Computer Graphics, 19(3):121{ 130, 1985. [SW89] H. Samet and R. E. Webber. A comparison of the space requirements of multi-dimensional quadtree-based le structures. Visual Computer, 5:349{359, 1989.