Realm

oa::image::canny

Canny edge detection per plane: 3x3 Sobel gradient magnitude, non-maximum suppression along the quantized gradient direction, double thresholding, and bounded hysteresis relaxation. Pixels at or above high_threshold are strong edges; pixels at or above low_threshold are weak and are kept only when 8-connected to a strong edge. hysteresis_passes bounds the relaxation passes (edge chains longer than the bound are cut); zero selects height + width per plane. Output planes carry 1.0 on detected edges and 0.0 elsewhere. Errors Returns an error unless the image is a nonempty FP32 NCHW/CHW image and both thresholds are finite with 0 <= low_threshold <= high_threshold.

FnRust public API

Function Documentation

pub fn canny( input: &Image, low_threshold: f32, high_threshold: f32, hysteresis_passes: u32 ) -> Result<Image>
Canny edge detection per plane: 3x3 Sobel gradient magnitude, non-maximum suppression along the quantized gradient direction, double thresholding, and bounded hysteresis relaxation. Pixels at or above high_threshold are strong edges; pixels at or above low_threshold are weak and are kept only when 8-connected to a strong edge. hysteresis_passes bounds the relaxation passes (edge chains longer than the bound are cut); zero selects height + width per plane. Output planes carry 1.0 on detected edges and 0.0 elsewhere. Errors Returns an error unless the image is a nonempty FP32 NCHW/CHW image and both thresholds are finite with 0 <= low_threshold <= high_threshold.