pub fn canny(
image: &impl ToInputArray,
edges: &mut impl ToOutputArray,
threshold1: f64,
threshold2: f64,
aperture_size: i32,
l2gradient: bool,
) -> Result<()>
Expand description
Finds edges in an image using the Canny algorithm Canny86 .
The function finds edges in the input image and marks them in the output map edges using the Canny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The largest value is used to find initial segments of strong edges. See http://en.wikipedia.org/wiki/Canny_edge_detector
§Parameters
- image: 8-bit input image.
- edges: output edge map; single channels 8-bit image, which has the same size as image .
- threshold1: first threshold for the hysteresis procedure.
- threshold2: second threshold for the hysteresis procedure.
- apertureSize: aperture size for the Sobel operator.
- L2gradient: a flag, indicating whether a more accurate
norm
should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the default
norm
is enough ( L2gradient=false ).
§C++ default parameters
- aperture_size: 3
- l2gradient: false