Skip to main content

canny_gpu

Function canny_gpu 

Source
pub fn canny_gpu(
    runtime: &WgpuRuntime,
    source: &GpuImage,
    options: GpuCannyOptions,
) -> SpatialResult<GpuImage>
Expand description

Computes a CPU-compatible binary Canny edge map entirely on the device.

Accepts one logical u8 channel and preserves image dimensions/metadata. Signed integer Sobel, asymmetric directional NMS ties and exact threshold conversion match the specialized CPU route. Complete eight-neighbor weak connectivity uses monotone atomic union of weak candidates and per-root strong-neighbor flags, with no propagation iteration cutoff. All five/six passes share one submission. No image/label readback, host wait, implicit blur, CPU fallback or automatic placement occurs. Buffer/workgroup/runtime limits reject before allocation.