Importance of spatial and spectral data reduction in the detection of internal defects in food products