【正文】
S={ P1,P2,P3,P7,P8,P9} (2) The principle invoved in the replacement strategy of Equation (1) is that if P5 is corrupted by noise ,it is better to replace its gray level by P2 or P8 than by using Min[S] or Max[S] .also,due to missing lines error,since P4 and P6 may be lost, they are not considered in Equation(2). The limitation of Equation(1) is that when Min[S] or Max[S] are also corrupted by impulse noise, Min[S] or Max[S] is equal to P5,Equation(1)fails to perform the desired filtering overe this limitation following modifications in the replacement strategy of Equation(1),are proposed. Output (X,Y)= Max(P2,P8)if P5≥ Max[S] P5 if Min [s]< P5< Max[S] Min(P2,P8) if P5≤ Max[S] (3) It has been observed that more than 7080% points in an image,the gray level diatances of P5 from(P2 or P8) and from Max[S] are below is shown in for the image‘ LENA ’ .This fact is used to further reduce unnessary replacements,thereby reducing the bluring of the taking into considertion of Figure(3) can be further modified as Output (X,Y)= Max(P2,P8)if P5Max[S]≥ 16 Max(P2,P8) if Min [s]P5≥ 16 P5 otherwise ( 4) Equation 4 indicates that replacing action takes place only when the distance between P5 and Min[S] or Max[S] is no smaller than 16. This strtegy thus avoids the necessary replacements and reduces blurring o