Note that the input matrix should be square or results will be discarded

foto(
  x,
  window_size = 61,
  harmonics = 29,
  method = "zones",
  norm_spec = FALSE,
  high_pass = TRUE,
  pca = TRUE,
  plot = FALSE
)

Arguments

x

an image file, or single or multi-layer SpatRaster (RGB or otherwise), multi-layer data are averaged to a single layer

window_size

a moving window size in pixels (default = 61 pixels)

harmonics

number of harmonics to consider (29 by default)

method

zones (for discrete zones) or mw for a moving window approach

norm_spec

normalize radial spectrum, bolean TRUE or FALSE

high_pass

apply high pass filter to radial spectra, bolean TRUE or FALSE

pca

execute PCA, TRUE or FALSE. If FALSE only the radial spectra are returned for additional manipulation. Plotting is ignored if set to FALSE.

plot

plot output, bolean TRUE or FALSE

Value

returns a radial spectrum for a moving window across a raster layer

See also

Examples

if (FALSE) {
# load demo data
r <- terra::rast(system.file("extdata",
  "yangambi.png",
  package = "foto",
  mustWork = TRUE
))

# classify pixels using zones (discrete steps)
output <- foto(r,
  plot = FALSE,
  window_size = 25,
  method = "zones"
)

# print data structure
print(names(output))
}