Arabic Bulgarian Chinese Croatian Czech Danish Dutch English Estonian Finnish French German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Malagasy Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swedish Thai Turkish Vietnamese
Arabic Bulgarian Chinese Croatian Czech Danish Dutch English Estonian Finnish French German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Malagasy Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swedish Thai Turkish Vietnamese

definition - sobel operator

definition of Wikipedia

   Advertizing ▼


Sobel operator

  A color picture of a steam engine
  The Sobel operator applied to that image

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 that it produces is relatively crude, in particular for high frequency variations in the image.


  Simplified 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.


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 Gx and Gy are two images which at each point contain the horizontal and vertical derivative approximations, the computations are as follows:

\mathbf{G}_x = \begin{bmatrix} 
-1 & 0 & +1 \\
-2 & 0 & +2 \\
-1 & 0 & +1 
\end{bmatrix} * \mathbf{A}
\mathbf{G}_y = \begin{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{atan2}\left({ \mathbf{G}_y , \mathbf{G}_x }\right)

where, for example, Θ is 0 for a vertical edge which is darker on the right 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.

  Extension to other dimensions

The Sobel operator consist of two separable operations [1]:

  • Smoothing perpendicular to the derivative direction with a triangle filter :  h(-1) = 1,  h(0) = 2,  h(1) = 1
  • Simple central difference in the derivative direction :  h'(-1) = -1,  h'(0) = 0,  h'(1) = 1

Sobel filters for image derivatives in different dimensions with x,y,z,t \in (0,-1,1)  :

1D:  h_x'(x) = h'(x);

2D:  h_x'(x,y) = h'(x)h(y)

3D:  h_x'(x,y,z) = h'(x)h(y)h(z)

4D:  h_x'(x,y,z,t) = h'(x)h(y)h(z)h(t)

Thus as an example the 3D Sobel kernel in z-direction:

h_z'(:,:,-1) = 
+1 & +2 & +1  \\
+2 & +4 & +2 \\
+1 & +2 & +1 
h_z'(:,:,0) = 
0 & 0 & 0  \\
0 & 0 & 0 \\
0 & 0 & 0 
h_z'(:,:,1) = 
-1 & -2 & -1  \\
-2 & -4 & -2 \\
-1 & -2 & -1 

  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:

-1 & 0 & 1 \\
-2 & 0 & 2 \\
-1 & 0 & 1 
\end{bmatrix} = \begin{bmatrix} 
1 \\
2 \\
\end{bmatrix} \begin{bmatrix} 
-1 & 0 & 1
\end{bmatrix} \quad \quad
-1 & -2 & -1 \\
\ \ 0 & \ \ 0 & \ \ 0 \\
\ \ 1 & \ \ 2 & \ \ 1 
\end{bmatrix} = \begin{bmatrix} 
-1 \\
\ \ 0 \\
\ \ 1  
\end{bmatrix} \begin{bmatrix} 
1 & 2 & 1

and the two derivatives Gx and Gy can therefore be computed as

\mathbf{G}_x = \begin{bmatrix} 
1 \\
2 \\
\end{bmatrix} * \left ( \begin{bmatrix} 
-1 & 0 & 1  
\end{bmatrix} * \mathbf{A} \right )
\quad \mbox{and} \quad 
\mathbf{G}_y = \begin{bmatrix} 
-1 \\
\ \ 0 \\
\ \ 1  
\end{bmatrix} * \left ( \begin{bmatrix} 
1 & 2 & 1
\end{bmatrix} * \mathbf{A} \right )

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

Applying convolution K to pixel group P can be represented in pseudocode as:

N(x,y) =  Sum of { K(i,j).P(x-i,y-j)}, for i,j running from -1 to 1.
N(x,y) represents the new matrix resulted  after applying the Convolution K to P. where P is pixel matrix.


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.

  Grayscale test image of brick wall and bike rack
  Normalized gradient magnitude from Sobel operator
  Normalized x-gradient from Sobel operator
  Normalized y-gradient from Sobel operator

  Alternative operators

The Sobel operator, while reducing artifacts associated with a pure central differences operator, does not have perfect rotational symmetry. Scharr looked into optimizing this property.[2][3] Filter kernels up to size 5 x 5 have been presented there, but the most frequently used one is:

+3 & +10 & +3 \\
\ \ 0 & \ \ 0 & \ \ 0 \\
-3 & -10 & -3 
\ \ \ \ \ \ \ \ \  
+3 & 0 & -3 \\
+10 & 0 & -10 \\
+3 & 0 & -3 

Scharr operators result from an optimization minimizing weighted mean squared angular error in Fourier domain. This optimization is done under the condition that resulting filters are numerically consistent. Therefore they really are derivative kernels rather than merely keeping symmetry constraints.

A similar optimization strategy and resulting filters were also presented by Farid and Simoncelli.[4][5] They also investigate higher-order derivative schemes. In contrast to the work of Scharr, these filters are not enforced to be numerically consistent.

The problem of derivative filter design has been revisited e.g. by Kroon.[6]

Orientation-optimal derivative kernels drastically reduce systematic estimation errors in optical flow estimation. Larger schemes with even higher accuracy and optimized filter families for extended optical flow estimation have been presented in subsequent work by Scharr.[7] Second order derivative filter sets have been investigated for transparent motion estimation.[8] It has been observed that the larger the resulting kernels are, the better they approximate Derivative of Gaussian filters.

  Example comparisons

Here, four different gradient operators are used to estimate the magnitude of the gradient of the test image.

  Grayscale test image of brick wall and bike rack
  Gradient magnitude from Sobel operator
  Gradient magnitude from Scharr operator
  Gradient magnitude from Roberts Cross operator
  Gradient magnitude from Prewitt operator

  See also


  1. ^ K. Engel (2006). Real-time volume graphics,. pp. 112–114. 
  2. ^ Scharr, Hanno, 2000, Dissertation (in German), Optimal Operators in Digital Image Processing .
  3. ^ B. Jähne, H. Scharr, and S. Körkel. Principles of filter design. In Handbook of Computer Vision and Applications. Academic Press, 1999.
  4. ^ H. Farid and E. P. Simoncelli, Optimally Rotation-Equivariant Directional Derivative Kernels, Int'l Conf Computer Analysis of Images and Patterns, pp. 207--214, Sep 1997.
  5. ^ H. Farid and E. P. Simoncelli, Differentiation of discrete multi-dimensional signals, IEEE Trans Image Processing, vol.13(4), pp. 496--508, Apr 2004.
  6. ^ D. Kroon, 2009, Short Paper University Twente, Numerical Optimization of Kernel Based Image Derivatives .
  7. ^ Scharr, Hanno, Optimal Filters for Extended Optical Flow In: Jähne, B., Mester, R., Barth, E., Scharr, H. (eds.) IWCM 2004. LNCS, vol. 3417, pp. 14–29. Springer, Heidelberg (2007).
  8. ^ Scharr, Hanno, OPTIMAL SECOND ORDER DERIVATIVE FILTER FAMILIES FOR TRANSPARENT MOTION ESTIMATION 15th European Signal Processing Conference (EUSIPCO 2007), Poznan, Poland, September 3–7, 2007.

  External links



All translations of sobel operator

sensagent's content

  • definitions
  • synonyms
  • antonyms
  • encyclopedia

Dictionary and translator for handheld

⇨ New : sensagent is now available on your handheld

   Advertising ▼

sensagent's office

Shortkey or widget. Free.

Windows Shortkey: sensagent. Free.

Vista Widget : sensagent. Free.

Webmaster Solution


A windows (pop-into) of information (full-content of Sensagent) triggered by double-clicking any word on your webpage. Give contextual explanation and translation from your sites !

Try here  or   get the code


With a SensagentBox, visitors to your site can access reliable information on over 5 million pages provided by Sensagent.com. Choose the design that fits your site.

Business solution

Improve your site content

Add new content to your site from Sensagent by XML.

Crawl products or adds

Get XML access to reach the best products.

Index images and define metadata

Get XML access to fix the meaning of your metadata.

Please, email us to describe your idea.


The English word games are:
○   Anagrams
○   Wildcard, crossword
○   Lettris
○   Boggle.


Lettris is a curious tetris-clone game where all the bricks have the same square shape but different content. Each square carries a letter. To make squares disappear and save space for other squares you have to assemble English words (left, right, up, down) from the falling squares.


Boggle gives you 3 minutes to find as many words (3 letters or more) as you can in a grid of 16 letters. You can also try the grid of 16 letters. Letters must be adjacent and longer words score better. See if you can get into the grid Hall of Fame !

English dictionary
Main references

Most English definitions are provided by WordNet .
English thesaurus is mainly derived from The Integral Dictionary (TID).
English Encyclopedia is licensed by Wikipedia (GNU).


The wordgames anagrams, crossword, Lettris and Boggle are provided by Memodata.
The web service Alexandria is granted from Memodata for the Ebay search.
The SensagentBox are offered by sensAgent.


Change the target language to find translations.
Tips: browse the semantic fields (see From ideas to words) in two languages to learn more.

last searches on the dictionary :

4261 online visitors

computed in 0.171s

   Advertising ▼

I would like to report:
section :
a spelling or a grammatical mistake
an offensive content(racist, pornographic, injurious, etc.)
a copyright violation
an error
a missing statement
please precise:



Company informations

My account



   Advertising ▼