10-05-2014, 03:58 PM
detected edges for Sobel Operator and Canny Operator
edge Detection.docx (Size: 1.06 MB / Downloads: 9)
INTRODUCTION
1. Background
Using computers to do image processing has two objectives: First, to create more suitable images for people to observe and identify. Second, computers can automatically recognize and understand images. Towards this task, edges of objects are one of the most basic features for describing an image. It contains a wealth of internal information of the image. Therefore, edge detection is one of the key research works in image processing.
The well known image edge detection methods are mainly differential operator
technique and high-pass filtration. Among these methods, the differential and gradient edge detection methods, namely, sobel, prewitt, and laplacian are sensitive to noise and their anti-noise performance is poor. The Log and Canny edge detection operators which have been proposed use Gaussian function to do convolution to the original image, but the computations are very intensive. The method mainly uses Sobel operator and soft-threshold wavelet de-noising method to do edge detection processing on the images which have been disturbed by white Gaussian noise. It has been proved that the effect by using this method to do edge detection is very good and its anti-noise performance is very strong too.
The Principles of Edge Detection
Edge pixels are the pixels at which intensity of an image function changes abruptly, and edges (or edge segments) are sets of connected edge pixels. Edge detectors are local image processing methods designed to detect edge pixels.
More specifically, edge is a collection of pixels whose intensity value has a step or ramp change in the intensity scan of an image.
There are three main features related to edge detection
1. Line: an edge segment in which the intensity of the background on either side of the edge segment changes abruptly relative to edge segment.
2. Isolated point: a single pixel whose intensity value is considerably different from its neighboring pixel values.
3. Edge: a set of pixels which separates objects and background, objects and objects in an image. Where objects are the collection of pixels forming connected set [3].
There are three fundamental steps in edge detection.
1. Do image pre-processing for noise reduction.
2. Use local edge detection operators to extract all points from an image that are potential candidates to become edge points.
3. Post-processing to remove edge points that may not be true members of the edge set, and adding new edge points to link the discontinuity in the edge.
[b] Background of Edge Detection Models[/b]
Local changes in an image can be detected using derivatives. First and second order derivatives are particularly well suited for this purpose.
The basic definition of first order derivative of one dimensional function is
∂f/∂y=f(x+1)-f(x) (1.1-1)
The basic definition of second order derivative of one dimensional function is
(∂^2 x)/(∂^2 y)=f(x+1)+f(x-1)-2f(x) (1.1-2)
First order derivative gives nonzero output at the onset of the ramp and step, whereas second order derivative gives nonzero output at the onset and end of the both ramp and step . These observations are the basis for edge detection in an image by using edge detection models.
An Edge Detection Model based on Sobel Operator
Sobel operator is a kind of orthogonal gradient operator. The gradient, of an image f(x,y), denoted by ∇f(x,y), is defined as
∇f(x,y)=[g_x¦g_y ]=[(∂f/∂x)¦(∂f/∂y)] (2.1-1)
The vector ∇f(x,y) is used for finding edge strength and direction at any location, (x,y) in an image f(x,y).
The magnitude of vector ∇f(x,y), denoted as M(x,y), where
M(x,y)=√(g_x^2+g_y^2 ) (2.1-2)
signifies the rate of change in the direction of the gradient vector, at location (x,y).
The direction of the gradient vector is given by the angle
α(x,y)=tan^(-1) [g^x/g^y ]
The partial derivatives are to be calculated for each pixel location. In practice, we use small area masks which are designed after first order derivatives to do convolution on each pixel value in an image. The horizontal and vertical sobel operators which are modelled in this way are shown in fig 2.1.
0 1 2
-1 0 1
-2 -1 0
-2 -1 0
-1 0 1
0 1 2
An Edge Detection Model based on Canny Operator
The Canny operator is designed to be an optimal edge detector. It produces as output the image showing the positions of tracked intensity discontinuities. The Canny operator works in a multi-stage process. First of all the image is smoothed by Gaussian convolution. Then a simple 2-D first derivative operator is applied to the smoothed image to highlight regions of the image with high first spatial derivatives. Edges give rise to ridges in the gradient magnitude image. The algorithm then tracks along the top of these ridges and sets to zero all pixels that are not actually on the ridge top so as to give a thin line in the output, a process known as non-maximal suppression. The tracking process exhibits hysteresis controlled by two thresholds: T1 and T2, with T1 > T2. Tracking can only begin at a point on a ridge higher than T1. Tracking then continues in both directions out from that point until the height of the ridge falls below T2. This hysteresis helps to ensure that noisy edges are not broken up into multiple edge fragments. Increasing the width of the Gaussian kernel reduces the detector's sensitivity to noise, at the expense of losing some of the finer detail in the image. Usually, the upper tracking threshold can be set quite high, and the lower threshold quite low for good results. Setting the lower threshold too high will cause noisy edges to break up. Setting the upper threshold too low increases the number of spurious and undesirable edge fragments appearing in the image.
Results and Discussions
The experiments were conducted using Canny operator and Sobel operator using an image with some noise and performs the comparison of the edge detection algorithm at different threshold values. Greater the treshold is, the clearer image edge processing effect is and the more coherent the edge point are significant. However, when the threshold is over 0.3, the effective information of the image edge will be lost. Sobel operator is in the form of filtering operator. Sobel operator is easy to achive in space, has a smoothing effect on noise, can provide more accurate edge direction information.
From the results obtained it is evident that Canny based denoising removes the noise located at high frequency parts of the signal. Compared to the results with those obtained by the Sobel operators. Because Canny can filter the noise and maintain the integrity of valid information.
Conclusion
Sobel is also known as classical operator,The primary advantages of the classical operator are simplicity. The second advantages of the classical operator are detecting edges and their orientations. The disadvantages of these cross operator are sensitivity to the noise, in the detection of the edges and their orientations. The increase in the noise to the image will eventually degrade the magnitude of the edges. The major disadvantage is the inaccuracy, as the gradient magnitude of the edges decreases. The accuracy also decreases. Sobel will perform better on the images having white Gaussian noise.but not verymuch efficent in removing salt and prpper noises.
Canny is a popular edge detection scheme widely used arround the world. Canny algorithm is not susseptible to noise interference eneables its ability to detect true weak edges. Canny’s edge detection algorithm is more costly in comparing to Sobel, One problem with the basic Canny operator is to do with Y-junctions i.e. places where three ridges meet in the gradient magnitude image. Canny performs better compared to Sobel.