image_canny_edge | R Documentation |
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)
img |
An |
index |
A character string with the index to be used. Defaults to |
s |
sigma, the Gaussian filter variance. Defaults to 5. |
low_thr |
lower threshold value of the algorithm. Defaults to 10. |
high_thr |
upper threshold value of the algorithm. Defaults to 20 |
a list with an Image
object with values 0 or 255, and the number of
pixels which have value 255 (pixels_nonzero).
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))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.