slideBrick | R Documentation |
Calculate focal statistics on a hyperspectral image using non-overlapping sliding windows.
slideBrick(Brick, slide_windows, fun = median)
Brick |
An object of class |
slide_windows |
An object of class |
fun |
A vectorized function indicating the statistics to be calculated
within each sliding-windows, e.g. |
A vector or matrix containing the estimates of each sliding windows.
slideWindows()
p <- system.file('exdata', 'obory.dat', package = 'hyperbrick') im <- buildBrick(p, ref_layer = 35, spectral_feature = "radiance", hFOV = 36.8, vFOV = 36.8, height = 45) print(im) plotRGB(im, r = 63, b = 34, g = 11, scale = 90) ext <- extent(c(512700.2, 512715, 5769462, 5769477)) sw <- slideWindows(ext, n = c(7, 7)) lapply(sw, lines, col = "white") -> null_obj sb <- slideBrick(im, sw, fun = mean) head(sb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.