Skip to contents

Normalizes the cube by a white reference, optionally with dark correction.

Usage

hs_white_normalize(cube, white, dark = NULL)

Arguments

cube

An hsi_cube object.

white

An hsi_cube object or 3D array representing the white reference.

dark

An hsi_cube object or 3D array representing the dark reference. Default NULL (no dark subtraction).

Value

An hsi_cube object with normalized values.

Examples

cube <- hs_simulate_cube(rows = 10, cols = 10, noise_sd = 0)
white <- hsi_cube(array(0.95, dim(cube$data)), cube$wavelengths)
norm <- hs_white_normalize(cube, white)