Edge Detection I


The Human Visual System is very sensitive to details (ex: abrupt changes, edges). These details in the Fourier or frequency domain are located in the high frequencies.

One way to detect edges or variations within a region of an image is by using the gradient operator. For instance, the gradient, G, is a vector with two elements, Gx and Gy, where Gx is the gradient in the width direction and Gy is the gradient in the height direction. Since G is a vector, its magnitude Gm and direction Theta are given by:

There are several well known gradient filters. In this experiment we use the Sobel gradients, which are obtained by convolving the image with the following kernels

Gx is the kernel on the right and Gy the one on the left. The kernel origin is located at the center and the arrows indicate the direction that each kernel measures. That is, the direction of Gx is from left to right (west-to-east), and Gy is from top to bottom (north-to-south).


Left: Original image, Right: Sobel Edge Detector (Gm)


Left: Gx, horizontal gradient, Right: Gy, vertical gradient

In general, each kernel computes the gradient in a specific direction and later these partial results are combined to produce the final result. Each partial result computes an approximation to the true gradient by either using Euclidean distances or absolute differences. Absolute value computations are faster operations when compared to square and square root operations, thus, a faster way of computing the gradient magnitude is to sum the absolute values of the gradients in the X (width) and in the Y (height) directions.



DIP Feedback Form

Copyright © 1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved.