A new algorithm for removal of cosmic spikes from hyperspectral Raman image data sets is presented. Spectra in a 3 × 3 pixel neighborhood are used to identify outlier-contaminated data points in the central pixel of that neighborhood. A preliminary despiking of the neighboring spectra is performed by median filtering. Correlations between the central pixel spectrum and its despiked neighbors are calculated, and the most highly correlated spectrum is used to identify outliers. Spike-contaminated data are replaced using results of polynomial interpolation. Because the neighborhood contains spectra obtained in three different frames, even large multi-pixel spikes are identified. Spatial, spectral, and temporal variation in signal is used to accurately identify outliers without the acquisition of any spectra other than those needed to generate the image itself. Sharp boundaries between regions of high chemical contrast do not interfere with outlier identification.
Caleb J. Behrend, Catherine P. Tarnowski, and Michael D. Morris, "Identification of Outliers in Hyperspectral Raman Image Data by Nearest Neighbor Comparison," Appl. Spectrosc. 56, 1458-1461 (2002)