Digital spectrometry applied to glass and ceramic sorting