Discrete geometry and Azriel Rosenfeld

Discrete geometry and Azriel Rosenfeld

Pattern Recognition Letters 26 (2005) 235–238 www.elsevier.com/locate/patrec Discrete geometry and Azriel Rosenfeld Theo Pavlidis Department of Compu...

283KB Sizes 87 Downloads 222 Views

Pattern Recognition Letters 26 (2005) 235–238 www.elsevier.com/locate/patrec

Discrete geometry and Azriel Rosenfeld Theo Pavlidis Department of Computer Science, Stony Brook University, Stony Brook, NY 11794-4400, USA Received 13 July 2004; received in revised form 8 October 2004 Available online 8 December 2004

Abstract Professor Azriel Rosenfeld did important work in several areas of Image Processing, Pattern Recognition and Computer Vision. I had the good fortune to interact with him on several topics for over 30 years and it is difficult to select a single topic to cover in a short paper. I settled on digital geometry because both our first and last contact dealt with this area. Furthermore Azriel not only did pioneering work on digital geometry, he also continued research on the topic for the rest of his life. Instead of trying to write something on a specific sub-topic of digital geometry, I opted to discuss why the area is so challenging. Ó 2004 Published by Elsevier B.V. Keywords: Digital geometry; Discrete geometry

In memoriam My first direct contact with Professor Azriel Rosenfeld was around 1970 on the subject of Discrete Geometry. Azriel had published a paper where he pioneered the concepts of 4- and 8-connectivity in order to resolve some of the intuitive paradoxes in the definition of geometrical properties on the discrete plane. My first Ph.D. student, John Mylopoulos, was investigating the computational complexity of several geometric problems and a solid foundation of the geometric definitions was paramount. AzrielÕs work provided the foundations. E-mail address: [email protected] 0167-8655/$ - see front matter Ó 2004 Published by Elsevier B.V. doi:10.1016/j.patrec.2004.10.013

Of course Azriel was soon moving to new problems: two that figured prominently were data structures such as quadtrees and pyramids and relaxation techniques. In the fifth ICPR (1980 in Miami) he gave the invited paper on ‘‘Quadtrees and Pyramids for Pattern and Image Processing.’’ He was also co-author of two contributed papers. One (with C.E. Kim) on digital geometry and the other (with H. Samet) on quadtrees for binary images. He still continued to work on discrete geometry extending the concepts to three-dimensional spaces and investigating algorithms, literally until his last working days. Indeed, my last interaction with Azriel involved the book he was co-authoring with Reinhard

236

T. Pavlidis / Pattern Recognition Letters 26 (2005) 235–238

Klette on Discrete Geometry. I was asked to provide detailed comments and I completed the task in September 2003. It is very unfortunate that Azriel passed away before the book was published. Azriel was also a distinguished Jewish scholar and a strictly observant Jew who adhered to the Jewish dietary laws in spite of the challenges posed when he had to travel all over the world as part of his activities as a scientist. Those of us who knew him personally were touched by his commitments to both aspects of his life. He would not hesitate to travel to far away places to meet scientific commitments and he would observe the dietary laws there even if that often meant a very meager meal. During the last few years (after my retirement from the University) I had the opportunity to appreciate directly AzrielÕs Jewish scholarship. We had several e-mail exchanges on sources for Jewish history and I have been very grateful for his suggestions and encouragement.

1. The challenge of discrete geometry Fig. 1 illustrates the classic digital geometry challenge: what color is the corner where the four squares touch? If we consider it to be black, then the line AB lies entirely in the black region of the image. But then the line AB intersects the line CD that lies outside the black region. A slightly different way of looking at the same example is to consider each region as a pixel and ask which pixels are connected to others.

If we assume that pixels are connected if they touch on their sides, then we have the paradoxical result that neither the black pixels nor the white pixels are connected. If we assume that two pixels are connected if they touch at a corner then we have the equal paradoxical result that both black pixels and white pixels are connected. The way out of such paradoxes is to use different definitions of connectivity for black and white pixels. For example, black pixels are connected if they touch in a corner (8-connectivity or indirect connectivity) while white pixels are connected only if they share a side (4-connectivity or direct connectivity). Although this idea had been discussed before, it was Azriel RosenfeldÕs seminal paper in 1970 (Rosenfeld, 1970) that first expressed it formally and provided a rigorous analysis of its implications. That paper started effectively the field of Discrete Geometry. Azriel Rosenfeld continued to be quite productive in this area (as well as several others) culminating in the book with Reinhard Klette (Klette and Rosenfeld, 2004). In 1996 he co-edited with T. Yung Kong a volume (Kong and Rosenfeld, 1996) that contains several papers covering developments that are all rooted in his seminal work in (Rosenfeld, 1970). The last chapter of (Kong and Rosenfeld, 1996) is by the editors and provides a succinct review of digital topology and its history with an extensive bibliography where the reader can find additional references. Here I add only two that represent particularly noteworthy extensions of the original work: In fuzzy sets (Rosenfeld, 1979) and in three-dimensional spaces (Rosenfeld et al., 1991). Discrete Geometry has widespread applications in Image Processing, Image Analysis, and Computer Graphics that is not always appreciated by software developers. I hope that the new book on Discrete Geometry (Klette and Rosenfeld, 2004) may help to rectify the situation.

2. There is no better way Fig. 1. Illustration of the classic digital geometry challenge. Black regions are shown as gray so that the lines and labels referred to in the text be visible.

It is interesting to ask whether there is a better way to deal with digital geometry/topology than to rely on dual definitions for connectivity for

T. Pavlidis / Pattern Recognition Letters 26 (2005) 235–238

the two colors. The vast amount of research in the years since Azriel RosenfeldÕs 1970 paper implies that it is unlikely that such an alternative exists but we may also look for theoretical reasons why this is so. There are also paradoxes that persist even after the introduction of a dual definition for connectivity: for example, in the Euclidean plane two points define a unique line but this property does no hold in the discrete plane. 2.1. Problems caused by sudden transitions in color or intensity The root of the problem is the fact that the shapes of the Euclidean plane have infinite bandwidth. An image containing only two levels of brightness involves step intensity functions and it is well known from signal theory that such images cannot be reconstructed exactly. No matter how dense is the sampling grid there will always be an ambiguity about the exact location of the boundary between two colors. If we were going to redraw Fig. 1 to account for this ambiguity, the result will be as shown in Fig. 2. The gray zones represent the areas where we are uncertain about the color/intensity of the image. A similar phenomenon is also observed with real scanners when they are used for document images. Real scanners average intensities over a finite area (point-spread function) and thus they perform a low- pass filtering operation on the image. If an image point is surrounded by others of the same color/intensity, then the resulting pixel will have

237

the correct color/intensity. Otherwise it will have an intermediate value. For black/white document images such pixels appear as gray (Pavlidis et al., 1993). It can easily be shown that the value of a pixel at a narrow gap between two areas of the same color will be the same in the case of a white gap surrounded by black areas as in the case of a black gap surrounded by white areas. This is a well-known problem for OCR researchers who must decide in favor either of touching characters or broken characters when selecting thresholding parameters. Selecting 8-connectivity is the equivalent to favoring a color in cases of ambiguity. If we do that for black we favor touching characters but if we do it for white we favor broken characters. Notice that it is not necessary to impose the asymmetric definition globally. For example, we may select 8-connectivity for a different color in different parts of the picture. The key decision is that pixels near the boundary of regions have ambiguous color/intensity in the digitized image. An alternative to asymmetry by color may be asymmetry by orientation. Let us reconsider for the moment the example of Fig. 1 in the Cartesian plane. If x0 and y0 are the coordinates of point X, then the color of pixels along a the line y = y1 with y1 > y0 may be defined as black when x 6 x0 and white when x > x0. This asymmetric definition determines the color of X unambiguously. 2.2. Problems caused by sharp boundaries Besides sudden transitions in color/intensity, images representing geometric shapes may have sharp corners that cannot be captured during sampling. Fig. 3 illustrates this phenomenon. The triangle represents part of a shape that is to be

Fig. 2. Ambiguity in the color of regions introduced by finite sampling.

Fig. 3. The gray area represents a shape that is sampled at the locations marked by circles.

238

T. Pavlidis / Pattern Recognition Letters 26 (2005) 235–238

Fig. 4. Multiple lines defined by end points with finite area.

digitized whereas the centers of the circles represent sampling points and the circles themselves the one sigma area of Gaussian point-spread functions. Under these assumptions only the four rightmost pixels will appear as black, the four leftmost will appear as white and the color of the four middle ones will depend on the precise value of the threshold function. The sharp corner feature will be lost entirely. In short, very thin shapes cannot be digitized properly and the Euclidean line that is defined as having zero width cannot be digitized at all. We can only digitize strips of finite width and thus it is not surprising that the ‘‘straight lines’’ of Discrete Geometry do not have the Euclidean properties. For example, the line joining pixels (0, 0) and (4, 1) could consists of the additional pixels (1, 0), (2, 0), (3, 0) or (1, 0), (2, 0), (3, 1) or (1, 0), (2, 1), (3, 1) or (1, 1), (2, 1), (3, 1). Each of these alternatives corresponds to one of the line segments of different styles shown in Fig. 4. For the same reason the intersection of two line segments is not well defined, especially if the two segments form a small angle. Readers may convince themselves about the challenge by trying to find the intersection of the segments (0, 0)—(4, 1) and (0, 1)—(4, 0).

3. Conclusions Understanding the reasons for the challenges presented by Digital Geometry is important both from a theoretical as well as practical point of view. The difficulties of several image processing

problems have their roots in their approximation of the Euclidean plane by the discrete plane. The difficulties of scaling on the discrete plane are well known, so that most applications deal with the problem by converting from the discrete plane to the Euclidean plane, performing the scaling transformation there and then converting back to the discrete plane. Pixel based thinning is another problem where the sharp boundary problem (discussed in Section 2.2 above) is the cause of difficulties in defining branches of the skeleton near corners. Sharp corners cannot be defined properly on the discrete plane and a thinning algorithm must make certain (in effect) arbitrary decisions. In general one must chose between too many and too few branches caused by corners. Published algorithms tend to alternate between the two, a fact that may explain the large number of papers published on that topic. In spite of significant past accomplishments, much remains to be done in digital geometry not the least of which is technology transfer, namely raising the awareness of display software developers to the subtleties of manipulating pictorial data in a discrete space. We are certain to continue seeing references to Azriel RosenfeldÕs work for many years to come.

References Klette, R., Rosenfeld, A., 2004. Digital Geometry: Geometric Methods for Digital Picture Analysis. Morgan Kaufmann. Kong, T.Y., Rosenfeld, A. (Eds.), 1996. Topological Algorithms for Digital Image Processing. North Holland. Pavlidis, T., Chen, M.H., Joseph, E., 1993. Sampling and quantization of bilevel signals. Pattern Recognition Lett. 14, 559–562. Rosenfeld, A., 1970. Connectivity in digital pictures. J. ACM 17, 146–160. Rosenfeld, A., 1979. Fuzzy digital topology. Inform. Control 40, 76–87. Rosenfeld, A., Kong, A.T.Y., Wu, A.Y., 1991. Digital surfaces. Graphic Modeling Image Process. 53, 305–312.