Master Thesis - Fachbereich Informatik
Master Thesis - Fachbereich Informatik
Master Thesis - Fachbereich Informatik
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
2.3. EDGE DETECTION 25<br />
These operators compute the horizontal and vertical components of a smooth gradient<br />
[21], denoted as gx and gy in the following. The total gradient magnitude g at a pixel<br />
position p in an image can be computed by the following equation:<br />
�<br />
g(p) = g2 x(p)+g2 y(p) (2.21)<br />
An example of the gradient magnitude based on the Sobel operator can be found in<br />
Figure 2.7(b). The following approximations can be used in order to save computational<br />
costs:<br />
g(p) ≈ |gx(p)| + |gy(p)| (2.22)<br />
g(p) ≈ max(|gx(p)|, |gy(p)|) (2.23)<br />
These approximations yield equally accurate results on average [22]. Beside the gradient<br />
magnitude it is possible to compute the angle of the gradient as:<br />
� �<br />
gy(p)<br />
φ(p) =arctan<br />
(2.24)<br />
gx(p)<br />
Although there is a certain angular error with the Sobel gradient [36], it is used very<br />
often in practice, since it provides a good balance between the computational load and<br />
orientation accuracy [16].<br />
The Equations 2.21-2.24 are defined not only for the Sobel operator, but for every other<br />
operator that computes the horizontal and vertical gradient components.<br />
Canny Edge Detector Today, the Canny edge detector [13] is probably the most used<br />
edge detector, and is proven to be optimal in a precise, mathematical sense [65]. It is<br />
designed to detect noisy step edges of all orientations and consists of three steps:<br />
1. Edge enhancement<br />
2. Nonmaximum suppression<br />
3. Hysteresis thresholding<br />
The first step is based on a first-order Gaussian derivative as introduced before. For<br />
fast implementations, the separability of the filter kernel can be used to improve the performance.<br />
Gradient magnitude and orientation can be computed as in Equation 2.21 and<br />
2.24, or using the approximations. The standard deviation parameter σ of the Gaussian<br />
function influences the scale of the detected edges. A lower σ preserves more details (highfrequencies),<br />
but also noisy edges, while a larger σ leaves only the strongest edges. The<br />
appropriate σ depends on the image content and what kind of edges should be detected.<br />
The goal of the nonmaximum suppression step is to thin out ridges around local maxima<br />
and return a number of one pixel wide edges [65]. The dominant direction of the gradient<br />
calculated in step one determines the considered neighbors of a pixel. The gradient magnitude<br />
at this position must be larger than both neighbors, otherwise it is no maximum<br />
and its position is set to zero (suppressed) in the edge image.