sobel: Sobel-Feldman operator

Description Usage Arguments Value Author(s) References Examples

View source: R/sobel.r

Description

An isotropic image gradient operator using a 3x3 window

Usage

1
sobel(x, method = "intensity", ...)

Arguments

...

Additional arguments passed to raster::overlay or, if method="edge", raster::focal (if you want a file written to disk use filename = "" argument)

x:

A raster class object

method:

Type of operator ("intensity", "direction", "edge")

Value

A raster class object or raster written to disk

Author(s)

Jeffrey S. Evans <[email protected]>

References

Sobel, I., & G. Feldman, (1969) A 3x3 Isotropic Gradient Operator for Image Processing, presented at the Stanford Artificial Intelligence Project (SAIL).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(raster)
r <- brick(system.file("external/rlogo.grd", package="raster")) 
s.int <- sobal(r[[1]])
s.dir <- sobal(r[[1]], method = "direction")
s.edge <- sobal(r[[1]], method = "edge")
par(mfrow=c(2,2))
  plot(r[[1]])
  plot(s.int, main="intensity") 
  plot(s.dir, main="direction") 
  plot(s.edge, main="edge")
  

khufkens/cropmonitor documentation built on Sept. 2, 2017, 4:19 p.m.