Anomalous pattern recognition based on image recognition in food safety detection

Ting Hu1
1Faculty of Science, The University of Hong Kong, 999077, Hong Kong Special Administrative Region

Abstract

In food processing, foreign matter inevitably contaminates packaged food. To ensure food safety, ray-based detection is used; however, the original images suffer from aberrations and noise that degrade quality and hinder further processing. Thus, images are preprocessed to enhance quality by highlighting key features and suppressing irrelevant ones before abnormal pattern recognition. Following image segmentation, a BP neural network algorithm is applied for foreign object detection. In tests with contaminants such as metal wires, stones, and glass, the algorithm identified distinct abnormal fluctuations at gray levels of 132, 108, and 34, respectively, allowing it to reliably detect foreign objects. Although the practical detection rate reached 100%, occasional misjudgments suggest that further optimization is needed. Overall, this method introduces a novel approach to detecting foreign objects in food and offers promising new strategies for improving food safety monitoring.

Keywords: ray detection, image segmentation, BP neural network algorithm, food safety monitoring, pattern recognition