Represent spectral data using a spline
Contents
Syntax
[KNOTS, CP_REF, CP_WAVE] = get_nurbs(R, WAVES, DEGREE, KNOT_THRESH, ALPHA, ITERS)
Description
This function generates a NURBS representation for a given set of hyperspectral data.
Input:
R: Input spectral data, stored as a 3D array of size (height x width x bands).
WAVES: Wavelength vector for the spectra.
DEGREE: Degree of the basis (polynominal) functions. By default, DEGREE = 3.
ALPHA: A balancing factor between 0 and 1. This controls the weight of the data closeness term (reconstruction error)
with respect to the original data when the spline is computed. By default, ALPHA = 0.1.
KNOT_THRESH: The minimal number of knots to be used for the spline representation. By default, KNOT_THRESH = bands - 2;
ITERS: The maximum number of iterations for the fitting algorithm. By default, ITERS = 10.
Output:
KNOTS: Knot vector.
CP_REF: Control point coordinates in the form of a 3D array of size height x width x ctrl_pts.
CP_WAVE: Control point coordinates in the wavelength domain represented as a vector of size 1 x ctrl_pts.
Example
Compute the spline representation of the materials in the scene using a spline of degree 2 and the corresponding wavelength vector.
[KNOTS, CP_REF, CP_WAVE] = get_nurbs(HSZ.S.Elements, HSZ.HDR.wavelength, 2);