Survey on Various Edge Detection Techniques on Noisy Images

DOI : 10.17577/IJERTV3IS100561

Download Full-Text PDF Cite this Publication

Text Only Version

Survey on Various Edge Detection Techniques on Noisy Images

Diya Chudasama Tanvi Patel

Dept of Information Technology Dept of Information Technology

SVMIT Engineering College SVMIT Engineering College

Bharuch, India Bharuch, India

Ghanshyam I. Prajapati Dept of Information Technology

SVMIT Engineering College Bharuch, India

Abstract – An edge is defined as boundaries of objects or sudden change in an image which is not in a continuous form that helps to detect and identify the objects in a given image. Edge detection is considered as an ignition in Computer Vision and Digital Image Processing. So, it is very important to have a clear concept about edge detection algorithms. There are various edge detections techniques like sobel, prewitt, canny and many others but these methods are not robust for noise. This paper introduces a clear-cut explanation of various edge detection algorithms with comparison on image with salt and pepper noise and preprocessed images. On comparing them we can say that image filtered by median filter gives better output than noisy image.

Keywords: Sobel,Prewitt,Canny, window mask, salt and pepper noise, median filter.

  1. INTRODUCTION

    Images are considered to be the most important part in human life. A simple image can also contain lot of information. Digital Image Processing is a field in which we can extract information. Edge characterizes boundaries of the objects present in an image, which can be further used for Segmentation and Pattern Matching [1]. Edge detection is one of the most commonly and primary operation in the field of Digital Image Processing. Edge detection means to trim down the unwanted parts like removing inadequate information, and at the same time preserving the properties of image [2].

    Edge detection in noisy image is a difficult part as it contains high frequency content. There are various types of noise, among them salt and pepper is one of the most commonly known. It is described as random distribution of

    Shubham Joshi

    Dept of Information Technology SVMIT Engineering College

    Bharuch, India

    techniques like Gaussian edge detectors, Gradient edge detectors, Colored edge detectors, Laplacian of Gaussian and Zero crossing. In this paper three techniques are discussed and in all techniques both noisy and normal images are applied as an input and compared with their outputs. The techniques used are as follows:

    1. Sobel edge detector

    2. Prewitt edge detector

    3. Canny edge detector

    1. Sobel edge detector

      Sobel edge detector is one of the Gradient based edge detector method to detect horizontal and vertical edges. It is an discrete differentiation operator used to take the approximate of gradient components for the purpose of edge detection [5]. It uses two 3×3 convolution masks to look for the edges in horizontal and vertical direction. The masks used by Sobel operator are as follows:

      (1)

      These masks are applied on the input image separately to produce the gradient components. These gradient component are combined together to calculate the absolute magnitude and orientation of that gradient. The gradient magnitude at each point is calculated by:

      white and black spots. These noisy images results in blurred

      | G |

      G 2 G 2

      (2)

      and distorted edges. So it is very important to remove the x y

      noise from the image as it degrades the performance of various image processing tasks [3].Therefore, the main objective is to apply various edge detection techniques in different conditions.

  2. EDGE DETECTION TECHNIQUES

    Edge detection is a first step used in Image processing applications.It has great importance in Image analyzing. It detects edges of objects and produces map containing important information [4]. There are various edge detection

    Approximate magnitude is calculated by:

    G Gx Gy

    The angle of orientation is calculated by:

    = invtan (Gx / Gy )

    (3)

    (4)

    1. Prewitt Edge Detector

      It works same as a sobel Operator, but the masks of prewitt is different than the sobel. To calculate

      After finding the magnitude the edge direction is calculated by following formula:

      approximations changes of derivation in horizontal and vertical directions, mathematically it uses two 3×3 masks

      = invtan (Gx / Gy )

      (9)

      which are convolued with input image. operator are as follows:

      The gradient magnitude at each point is calculated by:

      (5)

      After the edge direction is known relate the in such direction that can be traced in an image. So to trace the image there are only four possible directions- 0 degrees, 45 degrees, 90 degrees, or 135 degrees [7]. So, calculate (x,y) to find the edge orientation that can be in one of these four directions 0,45,90, or 135.

      3. Non-maximum Suppression: When using Sobel or Prewitt operator the output which is obtained are having thick edges. It depends upon the intensity across the edge. The non-maximal suppression keeps those pixels

      | G |

      G2 G2

      (6)

      on edge having highest gradient magnitude.

      x y

    2. Canny edge detector

      Canny Edge Detector is the most commonly used algorithm and it is considered as an standard algorithm in industries. It is an Optimal method and uses multi-stage algorithm to detect edges. The word optimal is used because it marks the real edges as close as possible, the edges marked once are not repeated and false edges are also not created due to noise [6].

      The steps for the canny edge detection algorithm are as follows:

      1. Smoothing: It is also called as noise reduction. The image is taken as an input and noise is removed from the image by using Gaussian filter. Gaussian filter uses a standard convolution method for removing the noise after calculating a suitable mask. A convolution mask is normally smaller, so it slids over the image manipulating at a time some square of pixel. If the

        Gaussian width is large the localization error increases.

      2. Compute the Gradient magnitude and edge direction: After removing the noise, smoothing the image the next step is to calculate gradient of the image to find the edge strength. The Sobel operator uses a pair of 3×3 convolution masks, Gx finds the gradient in the x- direction and Gy finds the gradient in the y-direction. They are shown below:

        (7)

        The magnitude of the gradient is then calculated using the following formula [7]:

        So, pixel (x,y) are known by:

        • If (x,y)=0, then pixels(x+1,y), (x,y), and (x1,y) are taken into considered.

        • If (x,y)=90, then pixels(x,y+1), (x,y), and (x,y1) are taken into considered.

        • If (x,y)=45, then pixels(x+1,y+1), (x,y), and (x1,y1) are taken into considered.

        • If (x,y)=135, then pixels(x+1,y1), (x,y), and (x1,y+1) are taken into considered.

          If pixel(x,y) has the highest gradient magnitude of the three pixels that are considered then take it as an edge. If any one of the other two pixels to be considered has a higher gradient magnitude, then pixel(x,y) is not considered as an edge[8].

          1. Hysteresis Thresholding: Some of the edges detected are not valid because some of the edges are obtained by noise. As it uses a single threshold value; the pixels obtained below the threshold value are ignored so, some of the valid edges are also removed or invalid edges are added. So to solve this problem Hysteresis thresholding is used. It takes ino consideration two threshold values Thigh and Tlow. Following are some steps of Hysteresis thresholding used to take decision which edge to be considered and which edge is to be neglected.

            • If pixel(x,y) has gradient magnitude less than Tlow, it is not considered to be an edge.

            • If pixel(x,y) has gradient magnitude greater than Thigh, consider to be an edge.

          GGx

          • Gy

            (8)

            • If pixel(x,y) has gradient magnitude between tlow and thigh and any of its neighbours in a 3×3 region around have

          gradient magnitudes greater than Thigh, consider to be an edge.

          • If none of pixel(x,y)s neighbours have high gradient magnitudes but at least one falls between Tlow and Thigh, search for the 5×5 region to see if any of these pixels have a magnitude greater than Thigh. If so, consider to be an edge.

          • Else, do not considered to be an edge.

    3. Image Filtering

      In digital images, there are many kinds of noises like Random Variation Impulsive Noise (RVIN), Salt & Pepper Noise (SPN), Speckle Noise (SPKN) and Blur. To remove these kinds of noise some techniques are available which can be used for filtering the images, these techniques are called filtering methods in digital image processing. There are many

    4. Steps of Edge detection

      Firstly, noisy image of salt and pepper is taken as an input for detecting edge. In second step it is preprocessed by applying median filter which removes the noise from the image. And lastly it is taken as an input for various edge detection techniques. Process flow used for detecting the edges is as follows:

      INPUT IMAGE WITH SALT AND PEPPER

      APPLYING MEDIAN FILTERING TECHNIQUE

      methods available for filtering the images like Median Filter

      (MF), Adaptive Wiener Filter (AWF), Gaussian Filter (GF) etc.

      In this paper salt and pepper noise image is used as an input. This type of noise normally occurs during image acquisition and/or transmission due to environment condition and many other reasons [9]. So, median filter is applied to remove the salt and pepper noise to achieve better output.

      Technique

      Advantages

      Disadvantages

      Gradient Based Technique (Sobel, Prewitt)

      1.Simple and easy to

      compute

      1.Sensitive to noise

      2.Detect edges and

      orientation

      2. Magnitude degrades

      as noise increases

      3.Faster approach

      3.Cannot detect thin

      and smooth edges

      Guassian Based Technique (Canny)

      1.Gaussian filter

      removes the noise

      1.Difficult for real time

      response

      2.Enhanced signal with

      respect to noise ratio

      2.Time consuming

      3.Adaptive in nature

      3.Same threshold does

      not work for all images

      4.Removes streaking

      problem

      4.Complex

      computations

      Median filter is a nonlinear digital filtering technique used to remove the noise. It is one kind of smoothing technique as linear Gaussian filtering. It is a preprocessing step to improve the edge detection technique. It is widely used in digital image processing because it preserves edges while removing noises. In median filter, window slides over the whole image and for each location in window, median concentration of the pixels decide which pixel to be positioned in middle of the window [10].

      The performance of median filter is not as good as Gaussian blur for high levels of noise, but for speckle noise and salt and pepper noise it is considered to be an effective method. Because of this it is largely used in digital image processing.

      EDGE DETECTION USING VARIOUS

      Fig. 1. Flow of Edge Detection

    5. Comparisions of various edge detection techinique

    TABLE I. ADVANTAGES AND DISAVANTAGES [11]

  3. RESULT ANALYSIS

    Fig. 2. Edge detection on noisy image

    Fig. 3. Edge detection on filtered image

    Fig. 2 shows the implementation of edge detection on noisy images. In that (a) shows the original image which is taken as an input, (b) and (c) shows the edge detected by sobel and prewitt and (d) shows the edge detected by canny and it gives the best output among three of them. Fig. 3 shows the implementation of edge detection after preprocessing the simage by applying median filter on noisy

    images. In that (e) shows the filtered image which is taken as an input after preprocessing the image for noise removal, (f) and (g) shows the edge detected by sobel and prewitt and (h) shows the edge detected by canny. This gives the best output than the input given with direct noisy image.

  4. CONCLUSION

In this paper various edge detection techniques are compared and it has been concluded that gradient based edge detection methods are not suitable for noisy images. Canny edge detection method gives better output than gradient based as it removes the drawback of that method but it is not giving proper output for salt and pepper noisy image. So, edge detection using median filtering process is used as it gives the best result after removing the noise in the input image.

REFERENCES

  1. S. Singh, A. Kathe, Various Mthods For Edge Detection in Digital Image Processing IJCST, Vol. 2 Issue 2, June 2011.

  2. H. Kapoor, P. Singla, Magnified Edge detection usinf Fuzzy-Canny Logic IJARCSSE, Vol. 2 Issue 5,May 2012.

  3. Bing wand & shaosheng fan. An improved CANNY edge detection algorithm second international workshop on computer science and engineering 2009.

  4. S. Patel, P.Trivedi, V. Gandhi and G. Prajapati, 2D Basic Shape Detection Using Region Properties IJERT, Vol. 2 Issue 5, May-2013.

  5. Rashmi, M. Kumar, R. Saxena, Algorithm And Technique On Various Edge Detection:A Survey SIPIJ, Vol. 4, No.3, June 2013.

  6. S. Jansi, P. Subhashini, Optimized Adaptive Thresholding based Edge Detection Method for MRI Brain Images International Journal of Computer Applications (0975 8887) Volume 51 No.20, August 2012.

  7. R. Maini, Dr. H. Aggrawal, Study and Comparision of Various Image Edge Detection Techniques IJIP, Vol. 3, Issue(1).

  8. R. C. Gonzalez and R. E. Woods. Digital Image Processing. 2nd ed. Prentice Hall, 2002.

  9. Chin-Chen Chang, Ju-Yuan Hsiao, Chih-Ping Hsieh. An Adaptive Median Filter for Image Denoising Second International Symposium.

  10. S. Sthapak, M. Khopade, C. Kashid. Artificial Neural Network Based Signature Recognition &Verification International Journal of Emerging Technology and Advanced Engineering, ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 8, August 2013.

  11. P. Dhankhar, N. Sahu, A Review and Research of Edge Detection Techniques for Image Segmentation IJCSMC, Vol. 2, Issue. 7, July 2013.

Leave a Reply