Sobel operator

Sobel operator

The Sobel operator is used in image processing, particularly within edge detection algorithms. Technically, it is a discrete differentiation operator, computing an approximation of the gradient of the image intensity function. At each point in the image, the result of the Sobel operator is either the corresponding gradient vector or the norm of this vector. The Sobel operator is based on convolving the image with a small, separable, and integer valued filter in horizontal and vertical direction and is therefore relatively inexpensive in terms of computations. On the other hand, the gradient approximation which it produces is relatively crude, in particular for high frequency variations in the image.

implified description

In simple terms, the operator calculates the "gradient" of the image intensity at each point, giving the direction of the largest possible increase from light to dark and the rate of change in that direction. The result therefore shows how "abruptly" or "smoothly" the image changes at that point, and therefore how likely it is that that part of the image represents an "edge", as well as how that edge is likely to be oriented. In practice, the magnitude (likelihood of an edge) calculation is more reliable and easier to interpret than the direction calculation.

Mathematically, the gradient of a two-variable function (here the image intensity function) is at each image point a 2D vector with the components given by the derivatives in the horizontal and vertical directions. At each image point, the gradient vector points in the direction of largest possible intensity increase, and the length of the gradient vector corresponds to the rate of change in that direction. This implies that the result of the Sobel operator at an image point which is in a region of constant image intensity is a zero vector and at a point on an edge is a vector which points across the edge, from darker to brighter values.

Formulation

Mathematically, the operator uses two 3×3 kernels which are convolved with the original image to calculate approximations of the derivatives - one for horizontal changes, and one for vertical. If we define A as the source image, and G"x" and G"y" are two images which at each point contain the horizontal and vertical derivative approximations, the computations are as follows:

:mathbf{G}_x = egin{bmatrix} +1 & 0 & -1 \+2 & 0 & -2 \+1 & 0 & -1 end{bmatrix} * mathbf{A}quad mbox{and} quad mathbf{G}_y = egin{bmatrix} +1 & +2 & +1 \0 & 0 & 0 \-1 & -2 & -1 end{bmatrix} * mathbf{A}

where * here denotes the 2-dimensional convolution operation. The "x"-coordinate is here defined as increasing in the "right"-direction, and the "y"-coordinate is defined as increasing in the "down"-direction. At each point in the image, the resulting gradient approximations can be combined to give the gradient magnitude, using::mathbf{G} = sqrt{ {mathbf{G}_x}^2 + {mathbf{G}_y}^2 }

Using this information, we can also calculate the gradient's direction::mathbf{Theta} = operatorname{arctan}left({ mathbf{G}_y over mathbf{G}_x } ight)where, for example, Θ is 0 for a vertical edge which is darker on the left side.

More formally

Since the intensity function of a digital image is only known at discrete points, derivatives of this function cannot be defined unless we assume that there is an underlying continuous intensity function which has been sampled at the image points. With some additional assumptions, the derivative of the continuous intensity function can be computed as a function on the sampled intensity function, i.e. the digital image. It turns out that the derivatives at any particular point are functions of the intensity values at virtually all image points. However, approximations of these derivative functions can be defined at lesser or larger degrees of accuracy.

The Sobel operator represents a rather inaccurate approximation of the image gradient, but is still of sufficient quality to be of practical use in many applications. More precisely, it uses intensity values only in a 3×3 region around each image point to approximate the corresponding image gradient, and it uses only integer values for the coefficients which weight the image intensities to produce the gradient approximation.

Technical details

As a consequence of its definition, the Sobel operator can be implemented by simple means in both hardware and software: only eight image points around a point are needed to compute the corresponding result and only integer arithmetic is needed to compute the gradient vector approximation. Furthermore, the two discrete filters described above are both separable:

:egin{bmatrix} +1 & 0 & -1 \+2 & 0 & -2 \+1 & 0 & -1 end{bmatrix} = egin{bmatrix} 1 \2 \1 end{bmatrix} egin{bmatrix} +1 & 0 & -1end{bmatrix} quad quadegin{bmatrix} +1 & +2 & +1 \0 & 0 & 0 \-1 & -2 & -1 end{bmatrix} = egin{bmatrix} +1 \0 \-1 end{bmatrix} egin{bmatrix} 1 & 2 & 1end{bmatrix}

and the two derivatives G"x" and G"y" can therefore be computed as

:mathbf{G}_x = egin{bmatrix} 1 \2 \1end{bmatrix} * left ( egin{bmatrix} +1 & 0 & -1 end{bmatrix} * mathbf{A} ight )quad mbox{and} quad mathbf{G}_y = egin{bmatrix} +1 \0 \-1 end{bmatrix} * left ( egin{bmatrix} 1 & 2 & 1end{bmatrix} * mathbf{A} ight )

In certain implementations, this separable computation may be advantageous since it implies fewer arithmetic computations for each image point.

Example

Because the result of the Sobel operator is a 2-dimensional map of the gradient at each point, it can be processed and viewed as though it is itself an image, with the areas of high gradient (the likely edges) visible as white lines. The following images illustrates this, by showing the computation of the Sobel operator on a simple image.

Scharr Operator

The Sobel operator, while reducing artifacts associated with a pure central differences operator, does not have perfect rotational symmetry. Scharr looked into improving this property and found that using the following kernels could produce better results:egin{bmatrix} +3 & +10 & +3 \0 & 0 & 0 \-3 & -10 & -3 end{bmatrix}egin{bmatrix} +3 & 0 & -3 \+10 & 0 & -10 \+3 & 0 & -3 end{bmatrix}

ee also

* Digital image processing
* Computer vision
* Edge detection
* Feature detection (computer vision)
* Feature extraction
* Image gradient
* Roberts Cross A similar, simpler edge-detection operator

References

Unpublished:

Sobel, I., Feldman,G., "A 3x3 Isotropic Gradient Operator for ImageProcessing", presented at a talk at the Stanford Artificial Project in1968, unpublished but often cited, orig. in Pattern Classification andScene Analysis, Duda,R. and Hart,P., John Wiley and Sons,'73, pp271-2

External links

* [http://www.informatik.uni-trier.de/~ley/db/indices/a-tree/s/Sobel:Irwin.html Bibliographic citations for Irwin Sobel] in DBLP


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Sobel-Operator — Der Sobel Operator ist ein einfacher Kantendetektions Filter, der in der Bildverarbeitung häufig Anwendung findet und dort mithilfe der Faltung als Algorithmus eingesetzt wird (Sobel Algorithmus). Dieser berechnet die erste Ableitung der… …   Deutsch Wikipedia

  • Sobel — could refer to: * Sobel operator, an operator used in image processing, particularly within edge detection algorithms * Barry Sobel (born 1959), American actor and comedian * Clifford Sobel (born 1949), United States diplomat and ambassador *… …   Wikipedia

  • Sobel — ist der Name von Dava Sobel (* 1947), US amerikanische Schriftstellerin Herbert Sobel (1912–1987), US amerikanischer Lieutenant Colonel Siehe auch: Sobel Operator Diese Seite ist eine …   Deutsch Wikipedia

  • Prewitt-Operator — Der Prewitt Operator ist ein Kantendetektions Filter ähnlich dem Sobel Operator, nur werden bei diesem die Grauwerte in der aktuellen Gradientenrichtung nicht zusätzlich gewichtet.   und   Analog zum Sobel Operator erhält man… …   Deutsch Wikipedia

  • Diskreter Laplace-Operator — Der Laplace Filter bzw. diskrete Laplace Operator ist ein Filter zur Kantendetektion, der den Laplace Operator (Summe der beiden reinen zweiten Ableitungen) approximiert: Unter einer Kante versteht man nun eine Kurve, entlang derer der Gradient… …   Deutsch Wikipedia

  • Bildsegmentierung — Die Segmentierung ist ein Teilgebiet der digitalen Bildverarbeitung und des maschinellen Sehens. Die Erzeugung von inhaltlich zusammenhängenden Regionen durch Zusammenfassung benachbarter Pixel oder Voxel entsprechend einem bestimmten… …   Deutsch Wikipedia

  • Kantendetektor — Originalbild Kantenbild, das mithilfe des Sobeloperators erstellt wurde. Die Kantendetektion ist Teil einer Segmentierung in der Bildbearbe …   Deutsch Wikipedia

  • Kantenerkennung — Originalbild Kantenbild, das mithilfe des Sobeloperators erstellt wurde. Die Kantendetektion ist Teil einer Segmentierung in der Bildbearbe …   Deutsch Wikipedia

  • Kantenfindung — Originalbild Kantenbild, das mithilfe des Sobeloperators erstellt wurde. Die Kantendetektion ist Teil einer Segmentierung in der Bildbearbe …   Deutsch Wikipedia

  • Laplacefilter — Der Laplace Filter bzw. diskrete Laplace Operator ist ein Filter zur Kantendetektion, der den Laplace Operator (Summe der beiden reinen zweiten Ableitungen) approximiert: Unter einer Kante versteht man nun eine Kurve, entlang derer der Gradient… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”