Pattern Recognition 32 (1999) 1507}1517
A new thresholding technique based on random sets Nial Friel, Ilya S. Molchanov* Department of Statistics, University of Glasgow, Glasgow G12 8QW, UK Received 18 September 1998; received in revised form 6 October 1998; accepted 6 October 1998
Abstract We present a new technique for grey-scale image thresholding. Vital to this paper is the idea that each grey-scale image gives rise to the distribution of a random set. Our new thresholded set appears as an expectation of a random set generated from an image. This expectation is de"ned using binary distance transforms in such a way that the distance transform of the thresholded binary image mimics (in some sense) the average distance transform for varying threshold level. 1999 Pattern Recognition Society. Published by Elsevier Science Ltd. All rights reserved. Keywords: Distance function; Grey-scale images; Random sets; Threshold
1. Introduction Grey-scale image thresholding plays an important role in image processing. Thresholding is useful for many di!erent reasons, most commonly for separating objects from the background. The most widely used thresholding technique employs the grey level histogram of the image. If the foreground is clearly distinguishable from the background, then the histogram will be bimodal and the threshold level is chosen in the valley. Most grey level histograms however, are not bimodal. For this reason other techniques are needed. Some thresholding methods have tried to modify the histogram to the bimodal case. For example, by weighting the histogram in a certain manner, so that the histogram consists mostly of grey levels of background and foreground pixels, and that border grey levels are not weighted as heavily. A survey of various methods has been presented in Ref. [1]. Other techniques have been presented, based on Shannon's entropy concept (for example, [2,3]). The entropy of an image may be considered as a measure of the
* Corresponding author. E-mail address:
[email protected] (I.S. Molchanov)
information content of the image. These methods use information from local changes in pixel intensities. The entropy of an image, H, is de"ned as L H"! p log (p ) I I I where p , represents the standardised frequency of the I number of pixels with grey level k. Entropy methods seek to maximise the information content between the object and background pixels of an image. A recent class of entropy techniques has been proposed which encompasses previous entropy methods [4]. The thresholding method which we propose here is based on distance functions (or distance transforms) de"ned for binary images. The distance transform have been used before in imaging, see Ref. [5]. In this situation binary images are transformed into grey-scale images, contrasting with the thresholding where the opposite occurs. Entropy methods [3,4,6] rely heavily on information theory, and in particular concentrate on "rst-order grey level statistics, that is, the histogram, and on secondorder grey level statistics, namely local changes in pixels intensities. Many conventional thresholding methods [1] operate entirely with the histogram of the image, so that two di!erent images with identical histograms are thresholded at identical levels. By using distance functions we
0031-3203/99/$20.00 1999 Pattern Recognition Society. Published by Elsevier Science Ltd. All rights reserved. PII: S 0 0 3 1 - 3 2 0 3 ( 9 9 ) 0 0 0 1 7 - 5
1508
N. Friel, I.S. Molchanov / Pattern Recognition 32 (1999) 1507}1517
aim to amalgamate both local and global information contained in the image, so that the spatial distribution of grey values is important to determine the threshold. Vital to this paper is the idea that a grey-scale image may be considered as a distribution, in a certain sense, of a random set. A fundamental notion to the theory of random sets is that of expectations. In our method we modify one such expectation, distance average, which is based on distance functions to produce our thresholding technique. It should seem plausible that we would use the notion of expectation in describing our thresholding technique, since analogous to an expectation, a thresholded set may be viewed as a set summarising the content of an image, while at the same time losing much information. The paper is organised as follows. Section 2 explains the relationship between grey-scale images and random sets. An example of an expectation of a random set together with its relationship to naive thresholds is presented in Section 3. In Section 4 the distance average of a random set is de"ned. Section 5 introduces the new thresholding technique. We discuss some properties associated with our new technique in Section 6. In Section 7 we present some results for various arti"cial and real images.
2. Grey-scale images and related random sets A grey-scale image inside a window = can be treated as a function de"ned on =, where = is usually a subset of a plane or three-dimensional space. In practical imaging = is a collection of pixels within a discretised rectangle, and possible values of f are given by integers +0,2, 255,, so both the domain and the range of f are discrete sets. Below we will work in the continuous setup, where = is a subset of a m-dimensional Euclidean space 1K and f : =C[0,1] is a function with values in [0,1]. In fact, most of methods work if = is a general metric space. The continuous set-up allows us to refer to analytic tools, while leaving always a possibility to &discretise' the problem. Each point x3= is assigned a grey value f (x) which lies between 0 and 1. We use the notation f to denote both the function and the corresponding grey-scale image. Without further notice we assume that f is upper semi-continuous. This ensures the measurability of f and guarantees that the subgraph (also called hypograph or umbra) of f is a topologically closed set [7,8]. Throughout we denote the cumulative histogram of the image by G(t). If = is a discrete set, then G(t )!G(t ) equals the number of pixels with grey values lying in the interval (t , t ]. In the continuous setting, the number of pixels should be replaced by a measure of a subset. If = is a subset of the Euclidean space 1K, then the most natural choice is the m-dimensional Lebesgue measure k, which
corresponds to the area of the subset if m"2 and the volume of the subset if m"3. Then, for each 0)t)1, G(t)"k(+x3=: f (x))t,). Clearly, G(t), 0)t)1, is an non-decreasing right-continuous function and G(1)"k(=). Note that the function G can be discontinuous if f has a #at piece. If
R G(t)" g(s)ds
(1)
for some function g, then the function g is called the histogram. Note that G( ) )/k(=) can be considered as a cumulative distribution function of a random variable f with values in [0,1], so that g( ) )/k(=) (if it exists) D becomes the probability density function of f . D An important technique in image processing is histogram equalisation. It is used for contrast enhancement and aims to "nd an image with uniformly distributed grey values over the whole grey-scale range. As above we denote the input histogram by g(s). Our intention is to "nd a monotonic transformation of grey levels, t"q(s) such that the desired equalised histogram, g (t), is uni form over the entire grey scale range. Thus we require
Q R g(x)dx" g (x)dx
where g (t) has the constant value k(=). By Eq. (2), we deduce G(s)"k(=)t. Solving the above we "nd that the transformation q may be derived as, 1 t"q(s)" G(s). k(=)
(2)
In practical imaging where we work with a discrete number of pixels and grey levels, Eq. (2) is modi"ed so that k(=) corresponds to the number of pixels in the window and G(s)" Q g(x)dx is approximated by a sum. the resulting histogram is not Therefore we see that ideally equalised. A grey-scale image can be interpreted as a nested family of sets F "+x3=: f (x)*t,, 0)t)1. R Observe that F becomes a random closed set, if ; is 3 a random variable on [0,1]. Therefore, a deterministic image f gives rise to a random set whose distribution is uniquely determined by f and the random variable ;. We could for instance consider the scenario where ; is uniformly distributed over the set of grey levels, we will henceforth call such a random set model uniformly weighted. Another possibility is to adopt the histogram of
N. Friel, I.S. Molchanov / Pattern Recognition 32 (1999) 1507}1517
the image as the distribution, i.e., set ;"f . The correD sponding random set model in this case is called histogram weighted. Of course, there are many more approaches to take, for instance those suitable to emphasise di!erent ranges of grey values. In fact, there is an immediate relationship between a uniformly weighted and a histogram weighted random set model. A histogram weighted random set model generated by an image f is equivalent to a uniformly weighted model for the corresponding equalised image. We have seen that an equalised image has a #at histogram (in the continuous case), thus most histogram thresholding techniques could not be employed successfully for this case. However, we will see later that our new thresholding method has no di$culties in handling this situation.
3. Naive thresholds Just as the notion of expectation is fundamental to random variables, so too is the idea of expectations to random sets. In general, there are many di!erent approaches to de"ning expectations of random sets in 1K, see Refs. [9,10]. Each method is generally determined by the type of sets in question. The Vorob'ev expectation [10 p. 113] is one such example. Let 1 (x) be the indicator function (or character6 istic function) of X, that is, it is equal to 1 for x3X and to 0 otherwise. Then E1 (x)"p (x)"P+x3X, 6 6 is called the coverage function. Assume that Ek(X))R. Then the Vorob'ev expectation, E (X), is de"ned by 4 X "+x31K: p (x)*t, for t which is determined from R 6 the equation
1509
F , of the image at level t, as introduced earlier. Further, R
Ek(X)"Ek(F )" 3
P+x3F ,dx" f (x)dx. 3 5 5
Thus we see that the Vorob'ev expectation of the random set F is the thresholded set F de"ned so that 3 R
k(F )" R
f (x)dx, 5
if such a set exists. If not, then we choose F such that R k(F )) f(x)dx)k(F ) for all q(t. So we see that F is R 5 O R the level set whose area is the closest to the integral of f over the entire window. Now consider the situation where the random set model is histogram weighted, so that ;"f is distribD uted according to the histogram g of the image f (assuming that the histogram exists). Then,
Ek(F )" 3
DV P+;)f(x),dx" g(t)dt dx. 5 5
Here g(t) denotes the histogram. Changing the order of integration above we see that
Ek(F )" 3
g(t)dt ds" g(t)k(F )dt. R $R
(3)
It may be seen that k(F )"g(t)dt. Inserting this into R R Eq. (3) and integrating, we see that Ek(F )"k(=)/2. 3 Thus we see that the Vorob'ev expectation for the histogram weighted case yields the level set F , determined by R k(F )"k(=)/2, if such a set exists. If not, we choose R F such that k(F ))k(=)/2)k(F ) for all q(t. So we R R O see that F is the level set whose area is the closest to half R the area of the window.
k(X )"Ek(X). R
4. Distance average
If this equation is not satis"ed for any X (for example, if R k(X ) is discontinuous), then X is chosen from the inR R equality
We have seen in the previous section that the Vorob'ev expectation is very much measure oriented. In particular it ignores sets of measure zero, for example, isolated points or curves in the continuous set-up. We now describe an expectation which has no such problems. It is based on the idea that random sets can be represented by their distance functions rather than indicator functions used to de"ne the Vorob'ev expectation. For each set XL1K all points in 1K can be classi"ed according to their positions with respect to X. We could, for instance, consider the distance of each point to X. This, however, is not the only approach. The following de"nition is a generalisation.
k(X ))Ek(X))k(X ), for all q(t. R O We now show that "nding the Vorob'ev expectation of the random set X"F generated by an image f, using 3 both the uniformly and histogram weighted models yields naive thresholds. If the random set model X"F is uniformly weighted, 3 then, p 3(x)"P+x3F ,"P+;)f (x),"f (x). 3 $ In this case the coverage function coincides with the image and the set X coincides with the thresholded set, R
De5nition 1 (Baddeley and Molchanov [11]). A function d(x, X) with the "rst argument being a point x31K and
1510
N. Friel, I.S. Molchanov / Pattern Recognition 32 (1999) 1507}1517
the second one being a closed subset XL1K is said to be a (generalised) distance function if it is lower semi-continuous with respect to its "rst argument, measurable with respect to its second argument, and satis"es the following two conditions.
where dM ( ) ) and d( ) , X(e)) are considered to be functions of their arguments designated by dots. The norm in Eq. (4) could be any one of numerous norms in function spaces, e.g., ¸ , ¸ , ¸ . Note that if h is a numerical function on =L1K, then the ¸ norm of h is given by
1. If X LX , then d(x, X )*d(x, X ) for all x31K (monotonicity). 2. X"+x: d(x, X))0, (consistency).
""h"" "sup "h(x)", VZ5
The following are examples of distance functions, some of which we will meet later: Example 1. The Euclidean distance function d(x, X) is equal to the distance from x31K to the nearest point of X. More precisely
and the ¸ norm of h for p*1 is de"ned by N
""h"" " N
"h(x)"Ndx 5
N .
We will see later that for our speci"c purposes some norms serve better than others.
d(x, X)"o(x, X)"inf+o(x, y): y3X,, x31K. 5. The distance threshold Example 2. The signed distance function is de"ned as:
d(x, X)"
o(x, X),
x,X,
!o(x, X), x3X.
Here X denotes the complement of X in 1K. Note that a mathematical analysis of signed distance functions can be found in Ref. [12]. Example 3. The square distance function is de"ned by d(x, X)"o(x, X). Note that in Examples 1}3 the metric o is not necessarily the Euclidean metric. It is possible to use other metrics, for instance, those suitable for particular application setup. Now let us consider the situation where X is a general random closed set. Let d(x, X) be the generalised distance function of X. In general the expected distance function dM (x)"Ed(x, X) is not a distance function, see Ref. [11]. However, it is sensible in many cases to search for a deterministic set (or binary image) such that its distance function (or distance transform) is the closest to dM (x) in some sense. Since it is di$cult to search through all possible closed sets, it is possible to restrict the choice of possible &candidates' onto those sets which appear as thresholds of dM (x). A suitable level set of the expected distance function serves as the distance average of X. To "nd this level, dM (x) is thresholded to get a family of sets X(e)"+x: dM (x))e,, e'0. Then the distance average XM is the set X(e) chosen to minimise ""dM ( ) )!d( ) , X(e))"",
(4)
In computing the distance average of a random set X, a set-valued mean is obtained by identifying a deterministic set whose distance function is the closest to the expected distance function, in some sense. So we are faced with the problem of how to choose various candidates from which the distance average is selected. Note that in the previous section for a general random set X, the expected distance function dM (x) is thresholded at di!erent levels, so that these thresholded sets become the &candidates' for the corresponding expectation. Therefore, for the case of a random set F generated 3 from an image, the distance average of X"F is not 3 a thresholded set (although it could be considered as an &integral threshold'). However, if instead of choosing the &candidates' for threshold from among the sets X(e) the distance average is chosen from the thresholded sets F , R then this results in the distance average becoming a thresholded set of f. In other words, the threshold is chosen as a set F such that its distance function &mimics' the best R the expected distance function dM (x). Thus obtained binary image will be called the distance threshold. Let the maximum and minimum grey levels in the grey-scale image f de"ned on the window = be denoted by t and t respectively. We formulate our algorithm as follows. 1. Evaluate d(x, F ) for all grey levels t3[t , t ] and R x3=. These functions form a collection of grey-scale images obtained as distance transforms of F taken at R di!erent threshold levels t. 2. Compute dM (x)"E[d(x, F )] 3 for all x3=. Here ; is a random variable distributed on the e!ective range of grey levels [t , t ]. Two basic options are to let ; have the uniform distribution on
N. Friel, I.S. Molchanov / Pattern Recognition 32 (1999) 1507}1517
[t , t ] or use the histogram weighted model where ; is distributed according to the histogram of f. The resulting function dM (x) itself can be represented as a grey-scale image on =. 3. For the chosen norm, evaluate ""dM ( ) )!d( ) , F )"" R
sup "dM (x)!d(x, F )" ¸ norm, VZ5 R " ( "dM (x)!d(x, F )"dx) ¸ norm, 5 R
(5)
for each grey level t3[t , t ]. The set F corresponding R to the value of t, which minimises the left-hand side of Eq. (5) as a function of t is chosen as the distance threshold. Note that there are further natural choices for the norm in Eq. (5). This step involves minimisation of a function of one variable (the level t). It should be noted that in practical implementation one does not require storage of all distance transforms from step 1. Instead, they are being accumulated and averaged successively as the threshold level moves up. We henceforth use the notation ¹( f ) to denote the distance threshold of an image f. We don't suggest a "xed approach to take for the situation where there are several grey levels minimising Eq. (5). Some approaches may work better for di!erent situations. It should be noted that the distance threshold depends on the choice of the random variable ; (or random set model corresponding to the grey-scale image), also on the choice of distance function used, for example, Euclidean distance function, or signed distance function, and "nally on the choice of norm chosen to minimise Eq. (5). The following result shows that an advantage in using the ¸ norm is that we can characterise the set of levels t which minimise Eq. (5). Theorem. If for t(t, ""dM (x)!d(x, F )"" """dM (x)!d(x, F )"" , RY R
(6)
then ""dM (x)!d(x, F )"" )""dM (x)!d(x, F )"" for all t) R RY t)t. In particular if t, t both minimise ""d( ) )!d( ) , F )"" , R
t )t)t ,
(7)
then t will also minimise Eq. (7) for all t)t)t.
1511
Taking suprema over x3=, yields ""dM ( ) )!d( ) , F )"" )""dM ( ) )!d( ) , F )"" R RY """dM ( ) )!d( ) , F )"" . R Thus t satis"es Eq. (6), as required. 䊐 Corollary. ""dM ( ) )!d( ) , F )"" viewed as a function of t has R either a single local minimum or is minimised over an interval of values of t.
6. Properties The following section introduces examples of some desirable properties of the distance threshold. 1. Let fI be an &inverse' image of f obtained by replacing all pixels with grey level t3[0,1] with grey level 1!t. If the signed distance function is used in computing the distance threshold, then in this instance ¹( fI )"=!¹( f ). So the distance threshold for the &inverse' image of f is identical with the complement of the distance threshold of f in =. This may be shown as follows Denote the corresponding level sets of fI by FI " R +x: fI (x)*t,. Thus, FI "+x: 1!f (x)*t,"=!F . R \R This implies that d(x, FI )"!d(x, F ), where d is the R \R signed distance function. Hence dM I (x)"Ed(x, FI )"!Ed(x, F )"!dM (x), D 3 \3 where dM I (x) is the expected distance function of fI . Thus, D ""dM I (x)!d(x, FI )"""""dM (x)!d(x, F )"", giving the deD R \R sired result. Note that this result is speci"c to the signed distance and in particular does not hold for the Euclidean distance function. 2. A convex colour-map is a monotonic transformation of the grey-scale range, c:[0, 1]C[0, 1] de"ned such that s"c(t) implies s)t. A concave colour-map c is de"ned similarly except that s"c(t) implies s*t. The following property holds for a uniformly weighted random set model: ¹(c f )-¹( f ),
Proof. Since d(x, F ), 0)t)1, is increasing for each R "xed x, the following inequality holds: dM (x)!d(x, F ))dM (x)!d(x, F ))dM (x)!d(x, F ). R R RY Thus, "dM (x)!d(x, F )")max("dM (x)!d(x, F )","dM (x)!d(x, F )"). R RY R
for any convex colour-map c. The opposite inclusion holds for any concave colour-map c. This tells us that the thresholded set for an image f under a convex colourmap is contained in the thresholded set for f. Similarly the thresholded set for an image f under a concave colourmap contains the thresholded set for f. Note that the equalised variants of c f and f coincide.
1512
N. Friel, I.S. Molchanov / Pattern Recognition 32 (1999) 1507}1517
The following is a particular case of the above. The image cf is obtained from f by replacing every grey value t with grey value ct. Here we must ensure that the transformed grey-scale range does not lie outside [0, 1]. The following property holds, for the uniformly weighted case. ¹(cf )"¹( f ). The result above does not tell us that the thresholded levels in both images are equal, rather that the thresholded sets are identical. This property is trivial for the histogram weighted case since as above the equalised variants of cf and f coincide. 3. ¹( f " )LK, where )
f (x), x3K, f " (x)" ) 0, x,K. This property states that the distance threshold of an image restricted to some subset K of the window =, and zero elsewhere, is contained in the set K.
7. Examples 7.1. Model images
Fig. 1. Model images with three grey levels.
To compute the distance threshold for a model 2dimensional image, by hand, is computationally intensive. It is for this reason that we begin by considering sample images in 1-dimension, i.e., where the window, =, is a subset of the real line. Example 4. The image in Fig. 1a is comprised of three grey levels, namely 0, h and 1. Consequently the image is interpreted as being comprised of two distinct level sets F and F . A uniformly weighted random set model together with the signed distance function and ¸ -norm are used to compute the distance threshold. Here, dM (x)"
Example 5. Fig. 1b shows an image comprised of three distinct level sets, F , F and F corresponding to the grey levels a, a#b and 1. For this example we use the uniformly weighted random set model, ¸ -norm and Euclidean distance function. Here it may be seen that,
(1!a!b)(2e!x),
dM (x)"
0)x(e,
b(x!e)#(1!a!b)(2e!x), e)x(3e/2, (1!a)(2e!x),
3e/2)x(2e,
0
2e)x)3e.
Hence we "nd,
!x#ha#(1!h)b,
0)x((a#c)/2,
x(2h!1)#(1!h)b!hc,
(a#c)/2)x((b#c)/2,
x!c,
(b#c)/2)x)d.
Further, ""dM ( ) )!d( ) , F )"" "(1!h)"b!a", ""dM ( ) )!d( ) , F )"" "h"b!a".
(8) (9)
Whichever F or F corresponds to the minimum of Eqs. (8) and (9) determines the threshold level. Clearly the threshold level is F if and only if h'1/2 and F otherwise.
""dM ( ) )!d( ) , F )"" "max (1!a!b)2e,
1!a e , 2 (10)
a ""dM ( ) )!d( ) , F )"" "max (1!a!b)2e, e , 2
(11)
""dM ( ) )!d( ) , F )"" "(a#b)2e.
(12)
Whichever F , F , F corresponds to the minimum of Eqs. (10)}(12) determines the threshold level. For example, the threshold level is F if a#b( max+1!a!b, (1!a)/4,.
N. Friel, I.S. Molchanov / Pattern Recognition 32 (1999) 1507}1517
We note here that if we alter the image above so that its histogram remains unchanged, for example, by interchanging pixels with grey level a with those of grey level a#b, then we get a set of conditions di!erent from Eqs. (10)}(12). This should appeal to our intuition as it tells us that the distance threshold takes into account spatial distribution of pixels, rather than just frequencies of grey levels. 7.2. Practical images In this section we present results of the distance threshold for various grey-scale images. Our algorithm must be modi"ed to cater for the discrete set-up. It is usual to work with 256 grey levels, +0, 1,2, 255,. We denote t and t by the minimum and maximum grey levels respectively, in the image. 1. Compute d(x, F ), for each grey level t"t , R t #1,2, t . For this, one can use the binary distance transform applied to the binary image F with t varyR ing from t to t . 2. For the case of a uniformly weighted model, dM (x) is simply an arithmetic mean of the distance functions for each grey level between the minimum and maximum grey levels, 1 R dM (x)" d(x, F ). R t !t #1 RR For the histogram weighted model, R g(t) dM (x)" d(x, F ), R N RR where N equals the number of pixels in the window = and g(t) denotes the histogram. 3. For the chosen norm, evaluate ""dM ( ) )!d( ) , F )"" R
"
max "dM (x)!d(x, F )" ¸ norm, VZ5 R ( "dM (x)!d(x, F )") ¸ norm, VZ5 R
(13)
for each grey level t"t ,2, t . The set F corre R sponding to the value of t minimising this norm is chosen as the distance threshold. If the ¸ norm is used, then using Corollary, we see that we need only search through values of t in increasing order until we get a minimum value. We have found that for all images encountered, the best visual performance (from the authors' subjective viewpoint) among all combination of parameters are, a histogram weighted random set model, together with
1513
the signed distance function and ¸ norm. It is hard to give a theoretical justi"cation for these choices. It is apparent however, that in employing the histogram weighted random set model we are enhancing information contained in the image. Below we present various images together with their corresponding histograms, we display distance thresholds for each image using the choice of parameters speci"ed above. The typical performance time on SUN Ultra 1 (133 MHz) for a 256;256 image is 10}15 s to compute the expected distance function dM (x) and the further 10 s to solve the minimisation problem. The images are grouped into various categories according to the shape of their histograms, which are bimodal, multimodal and unimodal. In this way we aim to display the performance of the distance thresholds on a diverse range of images. 7.2.1. Multimodal histograms We classify multimodal histograms as those having no clear modes. Such images would not lend themselves easily to valley seeking methods. Typically these images have a relatively even distribution of grey levels over the entire grey level range. For this reason histogram equalisation does not dramatically alter the shape of the histogram. This in turn tells us that the distance threshold for such images does not change signi"cantly when use either uniformly or histogram weighted random set models. For the &lenna' image in Fig. 2 we see that the grey level histogram is multimodal. Thus most histogram methods wouldn't work successfully here. This threshold picked up most of the features on Lenna's face and much of the feathers in her hat. The threshold level of 133 compares favourably with the threshold level of 128 which the authors in [4] suggest as giving the best visual performance among all threshold levels. We see that the distance threshold for the image of a postcard in Fig. 3 also performs well. Much of the detail in the original image is preserved in the thresholded image. 7.2.2. Unimodal histograms We classify histograms as being unimodal if there is one distinct mode. Again valley seeking methods would be inconclusive here. For the &tank' image in Fig. 4 below we see from the corresponding histogram that most of the grey level values are centred between levels 110 and 150. The distance threshold level of t"110 produced a reasonable threshold, although some of the details on the tank is missing. The histogram of the image in Fig. 5 shows that much of the grey levels are centred between levels 150 and 200. The distance threshold level of t"166 lies in this range. The thresholded image picked out detail on the gulls beaks and eyes.
1514
N. Friel, I.S. Molchanov / Pattern Recognition 32 (1999) 1507}1517
Fig. 3. Airport image, distance threshold (t"132) and grey level histogram.
Fig. 2. Lenna image, distance threshold (t"133) and grey level histogram.
7.2.3. Bimodal histograms Images with bimodal histograms are easiest to threshold. Generally a good threshold level is chosen be-
tween the two modes. We have found that for all images examined with bimodal histograms the corresponding distance threshold levels are indeed situated at the valley of the two peaks. We see that this is the case with the image in Fig. 6, where the threshold level of t"126 lies between the two peaks of the histogram.
N. Friel, I.S. Molchanov / Pattern Recognition 32 (1999) 1507}1517
1515
Fig. 5. Gulls image, thresholded image (t"166) and grey level histogram.
8. Conclusion
Fig. 4. Tank image, thresholded image (t"110) and grey level histogram.
This paper presents a new approach towards greyscale image thresholding. A natural approach to thresholding in this context is to consider expectations of random sets generated from images. We have found that modifying distance average yields appealing results. This technique is both straightforward and computationally inexpensive and is shown to display certain desirable properties. It should be noted that there is a considerable freedom of choice for the parameters (weighting of the random set model, type of distance function and the norm in the function space) tuning the procedure, so
1516
N. Friel, I.S. Molchanov / Pattern Recognition 32 (1999) 1507}1517
further investigations might be required to justify certain choices from a theoretical point of view.
References [1] P.K. Sahoo, S. Soltani, A.K.C. Wong, Survey of thresholding techniques, Comput. Vision Graphics Image Process. 41 (1988) 233}260. [2] C.-I. Chang, K. Chen, J. Wang, M. Althouse, A relative entropy-based approach to image thresholding, Pattern Recognition 27 (1994) 1275}1289. [3] N.R. Pal, S.K. Pal, Entropic thresholding, Signal Processing 16 (1989) 97}108. [4] C. Sahoo, P. Wilkins, J. Yeager, Threshold selection using Renyi's entropy, Pattern Recognition 30 (1997) 71}84. [5] A. Rosenfeld, J.L. Pfalz, Distance functions on digital pictures, Pattern Recognition 1 (1968) 33}61. [6] J.N. Kapur, P.K. Sahoo, A.K.C. Wong, A new method for grey level picture thresholding using the entropy of the histogram, Comput. Vision Graphics Image Process. 29 (1985) 273}285. [7] J. Serra, Image Analysis and Mathematical Morphology, Academic Press, London, 1982. [8] J.-B. Hiriart-Urruty, C. LemareH chal, Convex Analysis and Minimization Algorithms, vol. 1, 2, Springer, Berlin, 1993. [9] I.S. Molchanov, Statistical problems for random sets, in: J. Goutsias, R. Mahler, H.T. Nguyen (Eds.), Applications and Theory of Random Sets, The IMA Volumes in Mathematics and its Applications, Springer, Berlin, 1997, pp. 27}45. [10] D. Stoyan, H. Stoyan, Fractals, Random Shapes and Point Fields, Wiley, Chichester, 1994. [11] A.J. Baddeley, I.S. Molchanov, Averaging of random sets based on their distance functions, J. Math. Imaging Vision 8 (1998) 79}92. [12] M.C. Delfour, J.P. ZoleH sio, Shape analysis via oriented distance functions, J. Funct. Anal. 123 (1994) 129}201.
Fig. 6. An image with a bimodal histogram, thresholded image (t"126) and grey level histogram.
N. Friel, I.S. Molchanov / Pattern Recognition 32 (1999) 1507}1517
1517
About the Author*NIAL FRIEL recieved his B.Sc. and M.Sc. degrees from the Department of Mathematics, University College Galway, Ireland, in 1995 and 1996, respectively. He is presently completing a Ph.D. in the Department of Statistics in the University of Glasgow. His research interests include image processing and random sets.
About the Author*ILYA MOLCHANOV received his Ph.D. degree in Mathematics from Kiev University (Ukraine) in 1987 and his Habilitation from TU Bergakademie Freiberg (Germany) in 1994. Between 1987 and 1992 he was an Assistant Professor at Kiev Technological Institute of the Food Industry. From 1992 to 1994 he has been working at TU Bergakademie Freiberg as an Alexander von Humboldt Research Fellow. Then he took over a research position at Centrum voor Wiskunde en Informatica (CWI), Amsterdam. In December 1995 he joined the Department of Statistics of the University of Glasgow (Scotland). From 1998 he is a Professor of Applied Probability in the same department. His research interests are concentrated around random sets and their applications in Probability, Statistics and Image Analysis.