pub fn canny<T>(
) -> Array<bool> where
T: HasAfEnum + EdgeComputable,
Canny edge detection operator
The Canny edge detector is an edge detection operator that uses a multi-stage algorithm to detect a wide range of edges in images. A more in depth discussion on it can be found here.
inputis the input image
threshold_typehelps determine if user set high threshold is to be used or not. It can take values defined by the enum CannyThresholdType
lowis the lower threshold % of the maximum or auto-derived high
highis the higher threshold % of maximum value in gradient image used in hysteresis procedure. This value is ignored if CannyThresholdType::OTSU is chosen.
sobel_windowis the window size of sobel kernel for computing gradient direction and magnitude.
is_fastindicates if L1 norm(faster but less accurate) is used to compute image gradient magnitude instead of L2 norm.
An Array of binary type DType::B8 indicating edges(All pixels with non-zero values are edges).