next up previous
Next: Second Order Methods Up: Detecting Edge Points Previous: Detecting Edge Points

Gradient based methods

An edge point can be regarded as a point in an image where a discontinuity (in gradient) occurs across some line. A discontinuity may be classified as one of three types (see Fig 21):

 

Fig. 21 The C Compilation Model

A Gradient Discontinuity
-- where the gradient of the pixel values changes across a line. This type of discontinuity can be classed as by noting the sign of the component of the gradient perpendicular to the edge on either side of the edge.

Ramp edges have the same signs in the gradient components on either side of the discontinuity, while roof edges have opposite signs in the gradient components.

A Jump or Step Discontinuity
-- where pixel values themselves change suddenly across some line.

A Bar Discontinuity
-- where pixel values rapidly increase then decrease again (or vice versa) across some line.

For example, if the pixel values are depth values,

If the pixel values are intensities,

The gradient is a vector, whose components measure how rapidly pixel values are changing with distance in the x and y directions.

Thus, the components of the gradient may be found using the following approximation:
eqnarray638
where tex2html_wrap_inline3398 and tex2html_wrap_inline3400 measure distance along the x and y directions respectively.

In (discrete) images we can consider tex2html_wrap_inline3398 and tex2html_wrap_inline3400 in terms of numbers of pixels between two points. Thus, when tex2html_wrap_inline3410 (pixel spacing) and we are at the point whose pixel coordinates are (i,j) we have
 eqnarray656

In order to detect the presence of a gradient discontinuity we must calculate the change in gradient at (i,j). We can do this by finding the following gradient magnitude measure,
equation663
and the gradient direction, tex2html_wrap_inline3368, given by
equation670

Implementation:

The difference operators in Eqn. 44 correspond to convolving the image with the two masks in Fig. 22.

This is easy to compute:

 
tabular686
Fig. 22 Edge operator convolution masks

Instead of finding approximate gradient components along the x and y directions we can also approximate gradient components along directions at tex2html_wrap_inline3432 and tex2html_wrap_inline3434 to the axes respectively. In this case the following equations are used:
 eqnarray703

This form of operator is known as the Roberts edge operator and was one of the first operators used to detect edges in images. The corresponding convolution masks are given by:  
tabular713
Fig. 23 The C Compilation Model

Many edge detectors have been designed using convolution mask techniques, often using tex2html_wrap_inline3352 mask sizes or even larger.

An advantage of using a larger mask size is that errors due to the effects of noise are reduced by local averaging within the neighbourhood of the mask.

An advantage of using a mask of odd size is that the operators are centred and can therefore provide an estimate that is biased towards a centre pixel (i,j).

One important edge operator of this type is the Sobel edge operator. The Sobel edge operator masks are given in Fig 24.  
tabular735
Fig. 24 Sobel edge operator convolution masks


next up previous
Next: Second Order Methods Up: Detecting Edge Points Previous: Detecting Edge Points

tex2html_wrap_inline2984 David Marshall 1994-1997