Detection of signal transitions by order statistics filtering

Save this PDF as:

Size: px
Start display at page:

Download "Detection of signal transitions by order statistics filtering"


1 Detection of signal transitions by order statistics filtering A. Raji Images, Signals and Intelligent Systems Laboratory Paris-Est Creteil University, France Abstract In this article, we present a non linear method for transition detection in signals, based on order statistics filtering. By using a discrete transition model, the method consists in computing a linear combination of the order statistics in the operator window, with coefficients allowing to obtain a response which presents a local symmetry at each transition position. Taking the noise properties into account in the formulation of this objective leads to an optimal solution. Some examples illustrate the effectiveness of the proposed method. Keywords: order statistics, transition detection, nonlinear filtering. Introduction The detection of transitions in disturbed signals is an old problem which is still not solved satisfactorily in spite of important advances in signal and image processing techniques. The majority of the existing solutions are linear methods [], []. Earliest differential methods are very sensitive to noise since the derivative operation amplifies the high frequency components, including noise generally. Newest techniques of linear filtering less sensitive to noise were proposed [3], [] but they require rather delicate and contradictory adjustment between the localization and the detection aspects depending on the signal and noise properties. Order statistics filters are nonlinear operators based on the use of sorted elements of the operator window [5], [], [7]. Several configurations having various aims were proposed in literature. A successful example is the median filter well known for its effectiveness for noisy signals smoothing with an increasing robustness as the noise approaches the impulsive type. Let us consider a D signal {X(k)} which we process with a sliding operator window of odd sizem = m+. The response sample is computed from the input samples: {X(k m),...,x(k),...,x(k +m)} Sorting these elements gives the order statistics noted: X (k)... X m+ (k)... X m+ (k) The order statistics filter output is given by a linear combination of the form: = m+ a i X i (k) () where a i i =,...,m + are real coefficients, with m+ a i = for an unbiaised estimation in noise suppression applications. One interesting example used in noise suppression is the median filter defined by a m+ =, and a i = for i m+. The average filter is also a particular case with a i = /M, i =,...,m+. In the present work, we propose a configuration of order statistics filtering which aims to detect transitions in noisy signals.. Application of order statistics filtering to detection of signal transitions We search for a configuration of the coefficients a i allowing to detect and localize signal transitions, such as the filter response presents a local symmetry at the position of each transition with higher magnitude values in the vicinity of the transition comparatively to the response magnitude in stationnary regions, i.e that do not contain any transition. We will first formulate this objective on a noiseless transition model before taking into account the presence of noise.. Simple noiseless transition In contrast with the models usually suggested in literature, generally defining a transition as a continuous function, we use here a noiseless transition model, more convenient for discrete fields, which consists in a transition on two points k, k from a low level L to a high level H (Fig.-a): { L if k k X(k) = () H if k k We search for an operator of type () allowing to produce an output which is i) symmetrical around (k,k ) regarded as the center of symmetry of the transition and ii) such that the response magnitude is larger in the vicinity of (k,k ) than its magnitude on the stationary parts of the transition where we would like to obtain null or minimal output values. Then, the transition is simply detected by thresholding the filter response and extracting its center of symmetry (k,k ). The term center of symmetry is not used here in the classical meaning for a continuous function. It does not indicate only one point but, in accordance with the transition definition (), it indicates the couple of points (k,k ). Fig. illustrates an output example for a noiseless transition detection.

2 X(k).8... Y(k ) = Y(k +) Y(k +) Y(k ) = (a m +a m+3 )A = = a m = a m (a) noiseless step edge of magnitude Hence, the symmetry of the response with respect to (k,k ) leads to an antisymmetric configuration of the order statistics coefficients: a m+ =, a m+ i = a m++i i =,...,m (3) (b) example of response with center of symmetry at the transition position Fig. : Example of noiseless transition detection The filter response is given at the transition points (k,k ) by: Y(k ) = (a +...+a m+ )L+(a m a m+ )H Y(k ) = (a +...+a m )L+(a m a m+ )H We note A = H L the magnitude of the transition. If we constraint the response to be of the same value at (k,k ), it results from this that the median coefficient is null: Y(k ) = Y(k ) Y(k ) Y(k ) = a m+ A = = a m+ = By applying the response symmetry condition with respect to (k,k ) to the other points we have: Y(k ) = (a +...+a m+ )L+(a m a m+ )H Y(k +) = (a +...+a m )L+(a m +...+a m+ )H Y(k ) = Y(k +) Y(k +) Y(k ) = (a m +a m+ )A = = a m = a m+ Y(k ) = (a +...+a m+3 )L+(a m a m+ )H Y(k +) = (a +...+a m )L+(a m +...+a m+ )H The resulting order statistics filter is defined by the response: = a m++i (X m++i (k) X m+ i (k)) If we note: x i = X m++i (k) X m+ i (k) the difference between the symmetrical order statistics X m++i (k), X m+ i (k) and b i = a m++i, we obtain: = b i x i () with: x x m In particular, for the noiseless transition model, we have at the transition points (k,k ): x =... = x m = A, Y(k ) = Y(k ) = A m b i at (k,k +): x =, x =... = x m = A, Y(k ) = Y(k +) = A m i= b i at (k m+,k +m ): x =... = x m =, x m = A, Y(k m+) = Y(k +m ) = Ab m for k k m or k k +m: x =... = x m =, = We see that the response is indeed symmetrical with (k,k ) as its center of symmetry and the transition detection is straightforward. However, this behaviour is not guaranteed with any solution of form () for noisy transitions as illustrated by the example of fig. The form () provides in fact a family of solutions among which we will select in the following section the one that preserves the best way the objectives of transition detection in the presence of noise.

3 X(k) (a) step edge of magnitude disturbed by noise uniformly distributed on [,.5] (b) Output of the OS filter of size 7: (-3, -, -,,,, 3) Fig. : Example of failure of detection of a noisy transition by an OS filter of type (). Noisy transition We consider now the same transition disturbed by a white additive noise N(k) of mean µ N and variance σn : { L+N(k) if k k X(k) = H +N(k) if k k On the stationary parts of the transition, adding a constant to the noise samples does not modify their relative ranks: for k k m: X(k) = L+N(k), then: = = b i (X m++i (k) X m+ i (k)) b i (N m++i (k) N m+ i (k)) Similarly, for k k +m: X(k) = H +N(k) then: = b i (X m++i (k) X m+ i (k)) = b i (N m++i (k) N m+ i (k)) Thus, the filter response on the stationary sides of the transition is given by: = b i (N m++i (k) N m+ i (k)) (5) Since it depends only on the noise, we can try to enhance the detection performance of () in the presence of noise by minimizing the output value in these regions which do not contain any transition. In the immediate vicinity of the transition, we have the following configuration for the noiseless model: position number of points at level L number of points at level H k m+ m k m+ m k m+ m k m m+ k + m m+ k +m m Thus, while the filtering result depends only on the noise for the stationary parts of the transition, the operator s behavior is different in the vicinity of the transition where the noise has the effect to modify the relative ranks of the order statistics of the noiseless transition (L,...,L,H,...,H). Furthermore, because of the nonlinearity of the operator, we can not separate in the response filter () the components due to the transition alone and to the noise respectively. However, since the detection principle is based on localizing the transition as a local center of symmetry in the filter response, we can expect the noise perturbation which is confined to the close neighbours of the transition, to be of limited effect on this symmetry. Our general objective for noisy transitions is then to find a solution of form () with symmetrical behavior around transitions such that a thresholding operation of the filter response can easily preserve the symmetrical variations around transitions and reduce the output to zero everywhere else. This can be achieved by minimizing the output variance in the regions that do not contain transitions. In such regions, the filter response has the form (5). Its average is given by: µ = b i (E{N m++i (k)} E{N m+ i (k)}) E{N m++i (k)} and E{N m+ i (k) are symmetrical with respect to µ N : E{N m++i (k)} µ N = µ N E{N m+ i (k) = E{N m+ i (k) = µ N E{N m++i (k)}

4 then: µ = b i (µ i µ N ) with: µ i = E{N m++i (k)}. The variance of (5) is then given by: σ = E{Y (k)} µ σ = b i b j r ij b i b j (µ i µ N )(µ j µ N ) j= j= with: r ij = E{n i n j }, n i = N m++i (k) N m+ i (k). The derivative of σ with respect to the coefficients b k given by: is null if: σ b k = b i r ik 8(µ k µ N ) (µ i µ N )b i b i r ik = (µ k µ N ) (µ i µ N )b i k =,,n or, in matiricial notation: RB = λ(m µ N I) where R = (r ij ) i,j m, r ij = r ji, M t = (µ,,µ m ), B t = (b,,b m ), I t = (,,) is the unitary vector of dimension m and the scalar λ = (M µ N I) t B. Thus, we obtain the following system of m linear equations in m unknowns b,,b m : e b +e b ++e m b m = λ(µ µ B ) e b +e b ++e m b m = λ(µ µ B ) e m b +e m b ++e mm b m = λ(µ m µ B ) which becomes, if we note α i = /(µ i µ N ): α (e b +e b ++e m b m ) = λ α (e b +e b ++e m b m ) = λ α m (e m b +e m b ++e mm b m ) = λ By substracting equation from equations to n, we obtain: (α e α e )b ++(α e m α e m )b m = (α 3 e 3 α e )b ++(α 3 e 3m α e m )b m = (α m e m α e )b ++(α m e mm α e m )b m = If we consider the coefficient b as an arbitrary parameter, we obtain the following system of m linear equations in m unknowns b,,b m : (α e α e )b ++(α e m α e m )b m = (α e α e )b... (α m e m α e )b ++(α m e mm α e m )b m = (α m e m α e )b which can be noted in matricial form: AV = b W with: α e α e α e m α e m A =.., α m e m α e α m e mm α e m b... α e α e V =, and W =. α m e m α e b m If the system is consistent, the unknown coefficients b,,b m are given by: V = b A W () Since a multiple of any solution of () is also a solution of (), we set b = and take as general solution for the coefficients b,,b m : V = A W (7) 3. Results The computation of the coefficients of the obtained order statistics filter of size M requires the knowledge of the individual and joint probability density functions of the noise order statistics N (i). If we note f(x) and F(x) respectively the probability density function and the cumulative probability density function of the noise, the probability density functions of the noise order statistics N (i), i M are given by [5]: f i (x) = K i (F(x)) i ( F(x)) M i f(x) (8) with: K i = M!/[(i )!(M i)!], and the joint probability density functions of the noise order statistics N (i), N (j), i < j M are given by: g ij (x,y) = K ij (F(x)) i (F(y) F(x)) j i ( F(y)) M j f(x)f(y) (9) with: K ij = M!/[(i )!(j i )!(M j)!]. Therefore, even for simple expressions of f(x), it is difficult to determine analytical expressions of the functions f i (x) andg ij (x,y) needed to calculate the elementsα i andr ij. So, we have computed these elements by numerical integration.

5 In order to make the detection process independent of the sign of the transition, we apply the detection, i.e search for local symmetries, to the absolute value of the filter output. Fig.3 shows an example of transition detection of a noisy step edge. We tested the method on transitions disturbed by uniform and gaussian noise. In both cases, the transition is clearly detected as a center of symmetry in the output. The corresponding optimal OS filters of size M=7 obtained from (7) are (.38e, 3.99,,,, 3.99, 38e) and (.,.3,,,,.3,.) for the used uniform and gaussian noise respectively. We can however notice that the response symmetry is fairly approximate due to the noise. This can be solved for example by detecting the center of symmetry as the middle position of the thresholded response peak.. Conclusion We proposed a nonlinear method to detect transitions in disturbed signals, based on order statistics filtering. By using a discrete transition model, we found a set of solutions for the weighting coefficients of the order statistics such that the obtained response presents local symmetries at signal transitions. By taking into account the properties of the noise, we deduced a solution that minimizes false detection in the regions not containing transitions. The proposed method gives satisfactory results on noisy signals. As perspective, a thorough and comparative study of the proposed approach with usual linear and nonlinear methods used in transition detection would be usefull. It would be interesting also to study the consistency of the system (7) for various types of noise and deduce generic solutions that can be used in typical applications. References [] D. Ziou and S. Tabbone "Edge detection techniques: An overview", International Journal of Pattern Recognition and Image Analysis, 8(): , 998 [] Kimmel, Ron and Bruckstein, Alfred M. "On regularized Laplacian zero crossings and other optimal edge integrators", International Journal of Computer Vision, 53(3):5-3, 3. [3] Canny, J., A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and Machine Intelligence, 8():79 98, 98. [] R. Deriche, Using Canny s criteria to derive a recursively implemented optimal edge detector, Int. J. Computer Vision, Vol., pp. 7 87, April 987. [5] David, H. A., Nagaraja, H. N. Order Statistics (3rd Edition). Wiley, New Jersey, 3. ISBN [] Ioannis Pitas and Anastasios N. Venetsanopoulos, Order Statistics in Digital Image Processing, Proceedings of the ieee, vol. 8, no., december 99 pp [7] Gonzalo R. Arce, "Nonlinear Signal Processing: A Statistical Approach", Wiley, New Jersey, 5 X(k) (a) step edge of magnitude disturbed by noise uniformly distributed on [,.5] (b) Output of the optimal OS filter of size 7 (.38e, -3.99, -,,, 3.99, -38e) X(k) (c) step edge of magnitude 3 disturbed by Normal noise (d) Output of the optimal OS filter of size 7 (.,.3, -,,, -.3, -.) Fig. 3: Example of noisy transition detection