| Cv2Canny Method (InputArray, OutputArray, Double, Double, Int32, Boolean) |
Finds edges in an image using Canny algorithm.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static void Canny(
InputArray src,
OutputArray edges,
double threshold1,
double threshold2,
int apertureSize = 3,
bool L2gradient = false
)
Public Shared Sub Canny (
src As InputArray,
edges As OutputArray,
threshold1 As Double,
threshold2 As Double,
Optional apertureSize As Integer = 3,
Optional L2gradient As Boolean = false
)
public:
static void Canny(
InputArray^ src,
OutputArray^ edges,
double threshold1,
double threshold2,
int apertureSize = 3,
bool L2gradient = false
)
static member Canny :
src : InputArray *
edges : OutputArray *
threshold1 : float *
threshold2 : float *
?apertureSize : int *
?L2gradient : bool
(* Defaults:
let _apertureSize = defaultArg apertureSize 3
let _L2gradient = defaultArg L2gradient false
*)
-> unit
Parameters
- src
- Type: OpenCvSharpInputArray
Single-channel 8-bit input image - edges
- Type: OpenCvSharpOutputArray
The output edge map. It will have the same size and the same type as image - threshold1
- Type: SystemDouble
The first threshold for the hysteresis procedure - threshold2
- Type: SystemDouble
The second threshold for the hysteresis procedure - apertureSize (Optional)
- Type: SystemInt32
Aperture size for the Sobel operator [By default this is ApertureSize.Size3] - L2gradient (Optional)
- Type: SystemBoolean
Indicates, whether the more accurate L2 norm should be used to compute the image gradient magnitude (true), or a faster default L1 norm is enough (false). [By default this is false]
See Also