Pattern Analysis and Applications

, Volume 9, Issue 2–3, pp 189–210 | Cite as

Fuzzy histograms, weak fuzzification and accumulation of periodic quantities

Application in two accumulation-based image processing methods
Theoretical Advances

Abstract

The influence of the scale of a fuzzy membership function used to fuzzify a histogram is analysed. It is shown that for a class of fuzzifying functions it is possible to indicate the limit for fuzzification, at which the mode of the histogram equals the mean of the data accumulated in it. The fuzzification functions for which this appears are: the quadratic function for aperiodic histograms and the cosine square function for periodic ones. The scaled and clipped versions of these functions can be used to control the degree of fuzzification belonging to the interval [0,1]. While the quadratic function is related to the widely known Huber-type clipped mean or the kernel function derived from the Epanechnikov kernel, the clipped cosine square seems to be less known. The indications for using strong or weak fuzzification, according to the value of the fuzzification degree, are justified by examples in two applications: classic Hough transform-based image registration and novel accumulation-based line detection. Typically, the weak fuzzification is recommended. The images used are related to simulation images from teleradiotherapy and to mammographic images.

Keywords

Fuzzy histogram Accumulation Scale Mode to mean transition Limit fuzzification Periodic histogram Line detection Mammograms Image registration 

1 Introduction

One of the robust methods of estimating the measured quantity on the basis of a series of measurements, in the presence of errors, is the voting organized as forming a histogram and finding its mode. The histogram can be viewed as an empirical approximation of the probability density function and in this convention the mode is an approximation of its mode (or simply a maximum). This is the source of robustness of this method against noise as well as incomplete or partly erroneous data. For the voting to be possible the values are quantized and the histogram is an array. Its dimensionality corresponds to the dimensionality of the measured quantity. Each measurement is a vote for a specific value of the quantity of interest.

In the scope of computational methods, if the specified quantity can be calculated from the data in multiple ways, each such result can be treated as a measurement. This is particularly the case in image processing at low level, where the pixel data are a source of redundant but partly misleading information on the objects present in the image. Within the domain of image processing, the most widely known method using the analysis of a histogram is the Hough transform (HT), which has been developed into numerous versions applied to detection of several classes of shapes (see, for example, [1, 2, 3, 4, 5, 6] for the early works and [7, 8, 9] for the first surveys). The key feature of the method making it a robust image analysis tool is that data are accumulated in the array called the accumulator array, which is the histogram of the occurrences of specific values of the parameters of the detected shape (e.g., straight line, quadric, shape given by a template) or relation (e.g., image registration parameters). The presence of a single mode or multiple modes in this histogram is the evidence of the presence of the instances of the object sought. Recently, the methods of the detection of shapes which are described neither by parametric equations nor by a template have been developed (see [10, 11, 12] for the methods using Fourier descriptors and [13, 14, 15] for the accumulation in the image domain). The methods related to HT are now frequently called the evidence accumulation [9] or evidence gathering [10, 12] methods.

One of the important issues in the methods where a histogram is used is the choice of its resolution. The problem underlying this issue, as stated explicitly in [16], is the uncertainty–precision duality: the higher the histogram resolution is, the more precise the result of detection of the mode can be; however, together with resolution increase, the certainty that this mode exists and that it corresponds to the correct result decreases. This problem has been analysed by numerous authors. In [17, 18, 19, 20] the approaches related to establishing proper resolution have been proposed, including the non-uniform, multiresolution and adaptive divisions of the domain of the solution. In [21] it has been proposed to distribute each vote into more than one element of the histogram. In [22] the fuzzy set theory has been directly used and the fuzzy Hough transform was introduced explicitly.

The paper by Strauss [16] seems to be the most complete work on fuzzy histograms related to the Hough transform up till now. It presents a solution to the problem of finding a compromise between uncertainty and precision, with the issues of image thresholding, quantization of the parameter space and data localization uncertainty, and enhanced peak detection in the parameter space, taken into consideration. The membership functions used in fuzzification of the subsequent stages of the method are derived from the basic relationships pertaining to the way in which the pixels form an image of a line. A large number of citations on fuzzy Hough transform are given in that paper.

The methods used in this paper have a strong relationship to robust statistics and to kernel density estimation. The relation goes along the line of the use of functions treated in this paper as fuzzy membership functions in histogram fuzzification. Among them, there is the clipped square function used in the fuzzification of a non-periodic histogram. On the grounds of robust statistics, this function is related to the skipped mean function, traced back by [23, 24] to the fundamental works of Huber (collected in the book [25]). In the domain of kernel density estimation, this function is the kernel function derived from the Epanechnikov kernel (see [26, 27], also [28], as cited by [29]; the references go back to [30]). The clipped square function, as related to the skipped mean, picks the mean value of a number of histogram elements immediately neighbouring the given element, while skipping the values from the remaining elements. This widely known property is readily applicable in aperiodic histograms. It will be shown that in the case of periodic histograms, the function which has the analogous property is the cosine square function; the use of its scaled down and clipped version seems to be less generally acknowledged.

An overview of the applications of robust methods in computer vision problems can be found in [29].

There also exists an obvious analogy of histogram fuzzification to simple low-pass filtering, which is the reason why the users of fuzzy histograms frequently apply the Gaussian function as the membership function. It can be easily shown that this function has similar properties to those of the functions mentioned before.

In all the functions used here as the fuzzy membership functions in histogram fuzzification there is a single parameter related to the width of the support, or scale. In [29] (immediately preceding and following the formula (4.4.34), Sect. 4.4.3) a discussion on the question of scale can be found. This discussion covers several estimates of the scale and can be summarized in two questions: (1) How to find a good estimate of the scale if little is known on the structure of the data, i.e., the share of outliers and the noise? and (2) what coefficient should be used to tune the actual scale to be used in calculations with respect to this estimate? The scope of the present paper is less extensive than that of the paper by Strauss [16] and that of the cited works on robust statistics in computer vision. In this paper, a very simple yet useful approach to the problem of scale is proposed. The considerations will be restricted to accumulation-based, HT-related methods, which are the main domain of interest to the author. The cases of an aperiodic and a periodic histogram will be studied. The problem will be investigated not from the perspective of an estimate of scale, but rather from the perspective of the upper limit for fuzzification. This limit will be treated as the basis for simple indications concerning the choice of scale. These indications will be verified against two test problems: the image registration with the classical HT method according to [31, 32, 33, 34] and the novel line detection method according to [13, 14, 15].

The paper is organized as follows. Section 2 recalls the explanation why it is useful to solve the precision–certainty duality with fuzzy voting rather than by changing the histogram resolution. In this context the observation on the existence of the limit for fuzzification is made. This section is based on easily understandable artificial examples. In Sect. 3 the properties of a fuzzified histogram are briefly presented. The piecewise continuous transition between the mode of a histogram and the mean of the data accumulated in it is described. This constitutes the basis for explaining the notion of the limit fuzzification and the degree of fuzzification. The case of periodic data and a periodic histogram is treated in Sect. 4. The results analogous to those of an aperiodic histogram are discussed. Section 5 briefly recapitulates the obtained results and presents indications for the choice of scale in the fuzzifying function, i.e., the use of weak and strong fuzzification. In Sect. 6 these indications are confirmed on the basis of experiments with two HT-related accumulation methods. Conclusions come in Sect. 7.

2 Introductory example: fuzzification of a histogram

Assume that a real variable x has been measured 12 times. Results of these measurements, denoted as \(\check{x}_j, j \in J, J=\{1,\ldots,12\},\) are shown in Table 1. It can be seen that the measurements vary greatly. Hence, it is highly probable that only some of them are significant, and some others are defined as outliers. The data are accumulated in a histogram defined as
$$ H(i)=\sum_{j \in J} \chi (i - \tilde{i}(\check{x}_j)),$$
(1)
where χ(·) is the characteristic function
$$ \chi(k) = \left\{\begin{array}{*{20}l} 1 & \hbox{if}\; k = 0 \\ 0 & \hbox{otherwise} \;\\ \end{array}\right. $$
(2)
and \(\tilde{i}(x)\) is the indexing function, i.e., the mapping from the real domain of x into the integer domain of the index i of the histogram. The indexing constitutes the quantization of the domain of x. As the indexing function, a simple rounding function has been used:
$$ \tilde{i}(x) = \hbox{round}(x), $$
(3)
where round(x)  =  ⌊ x  +  1/2 ⌋ and ⌊· ⌋ denotes the integer part of a number, defined as the largest integer not greater than this number.
Table 1

Results of 12 measurements \(\check{x}_j\) of the variable x

j

1

2

3

4

5

6

7

8

9

10

11

12

\(\check{x}_j\)

0.6

1.1

1.4

3.8

7.2

12.2

12.8

13.9

14.1

15.4

15.9

18.8

\(\check{x}_j/2\)

0.3

0.55

0.7

1.9

3.6

6.1

6.4

6.95

7.05

7.7

7.95

9.4

\(\check{x}_j/4\)

0.15

0.275

0.35

0.95

1.8

3.05

3.2

3.475

3.525

3.85

3.975

4.7

\(\check{x}_j/2, \check{x}_j/4\): auxiliary data useful in forming the histograms in Fig. 2

The histogram (1) is shown in Fig. 1. A look at this histogram reveals the following observations. From the 12 results, six (j = 6,...,11) cluster around the value i ≈ 14. Three (j = 1,2,3) form a peak at i = 1. The remaining three results are displaced around the domain of the histogram and do not form any clusters. The basic question is whether the strongest peak in the histogram at i = 1 is the proper result of the measurement of x or if this result should be estimated from the measurements clustering around i = 14. It seems that this second solution should be chosen, due to which twice more measurements vote for i ≈ 14 than for i = 1. The example is artificial and indeed it is this particular interpretation which has been the motivation in its design. A case similar to this one could have been a result of a systematic error which occurred three times giving rise to erroneous measurements j = 1,2,3. The measurements j = 4,5,12 could be the result of gross errors, and the fact that some of the measurements j = 6,..., 11 do not fall exactly into the histogram element i = 14 could be attributed to noise with distribution close to normal.
Fig. 1

Histogram H(i) of the 12 measurements shown in Table 1 with the indexing function according to (3)

In consequence of the preceding considerations, the measured value should be estimated with the mean value of the measurements for j = 6, ..., 11, which leads to the estimation\(\hat{x}=14.05 \approx 14.\) The mean of all measurements is 9.75, the median is 12, and neither of these values conform to the estimation \(\hat{x}.\) Clearly, the mode of the histogram corresponding to x = 1 does not represent the proper result of the measurement. This discredits the use of the histogram and the accumulation principle as a robust measure of the result of measurements \(\check{x}_j.\)

As mentioned in Sect. 1, the negative result obtained above is the consequence of an improper choice of the resolution of the histogram. The resolution is too large. In general, a straightforward reduction of the resolution does not necessarily lead to an improvement in this respect, however. Let us try to form histograms with the data from Table 1, using resolutions reduced by two and four, with the indexing functions (4) and (5), respectively:
$$\tilde{i}_2(x) = \hbox{round}(x/2), $$
(4)
$$\tilde{i}_4(x) = \hbox{round}(x/4). $$
(5)
In the case of the data used, this does not lead to satisfactory results, as shown in the histograms in Fig. 2a, b, respectively. The problems of unequivocal modes of histograms and loss of precision arise.
Fig. 2

Histogram H(i) of the measurements from Table 1 with the indexing functions, respectively: a (4); b (5). In neither case does the mode of the histogram equivocally indicate the expected estimate \(\hat{x}\approx 14\)

Let us now fuzzify the histogram of Fig. 1 by replacing the (crisp) characteristic function χ(·) in (1) by the fuzzy membership function, which expresses the degree of membership of the vote to the given measurement (precisely, to the index of the measurement). In the application to fuzzify the histogram this function will be called the fuzzifying function. Let us begin with a commonly used fuzzifying function derived from a Gaussian by limiting its support to a small symmetric interval around the maximum:
$$ \mu_{\rm G} (k) = \left\{\begin{array}{*{20}c} \exp{-\left(\frac{k}{2s}\right)^2} & \hbox{if}\; k \in [-3s,3s] \\ 0 & \hbox{otherwise}\\ \end{array} \right.$$
(6)
and s > 0. The argument k is an integer. The parameter s is the scale factor and controls the width of the support of the function. The fuzzy histogram is defined as
$$ H_{\rm f}(i) = \sum\limits_{j \in J} \mu_{\rm G} (i - \tilde{i} (\check{x}_j)) = \sum\limits_{j\in J} H(j) \mu_{\rm G}(i-j).$$
(7)
(This formula can also be interpreted as filtering the histogram (1) with the low-pass filter with the kernel (6).)

At this point the basic question of this paper can be asked: what is the influence of the scale parameter, or in other words, the width of the support of the fuzzifying function, on the fuzzified histogram? To what extent the histogram can be fuzzified and is there a limit of a reasonable fuzzification? The commonsense intuition is enough to say that for a ‘very narrow’ support there is no fuzzification at all and for a ‘very wide’ the histogram tends to become uniform. It is easy to state that ‘very narrow’ is such that there is only the central zero point inside the support and the fuzzy histogram is equal to the crisp one.

Some intuition on what can be understood as ‘very wide’ can be gained by looking at Fig. 3. What is most interesting is the change of the mode with scale. As scale s grows, the mode of the histogram changes from the value corresponding to the peak at i = 1 to that corresponding to the expected value of the measured quantity \(\hat{x}=14.\) This value remains constant for a range of the scale s∈[0.8,4.9], approximately. This is the ‘useful’ range of s. Then, after a number of jumps between the indices in the histogram, the mode stabilizes at some value. It occurs that this value is close to the mean of the data accumulated in the histogram. This mean is understood as the average of the data quantized according to the indexing function, like (3), and will be called the average of the histogram. Further growth of the scale yields no change in the mode. The histogram becomes more uniform and its maximum becomes less prominent.
Fig. 3

Evolution of the shape of the fuzzy histogram of Fig. 1 versus scale s of the fuzzifying function (6): a histogram after fuzzification for selected scales; b projection onto the plane (Ois): thick solid line: mode of the fuzzy histogram for a changing scale; thin solid line: mean, and dashed line: median, both calculated from histogram without fuzzification. No fuzzification is marked with “- -” and does not mean s = 0, which would be impossible in (6). (Scale of axis s is non-linear for the sake of compactness)

In the next section the reason for such a behaviour of the fuzzified histogram will be shown. The considerations for the case of an aperiodic histogram will be analogical to those for the skipped mean and the Epanechnikov kernel, as stated in Sect. 1. In the case of a periodic histogram this analogy will not be so close, however. Hence, both cases will be presented, so the reader less acquainted with the basics of the domains of robust statistics and kernel density estimation can follow them easily. For the same reason the proofs of the presented properties will be given, despite the fact that they are quite simple.

3 Aperiodic histogram

In the following, we shall understand the fuzzifying function as a function of a real argument, and consequently, a fuzzy histogram will also be a function of a real argument. Let I ≡ {imin,..., imax } (set of integers) and X ≡ [imin  −  imax, imax  −  imin] (real interval, symmetrical around zero). As the indexing function, the simple function (3) will be used throughout this section, so for a given value of index i, the corresponding value of x will be simply x = i. Then,
$$ H_{\rm f}(x) = \sum\limits_{i\in I} H(i) \mu(x-i).$$
(8)

3.1 Quadratic fuzzifying function

It can be demonstrated that the fuzzified histogram has the following property:

Property 1 (Quadratic fuzzifying function) The mode xm of the fuzzy histogram Hf2(x) obtained by fuzzification of the crisp histogram H(i),iI, with the quadratic fuzzifying function
$$ \mu_{2} (x) = 1 - ax^{2}, $$
(9)
where a > 0 is chosen so that μ(x) ≥ 0 for xX, corresponds to the mean of the crisp histogram H(i). Namely,
$$ x_{\rm m} = \arg\max (H_{{\rm f}2} (x)),$$
(10)
where
$$ H_{{\rm f}2}(x) = \sum_{i\in I} H(i)\mu_2(x-i). $$
(11)

The straightforward proof of the property is given in Appendix.

This property is illustrated by an example of simple data shown in Fig. 4. In this example a = 0.1, so that μ2(x)≥ 0 for any x in the domain of the histogram. Note that if the case of integer arguments is considered, the fuzzy histogram, represented with points in the figure, would have two maxima and its mode would be unequivocal.
Fig. 4

Aperiodic histogram for simple data. Thick bars: crisp histogram H(i), i = imin,..., imax; dashed line: its fuzzy version Hf2(x) for real argument x; thin line: fuzzy membership functions μ2(x − ik) according to (9) for elements ik of the crisp histogram; points: fuzzy histogram Hf2(i) for integer argument i; xm = 1.5: mode of the fuzzy histogram Hf2(x) equal to the mean value of the crisp histogram H(i)

Returning to the fuzzifying functions with scale, the quadratic fuzzifying function should be defined as
$$ \mu'_2 (x) = \left\{\begin{array}{*{20}l} q_2(x) & \hbox{if} \; x \in [-s,s] \\ 0 & \hbox{otherwise} \\ \end{array} \right.,$$
(12)
where s≥ 0 and
$$ q_2(x) = \left\{\begin{array}{*{20}l} 1 - \frac{x^2}{s^2} & \hbox{if}\; s>0 \\ 1 & \hbox{if} \; s=0 \\ \end{array}\right..$$
(13)
In the context of this formula, a measure of fuzzification of a histogram can be introduced. Let us call it the fuzzification degreedf and let it belong to the real interval [0,1], where 0 means no fuzzification and 1 means such fuzzification at which the mode of the histogram equals its mean. Stronger fuzzification leads to no change in the mode and is pointless, so the case when df = 1 can be called the limit fuzzification. No fuzzification occurs when half-width of the support of the function (12) is zero: s = 0. Limit fuzzification takes place when half-width of the support is s  =  smax  =  imax  −  imin. This is the limit at which the Property 1 starts to hold (see Fig. 4), because for ssmax the function (12) is equivalent to (9), with a = 1/s2.
Finally, in the case of the quadratic fuzzifying function according to (12) and a histogram defined for iI, the degree of fuzzification can be defined as
$$ d_{\rm f} = \left\{\begin{array}{*{20}l} \frac{s}{s_{\max}} & \hbox{if} \; s\in[0,s_{\max}] \\ 1 & \hbox{if} \; s>s_{\max}\\\ \end{array}\right.. $$
(14)
This also defines the meaning of a weak fuzzification when df ≈ 0 and a strong one when df≈ 1.

3.2 Other fuzzifying functions

Now let us consider a more general case of symmetric functions depending on scale, having a single maximum. For such function (and its derivative, used in (38)) the following property holds:

Property 2 (Symmetrical fuzzifying function) Any real, symmetrical, and non-negative function, having a single maximum equal 1 at x = 0 and depending on scale as a parameter, in the form
$$ \mu(x) = f(x/s), $$
(15)
where s is the scale parameter, is arbitrarily close to the quadratic function, and its derivative is arbitrarily close to the derivative of the quadratic function, for a sufficiently large value of the scale parameter s, if this function is class C4 (continuous up to the fourth derivative) for xX.

The proof of the property is given in Appendix.

By virtue of Property 2, the fuzzification with any fuzzifying function fulfilling the preconditions of this property has its limit, at which the mode of the histogram stabilizes at its mean. For each such function, the appropriate expression for the fuzzification degree can be derived in analogy to the expression (14). Coming back to the example illustrated in Fig. 3, the limit scale at which the fuzzification degree becomes one is s≈ 9.

Remark 1 (to Properties 1, 2 and formula (14)) In the case of a crisp histogram, when the resolution increases, consequently the certainty of the solution consisting in finding the mode decreases. This is because the average number of votes in the histogram elements decreases. However, in the case of a fuzzy histogram, the mode always tends to the mean of the histogram when the degree of fuzzification grows. Moreover, if the resolution is larger then the precision of indexing is larger, so the mean of the histogram is closer to the mean of the data.

Remark 2 (to Properties 1, 2, formula (14) and Fig3) In cases like that presented in Sect. 2, illustrated in Fig. 3, the useful range of the fuzzification degree is closer to zero than to one. The dependence of this range on the histogram resolution is negligible, provided the resolution is sufficient for the indices to represent the values of the data.

The results obtained can be easily extended to a multidimensional case.

4 Periodic histogram

In the case of periodic data, the histogram is also periodic. If the period is 2π it is circular, otherwise it is not. Let the data be denoted by \(\check{\phi}_j, j\in J.\) Periodicity means that the result of each formula from now on is the same for ϕ and ϕ + nT, where T is the period and n an arbitrary integer. The angle ϕ can be always replaced by
$$ \phi_T = \phi\;\hbox{mod}\;T, \phi_T\in \Phi, \Phi\equiv[0,T]. $$
(16)
Let the indexing function be now \(\tilde{i}(\phi)\in I.\) This function is periodic, \(\tilde{i}(\phi)=\tilde{i}(\phi_T).\) Here, as a convention, it will be assumed that inf(I) = 0, which does not restrict any of the considerations presented.
Direct adoption of the simple formula for an indexing function like (3) accommodated to the periodic case would be too restrictive (having in mind that there are only two commonly used measures of angle: radians and degrees), so it is necessary to introduce an angular variable ξ linearly related to ϕT which would render the angle measure commensurable with the index. Let the relation be written down simply as a real-valued function
$$ \xi=\xi(\phi)=k\phi_T, \xi\in \Xi, $$
(17)
where k is such that if ξ(ϕ) equals an integer then \(\xi(\phi)=\tilde{i}(\phi).\) Also the inverse function ϕ = ϕ(ξ) = ξ/k will be used further.
The periodic histogram is then, analogously to (1),
$$ H(i) = \sum\limits_{j\in J} \chi(i-\tilde{i}(\check{\phi}_j)).$$
(18)
The fuzzifying function is μ(ξ) = μ(ξ(ϕ)) and the fuzzy periodic histogram is, analogously to (8),
$$ H_{\rm f}(\xi) = \sum\limits_{j\in J} \mu(\xi-\tilde{i}(\check{\phi}_j)) = \sum_{i\in I} \; H(i) \mu(\xi-i). $$
(19)
The formulae do not differ from (7) and (8) by anything but the fact that the indexing function \(\tilde{i}(\phi),\) and variables ξ and ϕ, are now periodic.

Analogous to the quadratic function in the case of an aperiodic histogram, for a periodic histogram the cosine square function is the fuzzifying function that leads to the convergence of the mode of the fuzzified histogram to some characteristic value for the set of the accumulated data. This characteristic value in the case of periodic data can be called the dominating value. If the period is 2π, this value can be strictly treated as the mean value. In the case of an arbitrary period, the same way of understanding the dominating value as the mean value can be adopted. As in the case of an aperiodic histogram, the considerations are related to the data quantized according to the indexing function. The following properties hold:

Property 3 (Cosine square fuzzifying function) The mode ξm of the fuzzy periodic histogram Hfc(ξ) obtained by fuzzification of the crisp periodic histogram H(i),iI, with the cosine square fuzzifying function
$$ \mu_{\rm c}(\xi) = \cos^2(\pi \phi(\xi)/T), $$
(20)
where T is the period of the data accumulated in the histogram, as well as of the function (20), corresponds to the dominating value or, in other words, to the mean of the histogram H(i). Namely,
$$ \xi_{\rm m} = \arg\max (H_{\rm fc}(\xi)), $$
(21)
where
$$ H_{\rm fc}(\xi)=\sum\limits_{i\in I} H(i)\mu_{\rm c}(\xi-i). $$
(22)
What is exactly meant as the dominating value or the mean value in the case of periodic data will be explained by the following property. First, let us introduce the period ratio which indicates how many times the period T fits into the round angle:
$$ \tau=2\pi/T. $$
(23)
Property 4 (Intensity of the fuzzy periodic histogram) The fuzzy histogram Hfc(ξ) according to (22) in which the fuzzifying function is (20) can be written down as a harmonic with a bias, in terms of the crisp histogram H(i), as follows:
$$ H_{\rm fc}(\xi) = \frac{1}{2} H \cos(\tau\phi(\xi)-\beta) + \frac{1}{2} \sum\limits_{i\in I}H(i), $$
(24)
where the amplitude and phase of the harmonic are
$$\begin{aligned} H &= \sqrt{H_x^2+H_y^2,} \\ \sin\beta &= H_x/H, \\ \cos\beta &= H_y/H, \\ H_x &= \sum_{i\in I} H(i)\cos\beta_i = \sum_{i\in I} H_{xi}, \\ H_y &= \sum_{i\in I} H(i)\sin\beta_i = \sum_{i\in I} H_{yi}, \\ \beta_i &= \tau\phi(i). \\ \end{aligned}$$
(25)
Equations (25) are the expressions for summing the vectors Hi = (Hxi,Hyi), which have moduli equal to the values of the crisp histogram H(i) and phases equal to the angle measures τϕ(i) proportional to the indices in this histogram. The result of this vector sum is the vector H = (Hx,Hy) having modulus H and phase β, which is the angle measure of the mode of the histogram, and
$$ \xi_{\rm m} = \xi(\beta/\tau). $$
(26)
From this, the interpretation of the dominating value or the mean value of the data in the crisp histogram H(i) follows. This is the vector sum of the vectors derived from the elements of the crisp histogram by taking the intensities of the histogram as the moduli of the vectors, and the phases of these elements multiplied by the period ratio τ as the phases of the vectors. This sum is proportional to the mean of the vectors Hi, equal to \((1/I){\mathbf{H}}.\)

The joint proof of the Properties 3 and 4 is given in Appendix.

These properties are illustrated by an example of simple data shown in Fig. 5. The data \(\check{\phi}_j\) in this example are the data used in Fig. 4 multiplied by π/4, so ϕ(1) = π/4 and ξ(ϕ) = 4ϕ/π. The period of the data is π, so the period ratio is τ = 2.
Fig. 5

Periodic histogram for the same simple data as in Fig. 4 with the period T = π and ϕ(1) = π/4, ξ(ϕ) = 4ϕ/π. Thick bars: crisp histogram H(i), i = imin,..., imax; dashed line: its fuzzy version Hf(ξ) for real argument ξ; thin line: fuzzy membership functions μ(ξ − ik) according to (20) for elements ik of the crisp histogram; points: fuzzy histogram Hfc(i) for integer argument i; ξm = 2.5 at ϕ(ξm) = 5π/8: mode of the fuzzy histogram Hf(ξ) equal to the dominating value for crisp histogram H(i). Thick dotted line: circles indicating the minimum and maximum value of the histogram. (The histogram is supplemented with an additional period π to form a full circle, so that angles between histogram elements correspond to angles in the image)

What seems the most conspicuous is that in the case of periodic data the dominating value falls between indices 2 and 3, while in the case of aperiodic data it was between 1 and 2. This is reasonable, however, because now the value H(0) is opposite to H(2): if they were equal, the fuzzified histogram containing only these two values would be strictly a circle. The reader is encouraged to investigate this contradiction by doubling the phase of histogram elements and treating them as vectors, according to Property 4. The net effect of the elements H(0) and H(2) is 1 at i = 1, so after adding H(3) = 1 the result falls between i = 1 and 2, and the intensity of the result is\(\sqrt{2}.\)

The histogram in Fig. 5 interpreted in terms of the formulae (25) can be viewed as the superposition of the evidence coming from three line intensities, appearing jointly at one point. This is the vector H such that
$$\begin{aligned} H &= H_{\rm fc}^{\max} - H_{\rm fc}^{\min}, \\ H_{\rm fc}^{\max} &= \max_{\xi\in\Xi}(H_{\rm fc}(\xi)), \\ H_{\rm fc}^{\min} &= \min_{\xi\in\Xi}(H_{\rm fc}(\xi)), \\ \end{aligned}$$
(27)
which is characteristic of what can be called the combined intensity of these lines. In this case \(H=\sqrt{2}.\)

The form of the equations (25) indicates that there is an analogy between a periodic quantity with intensity A and phase β having the period T, to a vector with modulus A and phase τβ = (2π/T)β. This analogy, described in 1972 by Mardia [35], was recalled by Zwiggelaar et al. in 1999 [36]. There exists a difficulty in some calculations on the directions of elongated objects in the images, for which the sense (in the meaning of the sense of a vector) is not defined, so the period of the angle which characterizes the direction is π. Therefore, the angle of a line can have two values differing by π, and there exists the problem of phase wrapping, which makes it arduous to calculate such an otherwise straightforwardly defined function on a set of data like the mean value. The same applies to the gradient if its sense is not important in the given application. An attempt to find the mean direction without using the vector analogy of the periodic quantity has been described and successfully used in [37]. Some heuristics must have been used in that paper to avoid the ambiguity resulting from the phase wrapping. Zwiggelaar et al. [36] used the transformation of angles into vectors according to [35] to calculate the mean direction, thus obtaining simple, well-defined formulae. In the case considered in [36] the angles alone were important, not the line intensities, so unit vectors were used. The formulae (25) make it possible to treat periodic quantities having arbitrary moduli.

It should be remarked that the use of the vector analogy is not the only way of overcoming the difficulty with the angles of elongated structures. The feature ALOE [38] is calculated as the standard deviation of the histogram of directions instead of the directions themselves, so the quantities of which the mean is calculated are not periodic.

Similar to the aperiodic case and the quadratic function (12), in the case of periodic histograms the degree of fuzzification can be defined. This can be done in relation to the cosine square fuzzifying function. Let us define a function based on cosine square, with a support depending on the parameter of scale s:
$$ \mu_{\rm c}'(\xi) = \left\{\begin{array}{*{20}l} q_{\rm c}(\xi) & \hbox{if} \;\phi(\xi) \in [-s,s] \\ 0 & \hbox{otherwise} \\ \end{array} \right., $$
(28)
where s≥ 0 and
$$ q_{\rm c}(\xi) = \left\{\begin{array}{*{20}l} \cos^2 \frac{\pi\phi(\xi)}{2s} & \hbox{if} \; s>0 \\ 1 & \hbox{if} \; s=0 \\ \end{array} \right.. $$
(29)
By analogy to the aperiodic case, if for the half-width it is s = smax = T/2 then the accumulation corresponds to summation, as defined by (25). The support of the fuzzification function comprises the whole period and therefore is at the limit. The degree of fuzzification is then
$$ d_{\rm f} = \frac{s}{s_{\max}} = \frac{2s}{T}.$$
(30)
It is not meaningful to investigate the case s > T/2.

In the periodic case, the property of similarity of other functions to the function (28) which could be analogical to the case of the Property 2 for the aperiodic case does not exist.

As has been said in Sect. 1, the considerations on the quadratic function as the fuzzification function and the use of its clipped version (12) is only a kind of reformulation, on the grounds of histogram fuzzification, of the notions already known from the domains of kernel density estimation (Epanechnikov kernel) and robust statistics (Huber-type skipped mean). However, to the best of author’s knowledge, it seems that the use of the clipped cosine square function (28) to the fuzzification of a periodic histogram, and the resulting definition of the fuzzification degree, has not been presented up till now.

5 Implications of the transition between the mode and the mean

In the preceding parts of the paper it has been demonstrated that for any crisp histogram, a piecewise continuous transition can be made between its mode and the mean of the data accumulated in the histogram. This is done by fuzzifying the histogram with the fuzzification function (12) for the case of an aperiodic histogram and with the function (28) for the periodic case, with the scale s changing so that the degree of fuzzification, according to (14) or (30), respectively, changes from zero to one. The fuzzy histogram with the real argument or with the integer argument can be considered (see Figs. 4, 5). The piecewise continuity consists in that the mode of the fuzzy histogram with a real argument changes smoothly between the jumps, and these jumps appear when the maximum of the histogram with the integer argument moves from one index to another.

A similar transition can be made with fuzzifying functions depending on the scale, other than (12) or (28), but then the definition of the degree of fuzzification has to be modified accordingly.

The most immediate implication of the statement that there exists the limit fuzzification and that it is equivalent to replacing the mode by the mean of the data is that if the robustness offered by using the mode as the estimate of the result is to be maintained, then the degree of fuzzification should be kept relatively small. A practical observation related to this implication is that it is enough to use such a fuzzifying function which makes it possible for the values immediately neighbouring in the histogram to interact in building a common peak. An example of such a function and the result of the fuzzification of the histogram from Fig. 1 is shown in Fig. 6. The fuzzy histogram has the same mode as in Fig. 3 for s∈[0.8,4.9], approximately (according to (6)). In Sect. 2 this mode has been specified as the proper estimate of the result. The simple fuzzification function from Fig. 6, called here μ232, having non-zero values 2/3, 3/3, and 2/3, can be recommended for many histogram fuzzification tasks. It is equal to the quadratic function μ′2 according to (12) with \(s=\sqrt{3},\) for an integer argument. In the case of the histogram from Fig. 1 this corresponds to \(d_{\rm f}=\sqrt{3}/19\approx 0.091\) (14).
Fig. 6

a Simple fuzzification function μ232(i) with values 2/3, 3/3, 2/3. b Histogram from Fig. 1 fuzzified with this function, having the mode considered as the proper estimate of the result

Another implication, important for the algorithms which incorporate the process of estimating the result on the basis of a set of data, is as follows. It can be observed in the continuous way how the change of the degree of fuzzification influences the result and an optimum in respect of some measure of quality of the result can be found. If and only if the optimum is not far from the limit fuzzification, which can take place when the data do not contain many outliers, the accumulation of the data followed by finding the mode of the histogram can be replaced by the calculation of the mean value of the data, which is simpler and requires less memory.

Examples of the application of weak and strong fuzzification will be presented in the next section.

6 Examples: the choice of scale

6.1 Image registration with the HT

Let us consider the problem of feature-based image registration with the HT. The boolean images containing the feature pixels labelled will be denoted as Fr(x,y), the reference image, and Fo(x,y), the overlaid image. Let us consider an affine transformation of the overlaid image into the reference image:
$$ \left\{\begin{array}{*{20}c} x^{\rm r}_i-x_{\rm s}\\ y^{\rm r}_i - y_{\rm s}\\ \end{array} \right\} = c \left[\begin{array}{*{20}r} \cos\varphi & -\sin\varphi\\ \sin\varphi & \cos\varphi\\ \end{array} \right] \left\{\begin{array}{*{20}c} x^{\rm o}_j-x_{\rm s}\\ y^{\rm o}_j-y_{\rm s}\\ \end{array} \right\} + \left\{\begin{array}{*{20}c} T_x\\ T_y\\ \end{array} \right\}, $$
(31)
where (Tx,Ty)T, φ, and c are the registering transformation parameters: translation vector, angle, and scale, respectively; (xs,ys) is the centre of scaling and rotation (constant); indices i, i = 1,...,Nr refer to feature pixels of the reference image, and j, j = 1,...,No to those of the overlaid image. Let the parameters be collected in the parameter vector (in the sense of a data structure, not a vector in space) \( {\varvec{\alpha}}=(T_x,T_y,\varphi,c). \)

The smallest subset of the set of feature pixels necessary to find all the transformation parameters is called the elemental subset [29]. In the case of four parameters, it contains m = 4 pixels: two from each image. By taking all the possible elemental subsets, accumulating the calculated transformation parameters in a four-dimensional accumulator, and finding its maximum, the registering transformation parameters can be found. To reduce the number of calculations, some randomly chosen part of the set of all the elemental subsets can be taken into account [39]. Further, only pairs of pixels in each image farther from each other than a specified distance can be considered. This and very similar versions of the HT have been described in [31, 32, 33] and compared with other versions in [34]. The reviews of image registration techniques can be found in [40, 41, 42, 43].

The fuzzification degree was calculated according to the ranges of parameters used in the accumulator, as shown in Table 3. The rotation was much smaller than the round angle, so in this example the periodic character of the angle could not be taken into account. First, the scale for each component of the transformation parameter vector was found for a given fuzzification degree, according to the formula corresponding to (14). The above given bounds of the domains of each transformation parameter vector component, αimin, αimax, i = 1,...,4, respectively, were used to calculate the scale for each component
$$ s_i = d_{\rm f} (\alpha_i^{\max}-\alpha_i^{\min}). $$
(32)
Then, the four-dimensional fuzzification function, corresponding to (12) was used, as follows:
$$ \mu({\varvec{\alpha}}) = \left\{\begin{array}{*{20}l} q({\varvec{\alpha}}) & \hbox{if} \; q({\varvec{\alpha}})>0 \\ 0 & \hbox{otherwise} \\ \end{array} \right., $$
(33)
where
$$ q({\varvec{\alpha}}) = \left\{\begin{array}{*{20}l} 1 - \sum_{i=1}^4 \frac{\alpha_i^2}{s_i^2} & \hbox{if}\; d_{\rm f}>0 \\ 1 & \hbox{if} \; d_{\rm f}=0 \\ \end{array} \right.. $$
(34)
The histogram of \({\varvec{\alpha}},\) or the accumulator, was fuzzified with this function, and the parameters were found as the components of its mode.

The robustness of the registration method has been tested with the use of example feature images derived from real-life images received from a medical application, which will be described further. The images were corrupted in such a way that a specified share ζ of the feature pixels was moved from their original position to a new position chosen randomly from the whole image (except other feature pixels), with the uniform probability density. These moved features are the outliers, while the remaining ones are inliers. The parameter ζ can be called the outlier share or noise share.

Registration accuracy has been recorded for ζ ranging from 0 to 0.9. The accuracy was defined as the maximum distance measure (in calculating the accuracy the non-corrupted images were taken):
$$ \varepsilon = \max_{j=1,\ldots,N^{\rm o}} \left(\min_{i=1,\ldots,N^{\rm r}} (d(f_j^{\rm o},f_i^{\rm r})) \right),$$
(35)
where d(fjo(xjo,yjo),fir(xir,yir)) is an Euclidean distance of a feature pixel of the overlaid image after registration to a feature pixel of the reference image. The maximum share ζmax for which the registration error is acceptable can be considered as a simplified, experimental counterpart of the measure of global robustness defined in [29], chapter 4.2.3. 1 In the images to be used, as the acceptable error the condition ɛ < 5 pixels can be considered.

It should be stressed that with the described method of introducing noise to the data, the outlying data are not inserted directly to the accumulator, but to the algorithm as a whole. Therefore, the whole test concerns primarily the image registration algorithm as a whole. However, the contamination of the input with strong noise implies the contamination of the data in the histogram in an adequately strong way.

The figures to be registered will be the edges of the anatomical structures selected from the images used in the quality assessment of teleradiotherapy—the treatment of patients with cancer by irradiation with external beams of ionizing radiation. The actual geometry in a therapeutical session is recorded in a portal image. The planned geometry is recorded in a simulation image, before the therapy begins. The simulation image should be registered with each of the portal images, made during each of the therapeutical sessions. The simulation image is an X-ray of high quality. The portal image is produced by the therapeutical beam of the ionizing radiation and is inherently of low contrast as different tissues, like bones and muscles, attenuate the radiation very similarly. In both images, the traces of anatomical structures of the patient, the shape of the therapeutic beam, and possibly the shields used to precisely shape the irradiation field are visible. The quality assessment of the therapy by registration of portal and simulation images has been presented for example in [44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55]. What is most important is that generally the registration is performed using the edges found in the images. From all the edges, the significant fragments belonging to the patient’s anatomical structures and irradiation fields are chosen semi-automatically or fully automatically. In the present study it was vital to have full information on the transformation between the images and to have the possibility to precisely evaluate the transformation error. Therefore, the pairs of images to be registered have been derived from single simulation images containing the edges of patient’s bony structures, by transforming these images in a known way.

The source images are shown in Figs. 7 and 10. They show the simulation images with the irradiation field geometry for the irradiation of brain (Fig. 7) and of axillar, subclavicular, and supraclavicular lymph nodes (Fig. 10; this image was supplemented to a square due to requirements of the software described in [54] by adding a white stripe and smearing it so that the emerging edge is not detected by the bone edge detection process). The edges of bones, selected for registration, are marked with white lines; this is the skull, and the clavicle and chest wall, respectively. In the images of Figs. 8, 9 and 11 one pair of images prepared for registration for each simulation is shown: the one with a considerably large share of outliers, ζ = 0.80. The images were prepared in the following way. The feature images were formed by taking only the feature pixels from images 7, 10. The overlaid images and the reference images were generated by transforming the feature images with the parameters shown in Table 2.
Fig. 7

Source image for registration: skull—the case of the irradiation of brain. Selected edges of bones marked with white colour. The shields and parts of the central and lateral lines of the irradiation field marked with wires during the simulation process are also visible

Fig. 8

Image of Fig. 9a without enhancement, for comparison. See Fig. 9 for details

Fig. 9

Images for registration derived from the skull edges of Fig. 7. a, b Feature images for registration, overlaid and reference, respectively. Only one pair of the series is shown: that with the share of outliers ζ = 0.80. The feature pixels are black. Images enhanced by replacing each black pixel with a black square 3 ×  3 for better visibility in print (see also Fig. 8)

Fig. 10

Source image for registration: chest— the case of the irradiation of axillar, subclavicular, and supraclavicular lymph nodes. Selected edges of bones marked with white colour. The shields and parts of the central and lateral lines of the irradiation field marked with wires during the simulation process are also visible

Fig. 11

Images for registration derived from the clavicle and chest wall edges of Fig. 10. a, b Feature images for registration, overlaid and reference, respectively. Only one pair of the series is shown: that with the share of outliers ζ = 0.80. The feature pixels are black. Images enhanced by replacing each black pixel with a black square 3 ×  3 for better visibility in print

Table 2

Parameters of the transformations used to form the overlaid and reference images from feature images of Figs. 7 and 10

Image

Overlaid

Reference

 

Tx

Ty

φ

c

Tx

Ty

φ

c

Figure 7

0

0

 − 1°

1

 − 3

2

1

Figure 10

 − 4

5

20/19

0

0

1

The ranges of the transformation parameters and the resolutions of the accumulator array used are collected in Table 3. The bounds of the domains of the parameter vector components have been chosen similar to those encountered in the problem of registration of the simulation and portal images, which are reasonably well aligned before the registration starts. The resolutions of the accumulator array for each parameter have been set to the values equal to the halves of such values which make the feature image change by a single pixel when transformed with it. This guarantees that the resolutions are commensurably accurate, and that the accuracy is sufficient.
Table 3

Ranges of the transformation parameters and resolutions of the accumulator array

 

Tx = α1

Ty = α2

φ = α3

c = α4

min

 − 20 pix

 − 20 pix

 − 10°

0.90

max

20 pix

20 pix

10°

1.10

N

81

81

201

81

Δ

0.5 pix

0.5 pix

0.01°

0.0025

min, max bounds of parameter domain, N number of accumulator elements, Δ resolution

The number of elemental subsets has been reduced by choosing one-fourth of feature pixels in each image at random and specifying the minimum distance of pixels in a pair as approximately half the characteristic dimension of the undistorted figure. With the images used, each having about 1,000 feature pixels, these conditions together with the limits imposed by the bounds on the parameters in the accumulator restrict the number of elemental subsets actually used in the accumulation to about 200,000 for the strongest noise and about 4,000,000 for no noise, which is from 0.0002 to 0.85 of their total number.

The images of the skull, Fig. 9, were registered for 152 combinations of the fuzzification degree df and the share of outlying feature pixels ζ: df from 0.0 to 0.8, at 0, 0.02, 0.05, 0.10, and further changing by 0.1, and ζ from 0.0 to 0.9 changing by 0.05. Note that for this image both scale factors were set to one (Table 2). This has been done to make it possible to solve the registration problem for this image in only three dimensions, which made the calculations quicker. The longest time was necessary to fuzzify the accumulator for very large values of df.

The resulting measure of registration errors has been shown in the graph in Fig. 12a. The general tendencies to be noticed in this graph are as follows:
  1. 1.

    The more the noise, the larger the errors.

     
  2. 2.

    For a small share of noise, the errors grow slowly with the growth of the fuzzification degree.

     
  3. 3.

    For large shares of noise, without fuzzification the errors are large. They have a deep minimum for a weak fuzzification, at df = 0.05 and 0.1. For stronger fuzzification, they grow similarly as for small noise share, but quicker.

     
  4. 4.

    This is less important, but there is an upper limit of registration error for very large noise and strong fuzzification, related to the fact that the result of registration tends to the average of the data, and with large noise it tends to the middle of the histogram, which in this case corresponds to an identity transformation.

     
The minimum error is acceptably small, ɛ < 5 pixels, for df = 0.05 and 0.10, even for the largest shares of noise. This excessively optimistic observation had to be verified by making calculations for more densely displaced values of the parameters in the interesting range of weak fuzzifications and large noise.
Fig. 12

Error measure for registration of images from Fig. 9. a Graph for full range and medium resolution of parameters df and ζ; b more detailed graph in the range df∈[0.00,0.30] and ζ∈[0.50,0.90]

The 287 pairs of values used were: df from 0.0 to 0.3, changing by 0.05, and ζ from 0.5 to 0.9 changing by 0.01.

The results have been shown in Fig. 12b. The errors still have a clear minimum for df = 0.05 and 0.1. A closer analysis reveals that for df = 0.10, for example, at ζ = 0.80 it is ɛ = 3.61 pixels, then with the increase of ζ the error goes down, and further grows and exceeds a reasonable limit for ζ = 0.84 with ɛ = 9.22 pixels. The range of acceptable errors for these degrees of fuzzification reaches the share of noise ζmax = 0.80, and this value seems to constitute the measure of global robustness of the fuzzified Hough transform registration, in the considered case.

The next pair of images has been used to validate the above finding. The images of the clavicle and chest wall of Fig. 11 were registered for 20 pairs of values: df from 0.0 to 0.2 and ζ from 0.0 to 0.9. The full four-dimensional problem has been considered. The error measures received can be seen in Fig. 13. Despite the fact that a smaller number of points in the df–ζ plane were investigated, the result is similar to that of the previous trial: a weak fuzzification of the histogram eliminates the deteriorating influence of strong noise on the result, up to 0.7–0.8 of noise share in the data. Such fuzzification does not influence the result for small or zero noise.
Fig. 13

Error measure for registration of images from Fig. 11

The observations made with the above experiments make it possible to draw the following conclusion of general applicability. If the data collected in a histogram contain significant noise, then the weak fuzzification of this histogram makes it possible to localize its mode in a robust way. If the noise is small or absent, the weak fuzzification has no harmful influence on the mode. The weak fuzzification is such a fuzzification which makes the values of the neighbouring elements in the histogram significantly cooperative in forming peaks.

6.2 Accumulation-based line detection

The issue of fuzzification at various degrees has been investigated for the accumulation-based line detection algorithm described in [13, 14, 15]. The algorithm has been developed primarily for the application of detecting blood vessels in mammographic images, so the robustness to various kinds of irregularities in the images was the basic challenge. Therefore the principle of data accumulation and the analysis of modes in fuzzified histograms has been used at various levels in the algorithm. Here, only the basic information on the method will be recalled; all the details can be found in the papers cited above.

The detection of elongated structures is founded on the search for loci of image intensity gradients cooperatively conforming to a model of a line, which is the ridge in the image intensity graph. The evidence on the existence of such loci is accumulated in the accumulator array congruent with the image domain, keeping for each pixel the information on line intensity and direction for a range of widths, limited by the lower limit width ww and upper limit width wu. Then the accumulator is searched through for maxima, and those which exceed the intensity fl times the intensity in the global maximum are retained, where fl is the lineness threshold coefficient. From these maxima the central lines of the elongated structures are tracked across pixels and widths, as ridges in the line intensity. The tracking stops if the intensity falls below fa times the average ridge intensity in the current line, where fa is the average accumulated value threshold coefficient.

The basic idea of the conformity of the gradients to the model of a ridge is shown in Fig. 14. Pairs of pixels p1,p2 lying at distances belonging to some range depending on the limit widths ww and wu are analysed for the whole image. Each such pair is a kind of an elemental subset for this problem. The gradients G1, G2 in these pixels are rotated by π/2 in opposite directions to obtain the vectors T1, T2 transversal to the ridge. If these vectors fulfil a number of necessary geometrical conditions, they are summed to form V located in the central point pc of the pair. Local line direction is according to this vector, but the line has no sense (in the meaning of the sense of a vector), so the period of the angle is π. The width w is the projection of distance between p1 and p2 on a normal to V. Line intensity l is calculated from the modulus of V as
$$ l = c_{\rm d} c_{\rm e} |{\mathbf{V}}| / w, $$
(36)
where the penalties of directional consistencecd and edgeness consistencece are
$$\begin{aligned} c_{\rm d} &= \cos^2[\measuredangle({\bf T}_1, {\bf T}_2)], \\ c_{\rm e} &= \cos^2[\pi (1 - \min(|{\bf G}_1|,|{\bf G}_2|)/\max(|{\bf G}_1|,|{\bf G}_2|)) /2]. \\ \end{aligned}$$
(37)
The intensity l is normalized by w to make the detector sensitivity dependent only on line intensity and invariant to line width.
Fig. 14

Derivation of the accumulated value in the central point pc from gradients G1,G2 in two pixels p1,p2. T1,T2: vectors tangent to the line; w: width of the line (see text)

During accumulation, the result of (36) is subjected to a number of fuzzifications: in location, to compensate for inter-pixel locations of the central point pc; in line length, to enhance line continuity; in line width, to enhance direction invariance; finally, in line angle ψ, as described further. The details are described in [13, 14]. Here it should be said that in the fuzzification in location and in line width, a weak fuzzification with the fuzzification function similar to that shown in Fig. 6 is applied. For the fuzzification in line length there is no reason to use weak fuzzification, as it has been designed to improve the line continuity in a strong manner and the support of the fuzzification function should be related mainly to the line width.

The lineness is accumulated in the central point pc of the current pair p1,p2. As all the possible pairs are analysed (reduced by some reasonable conditions), each pixel of the image (except its border pixels) is equivalent to the central point of some pair for many times. In the present paper this accumulation is of special interest. The lineness is characterized by the intensity l and angle \(\psi = \measuredangle({\mathbf{Ox}}, {\mathbf{V}}).\) In each pixel, for each width, a histogram \(H_{\rm l}(\tilde{i}(\psi))\) of l versus ψ is formed and fuzzified to obtain Hfl(ξ(ψ)) with a fuzzifying function (28). The resulting line intensity in the pixel is calculated as the difference between the histogram extrema, like in (27), with the phase corresponding to the maximum. The fuzzification degree df according to (30) can be set to a chosen value from an interval [0,1].

An experiment has been performed which consisted in the detection of lines in a series of phantom images with the Gaussian noise. The images are described further. The fuzzification degree df has been set to a series of seven values in [0,1] at intervals partly conforming to a geometric series. Other parameters were: lower and upper limits for line width: wu = 3 and ww = 15, the lineness threshold coefficient fl = 0.25 and the average accumulated value threshold coefficient fa = 0.25. In the histogram Hfl(ξ(ψ)) the angle [0,π] has been quantified into 90 intervals.

To make it possible to fully control the quality of result of the experiment, a phantom image shown in Fig. 15 has been used. Standard anti-aliasing procedures have been applied in rendering the geometrical objects: circles and rectangles. Patterns which can be difficult to detect with a line detector were not avoided: crossing lines having the same or slightly different brightnesses and lines located at a small distance from each other, in relation to their widths.
Fig. 15

Phantom (250 ×  250) for testing the line detector. Contrast enhanced for better visibility in print; actual intensities of the phantom: 100 (represented by black), 110 (grey), and 115 (white)

The mean square amplitude of the image of Fig. 15 was A = 5.4235. The centred Gaussian noise was added to form a series of images with the signal to noise ratio (SNR) from 9 dB down to  − 9 dB, in steps of 3 dB. The series was complemented with the noiseless image, which can be symbolically denoted as SNR = ∞. Eight values of noise have been used in total. The parameters of noise are given in Table 4.
Table 4

Signal to noise ratio SNR, ratio of the noise energy to signal energy σ2/A2, and standard deviation of noise σ, for the mean square amplitude A = 5.4235

SNR

9

6

3

0

 − 3

 − 6

 − 9

σ2/A2

0.13

0.25

0.50

1.00

2.00

3.98

7.94

σ

1.92

2.72

3.84

5.42

7.66

10.82

15.29

The quality measures of the 56 results have been collected in the graph in Fig. 16. These are: the true positive ratio (TPR)—ratio of correctly detected pixels of the object to the actual number of pixels in the object—the measure of sensitivity of the detector, and the false positive ratio (FPR)—ratio of incorrectly detected pixels of the object to the actual number of pixels in the object, for which the expression (1 − FPR) is treated as the measure of specificity. As the object, all pixels belonging to lines were taken (see Fig. 17b). The detector starts to fail for noise at  − 6 dB. For the strongest acceptable noise, the fuzzification with small fuzzification degrees gives some improvement in the FPR and no important decrease in the TPR. For small or zero noise the FPR seems constant, but TPR is better for weak fuzzification. Stronger fuzzification does not change this effect. The values of the two measures received for the extreme acceptable values of SNR and df are given in Table 5. In general, the results for very large noise do not differ much from those obtained for small noise, in the tested range.
Fig. 16

Measures of sensitivity and specificity: true positive rate TPR full points, solid lines, and false positive rate FPR empty points, dashed lines versus signal to noise ratio (SNR) and degree of fuzzification df. Increasing df does not decrease the result quality for SNR≥  − 3

Fig. 17

Example of result of line detection for noise SNR =  − 3 dB and full fuzzification, df = 1.0. a Source image (of Fig. 15) with added noise; contrast enhanced for better visibility in print; b reference image for line detection: image of Fig. 15 thresholded at 102; c result of detection; d difference image between a and c: grey: correct result, white: false positive, black: false negative

Table 5

The values of the true positive rate (TPR) and false positive rate (FPR) received for the acceptable values of SNR and df used in the experiment

df

SNR

 − 3

TPR

FPR

TPR

FPR

0

0.872

0.062

0.907

0.078

1

0.939

0.065

0.889

0.058

The results indicate that the use of the limit fuzzification is equally acceptable as the use of weaker fuzzification. Therefore, it is justified to replace the accumulation with the calculation of the mean value. Implementing the calculations in the form of finding the mean of vectors according to [35], as described in Sect. 4, instead of forming and analysing the histograms of the line intensities versus direction at each pixel, results in a dramatic reduction of the memory requirements. Instead of a 90-element histogram for angular resolution of 2°, only three elements are necessary: for the modulus and for the cosine and sine of the phase (phase could be stored in one element as angle, but then the number of computations would be larger). The time of operation is roughly the same for both algorithms.

The possibility of applying the strong or limit fuzzification in the considered stage of the algorithm can be explained by the fact that in the previous stages the weak fuzzification was already used. This could have significantly reduced the number of the outlying votes in the final accumulation.

The algorithm based on summation has been actually utilized from the early stage of development of the accumulation-based line detection method, but the present study has made this approach better validated.

An example of results of line detection in the phantom image obtained with the described algorithm has been shown in Fig. 17. For presentation, the result for the image with the largest acceptable noise has been chosen to show the possibilities of the method in a relatively difficult case.

The algorithm has been primarily developed for the detection of blood vessels and other elongated objects in mammograms. An example of such detection can be seen in Fig. 18. A fragment of an image from the publicly accessible database of mammographic images MIAS MiniMammographic Database [56] has been analysed. The fragment has been selected as it contains an interesting and difficult detail visible in the central upper part of Fig. 18b: the blood vessel seems to fork, which can be the effect of projection of two vessels on one another, and the contrast goes down considerably. The noise in the image is strong, so locally the contrast of the vessels is very near to that of the noise. This phenomenon is better seen in the profile plot of the image intensity in Fig. 18c. The value of the SNR cannot be easily estimated in this natural image, but it can be safely stated that it is not larger than  − 3 dB, the strongest noise for which the results of detection were good (Fig. 16). The amplitude of the vessels is between 10 and 20 approximately, so it is close to the amplitude of lines in the phantom, Fig. 15. Comparison of the image with the phantom images, made by eye, for subsequent values of noise, like in Fig. 17a, suggests that in the mammographic image of interest it is SNR≈ 0 dB. This noise is smaller than the largest noise for which the line detector was still operative in the experiments with the phantom. Despite the closeness of the contrast of the detected blood vessel to that of noise in Fig. 18, the accumulation-based line detector was able to detect the vessel at its whole length, without gaps. The two branches of the object are merged into one wide vessel in the binary image of Fig. 18d because their proximal edges overlap. The obtained shape of the detected vessel conforms to the expectation of a human observer of the mammographic image.
Fig. 18

Example of real-life result of the detection of a blood vessel in a mammogram. a Fragment 300 ×  300 of a mammogram mdb042 from the MIAS MiniMammographic Database [56]; white frame: source image 100 ×  100, shown in b (upper left corner of the window in pixel (500,400) of the original image); b source image to be analysed (enhanced by local histogram equalization for better visibility); c profile plot of intensity in the source image (natural contrast)—locally the contrast is comparable to noise; d binary result of line detection

7 Conclusion

The problem of the influence of the scale of a fuzzy membership function used to fuzzify a histogram was analysed. This problem arises, among others, in the context of the fuzzy image processing methods related to the Hough transform and other accumulation-based methods. The questions concern the resolution of the accumulator, precision of results, and their certainty. Both the cases of aperiodic and periodic histograms were analysed.

The membership functions used in fuzzy voting are usually symmetrical and have a single maximum, located at the histogram element for which the vote would be cast if the voting were crisp. If a parameter of scale is introduced into such a function, then for large scales the function tends to a quadratic function. It has been stated that for a scaled and clipped quadratic function it is possible to precisely define the notion of the degree of fuzzification, belonging to the real interval [0,1]. For other functions the notion can be treated as approximate. Thus, it is possible to indicate an upper limit for fuzzification and thus to qualify the fuzzification as, for example, weak or strong, using this limit as a reference.

It has been demonstrated that in the case of periodic histograms, the fuzzifying function which makes the histogram mode conform to the mean value is the cosine square function with the period equal to the period of the quantity of interest. By analogy to the aperiodic case, this fuzzification can be treated as the limit fuzzification. The scaled and clipped cosine square function can then be used to fuzzify a periodic histogram with the given degree of fuzzification.

While the quadratic function is related to the classical Huber-type skipped mean, used in robust statistics, and to the kernel function derived from the Epanechnikov kernel, used in kernel density estimation, the use of the clipped cosine square function seems to be less known, at least on the grounds of the fuzzy accumulation methods.

The conclusion pertaining both to aperiodic and periodic cases is that if there are outliers among the accumulated values, then weak fuzzification is recommended, and if the influence of outliers is not significant, then strong fuzzification can be used, which at the limit is equivalent to the simple calculation of the mean value. The conclusion concerning the mean value is trivial, but the one concerning the weak fuzzification is not easy to trace in the literature on accumulation-based image processing. In practice, the weak accumulation is meant as such that the values of the neighbouring elements in the accumulator can strongly interact in forming common peaks. In the considered examples this took place for the values of the degree of fuzzification close to 0.1.

The examples of the use of fuzzy histograms were the classical HT image registration method and the recently proposed evidence accumulation-based line detection algorithm. It has been demonstrated how the proper choice of the degree of fuzzification can improve the robustness of the algorithms against strong noise. The images used in the experiments were taken from medical applications. The image registration was performed on test images derived from simulation images used in teleradiotherapy. The line detection algorithm was tested with images related to mammograms.

8 Originality and contribution

The concepts known from the domains of robust statistics and kernel density estimation have been adapted to the fuzzification of aperiodic histograms. The concept of limit fuzzification has been described and the notion of the degree of fuzzification has been introduced for the scaled and clipped square fuzzy membership functions, corresponding to the Huber-type skipped mean, and to the kernel function derived from the Epanechnikov kernel. The results have been extended to the case of periodic histograms by using the scaled and clipped cosine square as the membership function. The choice of the scale has been made departing from an upper limit for fuzzification rather than from an estimate of scale made using the information on noise and outliers in the data. Simple indications for using strong or weak fuzzification, controlled by the value of the fuzzification degree, have been given. These indications have been justified by examples in two image processing problems: image registration with the Hough transform-based method and line detection with the accumulation-based method, using images related to medical applications, containing strong noise.

Footnotes

  1. 1.

    One reason why ζmax is only the simplified robustness measure is that just one arrangement of outliers is considered for a given ζ, not all the possible ones. Another obvious reason is that only two pairs of registered images will be considered. See [29] for details.

Notes

Acknowledgments

The research was financed by the Ministry of Education and Science as the research project no. 3 T11C 050 29 in 2005–2008.

References

  1. 1.
    Hough PVC (1959) Machine analysis of bubble chamber pictures. In: Proceedings of the international conference on high energy accelerators and instrumentation, CERNGoogle Scholar
  2. 2.
    Hough PVC (1962) A method and means for recognizing complex patterns. US Patent 3,069,654Google Scholar
  3. 3.
    Duda RD, Hart PE (1972) Use of the Hough transform to detect lines and curves in pictures. Commun ACM 15:11–15CrossRefGoogle Scholar
  4. 4.
    Merlin PM, Farber DJ (1975) A parallel mechanism for detecting curves in pictures. IEEE Trans Comput 24:96–98MATHGoogle Scholar
  5. 5.
    Kimme C, Ballard D, Sklansky J (1975) Finding circles by an array of accumulators. Commun ACM 18(2):120–122MATHCrossRefGoogle Scholar
  6. 6.
    Sklansky J (1978) On the Hough technique for curve detection. IEEE Trans Comput 27:923–926MATHGoogle Scholar
  7. 7.
    Maître H (1985) Un panorama de la transformation de Hough. Trait Signal 2(4):305–317Google Scholar
  8. 8.
    Illingworth J, Kittler J (1988) A survey of the Hough transform. Comp Vision Graph Image Process 44(1):87–116CrossRefGoogle Scholar
  9. 9.
    Leavers VF (1993) Which Hough transform? CVGIP Image Underst 58:250–264CrossRefGoogle Scholar
  10. 10.
    Aguado AS, Nixon MS, Montiel EM (1998) Parameterizing arbitrary shapes via Fourier descriptors for evidence-gathering extraction. Comput Vision Image Underst 69(2):202–211CrossRefGoogle Scholar
  11. 11.
    Aguado AS, Montiel EM, Nixon MS (2000) Bias error analysis of the Generalised Hough Transform. J Math Imaging Vis 12(1):25–42MATHMathSciNetCrossRefGoogle Scholar
  12. 12.
    Grant MS, Nixon MS, Lewis PH (2002) Extracting moving shapes by evidence gathering. Pattern Recognit 35:1099–1114MATHCrossRefGoogle Scholar
  13. 13.
    Chmielewski L (2006) Detection of non-parametric lines by evidence accumulation: finding blood vessels in mammograms. In: Proceedings of international conference on computer vision and graphics ICCVG 2004, Warsaw, Poland, 22–24 September, 2004. Computational imaging and vision, vol 32. Springer, Berlin Heidelberg New York, pp 373–380Google Scholar
  14. 14.
    Chmielewski L (2005) Specification of the evidence accumulation-based line detection algorithm. In: Kurzyński M, Woźniak M, Puchała E et al (eds) Proceedings of international conference on computer recognition systems CORES 2005, Rydzyna, Poland, 22–25 May 2005. Volume of Advances in soft computing. Springer, Berlin Heidelberg New York, pp 355–362Google Scholar
  15. 15.
    Chmielewski L (2005) Scale and direction invariance of the evidence accumulation-based line detection algorithm. In Kurzyński M, Woźniak M, Puchała E et al (eds) Proceedings of international conference on computer recognition systems CORES 2005, Rydzyna, Poland, 22–25 May 2005. Volume of Advances in soft computing. Springer, Berlin Heidelberg New York, pp 363–370Google Scholar
  16. 16.
    Strauss O (1999) Use the Fuzzy Hough Transform towards reduction of the precision–uncertainty duality. Pattern Recognit 32:1911–1922CrossRefGoogle Scholar
  17. 17.
    Cohen M, Toussaint G (1977) On the detection of structures in noisy pictures. Pattern Recognit 9:95–98MATHCrossRefGoogle Scholar
  18. 18.
    Van Veen T, Grœn F (1981) Discretization errors in the Hough transform. Pattern Recognit 14:137–145CrossRefGoogle Scholar
  19. 19.
    O’Rourke J, Sloan K (1984) Dynamic quantization: two adaptive data structures for multidimensional space. IEEE Trans PAMI 3:266–288Google Scholar
  20. 20.
    Jolion J, Rozenfeld A (1989) A O(log n) pyramid Hough transform. Pattern Recognit Lett 9:343–349MATHCrossRefGoogle Scholar
  21. 21.
    Thrift P, Dunn S (1983) Approximating point-set images by line segments using a variance of the Hough transform. Comput Vis Graph Image Process 21:383–394CrossRefGoogle Scholar
  22. 22.
    Han JH, Kóczy LT, Poston T (1994) Fuzzy Hough transform. Pattern Recognit Lett 15(7):649–658CrossRefGoogle Scholar
  23. 23.
    Hampel FR, Ronchetii EM, Rousseeuw PJ, Stahel WA (1986) Robust statistics: the approach based on influence functions. Wiley, New YorkMATHGoogle Scholar
  24. 24.
    Rousseeuw PJ, Leroy AM (1987) Robust regression and outlier detection. Wiley, New YorkMATHCrossRefGoogle Scholar
  25. 25.
    Huber PJ (2003) Robust statistics. Wiley, New YorkMATHGoogle Scholar
  26. 26.
    Silverman BW (1986) Density estimation for statistics and data analysis. Chapman & Hall, LondonMATHGoogle Scholar
  27. 27.
    Scott DW (1992) Multivariate density estimation: theory, practice, and visualization. Wiley, New YorkMATHGoogle Scholar
  28. 28.
    Wand MP, Jones MC (1995) Density estimation for statistics and data analysis. Chapman & Hall, LondonGoogle Scholar
  29. 29.
    Meer P (2004) Robust techniques for computer vision. In: Medioni G, Kang SB (eds) Emerging topics in computer vision. Prentice-Hall, Englewood Cliffs, pp 107–190Google Scholar
  30. 30.
    Parzen E (1962) On estimation of a probability density function and mode. Ann Math Stat 33:1065–1076MATHMathSciNetGoogle Scholar
  31. 31.
    Ratha NK, Karu K, Chen S, Jain AK (1996) A real-time matching system for large fingerprint databases. IEEE Trans PAMI 18(8):799–813. DOI 10.1109/34.531800Google Scholar
  32. 32.
    Zana F, Klein JC (1999) A multimodal registration algorithm of eye fundus images using vessels detection and Hough transform. IEEE Trans Med Imaging 18(5):419–428. DOI 10.1109/42.774169Google Scholar
  33. 33.
    Seedahmed G, Martucci L (2002) Automatic image registration using Geometrically Invariant Parameter Space Clustering (GIPSC). In: Proceedings of ISPRS Commission III symposium on photogrammetric computer vision, Graz, Austria, 9–13 September 2002, pp A318–A323Google Scholar
  34. 34.
    Chmielewski L (2004) Choice of the Hough transform for image registration. In: Nowakowski A, Kosmowski BB (eds) Optical methods, sensors, image processing, and visualization in medicine. Proc SPIE, vol 5505, pp 122–134. DOI 10.1117/12.577912Google Scholar
  35. 35.
    Mardia KV (1972) Statistics of directional data. Academic, LondonMATHGoogle Scholar
  36. 36.
    Zwiggelaar R, Parr TC, Schumm JE et al (1999) Model-based detection of spiculated lesions in mammograms. Med Image Anal 3(1):39–62CrossRefGoogle Scholar
  37. 37.
    Liu S, Babbs CF, Delp EJ (2001) Multiresolution detection of spiculated lesions in digital mammograms. IEEE Trans Image Process 10(6):874–884MATHCrossRefGoogle Scholar
  38. 38.
    Kegelmeyer WP, Pruneda JM, Bourland PD et al. (1994) Computer-aided mammographic screening for spiculated lesions. Radiology 191:331–337Google Scholar
  39. 39.
    Kälviäinen H, Hirvonen P, Erkki O (1995) Probabilistic and non-probabilistic Hough transforms: overview and comparisons. Image Vis Comput 13(4):239–252CrossRefGoogle Scholar
  40. 40.
    Gottesfeld Brown L (1992) A survey of image registration techniques. ACM Comput Surv 24(4):325–376CrossRefGoogle Scholar
  41. 41.
    van den Elsen PA, Pol EJD, Viergever MA (1993) Medical image matching—a review with classification. IEEE Eng Med Biol 3:26–39CrossRefGoogle Scholar
  42. 42.
    Lester H, Arrige SR (1999) A survey of hierarchical non-linear medical image registration. Pattern Recognit 32:129–149CrossRefGoogle Scholar
  43. 43.
    Kozińska D, Chmielewski L (2003) Image registration and multimodal data integration (in Polish). In: Chmielewski L, Kulikowski JL, Nowakowski A (eds) Biomedical imaging (in Polish). Akademicka Oficyna Wydawnicza EXIT, Warsaw, pp 127–164Google Scholar
  44. 44.
    Gilhuijs KGA, van Herk M (1993) Automatic on-line inspection of patient setup in radiation therapy using digital portal images. Med Phys 20(3):667–677CrossRefGoogle Scholar
  45. 45.
    Gilhuijs KGA, El-Gayed AAH, van Herk M, Vijlbrief RE (1993) An algorithm for automatic analysis of portal images: clinical evaluation for prostate treatments. Radiother Oncol 29:261–268CrossRefGoogle Scholar
  46. 46.
    Eilertsen K, Skretting A, Tennvassas TL (1994) Methods for fully automated verification of patient set-up in external beam radiotherapy with polygon shaped fields. Phys Med Biol 39:993–1012CrossRefGoogle Scholar
  47. 47.
    Cai J, Zhou S-Q, Hopkinson J, Saxena AV, Chu J (1996) Alignment of multi-segmented anatomical features from radiation therapy images by using least squares fitting. Med Phys 23(13):2069–2075CrossRefGoogle Scholar
  48. 48.
    Cai J, Chu JCH, Saxena A, Lanzl LH (1998) A simple algorithm for planar image registration in radiation therapy. Med Phys 25(6):824–829CrossRefGoogle Scholar
  49. 49.
    Giraud LM, Pouliot J, Maldague X, Zaccarin A (1998) Automatic setup deviation measurements with electronic portal images for pelvic fields. Med Phys 25(7):1180–1185CrossRefGoogle Scholar
  50. 50.
    Bansal R, Staib LH, Chen Z et al (1998) A novel approach for the registration of 2D portal and 3D CT images for treatment setup verification in radiotherapy. In: Proceedings of 1st international conference on medical image computing and computer-assisted intervention MICCAI 98, Cambridge, Massachusetts, 11–13 October 1998. LNCS, vol 1496. Springer, Berlin Heidelberg New York, pp 1075–1086Google Scholar
  51. 51.
    Dekker N, Ploeger LS, van Herk M (2001) Evaluation of cost functions for gray value matching of 2D images in radiotherapy. In: Proceedings of 4th international conference on medical image computing and computer-assisted intervention MICCAI 01, Utrecht, The Netherlands, 14–17 October 2001. LNCS, vol 2208. Springer, Berlin Heidelberg New York, pp 1354–1355Google Scholar
  52. 52.
    Gut P, Chmielewski L, Kukołowicz P, Dabrowski A (2001) Edge-based robust image registration for incomplete and partly erroneous data. In: Proceedings of 9th international conference on computer analysis of images and patterns CAIP 2001, Warsaw, Poland, 5–8 September 2001. LNCS, vol 2124. Springer, Berlin Heidelberg New York, pp 309–316Google Scholar
  53. 53.
    Chmielewski L, Gut P, Kukołowicz PF, Dabrowski A (2002) Robust feature-based image registration using modified Hausdorff distance measure with the evolving quantile rank. In: Leberl F, Ferko A (eds) Proceedings of east–west vision EWV’02, Graz, Austria, 12–13 September 2002. Austrian Computer Society, pp 23–28Google Scholar
  54. 54.
    Chmielewski L, Kukołowicz PF, Gut P, Dabrowski A (2002) Assessment of the quality of radiotherapy with the use of portal and simulation images—the method and the software. J Med Inf Technol 3:MI-171–MI-179Google Scholar
  55. 55.
    Craig T, Sharpe M, Haycocks T et al (2003) Comparison of correction protocols for image-guided radiation therapy. In: Proceedings of 5th international conference on medical image computing and computer-assisted intervention MICCAI 03, Montréal, Canada, 15–18 November 2003. LNCS, vol 2879. Springer, Berlin Heidelberg New York, pp 264–270Google Scholar
  56. 56.
    Suckling J, Parker J, Dance D et al (1994) The Mammographic Images Analysis Society digital mammogram database. In: Gale AG, Astley SM, Dance DR et al (eds) Digital mammography. Exerpta medica international congress series, vol 1069, pp 375–378. http://www.wiau.man.ac.uk/services/MIAS/MIASweb.html
  57. 57.
    Whittaker ET, Watson GN (1958) A course of modern analysis, 4th edn. Cambridge University Press, CambridgeGoogle Scholar

Copyright information

© Springer-Verlag London Limited 2006

Authors and Affiliations

  1. 1.Institute of Fundamental Technological ResearchPolish Academy of SciencesWarsawPoland

Personalised recommendations