Table of Contents

Method SpatialGradient

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

SpatialGradient(InputArray, OutputArray, OutputArray, int, BorderTypes)

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

public static void SpatialGradient(InputArray src, OutputArray dx, OutputArray dy, int ksize = 3, BorderTypes borderType = BorderTypes.Default)

Parameters

src InputArray

input image.

dx OutputArray

output image with first-order derivative in x.

dy OutputArray

output image with first-order derivative in y.

ksize int

size of Sobel kernel. It must be 3.

borderType BorderTypes

pixel extrapolation method