Identifies dead/hot pixels by statistical deviation from spatial neighborhood and replaces with neighborhood interpolation.
Arguments
- cube
An hsi_cube object.
- threshold
Numeric. Standard deviation threshold for detection. Default
3.- method
Character. Replacement method:
"mean"or"median"of spatial neighbors. Default"median".
Value
An hsi_cube object with corrected pixels.
Examples
cube <- hs_example_cube()
# Introduce a hot pixel
cube$data[15, 15, ] <- 999
fixed <- hs_fix_bad_pixels(cube, threshold = 3)