You are on page 1of 5

Edge Sharpening in Grayscale Images using Modified Sobel Technique

Talha Naqash Department of GS&AS Bahria University Islamabad, Pakistan Email: talha.naqash@yahoo.com
AbstractEdges of an image is characterised by a boundary thats why it has a significant importance in the field of image processing. This paper presents the modified Sobel edge detection technique which gives sharp thin and noise free edges. Canny edge detection can filter out the useless information than the remaining information defines the structural information of the image. First of all make the image smooth by using a mask than Sobel operator use gradient method to find edges in an image. Gradient method is very useful in camera processing technique. It is used to blend the colors in horizontal and in vertical direction.

Imran Shafi Department of GS&AS Bahria University Islamabad, Pakistan Email: Imran.shafi@iqraisb.edu.pk
limits by putting the Figure information in Hilbert space nine limitation formula than a point is found that is quite close to the perfect rim model but this method is so difficult and sensitive to noise [3]. Marr and Hildreth used the LOG (Laplacian of Gaussian) to find edge of an image. In this process Gaussian operator make image smooth. Than by taking second derivative that is considered as edge of an image. Canny described a good method to find edges of an image. Canny edge detector provides the strength to edge [4]. Canny edge detector operator is multistage algorithm to find out a large range of edges in an image. It is also known as an optimal edge detector. In this paper Sobel operator is modified to improve the quality of the classical Sobel technique. The modified method has 6 stages that are mentioned in Table 1. TABLE I. STEPS OF IMPROVED SOBEL

I. INTRODUCTION
Edge detection technique was important in machine vision but now a day it is important to reduce the problem of discontinuity in image brightness and illumination. Information of an image in term of edges is in dense form because a two dimensional images information is now present in one dimensional form. Due this fact it becomes the part of most of the computer visualisation techniques. Similarly edge detection techniques are the basis of computer vision algorithms [1]. Edges finding is an essential thing to work and enhance the computer vision technique and to find out objects sharp. Current methods of edge detection are acutely susceptible to external error because of their large process [2]. By using sub pixel level method edges can be found with great accuracy. Hueckel presented the sub pixel level technique in his own way. As find out edges

Convert into Grayscale image Blurring the image Find Edges using Sobel operator Angle Of Gradient Quantizing the angle Hysterious Thresholding

The first stage is to lowdown the error rate because due to error rate edges at corner points are missed and shown as there are no edges. Second stage is to find sharp edges or points which must be well confined to a small area. Edge will be not sharp if there is noise between the pixels at edge so to get true edge eliminate all noise. Because of these problems when the canny operator is used it first of all blur the picture then find the edges of given images. Threshold hysteresis is used to find the noise free sharp edge. Because salt and paper noise cannot be removed by using classical Sobel technique.

Gy =

( , )

Then the total magnitude or the gradient can be found by this formula

= f(x, y + 1) f(x, y)

(2)

II. THE PROPOSED MODIFIED SOBEL EDGE DETECTION METHOD


To implement the enhanced version remove the unwanted pixels from the given data before finding the edges of the Image. Noise can be removed by using Gaussian filter. In Gaussian Filter a suitable mask is chosen and convolved with image. Mask must be smaller than image size because larger the size of the mask can reduce the noise sensitivity of the detector. Localisation error can also increase by increasing mask size. Gaussian function with =1.4 as shown in Figure 1.

To find the edge direction is minor when the gradient in the x and y direction are known. But it can still create errors when sum GX is equal to zero. So during implementation a restriction must be set out to handle such cases. For example when every gradient is equal to zero edge direction than angle path will be 90 degree. Similarly when ever sum Gy equal to zero than edge direction must be zero degree. So the main formula that is used

G = Gx + Gy

(3)

= tan^(1) (Gx/Gy)

(4)

After finding the edges there is needed to find the direction on which edges are traced out. It is easy to understand from the following Figure 2.

x x x x x

x x x x x

x x

x x x x x

x x x x x

2 4 5 4 2

4 9 12 9 4

5 12 15 12 5

4 9 12 9 4

2 4 5 4 2

a
x x

Figure 2. Possible Direction to trace out edges Now look at pixel a. It has only four directions to move zero degree, 45 degrees, 90 degrees, 135 degrees. Edge direction must be 0 degree to 180 degree. According to this explanation a semicircle is divided into five areas shown in Figure 3.

Figure 1. Gaussian function with =1.4 After removing the noise edge potency is found to measure the edge strength. 2-D gradient is found by Sobel operator also it can find out edge strength at each point. Normally a 3*3 Sobel mask is used as gradient along x-axis and along y-axis by using following equations [6]. Gx =
( , )

= f(x + 1, y) f(x, y)

(1)

Figure 3. Directional angle When the edge directions is confirmed a non maximum suppression is used to eliminate all pixels by setting their value zero which are not edges This will give a thin line as output which is the true edge of the image. At last stage hytresis is used to eliminate salt and paper effect. Picture is not so much clear and some time edges were broken. So to minimize that effect hysterious thresholding is used.

Figure 4. Grayscale image

III. RESULTS AND DISCUSSION


The 2-D gradient is determined by using a Sobel operator. Actually it can find out the gradient magnitude at every point of the of the input grayscale image. The Sobel operator uses the 3*3 mask to convovle and found the blurred image. The estimate the gradient along xdirection and y-direction. Then by eliminating the pixel which after finding the directional pixel value to get sharp edges. The new results that are found by modified technique is called T_Sobel. Edge detection is very usefull in pattern recognition and object detection in the image. Sobel operator effectively detects the noise in the image. Usually sobel operator gives the thick edges in the results but by using the angle of gradient useless pixel can be removed to fnd sharp edges. Steps that are defined in Table 1 are implemented and results are shown in Figure 4 to Figure 8 step by step. The sobel operator is based on convolution the image with a flter along X and Y direction that is much easier to implement and inexpensive in term of computations [6].

Figure 5. After Gausian Mask

Figure 6. After Sobel Operator

According to these defined benchmarks different techniques can be compared. Here are some results of some different techniques that are compared .

Figure 7. Eliminating non edge pixel Figure 9. Original image Figure 10. Fuzzy

Figure 11. Prewitt Figure 8. Final Result

Figure 12. Roberts

IV.COMPARISONS OF EDGE DETECTION METHOD


Many other edge detection techniques and their results are compared with modified sobel image filtter here but different techniques work better under different conditions. For example in the field of construction there is need of sharp and noise free errors that can be found by using Prewitt, Roberts, Neural and Sobel techniques that are shown in Figure 11 to Figure 16. But in ultrasound machine fuzzy edge detection algorithm is preferred as shown in Figure 10. There are some parameters in image detection techniques that are Edges must be sharp and thin. Images edges should be noise free. Object must be detectable and distinguishable in the result.

Figure 13. T-Sobel

Figure 14. Sobel

Figure 15. Genetic

Figure 16. Neural

V. CONCLUSION
This paper mainly focussed on modified sobel technique to get noise free and sharp edge result. Useless information was eliminated by the canny edge detector to get structural information of the image. The classical Sobel technique is compared to T_sobel technique and also compared with all other edge detection techniques. For large size of image T_Sobel technique may take time to produce results as compared to classical Sobel technique but T_Sobel has much better results than classical sobel technique.

REFERENCES
[1] P. Perona, and J. Malik, Scale space and edge detection using anisotropic diffusion IEEE Trans. Pattern Anal. Machine Intell 2002; vol. 127, pp. 629639. [2] C. Min Qi., U. Heute, and C. Moraga, New Method for fast image edge detection based on subbaned decomposition Image Anal streol Proceeding 2001; vol. 20; pp. 53-57. [3] M. H. Hueckel, An operator which locate edges in digitized pictures, Journal of ACM 2007; vol. 18; pp 113125. [4] D. Marr, and E. C. Hildreth, Theory of Edge Detection, Proceedings of the Royal Society 1994; vol. 207; pp 187217. [5] O.R. Vincent, and R. Woods, A Descriptive algorithm for sobel image edge detection Proceeding of information science and IT education conference 2009. [6] R. C. Gonzalez, and R. E. Woods, Digital Image processing third Edition, published by Prentice- Hall, 2006; pp 719-726.

You might also like