TEAM2014-Template - Hrvatska znanstvena bibliografija Web view · 2015-10-26Standard...

5
7 th International Scientific and Expert Conference TEAM 2015 Technique, Education, Agriculture & Management ADAPTIVE CENTER WEIGHTED MEDIAN FILTER Vedran Novoselac * and Zlatko Pavić Mechanical Engineering Faculty in Slavonski Brod, J. J. Strossmayer University of Osijek, Croatia * Corresponding author e-mail: [email protected] Abstract In this paper, the weighted median is presented and its propertie distance to center data. This relation is implemented in the image denoising filter. In the paper impulse image noise model is considered. The quality of reconstructed images provided with proposed filter are measured with PSNR metric. Keywords: Weighted median, image processing, impulse noise, PSNR 1. Introduction The weighted medina [1] is a natural extension of the medina. While the median of data vector y= [ y 1 ,…,y n ] T , y i ∈R, minimizes the L 1 -distance (or least absolute deviation, LAD), the weighted median of y= [ y 1 ,…,y n ] T with positive corresponding weight vector w= [ w 1 ,…,w n ] T , minimizes the weighted L 1 -distance med ( w,y ) =argmin x i=1 n w i | y i x | . (1 ) If w 1 == w n =1, the global minimum is denoted by med ( y) and called the median of data vector. In case that the number of observation n is an odd number ( n=2 k1), the distance between center weight median and center observation y k can be observed. It is shown that distance between center weight median and y k decrease as the x increase. The weighted median problem is used in many methods for outlier detection [4] and can be found in various branches of applied research (robotics, signal and image processing [2,3], etc.). In image processing the reconstruction of noise image is a problem which can be solved with different methods. For that purpose the class of stack filter is developed. Standard median filter removes impulse noise and preserve image edges [2]. However, median filter has detail preserving difficulties. Weighted median is useful because of their flexibility. In weighted median filter weights are used to preserve image details and suppress noise as well [3]. For that purpose the new filter represented by thresholds are developed based on relation between center weight median and distance to center observation. In that case an adaptive center weighted median filter (ACWMF) is constructed and tested on various experimental images. Proposed algorithm has been developed under the PSNR criteria. 2. Weighted median and its application In this section is given a solution of the weighted median problem [1]. The following theorem proofs minimization problem of the weighted L 1 -distances. Vedran Novoselac and Zlatko Pavić 1

Transcript of TEAM2014-Template - Hrvatska znanstvena bibliografija Web view · 2015-10-26Standard...

Page 1: TEAM2014-Template - Hrvatska znanstvena bibliografija Web view · 2015-10-26Standard median filter removes impulse noise and preserve image edges [2]. However, median filter has detail

7th International Scientific and Expert Conference TEAM 2015Technique, Education, Agriculture & ManagementBelgrade, October 15-16, 2015

ADAPTIVE CENTER WEIGHTED MEDIAN FILTERVedran Novoselac* and Zlatko Pavić

Mechanical Engineering Faculty in Slavonski Brod, J. J. Strossmayer University of Osijek, Croatia* Corresponding author e-mail: [email protected]

AbstractIn this paper, the weighted median is presented and its propertie distance to center data. This relation is implemented in the image denoising filter. In the paper impulse image noise model is considered. The quality of reconstructed images provided with proposed filter are measured with PSNR metric.

Keywords:Weighted median, image processing, impulse noise, PSNR

1. IntroductionThe weighted medina [1] is a natural extension of the medina. While the median of data vector y= [ y1 ,…, yn ]T, y i∈R, minimizes the L1-distance (or least absolute deviation, LAD), the weighted median of y= [ y1 ,…, yn ]T with positive

corresponding weight vector w=[ w1 ,…,w n ]T,

minimizes the weighted L1-distance

med ( w , y )=argminx

∑i=1

n

wi|y i−x|. (1)

If w1=⋯=wn=1, the global minimum is denoted by med ( y ) and called the median of data vector. In case that the number of observation n is an odd number (n=2k−1), the distance between center weight median and center observation yk can be observed. It is shown that distance between center weight median and yk decrease as the x increase.The weighted median problem is used in many methods for outlier detection [4] and can be found in various branches of applied research (robotics, signal and image processing [2,3], etc.). In image processing the reconstruction of noise image is a problem which can be solved with different methods. For that purpose the class of stack filter is developed. Standard median filter removes impulse noise and preserve image edges [2]. However, median filter has detail preserving difficulties. Weighted median is useful because of their flexibility. In weighted median filter weights are used to preserve image details and suppress

noise as well [3]. For that purpose the new filter represented by thresholds are developed based on relation between center weight median and distance to center observation. In that case an adaptive center weighted median filter (ACWMF) is constructed and tested on various experimental images. Proposed algorithm has been developed under the PSNR criteria.

2. Weighted median and its applicationIn this section is given a solution of the weighted median problem [1]. The following theorem proofs minimization problem of the weighted L1-distances.

Theorem 1 Let y(1)≤⋯≤ y(n ) denote the ordered observation and w(1) ,…,w(n) the corresponding positive weights. Then the weighted median of y= [ y1 ,…, yn ]T is med ( w , y )= y(l+1), where

l=max{h :∑i=1n

w(i )<12∑i=1

n

wi}. (2)

Proof. Let F :R →R be a function defined as

F (x)=∑i=1

n

wi|y i−x|. (3)

Notice that on each interval

(−∞, y(1)) , [ y(1), y(2 )) ,… , [ y(n−1), y(n )) , ( y(1) ,∞ ) ,(4)

F is a linear function and slopes of those linear function are consecutively k h, h=0 ,…,n, where

k 0=−∑i=1

n

wi , kn=∑i=1

n

wi , (5)

and for h=1 ,…,n−1

k 0=2∑i=1

h

w(i)−∑i=1

n

wi=¿ kh−1+2w(h ).¿ (6)

Vedran Novoselac and Zlatko Pavić 1

Page 2: TEAM2014-Template - Hrvatska znanstvena bibliografija Web view · 2015-10-26Standard median filter removes impulse noise and preserve image edges [2]. However, median filter has detail

7th International Scientific and Expert Conference TEAM 2015Technique, Education, Agriculture & ManagementBelgrade, October 15-16, 2015

Since k h+1−kh=2w(h+1)>0, the sequence (k¿¿h)¿ is increasing and

k 0<k1<⋯<0≤k l+1<⋯<kn . (7)

It fallows from (7) that F is decreasing on

(−∞, y(l+1)) and increasing on ( y(l+1) ,∞ ), therefore the minimum of F is attained for med ( w , y )= y(l+1).∎

The next theorem shows relation between the center weight vector w ( x )=[1 ,…, x ,…,1]T and

¿ yk−med (w (x) , y )∨¿.

Theorem 2 Let y= [ y1 ,…, yn ]T, n=2k−1, be data vector with weight vector w ( x )=[1 ,…, x ,…,1]T . Then

F ( x )=|yk−med ( w ( x ) , y )|, (8)

is monotonically decreasing on DF= [1 ,∞ ) .

Proof. Let 1≤x1≤ x2. If yk= y(k) the function F is constant an the proof in this case is trivial.Suppose that k ' correspond to position of yk in ordered observation and k ' ≤ k. In this case from Theorem 1 it is easy to see that med ( w , y )= y(l+1) where l+1∈[k ' , k ]. So it is sufficiently to indicate that l1≥ l2 where

med (w (x1 ) , y )= y(l1+1) , (9) and

med (w (x2 ) , y )= y(l2+1) . (10)

Situation when center weights are x1, x2≥12

(or

x2≥12

) indicate that l1+1=l2+1=k ' , and

statement of theorem is proven. neighborhoods

Observed nontrivial case is when x1 , x2≤n2

, i.e.

l1+1 ,l2+1>k '. In that situation, according to Theorem 1, it can be conclude that

l1=max {h :h<n−x1−12 }, (11)

and

l2=max {h :h<n− x2−12 }, (12)

what directly implies statement of theorem because x1≤ x2.

Situation when k '>k is considered also when

x1, x2≤n2

, otherwise the proof is trivial.

Considered that case, it can be conclude that l1+1 ,l2+1<k ', and it is sufficiently to indicate that l1≤ l2. According to Theorem 1 it can be conclude that

l1=max {h :h<n+x1−12 }, (13)

and

l2=max {h :h<n+x2−12 }. (14)

From (13) and (14) the theorem is proven, i.e. l1≤ l2, because x1≤ x2.∎

3. Adaptive center weighted median filter

The digital image can be represented N ×M matrix of the form:

X=[ x ij](i , j)∈Ω=[ x0,0 ⋯ x0 , M−1

⋮ ⋱ ⋮xN −1,0 ⋯ xN −1 ,M −1

] . (15)

In such a system, the indices (i , j)∈Ω of the image matrix correspond to (i , j)-th image intensity x ij. The term grey level is often to refer to the intensity of monochrome image. In that situation the matrix elements (image pixels) are integers in the range [0 ,…,255 ].Digital images are often corrupted by impulse noise during the transmission through communication channels. It appears as black or withe impulses on the image. It can be modeled as follows:

yij=¿{ξ ij , with probability ρ ,

x ij , with probability 1−ρ ,¿ (16)

where X=[ x ij](i , j)∈Ω denote original image, Y=[ y ij](i , j)∈Ω noisy image, and ρ noise ratio. For a impulse noise ξ ij is probability distribution with corresponding probability density function

P (ξ ij)={P p, for ξij=p ,P s , for ξ ij=s ,0 , otherwise ,

(17)

where Pp+Ps=1 and Pp ,P s≥0. Most usually observed situation is when p=0, s=255, and Pp=P s=0,5.In image processing, filters are constructed to process every image element y ij, (i , j)∈Ω. In

Title of the Paper 2

Page 3: TEAM2014-Template - Hrvatska znanstvena bibliografija Web view · 2015-10-26Standard median filter removes impulse noise and preserve image edges [2]. However, median filter has detail

7th International Scientific and Expert Conference TEAM 2015Technique, Education, Agriculture & ManagementBelgrade, October 15-16, 2015

that way reconstructed image X ¿=[x¿ij ](i , j )∈Ω is

constructed. Filter process different neighborhoods of y ij where 3×3 filtering window are most commonly used for impulse noise. In that case filtering window is defined as

Y ij={ y hl :|h−i|≤ ω∧|l− j|≤ω} , (18)

where ω denotes size window which is in our case is ω=3. Filtering window Y ij can be presented as

a vector yk= [ y1,…, yn ]T, m=ω2, where

k=i ∙ N+ j correspond to (i , j)-th position.In this paper adaptive center weighted median filter (ACWMF) is proposed. Ideally the filtering should be applied only to the noisy pixels, and noise-free pixels should be kept unchanged. So, in filter is implemented a noise detector. We proposed an scheme by successfully combining center weighted median filters [3] and compares them with the observed pixel value. The output of proposed ACWMF is obtained by

x¿ij={ y ij , ε≥ d1 ,

med (w ( x1 ) , yk ) , ε<d2 ,

med (w ( x2 ) , yk ) , d2≤ ε<d1 .(19)

In proposed method d1 and d2 are defined as

d1=|y ij−med (w ( x1 ) , yk )|, and

d2=|y ij−med (w ( x2) , yk )| respectively, where

1≤ x1≤ x2. The definition of (19) follows the property that d1≥d2, showed by Theorem 2. Note that threshold ε affects the performance of impulse detection. As a results, impulse noise can be removed while uncorrupted pixels remain unchanged in order to preserve the image details. Consequently, the trade off between suppressing noise and preserving detail is well balanced. In the following section we study influence of center weights x1, x2, and threshold ε on the filtering performance using variety of the test images.

4. Experimental resultsThe quality measure of proposed ACWMF has been experimented with center weights x1=1 and x2=2. The measures are provided via PSNR (Peak Signal-to-Noise Ratio) metric defined as

PSNR=20 log10255

√MSE, (20)

where MSE (Mean Squared Error) is defined as

MSE=∑i=0

M−1

∑j=0

N−1

(x ij−x¿ij )2

M × N.

(21)

PSNR quality measure is appropriate for insight of impulse reducing because of its robust properties to outliers [4]. The PSNR via threshold ε is graphically presented in figure 1 for 256×256 test images Lena and Mandrill corrupted with impulse noise ρ=0,2.

Figure 1. Results of PSNR via threshold ε

It can be seen that the PSNR performance is significantly improved by using threshold ε in the range [30,60]. In figure 2 are presented PSNR filtering results of median filter (MF) [2], and ACWMF (ε=40) for Lena and Mandrill test images for a noise ratio ρ∈[0,05 ,0,5].

(a) (b)

Figure 2. Filtering results: (a) Lena, (b) Mandrill

Referring to figure 3, one can see that the noise suppression and detail preservation are satisfactorily compromised by using our proposed method (d) as compared to using standard median filter (c).

Vedran Novoselac and Zlatko Pavić 3

Page 4: TEAM2014-Template - Hrvatska znanstvena bibliografija Web view · 2015-10-26Standard median filter removes impulse noise and preserve image edges [2]. However, median filter has detail

7th International Scientific and Expert Conference TEAM 2015Technique, Education, Agriculture & ManagementBelgrade, October 15-16, 2015

(a) (b)

(c) (d).

Figure 3. Results of filtering for: (a) original, (b) noisy image ¿), (c) MF, (d) ACWMF

5. ConclusionIn this work a new median filter ACWMF is introduced. By incorporating the weighted median

into an impulse noise detection framework is formed for effectively reducing impulse noise while preserving image details. Given a specified threshold ε the output of our proposed ACWMF may correspond to one of three possible states, namely the origin pixel value (i.e., the pixel is noise-free), or one of the center weighted output. The proposed methodology remains applicable to adjust center weights x1, x2, and threshold ε according to different noise ratio ρ. In addition, the proposed filter present a quite stable performance over a wide variety of image.

6. References[1] C. Gurwitz, “Weighted median algorithms for

L1 approximation”, BIT Numerical Mathematics 12(2002), 524-560.

[2] V. Novoselac, S. Rimac-Drlje, “Svojstva I primjena aritmetičke sredine”, Osječki matematički list, 14(2014), 1;51-67.

[3] V. Novoselac, B. Zovko-Cihlar, “Image Noise Removal by Vector Median Filter”, Proceedings ELMAR-2012, Croatian Society Electronics in Marine-ELMAR, 2012, 57-62.

[4] P. J. Rousseeuw, A. M. Leroy, “Robust Regression and Outlier Detection”, Whiley, New York, 2003.

Title of the Paper 4