powered by
Canny Edge Detector for Images. Adapted from https://github.com/bnosac/image/tree/master/image.CannyEdges.
image_canny_edge(img, index = "GRAY", s = 5, low_thr = 10, high_thr = 20)
a list with an Image object with values 0 or 255, and the number of pixels which have value 255 (pixels_nonzero).
Image
An Image object.
A character string with the index to be used. Defaults to "GRAY".
"GRAY"
sigma, the Gaussian filter variance. Defaults to 5.
lower threshold value of the algorithm. Defaults to 10.
upper threshold value of the algorithm. Defaults to 20
if(interactive()){ library(pliman) img <- image_pliman("sev_leaf.jpg") conts <- image_canny_edge(img, index = "B") par(mfrow = c(1, 2)) plot(img) plot(conts$edges) par(mfrow = c(1, 1)) }
Run the code above in your browser using DataLab