Function opencv::gapi::canny

source ·
pub fn canny(
    image: &GMat,
    threshold1: f64,
    threshold2: f64,
    aperture_size: i32,
    l2gradient: bool
) -> Result<GMat>
Expand description

Finds edges in an image using the Canny algorithm.

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

Note: Function textual ID is “org.opencv.imgproc.feature.canny”

Parameters

  • image: 8-bit input 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 inline formula norm inline formula should be used to calculate the image gradient magnitude ( L2gradient=true ), or whether the default inline formula norm inline formula is enough ( L2gradient=false ).

C++ default parameters

  • aperture_size: 3
  • l2gradient: false