Skip to contents

Destripe hyperspectral raster

Usage

hsi_destripe(x, filename = "", overwrite = FALSE, ...)

Arguments

x

A SpatRaster with hyperspectral data.

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 destriped reflectance values.

Details

Pushbroom detectors produce additive (offset) and multiplicative (gain) striping (Rogaß et al., 2011). Because dark current – the source of additive miscalibration – is removed upstream by hsi_calc_reflectance(), only multiplicative residuals from uneven flat-field calibration remain. Per band, each column is therefore scaled by pixel × (global_median / column_median), a gain-only variant of the moment-matching approach of Gadallah et al. (2000) using median as a parameter-free robust estimator. Input must be cropped to the specimen extent – background pixels bias column medians and corrupt the correction. For sources and types of detector errors look, for example, into:

Rogaß et al. (2011) doi:10.3390/s110606370

Gadallah et al. (2000) doi:10.1080/01431160050030592

Input should be cropped to the specimen extent before destriping. Background pixels (ruler, frame, tape) bias column medians and corrupt the correction.

Examples

if (FALSE) { # \dontrun{
x <- terra::rast("REFLECTANCE_testdata.tif")

x_destripe <- hsi_destripe(x)

x_destripe <- hsi_destripe(
  x,
  filename = "REFLECTANCE_destripe.tif",
  overwrite = TRUE
)
} # }