A detector for detecting a different kind of object among objects being carried with high resolution using a plane spectrometer irradiates near-infrared ray and performs plane spectroscopy for a reflected light. The detector also detects spectral data of the reflected light and performs preprocessing for averaging and standardizing the spectral data. Then wavelength axis averaging, Lagrangian interpolation and spatial axis averaging are performed. Conversion of first-order/second-order differentiation, smoothing and calculation of the main component score on the basis of previously obtained loading vector data is also performed. Then performing judgment of a different kind of object is performed.