www.ijaera.org 2016, IJA-ERA - All Rights Reserved 174
Study and Analysis of Smoothing Filter for
Third Order Edge Detection Operator
Dr. G.J. Joyce Mary1, Rijuvana Begum2*
1Research Supervisor, PRIST University, Thanjavur, S. India 2Research Scholar, PRIST University, Thanjavur, S. India
Abstract: Images corrupted by the noise during either transmission or acquisition process. Filtering and or smoothing an important task to reduce the effect of noise that contaminates images. Hence the processed image is useful for further applications. This paper analyses the suitable smoothing filter for the edge mask derived using Third Order Difference Equation (TODE). Also it provides a comparative study of both simple and edge preserving smoothing filters such as Averaging filter, Gaussian filter, Weiner filter, Median filter, Bilateral filter and guided filter over different image datasets. Since Additive White Gaussian Noise (AWGN) is the most common type of Gaussian noise useful for testing, the images are degraded prior to the application of the TODE edge mask. Performance metric such as Mean Square Error (MSE), Peak Signal to Noise Ratio (PSNR) and Entropy are computed to prove the efficiency of the proposed method. The results prove that the Guided filter based TODE edge detection process offer better result than the other smoothing filters. Keywords: Edge detection, Third Order Difference Equation (TODE), Edge Mask, Smoothing,
Bilateral filter, Guided Filter
I. INTRODUCTION
Many machine vision operations require smoothing as a pre processing step to reduce image noise. To blur the image and reduce the noise smoothing filters are used. Small detail in an image is removed by blurring and the gaps are bridged with lines and curves. Thus the noise removal can be achieved by blurring and linear, non linear filtering [1]. To calculate the smoothed value at a pixel, a square grid of neighborhood centered at the pixel is averaged [2]. Filters provide an aid to visual analysis of images for further digital image processing applications such as segmentation, compression, registration etc. Noise removal can be achieved by using a number of existing linear filtering techniques which are mathematically simple. Filters are linear if the output values are linear combinations of the pixels in the original image, otherwise they are nonlinear. Linear Filters are well defined and computationally fast, but are not capable to smooth without simultaneously blurring edges. Nonlinear filters can smooth without blurring edges and can detect edges at all directions concurrently, but have not as much of secure theoretical foundations and is slow to compute [3][4].
II. RELATEDWORK
www.ijaera.org 2016, IJA-ERA - All Rights Reserved 175 Gaussian, Speckle, Salt and Pepper and Poisson noise added to the original lena image .Wiener,
Mean and Median filters were used for noise removal. Simulation performance shows that Weiner filter works well for Poisson and speckle noise than mean and median filters [6].
Non Local Mean (NLM) algorithm based on the concept of self similarity is used to denoise the images corrupted by the noise. Results proves that NLM algorithm perform better than Gaussian and Weiner filter [7].
Speckle noise reduction for ultra sound medical images is performed by all standard speckle filters which causes over smoothing artifacts. This effect is overcome by contourlet transform which is directly defined on discrete rectangular grid is best suited for speckle reduction in ultra sound images [8].
Colour image enhancement and smoothing is done by using non linear filters such as Edge Preserving Smoothing (EPS), Symmetric Nearest Neighbour (SNN) and Vector Median Filter (VMF). Parameters like SNR and Colour difference metric used for analysis. Resultant performance proves that VMF outperforms than EPS and SNN [9].
Electrocardiographic images corrupted by speckle noise are removed using common spatial filters like Mean, Median, Gaussian and Laplacian. Three statistical measures like RMSE, SNR and PSNR were evaluated. The experimental results prove that the Laplacian is best suited for noise reduction and detail enhancement for further processing applications [10].
Generalized Value and Criterion Filter Structure (VCFS) with different weighting function used for preserving both corners and edges while smoothing. This operation has been performed over wide variety of both Gray scale and colour images to achieve painting like artistic effects [11]. Bilateral Filter is a non linear filtering technique to smooth images while preserving edges. It is
based on the principle that each pixel is replaced by its weighted average of its neighbours and it depends on two parameters that indicate the size and contrast of the feature to preserve. Performance of the result is compared with the iterative approaches such as Anisotropic Diffusion (AD), Weighted Least Squares (WLS) and Robust Estimation (RE) conclude that the bilateral filter is a best non iterative edge preserving non linear filter [12].
Guided Image filter used for preserving edges which is an explicit filter derived based on local linear model in which the output filtered image is based on the guidance image which may be either input image itself or any other image. It is the recent fastest edge preserving filter which removes the gradient reversal artifacts occurred in bilateral filter [13].
Local Linear Stein’s Unbiased Risk Estimate (LLSURE) to preserve high quality edges and fine details in an image. It is a simple, Less computationally complex and the design parameters are automatically tuned for the requisite. The experimental results show that this approach is robust and flexible for wide variety of images [14].
A new edge preserving smoothing technique that combines L0 gradient minimization technique
with average filtering, Alpha blending, Un sharp masking and contrast adjustment used in color images. Metrics PSNR, Structural Similarity Index and Gradient are computed for different color images. Performance result shows that the proposed method outperforms than the existing L0
www.ijaera.org 2016, IJA-ERA - All Rights Reserved 176
III. NOISETYPES
Noise in image is a consequence from the random fluctuations in intensity or color information. Noise produces the undesirable information which affects the quality of the image. Digital image noise may occur due to various sources. During acquisition process, during digital image conversion, and image transmission. In practice image noise is regarded as an undesirable derivative of image capture. Following are the some common types of noises [16].
• Gaussian noise or Amplifier noise • Salt-and-pepper noise
• Poisson noise or Shot noise • Speckle noise
A. Gaussian Noise
The main source for this noise is that it occurs during image acquisition process that is in image sensor due to poor illumination (sensor noise) and during image transmission. It is a standard and commonly used noise type for analysis. It is otherwise called as normal noise and is evenly distributed over the image means that each pixel in the noisy image is the sum of true pixel value and random Gaussian noise. One common form of Gaussian noise is Additive White Gaussian Noise (AWGN) [16] [17].
B. Salt and Pepper Noise
It is an impulse type noise generally caused by malfunctioning of pixel elements in the camera sensors, defective memory locations, or timing errors in the digitization process. The noisy image has black pixels on bright regions and white pixels on dark regions thus giving the appearance like salt and pepper [17] [18].
C. Shot Noise
Shot noise caused by statistical quantum variations, that is, disparity in the number of photons sensed at a given exposure level. This noise is known as photon shot noise. Shot noise has a root-mean-square value proportional to the root-mean-square root of the pixel intensity, and the noises at different pixels are independent [16].
D. Speckle Noise
www.ijaera.org 2016, IJA-ERA - All Rights Reserved 177
IV. CLASSICALDENOISINGTECHNIQUES
Image denoising is the key concepts in imaging and computing field. Image denoising manipulates the noisy image to fabricate a visually appealing high quality image. It is widely used in various image-related applications such as three dimensional object detection, MRI analysis, CT images etc. The mages degraded by some degree of noise due to image sensing phenomenon and transmission process. The aim of image denoising is to recover the actual image by removing undesirable noise. With the constraint that low computational complexity and edge preserving ability [7]. Many denoising techniques in existence. Some of the common denoising techniques are Mean filtering, Weiner filtering, Gaussian filtering, Median filtering and latest techniques like bilateral filtering, guided image filtering. This section discusses the behavior of above mentioned techniques in detail.
E. Mean Filters
Mean filters are the simplest form of smoothing filters. It is also called as averaging filter. Mean filter reducing the amount of intensity variation between one pixel and the next. Basic idea is that it uses a mask which operates over each pixel in an image to calculate its average value surrounded by the mask. This average value is replaces the actual pixel.
Mean Filter of (Z1, Z2, Z3…….ZN)
Where (Z1, Z2 ….. ZN) is range of image pixel. Mean filter is useful for eliminating grain noise from
the photography image. But it fails to preserve edges in the image. There are two main problems with the mean filters, which are [19] [20]
i. Single pixel with misleading affects the average value of all the neighborhood pixels. If the neighbourhood of the filter overlaps an edge, the filter will blur it.
F. Weiner Filters
Weiner filter is a linear filter works based on statistical approach. A Wiener filter is a least mean square error filter. This filter requires knowledge about image and noise spectra for its operation. It recovers the original image in the presence of both noise and blur. It computes image variance to perform smoothing. Higher the variance lesser will be the smoothing and vice versa. Hence for better smoothing the variance should be small. It performs better than mean filter interms of preserving edges and other high frequency detail information. Main drawback of this method is that it takes longer computational time than mean filter [8] [20].
In general Wiener filters follows some properties like noise and original image is assumed to be stationary linear random processes with known power spectral density, the filter must be causal and the filter operates with the constraint that minimum mean-square error [22].
Operation of Wiener filter is defined as,
Z (u, v) = H*(u, v) / {|H (u, v) |2 + PN (u, v)/ PI (u, v)}
Where,
www.ijaera.org 2016, IJA-ERA - All Rights Reserved 178 H*(u, v) = Complex conjugate of H(u, v)
PN (u, v) = Noise Power Spectral Density
PI (u, v) = Image Power Spectral Density
G. Median Filters
It is a typical non linear filter that replaces every pixel in an image by the median of the gray values of pixels in a specific neighbourhood surrounded by the mask. If the mask contains odd number of entries then the median is the middle value of gray level otherwise for even number of entries average between two central gray values considered as the median .The median filter is also called the order statistics filter because it is based on arranging the pixels in ascending order to calculate its median. It is a popular filter used to reduce salt and pepper noise and speckle noise without blurring edges of the image [21]. One of the major problems with the median filter is that it is relatively expensive and complex computation. Also median filter removes both noise and fine details in the image since it cannot distinguish both [8].
H. Gaussian Filters
Gaussian filter is a separable and circularly symmetric filter. Filtering based on peak detection. The peaks are the impulses in the image. This filter adjusts and corrects both spectral coefficient and amplitude spectrum surrounded by the filter window. Important properties of Gaussian filter include [6] [16],
1. They are linear Low Pass Filters (LPF) reduces edge blurring. 2. Higher computationally efficiency.
3 The degree of smoothing is controlled by σ (σ defines the size of the neighbourhood and larger σ for more intensive smoothing).
I. Bilateral Filters
www.ijaera.org 2016, IJA-ERA - All Rights Reserved 179
J. Guided Filters
It is a linear rotation variant explicit filter in which the filtered output is obtained by considering the guidance image which may be either input image itself or any other image. The filtered output is independent of kernel size and intensity range. It is the most reliable filter for noisy images. It also preserves edges while smoothing .Its other applications includes image matting, detail enhancement, image denoising and HDR compression.
Fig.1. Guided Image Filter
The operation of guided image filtering is shown in fig.1.Window radius ‘r’ and regularization parameter ξ are the two important design functions to implement filtering operation. Guided filter overcomes the gradient reversal problem of bilateral filter [23].
V. THIRDORDEREDGEDETECTIONOPERATOR
To improve the performance of the first and second order edge detector, a new maskr of size 4x4 is derived using Third Order Difference Equation (TODE).This mask provides higher PSNR, lower MSE and lesser Entropy values for different images and file formats. The mask is shown in figure 6.
Figure 2.Third order convolution mask
Advantage
Offers high Peak Signal to Noise Ratio (PSNR), low Mean Square Error (MSE) and Entroy.
Disadvantage
Superior noise sensitivity .Since the edge pixel is differentiated thrice [25, 26]. 0 0 -1 0
0 0 3 0
-1 3 -6 1
www.ijaera.org 2016, IJA-ERA - All Rights Reserved 180
VI. PROPOSEDWORK
The edge mask simply enhances and sharpens the edge pixels. Since both noise and edges are high frequency components the masks enhances both of it [25]. Hence appropriate smoothing technique is used to remove noise before applying the edge mask. Various edge preserving smoothing techniques are available in domain, out of which the state of the art techniques are non linear bilateral filter and linear guided filter. In this section different images and file formats are randomly taken from the datasets. The original sample image is degraded with random noise.
Then the noisy image is smoothened using averaging filter, Gaussian filter, and Median filter, bilateral and guided filter. Finally edge map is derived using third order edge mask TODE. Parameters such as Peak Signal to Noise Ratio (PSNR) and Mean Square Error (MSE) were analyzed. Figure 2 shows the operation of the newly proposed work. Experimental results show that the guided filter based third order edge mask perform better than the other filters.
Figure 2. Block Diagram of Proposed Work
VII. EXPERIMENTALRESULTS
To validate and analyze the performance of the proposed method given in Figure 2 it is implemented using MATLAB software. Test is performed over twenty random sample images from the standard and well known image datasets such as BSDS, SIPI and Real Life images. Both simple and edge preserving smoothing filters were applied to all the images. Results presented in the tables Table 1, Table 2 and Table 3. These tables illustrate the performance of the filter in two categories namely simple smoothing filters and edge preserving smoothing filters. Averaging, Gaussian and Median filters are considered under the category of simple smoothing filters, where as Bilateral filter and Guided filter are on edge preserving smoothing filters. Average PSNR and average MSE are given in Table 1 and Table 2 respectively.
Table 1. Average Peak Signal to Noise Ratio
Image Dataset
Simple Smoothing Filters
Edge Preserving Smoothing Filters
Averaging filter
Gaussian Filter
Median Filter
Bilateral Filter
Guided Filter
BSDS Test 55.26 54.71 54.89 54.44 54.72
BSDS Training 54.48 53.95 54.14 53.60 53.90
SIPI 53.70 53.50 53.36 53.34 53.49
www.ijaera.org 2016, IJA-ERA - All Rights Reserved 181 Table 2. Average MeanSquare Error
Image Dataset
Simple Smoothing Filters
Edge Preserving Smoothing Filters
Averaging filter
Gaussian Filter
Median Filter
Bilateral
Filter Guided Filter
BSDS Test 2.04E-01 2.31E-01 2.23E-01 2.48E-01 2.32E-01
BSDS Training 2.41E-01 2.70E-01 2.59E-01 2.93E-01 2.74E-01
SIPI 3.18E-01 3.40E-01 3.35E-01 3.48E-01 3.38E-01
Real Life Images 2.00E-01 2.06E-01 2.23E-01 2.03E-01 4.71E-01
With reference to the Table 1, among all the simple smoothing filters the Averaging filter perform well since its average PSNR value for BSDS Test dataset is 55.26 dBs. It is higher than the Gaussian filter output of 54.71 dBs and Median filter output of 54.89 dBs. On the other hand with reference to Table 2 the average MSE for BSDS dataset is 2.04E-01 which is smaller than Gaussian filter output 2.31E-01 and Median filter value 2.23E-01. This situation is reflected for other data set samples like BSDS training, SIPI and Real life images. Similarly for the edge preserving smoothing filter, linear Guided filter offer better performance than non linear bilateral filter except for the real life images. For an example BSDS Training image samples average PSNR and MSE value of Guided filter is 53.9 dBs and 2.74E-01 respectively , where as for the Bilateral filter it is 53.6 dBs and 2.93 E-01. As MSE and PSNR are inverse of each other larger PSNR offers lesser MSE and vice versa. Graphical represesntation of average PSNR and MSE shown in figures 3 and 4.
50 51 52 53 54 55 56
BSDS Test BSDS Training SIPI Real Life Images
Av
er
a
g
e
P
SNR
(d
B
)
Image Datesets
Smoothing Filters Vs Average PSNR
Averaging filter Gaussian Filter Median Filter Bilateral Filter Guided Filter
www.ijaera.org 2016, IJA-ERA - All Rights Reserved 182 0.00E+00
1.00E-01 2.00E-01 3.00E-01 4.00E-01 5.00E-01
BSDS Test BSDS Tra ining
SIPI Real Life Images
A
v
e
r
a
g
e
M
S
E
Image Datasets
Smoothing Filters Vs Average MSE
Avera ging filter Ga ussia n Filter Media n Filter Bila tera l Filter Guided Filter
Figure 4. Average MSE
Entropy is the metric used for measuring information. It defines the minimum amount of information required to describe an image without loss of information. Table 3 shows the average entropy of the test images.
Table 3. Average Entropy
Image Dataset Average
Entropy of the Image Dataset
Simple Smoothing Filters Edge Preserving
Smoothing Filters
Averaging filter
Gaussian Filter
Median Filter
Bilateral Filter
Guided Filter
BSDS Test 7.144 3.56 4.337 4.021 4.153 3.865
BSDS Training 7.290 3.618 4.381 4.057 4.195 3.872
SIPI 6.082 3.285 4.155 3.713 3.592 3.001
Real Life Images 6.816 2.973 2.974 3.357 2.918 1.245
Among all the simple smoothing filters once again the averaging filter outperforms. For example the entropy of SIPI dataset is 3.285 bits per pixel which is smaller than the Gaussian filter entropy (4.155 bits per pixel) and median filter entropy (3.713 bits per pixel). Similarly for the edge preserving smoothing filters performance of the guided filter is much better than the bilateral filter.
www.ijaera.org 2016, IJA-ERA - All Rights Reserved 183 0
2 4 6 8
BSDS Test BSDS Tra ining
SIPI Real Life Images
A
v
e
r
a
g
e
E
n
tr
o
p
y
Image Datasets
Smoothing Filters Vs Average Entropy
Avera ge Entropy of the Ima ge Da ta set
Avera ging filter Ga ussia n Filter Media n Filter Bila tera l Filter
Figure 5. Average Entropy
VIII. CONCLUSIONANDFUTUREWORK
Image smoothing and edge detections are the prominent image processing steps for machine vision applications. Noises are random in nature and disturb the image during sensing and transmission.This chapter attempts to find out the better edge preserving smoothing techniques for third order edge detection operator. However the classical first order edge mask is simple to implement but contains two masks one for vertical and another one for horizondal directions which increases computational time and is also a too old process. Second order Laplacian opearator contains single mask producing thin edges but poor localization and hence poor detection ability.To improve the performance of the edge detection further a third order mask is derived. Being third order differential operator the proposed mask, both edge andhigher degree, thus it is highly sensitive to noise. This issue overcome by suitable smoothing process prior to the application of edge mask. Commonly used denoising filters such as Averaging filter, Weiner Filter, Guassian filter, Median filter and edge preserving smoothing filters such as Bilateral filter and Guided filter are tested with third order edge mask. Results show that the edge preserving linear guided filter outperforms the other filters with the metrics PSNR, MSE and entropy for most of the test image samples. The Guided filter offers higher PSNR, Lowe MSE and Lesser entropy than other smoothing filters. In future this proposed Guided filter based third order edge mask is applied to feature extraction, image segmentation and image compression process.
Conflict of Interest: The authors declare that they have no conflict of interest.
Ethical Statement: The authors declare that they have followed ethical responsibilities
REFERENCES
[1] Rafael C. Gonzalez and Richard E. Woods, 2001 Digital Image Processing.
[2] Mr.Avadhoot R. Telepatil, S.A.Patil,Mr.Vishal P.Paramane, A Survey on Median Filters for Removal of High Density Salt & Pepper Noise in Noisy Image, IOSR-JECE. pp 22-26.
[3] Ardeshir Goshtasby and Martin Satter. An Adaptive Window Mechanism for Image Smoothing. [4] Chapter3,FILTERS,www.bioss.ac.uk/people/chris
[5] B.Thamotharan, M.Menaka, Sandhya Vaidyanathan,Sowmya Ravikumar, 2012, Survey on image processing in the field of de-noising techniques and edge detection techniques on radiographic images, Journal of Theoretical and Applied Information Technology, Vol. 41 No.1,pp-26-34.
www.ijaera.org 2016, IJA-ERA - All Rights Reserved 184 [7] Amita Kumari. Pankaj Dev Chadha, 2014 A Survey on Filtering Technique for Denoising Images in
Digital Image Processing, International Journal of Advanced Research in Computer Science and Software Engineering, Volume 4, Issue 8, pp-612-614.
[8] T. Joel and R. Sivakumar, Despeckling of Ultrasound Medical Images: 2013 A Survey, Journal of Image and Graphics Vol. 1, No. 3, pp-161-165
[9] Vinh Hong, Henryk Palus, Dietrich Paulus, Edge Preserving Filters on Color Images,
[10] Faten A. Dawood, Rahmita W. Rahmat, Suhaini B. Kadiman, Lili N. Abdullah, Mohd D. Zamrin,2012, World Academy of Science, Engineering and Technology Vol:6 ,International Scholarly and Scientific Research & Innovation 6(9) pp-415-420
[11] Giuseppe Papari, Nicolai Petkov, and Patrizio Campisi, Artistic Edge and Corner Enhancing Smoothing,2007, IEEE Trans. on image processing, VOL. 16, NO. 10, pp-2449-2462.
[12] Michael Elad, 2002, On the origin of bilateral filter and the ways to improve it, IEEE trans. on image processing, Vol.11, NO.10, pp-1141-1151.
[13] Kaiming He, Jian Sun, Xiaoou Tang,2013, IEEE trans. on pattern analysis and machine intelligence, vol. 35, no. 6, pp-1397-1409
[14] Tianshuang Qiu, Aiqi Wang, Nannan Yu, and Aimin Song, 2013, LLSURE: Local Linear SURE-Based Edge-Preserving Image Filtering, IEEE trans. on image processing, vol. 22, NO. 1.
[15] Gurjeet Kaur,Merge L0 minimization technique, 2015, International Journal of Advanced Research in
Computer Science and Software Engineering,Vol.5,Issue.2,pp-857-861.
[16] Charles Boncelet,2005, “Image Noise Models” in Alan C.Bovik, Handbook of Image and Video Processing, ,pp397-409
[17] Chandrika Saxena, Prof. Deepak Kourav, 2014, Noises and Image Denoising Techniques: A Brief Survey, International Journal of Emerging Technology and Advanced Engineering, Volume 4, Issue 3, pp-878-885.
[18] Mohd Awais Farooque, Jayant S.Rohankar, 2013,Survey on various noises and techniques for denoising the color image, IJAIEM, Volume 2, Issue 11,pp-217-221.
[19] Rupinderpal Kaur, Rajneet Kaur,2013, Survey of De-noising Methods Using Filters and Fast Wavelet Transform, International Journal of Advanced Research in Computer Science and Software Engineering, Volume 3, Issue 2, pp-133-136.
[20] Pawan Patidar, Manoj Gupta, Sumit Srivastava, Ashok Kumar Nagawat,2010, Image De-noising by Various Filters for Different Noise,IJCA, Volume 9– No.4,,pp-45-50
[21] James Church, Dr. Yixin Chen, and Dr. Stephen Rice, 2008, A Spatial Median Filter for Noise Removal in Digital Images, IEEE, pp. 618-623.
[22] Toran Lal Sahu, Mrs. Deepty Dubey, 2012,A Survey on Image Noises and Denoise Techniques, IJARCET, Volume 1, Issue 9, pp.77-81.
[23] Kaiming He,Jian Sun,Xiaoou Tang, 2013,Guided Image Filtering, IEEE transaction on pattern analysis and machine intelligence,Vol.35,No.6,pp.1397-1409.
[24] Chandrajit Pal,Amlan Chakrabarti,Ranjan Ghosh, 2015,A brief survey on recent edge preserving smoothing algoriths on digital images.Elsevier ,Procedia Computer Science.
[25] G.J.Joyce Mary,A.Rijuvana Begum, 2015, Edge Detection using Third Order Difference Equation: A New Dimension, Communications on Applied Electronics,vol.1.No.6,pp.10-14.
[26] S.Asha, R.Rajesh Kanna, 2014, A Survey on Content Based Image Retrieval Based on Edge Detection, IJCSIT, Vol. 5 (6), pp.8272-8275.