The invention provides a cereal freshness detecting method and device. According to the method, acquired character information of standard cereals with different varieties and terahertz transmission spectra obtained after tabletting the standard cereals are stored, and a standard spectrum
library is built; performing Fourier transformation on the acquired time-domain
spectroscopy of the tabletting terahertz spectrum of one sample cereal to be detected, so as to obtain a terahertz spectrum chart, and calculating to obtain corresponding
refractive index spectrum and absorption coefficient spectrum; calculating
mean square errors and correlation coefficients for the calculation results and each standard
data set of the standard spectrum
library, and taking the character information corresponding to the standard data sets with the smallest
mean square error and the greatest
correlation coefficient as the terahertz spectrum detection conclusion of the sample cereal to be detected. The cereal freshness detecting device corresponds to the cereal freshness detecting method. As terahertz is very safe, is extremely small in
photon radiation energy and cannot injure human bodies, the method and the device are suitable for
field detection on
grain quality, the detection accuracy is high, and the effect is good.