Builds a colour composite by equally averaging three groups of measured bands. Averaging may reduce independent band noise but does not calibrate values. Explicit groups may overlap; singleton groups are allowed, including identical channels from one band. Each channel uses its own stretch.
Arguments
- cube
An
hsi_cube(from hyperspectR) or a 3-D array with dimensions(rows, cols, bands), of integer or double values. Optionalwavelengthsmetadata must be finite, unique and strictly increasing in nm. Without it, coordinates are band indices. An optional logical spatialmaskhas dimensions(rows, cols)and no missing entries;FALSEexcludes a pixel. Arrays may carry these as attributes; anhsi_cubemay carry them as list fields. Nonfinite observations are excluded.- red, green, blue
Integer vectors of band indices, or numeric wavelengths in nm when
by = "wavelength".NULL(default) splits the spectrum into three contiguous thirds, long wavelengths to red.- by
Either
"index"(default) or"wavelength".- stretch
Contrast stretch:
"percentile"(default),"range"or"none".- probs
Percentiles for
stretch = "percentile". Defaultc(0.02, 0.98).- display_limits
Two increasing finite endpoints used as the fixed colour domain for
stretch = "none". Defaultc(0, 1).- value_label
A truthful label for the input values. Default
"input value". A reflectance label requires known upstream calibration; numeric range alone cannot establish calibration.- interpolate
Logical; interpolate raster pixels. Default
TRUE.- missing
Missing-band policy.
"propagate"(default) requires every selected band;"available"averages the finite contributors in a group.
Examples
cube <- hsa_demo_cube()
hsa_fusion(cube)