cv.spatialGradient - MATLAB File Help
cv.spatialGradient

Calculates the first order image derivative in both x and y using a Sobel operator

[dx, dy] = cv.spatialGradient(src)
[...] = cv.spatialGradient(..., 'OptionName', optionValue, ...)

Input

Output

Options

Equivalent to calling:

dx = cv.Sobel(src, 'DDepth','int16', 'XOrder',1, 'YOrder',0, 'KSize',3);
dy = cv.Sobel(src, 'DDepth','int16', 'XOrder',0, 'YOrder',1, 'KSize',3);
See also