sobelcv
Calculates the derivatives using the Sobel operator.
Syntax
R = sobelcv(handle, depth, dx, dy...)
R = sobelcv(handle, depth, dx, dy, ksize, scale, delta, type)
Inputs
- handle
 - Handle of an image.
 - depth
 - Depth of R. A value of -1 will result in the same depth as
              handle. Valid values are: 
- -1
 - Same depth as input.
 - 0
 - 8-bit unsigned integer [CV_8U]
 - 2
 - 16-bit unsigned integer [CV_16U]
 - 3
 - 16-bit signed integer [CV_16S]
 - 5
 - 32-bit floating point number [CV_32F]
 - 6
 - 64-bit floating point number [CV_64F]
 
 - dx
 - Order of derivative x, must be 0 or 1.
 - dy
 - Order of derivative y, must be 0 or 1.
 - ksize
 - Optional parameter specifying the size of extended Sobel kernel. Defaults to 3, valid values are 1,3,5 or 7.
 - scale
 - Optional parameter specifying the scale factor. Defaults to 1.
 - delta
 - Optional value to be added to each pixel of R. Default value is 0.
 - type
 - Optional parameter specifying the pixel extrapolation method. Default value is 4.
            Valid values are:
            
- 0
 - Type cv::BORDER_CONSTANT.
 - 1
 - Type cv::BORDER_REPLICATE
 - 2
 - Type cv::BORDER_REFLECT
 - 4
 - Type cv::BORDER_DEFAULT - default
 - 16
 - Type cv::BORDER_ISOLATED
 
 
Outputs
- R
 - Handle of the resulting image.
 
Example
handle = imreadcv('owl.jpg', 0);
depth = -1;
dx = 1;
dy = 0;
R = sobelcv(handle, depth, dx, dy);
            Figure 1. Input image
Figure 2. Output image