View source: R/sobel_operator.R
sobel_operator | R Documentation |
Uses a Sobel-Feldman operator (3x3 kernel) to detect internal edges in a SpatRaster object.
sobel_operator(x)
x |
A SpatRaster object. |
A SpatRaster object with boundary values.
Amy Luo
data(T.cristatus)
T.cristatus <- terra::rast(T.cristatus_matrix, crs = T.cristatus_crs)
terra::ext(T.cristatus) <- T.cristatus_ext
edges <- sobel_operator(T.cristatus)
terra::plot(edges)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.