Comp27103.qxd 1. Introduction Multidimensional signal processing is of paramount importance in application areas such as biomedicine, com- puter vision, multimedia, industrial inspection and remote sensing. In all these areas end-users and system develop- ers have to work with multidimensional data sets (Haralick and Shapiro, 1992; Plataniotis and Venetsanopoulos, 2000). Noise filtering is an essential part of any image processing based system, whether the final information is used for human inspection or for an _________________________________________ *Corresponding author E-mail: lazhar@squ.edu.om automatic analysis. A number of sophisticated multichan- nel filters have been developed to date for image filtering (Pitas and Venetsanopoulos, 1990; Astola and Kuosmanen, 1997). Nonlinear filters applied to images are required to suppress the noise while preserving the integri- ty of edge and other detail information. To this end, vector processing of multichannel images is more appropriate compared to traditional approaches that use instead com- ponent-wise operators Machuca and Phillips, (1983). For instance, the vector median filter (VMF) minimizes the distance in the vector space between the image vectors as an appropriate error criterion Astola et al. (1990). It inher- ently utilizes the correlation of the channels and keeps the The Journal of Engineering Research Vol. 2, No. 1 (2005) 1-11 Vector Directional Distance Rational Hybrid Filters for Color Image Restoration L. Khriji* Department of Electrical and Computer Engineering, College of Engineering, Sultan Qaboos University, PO Box 33, Al-Khod 123, Sultanate of Oman. Received 27 January 2003; accepted 24 December 2003 Abstract: A new class of nonlinear filters, called vector-directional distance rational hybrid filters (VDDRHF) for multi- spectral image processing, is introduced and applied to color image-filtering problems. These filters are based on ration- al functions (RF). The VDDRHF filter is a two-stage filter, which exploits the features of the vector directional distance filter (VDDF), the center weighted vector directional distance filter (CWVDDF) and those of the rational operator. The filter output is a result of vector rational function (VRF) operating on the output of three sub-functions. Two vector direc- tional distance (VDDF) filters and one center weighted vector directional distance filter (CWVDDF) are proposed to be used in the first stage due to their desirable properties, such as, noise attenuation, chromaticity retention, and edges and details preservation. Experimental results show that the new VDDRHF outperforms a number of widely known nonlin- ear filters for multi-spectral image processing such as the vector median filter (VMF), the generalized vector directional filters (GVDF) and distance directional filters (DDF) with respect to all criteria used. Keywords: Rational functions, Vector rational filters, Vector median filters, Vector directional distance filters ¢¢üü∏∏îîàà°°ùŸŸGG” ~bh .±É«W’G IO~©àe Qƒ°üdG á÷É©Ÿ ''á«gÉŒ’G áaÉ°ùª∏d øé¡ŸG »≤£æŸG äÉ¡éàŸG ≈Ø°üe '' ≈ª°ùj á«£ÿG ÒZ äÉ«Ø°üŸG øe ~j~L ´ƒf åëÑdG Gòg Ω~≤j : √OÉØà°S’G ºàj å«M á«Ø°üà∏d Úà∏Môe øe ¿ƒµàJh á«≤£æŸG ∫Gh~dG ≈∏Y äÉ«Ø°üŸG øe ´Gƒf’G Iòg ~ªà©Jh .áfƒ∏ŸG Qƒ°üdG á«Ø°üJ äÓµ°ûe π◊ äÉ«Ø°üŸG øe ´ƒædG Gòg ≥«Ñ£J ádGO ≥«Ñ£J œÉf ìÎ≤ŸG ≈Ø°üŸG êôN ¿ƒµjh .»≤£æŸG πeÉ©dG ÉjGõe ™e õcôŸG ¿hRƒe á«gÉŒ’G áaÉ°ùª∏d äÉ¡éàŸG ≈Ø°üeh á«gÉŒ’G áaÉ°ùª∏d äÉ¡éàŸG ≈Ø°üe ÉjGõe øe áØ∏àıG ºgÉjGõe øe IOÉØà°SÓd ∂dPh õcôŸG ¿hRƒe á«gÉŒ’G áaÉ°ùª∏d äÉ¡éàŸG ≈Ø°üŸ ådÉãdGh »gÉŒ’G áaÉ°ùŸG ¬éàe É«Ø°üe ¿ÉæKG äÉLôfl çÓK ≈∏Y »≤£æŸG ¬éàŸG .π«°UÉØàdGh ±Gƒ◊ÉH ®ÉØàM’Gh ʃ∏dG ¢SÉÑàM’Gh AÉ°Vƒ° dG ∞«ØîJ πãe ≈£°SƒdG ¬éàŸG ≈Ø°üe πãe ±É«W’G O~©àe Qƒ°üdG èdÉ©Ÿ áahô©ŸG á«£ÿG ÒZ äÉ«Ø°üŸG øe O~Y øY IQÉÑY ìÎ≤ŸG ≈Ø°üŸG äÉLôfl áÄ«g ¿G ÜQÉéàdG èFÉàf âæ«H ~bh .áe~îà°ùŸG ÒjÉ©ŸG áaɵd áÑ°ùædÉH á«gÉŒ’G áaÉ°ùª∏d äÉ¡éàŸG ≈Ø°üeh ΩÉ©dG á«gÉŒ’G áaÉ°ùª∏d äÉ¡éàŸG ≈Ø°üeh G::áá««MMÉÉààØØŸŸGG ääGGOOôôØØŸŸ.á«gÉŒC’G áaÉ°ùª∏d äÉ¡éàŸG ≈Ø°üe ,≈£°SƒdG ¬éàŸG ≈Ø°üe ,»≤£æŸG ¬éàŸG ≈Ø°üe ,á«≤£æŸG ∫Gh~dG áfƒ∏ŸG Qƒ°üdG á÷É©Ÿ á«gÉŒC’G áaÉ°ùª∏d øé¡ŸG »≤£æŸG äÉ¡éàŸG ≈Ø°üe desirable properties of the scalar median; the zero impulse response, and the preservation of the signal edges. VMFs are derived as maximum likelihood estimators for an exponential distribution. They perform accurately when the noise follows a long-tailed distribution (e.g. exponen- tial or impulsive); moreover any outliers in the image data are easily detected and eliminated by VMF's. A second class of filters, called vector directional filters (VDF), uses the angle between the image vectors as an ordering crite- rion Trahanias et al. (1996). The VDF's are optimal direc- tional estimators and consequently are very effective in preserving the chromaticity of the image vectors. A draw- back of VDF lies in the fact that they do not consider the magnitude of the image vectors, separating in this way the processing of vector data into directional processing and magnitude processing. However, the resulting filter struc- tures are complex and the corresponding implementations may be slow since they operate in two steps. A third class of filters uses rational functions in its input/output relation, and hence the name ‘’vector rational filter’’ (VRF) (Khriji et al. 1999; Khriji and Gabbouj, 2001). There are several advantages to the use of this function, similar to a polynomial function, a rational function is a universal approximator (it can approximate any continuous function arbitrarily well); however, it can achieve a desired level of accuracy with a lower complexity, and possesses better extrapolation capabilities. Moreover, it has been demon- strated that a linear adaptive algorithm can be devised for determining the parameters of this structure Leung and Haykin, (1994). In this paper, a novel nonlinear vector filter class is pro- posed: the class of vector directional distance-rational hybrid filters (VDDRHFs). The VDDRHF is formed by three sub-filters (two vector directional distance filters and one center weighted vector directional distance filter) and one vector rational operation. VDDRHFs are very useful in color (and generally multichannel) image processing, since they inherit the properties of their ancestors. They constitute very accurate estimators in long- and short- tailed noise distributions and, at the same time, preserve the chromaticity of the color image. Moreover, they act in small window and require a low number of operations, resulting in simple and fast filter structures. This paper is organized as follows. Section 2 briefly reviews rational functions and vector rational function fil- ters. The weighted vector directional distance filters are presented in section 3. In section 4, we define the vector directional distance-rational hybrid filter (VDDRHF) and point out some of its important properties; in addition, the proposed filter structures have been considered. section 5 includes simulation results and discussion of the improve- ment achieved by the new VDDRHF. In order to incorpo- rate perceptual criteria in the comparison, the error is measured in the uniform L*a*b* color space, where equal color differences result in equal distances (Pratt, 1991). Section 6 concludes the paper. 2. Rational and Vector Rational Function Filters A rational function is the ratio of two polynomials. To be used as a filter, it can be expressed as: (1) where x1,x2,...,xm are the scalar inputs to the filter and y is the filter output, ao,bo, aij and bij (i = 1,...,m, j = 1,...,m) are filter parameters. The representation described in Eq. 1 is unique up to common factors in the numerator and denominator poly- nomials. The rational function (RF) must clearly have a finite order to be useful in solving practical problems. Like polynomial functions, a rational function is a universal approximator Leung and Haykin, (1994). Moreover, it is able to achieve substantially higher accuracy with lower complexity and possesses better extrapolation capabilities than polynomial functions. Straight forward application of the rational functions to multichannel image processing would be based on pro- cessing the image channels separately. This however, fails to utilize the inherent correlation that is usually present in multichannel images. Consequently, vector processing of multichannel images is desirable Machuca and Phillips, (1983). The generalization of the scalar rational filter def- inition to vector and scalar signals alike is given by the fol- lowing definition: Definition 2.1 Let X1, X2,...,Xn be the n input vectors to the filter, where Xi = [x1i, x2i,...,xmi ]T and xki € {0,1,...,M}, M is an inte- ger. The VRF output is given by (2) where P is a vector-valued polynomial and Q is a scalar polynomial. Both are functions of the input vectors. The ith component of the VRF output is written as 2 The Journal of Engineering Research Vol. 2, No. 1 (2005) 1-11 ∑ ∑∑ ∑ ∑∑ = == = == +++ +++ = m j m k kjjk m j jj m j m k kjjk m j jj xxbxbb xxaxaa y 1 1 2 1 10 1 1 2 1 10 ... ... [ ] [ ]Tm n n n rfrfrf XXXQ XXXP XXXRFVRF ,,, ),,,( ),,,( ,,, 21 21 21 21 L L L L = = = (3) where (4) and (5) (6) When the vector dimension is 1, the VRF reduces to a spe- cial case of the scalar RF. 3. Weighted Vector Directional Distance Filters (7) (8) The power parameter p is a design parameter ranged from 0 to 1. It controls the importance of the angle criteri- on versus the distance criterion in the overall filter process. At the two extremes, p=0 or p=1, the operator behaves as either magnitude processing or directional pro- cessing, respectively. The case of p=0.5 gives equal importance to both criteria. We have adopted a constant operational value p=0.25 as explained by Karakos and Trahanias (1997). This repre- sents a compromise between the different values implied by the different noise models. Moreover, since the per- formance measures remain practically unchanged for a range of p values, which includes the value p=0.25, this is “safe” value independent of the noise distribution. If all weight coefficients are set to the same value, then all angular distances will have the same importance and the WVDDF operation will be equivalent to the VDDF. If only the center weight is varied, whereas other weights remain unchanged, the WVDDFs perform the Center Weighted Vector Directional Distance Filtering (CWVDDF). 3 The Journal of Engineering Research Vol. 2, No. 1 (2005) 1-11 { }M XXXQ XXXP rf n n i i ,,1,0 ),,,( ),,,( 21 21 L L L ∈ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎣ ⎡ = ( ) L L ++ += ∑ ∑ ∑ = = = n k n k i k i kkk n k i kkn i xxa xaaXXXP 11 12 2121 1 021 ,,, ( ) ∑ ∑ = = −+= n j n k p kjjkn XXbbXXXQ 1 1 021 ,,, L p . is the L p-norm, and the squar e bracket notation used in Eq. (3) above, [ ]α refers to the integer part of α , +ℜ∈α . jkbb ,00 > are constant, and iriia ,,2,1 L used in Eq. (4) is a function of the input ( )nirii XXXfa ,,, 21,,2,1 LL = Let ml ZZX →: represent a multichannel image, where l is an image dimension and m characterizes a number of channels. In the case of standard color images, parameters l and m are equal to 2 and 3 respectively. Let where, ( )ji XX ,θ represents the angle between two m- dimensional vectors imiii xxxX ,,, 21 L= and jmjjj xxxX ,,, 21 L= and ( ) πθ ≤≤ ji XX ,0 . ( ) ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ = − ji T ji ji XX XX XX . . cos, 1θ If ordered distances give the ordering scheme )()2()1( Nddd ≤≤≤ L and the same ordering is implied to the input vector -valued samples )(),(),( 2211 NN dXdXdX L , it results in the ordered input set )()2()1( NXXX ≤≤≤ L . The output of the WVDDF is the sample { }NXXXX ≤≤≤∈ L21)1( associated with the minimum weighted angular - magnitude distance { }Ndddd ≤≤≤∈ L21)1( . Thus, the WVDDFs are outputting the sample from the input set, so that the local distortion is mini mized and no color artifacts are produced (Lukac, 2002). ( ) [ ] Nip XXwXXwd pN j jij p N j jiji ,,2,1 ,1,0 ., 1 11 L=∈ ⎥⎦ ⎤ ⎢⎣ ⎡ −⎥⎦ ⎤ ⎢⎣ ⎡= − ∑ = ∑ = θ { }NiZXW li ,,2,1; L=∈= represent a filter window of a finite length N, where NXXX ,,, 21 L is a set of noisy samples. Note, that the position of the filter window is determined by the central sample 2/)1( +NX . Let us assume that Nwww ,,, 21 L represent a set of positive real weights, where each weight jw , for Nj ,,2,1 L= is associated with the input sample jX . Introducing the aggregated weighted angu lar-magnitude distance associated with input sample iX gives 4. Vector Directional Distance-Rational Hybrid Filters (VDDRHF) 4.1. Design Procedure The VMF effectively removes impulsive noise and the vector directional filter operates on the directional domain of color images. The filtering schemes based on direction- al processing of color images may achieve better perform- ance than VMF based approaches in terms of color chro- maticity (direction of color data) preservation. In fact, the combination of the direction and the magnitude process (Vector Directional Distance Filter) is suitable for the human visual system and can give a better-balanced result between noise reduction and chromaticity retention. Moreover, as pointed out in (Khriji, et al. 1999; Khriji and Gabbouj, 2001), a vector rational filter performs well for relatively high SNR Gaussian contaminated environ- ments. When both impulsive and Gaussian noises are present, neither the vector rational filter nor VDDF perform well. Thus, it is necessary to use a hybrid structure filter. This structure is made of two filtering stages, as shown in Fig.1. They combine in the first stage the Lp-norm criteria and angular distance criteria to produce three output vectors in which two vector directional distance filter outputs and one center weighted vector directional distance filter out- put to eliminate impulsive noise, preserve edges and color chromaticity. In the second stage a vector rational opera- tion acts on the above three output vectors to produce the final output vector. The aim of the final stage, in addition to its detail preserving capability, is to remove Gaussian noise and small magnitude impulsive noise. The VDDRHF is defined as follows: (9) (10) where, the coefficients c1, c2 and c3 are some constants. (11) Therefore, the VDDRHF operates as a linear low-pass filter between three nonlinear sub-operators, the coeffi- cients of which are modulated by the edge-sensitive com- ponent. The proposed structures of the VDDRHF are shown in Figure 1. 4.2. Edge Sensor The proposed edge sensor is written as, (12) Depending on the value of the parameter p, the edge sen- sor behaves as follows: 1. p=0, the edge sensor is based on the magnitude differ- ence between the vectors in the L2-norm sense, (13) 2. p=1, the angles between the directions of the color vec- tors is now used as an edge sensitivity measure. The goal is to sustain the sharpness of the filtered image by 4 The Journal of Engineering Research Vol. 2, No. 1 (2005) 1-11 Definition 4.1 The output vector )( iXy of the VDDRHF, is the result of a vector rational function taking into account three input sub -functions which form an input functions set { }321 ,, ΦΦΦ where the “central one ” ( 2Φ ) is fixed as a center weighted vector directional distance sub -filter, [ ])(),(. )( )()( 31 3 1 2 ii j ijj ii XXDkh X XXy ΦΦ+ Φ +Φ= ∑ = β where, D[.] is a scalar output function, which plays an important role in rational function as an edge sensing term, [ ]321 ,, ββββ = characterizes the constant vector coefficient of the input sub -functions. In this approach, we have chosen a very s imple prototype fil ter coefficients which satisfy the unbiased condition: 0 3 1 =∑ =i iβ . In our study, [ ]T1,2,1 −=β and h and k are some positive constants. The parameter k is used to control the amount of the nonlinear effect. The sub-filters 1Φ and 3Φ are chosen so that an acceptable compromise between noise reduction, edge and chromaticity preservation is achieved. It is easy to observe that this VDDRHF differs from a linear low - pass filter mainly for the scaling, which is introduced on the 1Φ and 3Φ terms. Indeed, such terms are divided by a factor proportional to the output of an edge-sensing term characterized by the function [ ]31 , ΦΦD . The weight of the vector directional distance -operation output term is accordingly modified, in order to keep the gain constant. The behavior of the proposed VDDRHF structure for different positive values of parameter k is the following: 1. 0≈k , the form of the filter is given as a linear low - pass combination of the three nonlinear sub - functions: )(.)(.)(.)( 332211 iiii XcXcXcXy Φ+Φ+Φ= 2. ∞→k , the output of the filter is identical to the central sub -filter output and the vector rational function has no effect: )()( 2 ii XXy Φ= 3. For intermediate values of k the [ ]31 , ΦΦD term perceives the presence of a detail and accordingly reduces the smoothing effect of the operator. [ ] ( ) ( )[ ]21313131 .,, ppD −Φ−ΦΦΦ=ΦΦ θ [ ] 23131 , Φ−Φ=ΦΦD where, 2 . denotes the L 2-norm. preserving the transitions detected in the color space, where transactions are represented by the angles between the color vectors. At a fixed luminance, small angles between color-vectors denote “color” homogeneous regions; whereas, large angles indicate edges as given below: (14) For intermediate value of p (0