http://www.emgu.com
The Sobel operators combine Gaussian smoothing and differentiation so the result is more or less robust to the noise. Most often, the function is called with (xorder=1, yorder=0, aperture_size=3) or (xorder=0, yorder=1, aperture_size=3) to calculate first x- or y- image derivative. The first case corresponds to
 
              |-1  0  1|
              |-2  0  2|
              |-1  0  1|
kernel and the second one corresponds to
              |-1 -2 -1|
              | 0  0  0|
              | 1  2  1|
or
              | 1  2  1|
              | 0  0  0|
              |-1 -2 -1|
kernel, depending on the image origin (origin field of IplImage structure). No scaling is done, so the destination image usually has larger by absolute value numbers than the source image. To avoid overflow, the function requires 16-bit destination image if the source image is 8-bit. The result can be converted back to 8-bit using cvConvertScale or cvConvertScaleAbs functions. Besides 8-bit images the function can process 32-bit floating-point images. Both source and destination must be single-channel images of equal size or ROI size

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.10.1935 (2.4.10.1935)

Syntax

C#
public static void cvSobel(
	IntPtr src,
	IntPtr dst,
	int xorder,
	int yorder,
	int apertureSize
)
Visual Basic
Public Shared Sub cvSobel ( 
	src As IntPtr,
	dst As IntPtr,
	xorder As Integer,
	yorder As Integer,
	apertureSize As Integer
)
Visual C++
public:
static void cvSobel(
	IntPtr src, 
	IntPtr dst, 
	int xorder, 
	int yorder, 
	int apertureSize
)
F#
static member cvSobel : 
        src : IntPtr * 
        dst : IntPtr * 
        xorder : int * 
        yorder : int * 
        apertureSize : int -> unit 

Parameters

src
Type: System..::..IntPtr
Source image.
dst
Type: System..::..IntPtr
Destination image
xorder
Type: System..::..Int32
Order of the derivative x
yorder
Type: System..::..Int32
Order of the derivative y
apertureSize
Type: System..::..Int32
Size of the extended Sobel kernel, must be 1, 3, 5 or 7. In all cases except 1, apertureSize x apertureSize separable kernel will be used to calculate the derivative. For aperture_size=1 3x1 or 1x3 kernel is used (Gaussian smoothing is not done). There is also special value CV_SCHARR (=-1) that corresponds to 3x3 Scharr filter that may give more accurate results than 3x3 Sobel. Scharr aperture is:
             | -3 0  3|
             |-10 0 10|
             | -3 0  3|
for x-derivative or transposed for y-derivative.

See Also