A general module for hyperspectral image analysis
OBS: the images represent distinct images
Savitzky–Golay filter
|
Moving average smoothing
|
|
|
def rescale_01(self):
# Linear rescaling to interval zero-one
self.spc = np.array([rescale_spectrum_01(spec) for spec in self.spc],dtype=float)
return self
def rescale_zero(self):
# force series to start at zero, while maintaining range
self.spc = np.array([spec - min(spec) for spec in self.spc],dtype=float)
return self
def rescale_mean(self):
# centralization to the mean
self.spc = np.array([spec/np.mean(spec) for spec in self.spc],dtype=float)
return self
def rescale_zscore(self):
# Standardization of spectrum to a N(0,1)
self.spc = np.array([(spec - np.mean(spec))/np.std(spec) for spec in self.spc],dtype=float)
return self
Similar pixels replaced by 'exemplar' spectra
|
List of 'exemplars'
|
(1) Original data
(2) after PCA noise reduction
(3) after PCA pixel reduction
Rubberband baseline
|
Polynomial baseline
|
Piecewise rubberband baseline
|
Asymmetric least squares baseline
|