Subset a hyperspectral raster to three bands and apply a linear or histogram-equalized stretch. Supports predefined band combinations and custom wavelength selection.
Arguments
- x
A
SpatRasterwith hyperspectral data. Band names must be numeric wavelengths in nm.- type
Character or numeric. A predefined band combination (
"RGB","CIR","NIR","SWIR") or a numeric vector of exactly 3 wavelengths in nm.- tol
Numeric. Wavelength tolerance for band matching in nm. Default
25.- histeq
Logical. Use histogram equalization instead of linear stretch. Default
FALSE.- filename
Character. Output filename. Default
""keeps result in memory.- overwrite
Logical. Overwrite existing file. Default
FALSE.- ...
Additional arguments passed to
terra::writeRaster().
Value
A SpatRaster with 3 stretched bands.
See also
Other HSI Transformations:
hsi_apply_mnf(),
hsi_calc_difference(),
hsi_calc_mnf(),
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_destripe(),
hsi_remove_continuum(),
hsi_smooth_median(),
hsi_smooth_savgol(),
hsi_tiled(),
hsi_write_scaled()