ilarity measure for comparisons between grey-scale images. Some mea- ... cessing is that of comparing two grey-scale images of equal sizes and equal grey.
Towards a m e a s u r e of diversity b e t w e e n grey-scale images Valery V. Starovoitov Institute of Engineering Cybernetics, Belorussian Academy of Sciences Surganova 6, 220012 Minsk, Belarus A b s t r a c t . This paper introduces an approach to a definition of a dissimilarity measure for comparisons between grey-scale images. Some measures are proposed and analyzed. They are based on different representations of grey-scale images: as "surfaces" and as "stacks". Some of the functions are based upon volume measures for "cube" (or discrete point) sets, and others on distances (and their combinations) between "cubes".
1
Introduction
A problem of both theoretical and practical importance in tow level image processing is that of comparing two grey-scale images of equal sizes and equal grey value ranges (without rotation and scaling). There are many situations in digital image processing and analysis where measures of image diversity must be performed within the scope of a particular task. A particularly useful application is the comparison of different algorithms devoted to the same task like, for instance, image restoration or filtering. Hence we are interested in defining and computing a cost function M(A,B), which is associated with two images and which measures their dissimilarity. Measures of similarity or diversity between two binary images, between their parts, or between polygonal shapes, are described in several papers [1-5,7-9]. However, only few papers are concerned with grey-scale image comparison. One of the first studies that suggests a measure of dissimilarity for two grey-scale images is [9], but the authors represent two images as matrices, and then calculate the Frobenius norm of these matrices. The main goal of this study is not a comparison of two images, but a comparison of an object or a scene digitized under different conditions (rotation, scaling and so on). Some numerical examples of these measures are given, but it is difficult to say something about the similarity of the initial and the rotated images because the "similarity distances" calculated are very different, while the images show the same toy tiger. Before suggesting a useful measure for comparing grey-scale images, we try to formulate several properties that such a measure should have. The most important of all properties is that it should match our intuitive notions of image resemblance. In particular, the measure should be insensitive to small perturbations (or errors) in the data. We are studying diversities based on two different representations of a greyscale image: as a "digital surface" and as a "digital stack". Three main basic Hlav~i6, ~fira (Eds.): CAIP '95 Proceedings, LNCS 970 9 Springer-Verlag Berlin Heidelberg 1995
215
metrics were used: Euclidean, city-block and chess-board. The idea of computing the diversity measures presented here is to describe the relations b e t w e e n two sets of "cubes", each giving an image representation. This paper proposes some approaches to defining such a measure. For this purpose, known diversity measures for binary images have been adapted to the grey-scale case, and some n e w measures are proposed. We look at the final measure as at a sequence of steps, each step presenting a choice of alternative measures corresponding to the different level of the diversity estimation: pixel-pixel, pixel-image, image-image. Varying the alternatives at every step, we obtain a lot of diversity measures.
2
Image representation
The basic idea for defining a "grey-scale image diversity measure" is simple from the geometrical point of view. Let A = {aij} be an image, where a~j is the grey value of the pixel with coordinates (i, j) in the range [0,..., 5/9]. We have a binary image if Ng equals 1, and we have grey-scale image if Ng greater than 1. A binary image can be thought of as a set of "black squares" on a "white table" (i.e. a set of points in the Z 2 space); and a grey-scale image can be thought of as a set of "black cubes" in a "glass box" (i.e. a set of points in the Z 3 space). We consider here two main possibilities of such representation: (i) as a digital "surface" in the "glass box" X of Z3; (ii) as a digital "stack" in the same box X of Z 3. A representation similar to the second one is used in the Mathematical Morphology and is called "umbra", but the first one is new. An advantage of these kinds of representations is that, for an arbitrary image, we have only one connected "black object" (the pixels with grey value a~j = 0 correspond to the lowest "cubes" in the "stack"). An additional advantage of the first representation is that every "object" has a constant number of points, equal to the image size N 2, and the computation time of a diversity measure is constant for any pair of images. In the second variant of the grey-scale image representation the "sub-stack" or column of (a~j + 1) "black cubes" corresponds to the pixel with grey value a~j with coordinates (i,j).
3 Requirements that may bet met by the diversity measure Before suggesting a measure to be used for comparing images, we have examined several properties that such a measure should have. There are different requirements formulated in the literature for comparison of binary images, shapes and other objects. Among the properties required for a measure M of diversity we distinguish between strong and weak properties. Let A - - {aij}, B = {bij} and C = {clj} be arbitrary images; then the desirable properties of the measure are the following ones:
216
- Metricity: -M (A,B)=0 - M
(A,B)
=
r M
A=B; (B,A);
- M (A,B) _< M ( A , C ) + M (C,B). - Normalized diversity: M(A,B)=I ~ aij=O, b i j = g g r V(i,j). - Robustness to noise: M (A, B1) = M (A, B2) 4- e, if image B1 is equal to image B2 except some pixels, i.e. M ( (Bt \ {b~jtl = 1..k}), (B2 \ {b~j[I = 1..k}) ) = 0. - Averaging (independence of small differences between images): if
{aij \ {a~j If
= 1..kl}} =
= {cij \ {e~ [/= l..k2}},
{bid \
{b~j I I = 1..Hi}},
kl