~NFURMAT~ON SCTENCES 50,123-150 (1990) 123 Octagonal Distances for Digital Pictures P. P. DAS B. N. CHATTERJI Depurtment of Electronics and Electrical Communicution Engineering, Indiun Institute of Technology, Kharagpur-721302, Indiu ABSTRACT The set of distances obtained by combining the cityblock and the chessboard motions is studied as a generalization of the octagonal distance for digital pictures. The corresponding digital disks are shown to be digital octagons. A necessary and sufficient condition is obtained for the triangularity of these distances. The suitability of these distances as approximations of the Euclidean distance is studied using three different indices of errors. 1. INTRODUCTION Rosenfeld and Pfaltz [2] identified two types of motions in two-dimensional digital pictures. The first type of motion restricts movements to the horizontal or vertical directions, while the second kind also allows diagonal movements. The length of the shortest path between any two points restricted by a particular type of motion defines a distance function between these two points. Thus the two types of motion in two dimensions determine two distances: cityblock distance d4 and chessboard distance d,, respectively. To compare these distances with the Euclidean norm in two dimensions, the corresponding disks of the same radius are considered. The cityblock disk is a diamond (a square rotated through 45”) which is always smaller than the Euclidean circle, whereas the chessboard disk is a square which is larger. Hence in order to obtain a better approximation, Rosenfeld and Pfaltz suggested the alternating use of cityblock and chessboard motions. The disk of this distance is an octagon (hence it is called the octagonal distance, dot,), which is a better approximation to the Euclidean circle. It was pointed out that the combination of these motions in various other ways may give better distance functions. In this paper we study this class of distance combination in detail. Wlsevier Science Publishing Co., Inc. 1990 655 Avenue of the Americas, New York, NY 10010 0020-0255/90/$03.50