sobel_operator {BoundaryStats} | R Documentation |
Sobel-Feldman operator for edge detection
Description
Uses a Sobel-Feldman operator (3x3 kernel) to detect internal edges in a SpatRaster object.
Usage
sobel_operator(x)
Arguments
x |
A SpatRaster object. |
Value
A SpatRaster object with boundary values.
Author(s)
Amy Luo
Examples
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)
[Package BoundaryStats version 2.1.1 Index]