Compute Minimum Noise Fraction transform
Arguments
- x
A
SpatRasterwith hyperspectral data.- trim
Non-negative integer. Number of bands to drop symmetrically from both spectral edges before computing the transform. Default
0Lapplies no trimming.- ...
Additional arguments passed to
spacetime::mnf(), notablySigma.Noisefor a custom noise covariance matrix andusefor NA handling. Default noise estimate uses0.5 * cov(diff(x))(MAF).
Value
An object of class c("mnf", "prcomp") with components:
- values
Numeric vector of eigenvalues (noise fractions), one per band.
- rotation
Numeric matrix of eigenvectors (loadings).
- x
Numeric matrix of MNF scores (pixels x bands).
Details
MNF components are ordered by decreasing noise fraction: MNF1 carries
the most noise, the final components carry the most signal. Eigenvalues
approximate the noise fraction under the proportional covariance model and
are non-negative, but may exceed 1 with real data. 1 - eigenvalue is the
lag-1 autocorrelation of that component. Inspect $values to identify the
signal-rich tail before passing the result to hsi_apply_mnf().
When x has been pre-processed with hsi_smooth_savgol(), spectral edge
bands become nearly collinear due to the polynomial fitting, which can make
the noise covariance matrix singular. Set trim to ceiling(n / 2) where
n is the window size passed to hsi_smooth_savgol() to drop the
affected bands from both ends before computing the transform.
Wraps spacetime::mnf() by Edzer Pebesma, implementing the algorithm of
Green et al. (1988) with noise estimation following Switzer & Green (1984).
Green, A.A., Berman, M., Switzer, P. and Craig, M.D. (1988). A transformation for ordering multispectral data in terms of image quality with implications for noise removal. IEEE Transactions on Geoscience and Remote Sensing, 26(1), 65–74.
Switzer, P. and Green, A. (1984). Min/max autocorrelation factors for multivariate spatial imagery. Technical Report, Department of Statistics, Stanford University.
See also
hsi_apply_mnf(), spacetime::mnf()
Other HSI Transformations:
hsi_apply_mnf(),
hsi_calc_difference(),
hsi_calc_ndi(),
hsi_calc_raba(),
hsi_calc_rabd(),
hsi_calc_ratio(),
hsi_calc_rcv(),
hsi_calc_reflectance(),
hsi_calc_remp(),
hsi_calc_rmean(),
hsi_calc_rmedian(),
hsi_calc_rsd(),
hsi_calc_stretch(),
hsi_destripe(),
hsi_remove_continuum(),
hsi_smooth_median(),
hsi_smooth_savgol(),
hsi_tiled(),
hsi_write_scaled()
Examples
if (FALSE) { # \dontrun{
x <- terra::rast("REFLECTANCE_testdata.tif")
x_mnf <- hsi_calc_mnf(x)
x_mnf$values
# After hsi_smooth_savgol() with window = 15
x_mnf <- hsi_calc_mnf(x, trim = 8L)
} # }