edgeDetection {biopixR} | R Documentation |
Canny edge detector
Description
Adapted code from the 'imager' cannyEdges
function
without the usage of 'dplyr' and 'purrr'. If the threshold parameters are
missing, they are determined automatically using a k-means heuristic. Use
the alpha parameter to adjust the automatic thresholds up or down. The
thresholds are returned as attributes. The edge detection is based on a
smoothed image gradient with a degree of smoothing set by the sigma
parameter.
Usage
edgeDetection(img, t1, t2, alpha = 1, sigma = 2)
Arguments
img |
image (import by |
t1 |
threshold for weak edges (if missing, both thresholds are determined automatically) |
t2 |
threshold for strong edges |
alpha |
threshold adjustment factor (default 1) |
sigma |
smoothing (default 2) |
Value
Object of class 'cimg', displaying detected edges.
References
https://CRAN.R-project.org/package=imager
Examples
edgeDetection(beads, alpha = 0.5, sigma = 0.5) |> plot()
[Package biopixR version 1.1.0 Index]