edge_canny | R Documentation |
This is the wrapper of the cannyEdges() function in the imager package. t1 and t2 determines the edge threshold. if the threshold parameters are missing, they are determined automatically using a k-means heuristic. alpha parameter adjusts the automatic thresholds up or down. The edge detection is based on a smoothed image gradient (set by the sigma parameter). If smoothing parameter is set, high frequency noise is removed before applying the Canny edge detection.
edge_canny(im, t1, t2, alpha = 1, sigma = 2, smoothing = 0)
im |
an image. |
t1 |
threshold for weak edges (if missing, both thresholds are determined automatically). |
t2 |
threshold for strong edges. |
alpha |
threshold adjustment factor (default 1). |
sigma |
degree of smoothing image gradient. |
smoothing |
numeric (integer). Smoothness of image texture. |
an array of the edge image.
im = edge_canny(regatta) plot(im)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.