Unit-5 Edge Detetction
Unit-5 Edge Detetction
Edge Detection
An edge is defined as a sudden change in intensity, i.e., edges have different pixel intensity values in comparison
to their neighbors. An edge is defined as the change in the intensity of an image from low to high, or vice versa.
The edge is regarded as the boundary between two dissimilar regions. The edges of various objects in an image
are very important as edges hold a good amount of information in an image. The edges indicate the location of
objects in the image and their shape and size.
There are several applications for detection of edges of objects in an image. For example, digital artists
use edge detection techniques to create dazzling image outlines. The output of an edge detection technique can be
added back to an original image in order to enhance the edges.
There are an infinite number of edge orientations, widths and shapes. Edges may be straight or curved, with
varying radii. There are a number of edge detection techniques to go with all these edges, each having their own
strengths. Some edge detectors may work well for one application, but poorly for other applications. The choice of
an edge detection technique completely depends on the application.
CLASSIFICATION OF EDGES
Points in an image where brightness changes abruptly are called edges or edge points. Edges are significant local
changes of intensity in an image. Edges are the boundaries between segments. Edges are a very important portion
of the perceptual information content in an image. Edges can be broadly classified into (i) step edge, (ii) line
edge, (iii) ramp edge, and (iv) roof edge.
Step Edge
The step edge defines a perfect transition from one segment to another. In the case of a step edge, the image
intensity abruptly changes from one value to one side of the discontinuity to a different value on the opposite side.
If segments are piecewise constant and pixels can only belong to one segment, then a step edge model is
implicitly used. The step edge is illustrated in Fig. 7.17.
Line Edge
If a segment of an image is very narrow, it necessarily has two edges in close proximity. This arrangement is
called a line. The line edge is shown in Fig. 7.18.
Ramp Edge
A ramp allows for a smoother transition between segments. A ramp edge is useful for modeling the blurred edges
created from sampling a scene containing objects not aligned to the pixel grid. The ramp edge is shown in Fig.
7.19.
Roof Edge
Two nearby ramp edges result in a line structure called a roof. Basically, there are two types of roof
edges:(i) convex roof edges, and (ii) concave roof
edges which are shown in Fig. 7.20.
EDGE DETECTION
Edge detection is the process of finding meaningful transitions in an image. Edge detection is one of the central
tasks of the lower levels of image processing. The points where sharp changes in the brightness occur typically
form the border between different objects. These points can be detected by computing intensity differences in
local image regions. That is, the edge-detection algorithm should look for a neighbourhood with strong signs of
change. Most of the edge detectors work on measuring the intensity gradient at a point in the image.
Importance of Edge Detection
Edge detection is a problem of fundamental importance in image analysis. The purpose of edge detection is to
identify areas of an image where a large change in intensity occurs. These changes are often associated with some
physical boundary in the scene from which the image is derived. In typical images, edges characterise object
boundaries and are useful for segmentation, registration and identification of objects in a scene.
Second-Derivative Method of Detecting Edges in an Image
Finding the ideal edge is equivalent to finding the point where the derivative is maximum or minimum. The
maximum or minimum value of a function can be computed by differentiating the given function and finding places
where the derivative is zero. Differentiating the first derivative gives the second derivative. Finding the optimal
edges is equivalent to finding places where the second derivative is zero. The differential operators can be applied
to images; the zeros rarely fall exactly on a pixel. Typically, they fall between pixels. The zeros can be isolated by
finding the zero crossings. Zero crossing is the place where one pixel is positive and a neighbouring pixel is
negative. The problems with zero-crossing methods are the following:
(i) Zero crossing methods produce two-pixel thick edges.
(ii) Zero crossing methods are extremely sensitive to noise.
For images, there is a single measure, similar to the gradient magnitude, that measures the second derivative, which
is obtained by taking the dot product of ∇ with itself.
Gradient Operator
A gradient is a two-dimensional vector that points to the direction in which the image intensity grows fastest. The
gradient operator ∇ is given by
The two functions that can be expressed in terms of the directional derivatives are the gradient magnitude and the
gradient orientation. It is possible to compute the magnitude ||∇f || of the gradient and the orientation Φ(∇f ).
Prewitts Operator
The Prewitt edge detector: The Prewitt operator is also a gradient-based edge detector, it consists of two 3 × 3
masks (Fig. 7.10). Basically, the Prewitt operator detects horizontal and vertical edges. The x component (denoted
by Gx) of the Prewitt operator detects horizontal edges, while the y component (denoted by Gy ) detects vertical
edges. It is computationally less expensive and a quicker method for edge detection but this technique does not
work well with noisy and low contrast images.
Sobel Operator
The Sobel edge detector: The Sobel operator is also based on gradient, and very similar to the Prewitt operator.
The difference between the two is that the Sobel operator has ‘2’ and ‘–2’ values in the center of the first and third
columns of the horizontal mask and first and third rows of the vertical mask (Fig. 7.11).
the Sobel operator also highlights horizontally and vertically oriented edges. Due to the larger masks, the Sobel
operator smooths the input image to a greater extent and is less sensitive to noise. The operator also generally
produces considerably higher output values for similar edges, when compared with the Roberts Cross.
Numerical on all the above topics solved in theory sessions.