[−][src]Function opencv::imgproc::spatial_gradient
pub fn spatial_gradient(
src: &dyn ToInputArray,
dx: &mut dyn ToOutputArray,
dy: &mut dyn ToOutputArray,
ksize: i32,
border_type: i32
) -> Result<()>
Calculates the first order image derivative in both x and y using a Sobel operator
Equivalent to calling:
ⓘThis example is not tested
Sobel( src, dx, CV_16SC1, 1, 0, 3 ); Sobel( src, dy, CV_16SC1, 0, 1, 3 );
Parameters
- src: input image.
- dx: output image with first-order derivative in x.
- dy: output image with first-order derivative in y.
- ksize: size of Sobel kernel. It must be 3.
- borderType: pixel extrapolation method, see #BorderTypes
See also
Sobel
C++ default parameters
- ksize: 3
- border_type: BORDER_DEFAULT