1. A method for detecting materials in a hyperspectral scene, the method comprising: in a detecting engine provided with: i) a spectral library of references in which each reference is a spectrum of a material, ii) dimensional reduced representations of the spectra of a first pluralities of pixels included in the hyperspectral scene, the representations including basis vectors and dimensional reduced coefficients, and iii) full spectra of a second plurality of pixels included in the hyperspectral scene, with respect to a subject spectrum of a respective material from the spectral library of references; for each pixel in the second plurality of pixels, determining a score indicative of the likelihood the spectrum of a respective pixel matches the subject spectrum of the respective material; transforming the subject spectrum of the respective material into dimensional reduced library coefficients based on the provided basis vectors; for each pixel in the first plurality of pixels, determining which pixel is a variant pixel having dimensional reduced coefficients sufficiently different from dimensional reduced coefficients associated with other pixels; for each variant pixel, determining a score indicative of the likelihood that the dimensional reduced coefficients associated with a respective variant pixel match the dimensional reduced library coefficients of the respective material; comparing the scores to a threshold; and based on the comparison, determining in which of the pixels in the hyperspectral scene the respective material is present.