The invention relates to the technical field of
image enhancement, and provides a food
impurity detection method based on a spectrum technology, which comprises the following steps: acquiring spectrum image data and built-in reference plate data on line, and normalizing
original data through real-time self-calibration to form standard spectrum characterization; performing motion and illumination disturbance compensation on the standard spectrum characterization, and establishing a material spectrum
fingerprint database containing material category and source information based on the collected standard spectrums of the
impurity material and the contact part material; performing rapid screening and connected domain extraction on the compensated
spectral representation to obtain a candidate region, calculating the similarity and the novelty of the candidate region and the
fingerprint database, and triggering local reinspection when the similarity falls into an uncertain interval or the novelty exceeds a preset threshold value to determine the category and the position of an
impurity; and outputting a multi-dimensional detection result, and performing controlled updating and
version management on the
fingerprint database and the candidate screening threshold value based on a confirmation sample.