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.CVAssembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.2.0.2682 (3.2.0.2682)
Syntax public static void Sobel(
IInputArray src,
IOutputArray dst,
DepthType ddepth,
int xorder,
int yorder,
int kSize = 3,
double scale = 1,
double delta = 0,
BorderType borderType = BorderType.Reflect101
)
Public Shared Sub Sobel (
src As IInputArray,
dst As IOutputArray,
ddepth As DepthType,
xorder As Integer,
yorder As Integer,
Optional kSize As Integer = 3,
Optional scale As Double = 1,
Optional delta As Double = 0,
Optional borderType As BorderType = BorderType.Reflect101
)
public:
static void Sobel(
IInputArray^ src,
IOutputArray^ dst,
DepthType ddepth,
int xorder,
int yorder,
int kSize = 3,
double scale = 1,
double delta = 0,
BorderType borderType = BorderType::Reflect101
)
static member Sobel :
src : IInputArray *
dst : IOutputArray *
ddepth : DepthType *
xorder : int *
yorder : int *
?kSize : int *
?scale : float *
?delta : float *
?borderType : BorderType
(* Defaults:
let _kSize = defaultArg kSize 3
let _scale = defaultArg scale 1
let _delta = defaultArg delta 0
let _borderType = defaultArg borderType BorderType.Reflect101
*)
-> unit
Parameters
- src
- Type: Emgu.CVIInputArray
Source image. - dst
- Type: Emgu.CVIOutputArray
Destination image - ddepth
- Type: Emgu.CV.CvEnumDepthType
output image depth; the following combinations of src.depth() and ddepth are supported:
src.depth() = CV_8U, ddepth = -1/CV_16S/CV_32F/CV_64F
src.depth() = CV_16U/CV_16S, ddepth = -1/CV_32F/CV_64F
src.depth() = CV_32F, ddepth = -1/CV_32F/CV_64F
src.depth() = CV_64F, ddepth = -1/CV_64F
when ddepth=-1, the destination image will have the same depth as the source; in the case of 8-bit input images it will result in truncated derivatives. - xorder
- Type: SystemInt32
Order of the derivative x - yorder
- Type: SystemInt32
Order of the derivative y - kSize (Optional)
- Type: SystemInt32
Size of the extended Sobel kernel, must be 1, 3, 5 or 7. - scale (Optional)
- Type: SystemDouble
Optional scale factor for the computed derivative values - delta (Optional)
- Type: SystemDouble
Optional delta value that is added to the results prior to storing them in dst - borderType (Optional)
- Type: Emgu.CV.CvEnumBorderType
Pixel extrapolation method
See Also