Description Usage Arguments Value Examples
View source: R/load_and_reshape.R
Reduce the resolution of images (columns) in a
SAR_matrix
object m
,
by aggregating all values inside d \times d patches
using the aggregation function fun
.
1 | patchify_SAR_matrix(m, d, fun = mean)
|
m |
An |
d |
The dimension of patches. |
fun |
The aggregation function. Default is mean. |
A SAR_matrix
of reduced dimension,
with appropriately adjusted raster attributes.
1 2 3 4 5 6 7 8 9 | filename <- system.file(
"extdata", "MG_CC_sub_norm_testclip.tif", package="rsar")
m <- load_SAR_matrix(filename)
dim(m)
mp <- patchify_SAR_matrix(m,4)
head(mp)
dim(mp)
bp <- matrix_to_brick(mp)
raster::plot(bp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.