Builds a colour composite by averaging three groups of bands rather than picking three single wavelengths. Averaging suppresses per-band sensor noise and yields smoother, more saturated images than a three-band composite, while remaining a straightforward and disclosable operation.
Arguments
- cube
An
hsi_cube(from hyperspectR) or a 3-D array with dimensions(rows, cols, bands).- 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).
Examples
cube <- hsa_demo_cube()
hsa_fusion(cube)