Preprocessing#
Reflectance transformation#
import hsi
from hsi.preprocessing import make_reference, reflectance_calibration
img = hsi.open("path/to/file.hdr")
dark = hsi.open("path/to/dark_file.hdr")
white_ref = make_reference(img[:100, :, :])
dark_ref = make_reference(dark)
reflectance = reflectance_calibration(img, white_ref, dark_ref)