A foreign object visual inspection system and its inspection equipment
By establishing a reference color and foreign object feature library, pre-identifying and calibrating color parameters in real time, and dynamically updating the reference template, the problems of false alarms, missed detections, and shutdown calibration in existing foreign object visual inspection systems during dynamic environments and product switching are solved, achieving efficient and accurate foreign object detection.
Patent Information
- Application Number
- CN202511411459.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-09-29
AI Technical Summary
Existing foreign object visual inspection systems suffer from static parameters and lag in response when dealing with dynamic environments and changing products, leading to false alarms and missed detections. Furthermore, these systems are not adaptable to dynamic environments and products, and require extended downtime for calibration when handling changing products, impacting production efficiency and costs.
The system employs a reference color and foreign object feature library module, a camera module, a foreign object type pre-identification module, a color parameter calibration module, and a foreign object secondary detection module. By capturing images in real time, it pre-identifies suspected foreign objects, calls up dedicated calibration parameters, and dynamically updates the reference template, enabling rapid product switching and efficient detection.
It improves detection accuracy, reduces false alarms and missed detections, increases production efficiency, reduces costs, achieves adaptability to environmental and product fluctuations, and avoids the effects of background drift.
Smart Images

Figure CN120890997B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision inspection technology, specifically to a foreign object visual inspection system and its inspection equipment. Background Technology
[0002] In modern food industry production processes, product quality and safety are core considerations. Among them, visual inspection of foreign objects is an increasingly important link in ensuring the purity of food and the health of consumers.
[0003] Existing technologies, such as the AI-based food safety artificial intelligence supervision system disclosed in CN117456468A and the foreign object detection method and system for food processing disclosed in CN118706852A, demonstrate that the widely adopted foreign object visual detection systems typically involve core steps such as image acquisition, preprocessing, feature extraction, and classification decision-making in their basic working principle. Specifically, traditional systems often acquire images of the product to be inspected using an industrial camera with a fixed viewing angle. Then, they utilize preset image processing algorithms, such as grayscale thresholding, edge detection, or simple color difference analysis, to distinguish the main product from potential foreign objects. Based on this, and using static feature templates set through experience or obtained during initial training, they determine whether the identified abnormal areas belong to foreign objects that need to be removed.
[0004] The inherent characteristics of traditional visual inspection systems, as described above, have gradually revealed their limitations in addressing new challenges. Specifically, these limitations manifest in several ways: Traditional systems largely rely on pre-set or calibrated fixed parameters and detection thresholds under specific operating conditions. On one hand, this may lead to misjudging normal color differences within the product as foreign objects, causing unnecessary downtime for inspection, manual verification, or even the scrapping of good products, severely impacting production efficiency and material costs. On the other hand, genuine foreign objects, especially those whose color, brightness, or shape more closely resembles the changed product background, may fail to be effectively identified due to mismatched detection thresholds, resulting in missed detections and posing a potential threat to food safety. Furthermore, these systems lack real-time, adaptive response capabilities to environmental changes or inherent fluctuations in the product itself.
[0005] When faced with the increasingly frequent product switching demands of modern food production lines, the corresponding foreign object characteristics, normal product background characteristics, and optimal detection parameters all need to be comprehensively adjusted. Traditional solutions often require operators to spend a lot of time on manual calibration, which is quite subjective and leads to long downtime of the production line, significantly reducing production efficiency and significantly increasing the production cost per unit product.
[0006] Therefore, overcoming the inherent problems of static parameters and lag response in existing foreign object visual inspection systems when dealing with dynamic environments and changing products, and constructing an efficient and accurate inspection mechanism that can adapt to changes in real time, dynamically adjust detection parameters, and enable rapid product switching has become a key challenge for those skilled in the art. Summary of the Invention
[0007] The purpose of this invention is to provide a foreign object visual inspection system and its inspection equipment, which solves the problems existing in the background art.
[0008] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: The first aspect of the present invention provides a foreign object visual detection system, comprising: a reference color and foreign object feature library establishment module: acquiring image samples of foreign object-free areas in a batch of food to construct an initial reference template for each food item being detected; and simultaneously establishing a specialized foreign object feature library.
[0009] The camera module is used to capture images of the food to be inspected in real time while the production line is running.
[0010] The foreign object type pre-identification module is used to extract the effective detection area in the image of the food to be detected, and based on the special foreign object feature library, to pre-identify the suspected foreign objects in the effective detection area and determine the type of the suspected foreign objects.
[0011] The color parameter calibration module is used to call the corresponding calibration color parameters according to the type of suspected foreign object in the food image to be detected, and to feed back the called calibration color parameters to the camera module in real time. At the same time, it updates the benchmark template based on the valid detection images within a preset period.
[0012] The foreign object secondary detection module is used to acquire a second image of the food to be inspected and to identify the type of foreign object in the image of the food to be inspected.
[0013] A second aspect of the present invention provides a foreign object visual inspection device, comprising: a processor, a memory, and a communication bus. The memory stores a computer-readable program executable by the processor. The communication bus enables communication between the processor and the memory. When the processor executes the computer-readable program, it implements the foreign object visual inspection system of the present invention.
[0014] The beneficial effects of this invention are as follows: First, it solves the problem of false alarms and missed detections caused by fixed parameters and thresholds. By calibrating the color parameter module, it calls exclusive calibration parameters according to the suspected foreign object type and dynamically updates the benchmark template. Through secondary detection, it improves the adaptability to environmental and product fluctuations and enhances the detection accuracy.
[0015] Secondly, it addresses the lack of adaptive capabilities. The closed-loop system constructed in this invention, consisting of pre-identification, parameter invocation, template update, and secondary detection, responds to changes in real time and avoids the impact of background drift.
[0016] Third, it solves the problem of manual calibration required for product switching. A special foreign object feature library is established in advance, and parameters can be quickly called up during specific implementation without long-term downtime for manual adjustment, thereby improving production efficiency and reducing costs. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the system structure connection of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Reference Figure 1 As shown, the first aspect of this invention provides a foreign object visual detection system that solves the problem of false alarms and missed detections caused by fixed parameters and thresholds in the prior art. It uses a color parameter calibration module to call specific calibration parameters according to the suspected foreign object type and dynamically updates the baseline template. Through secondary detection, it improves adaptability to environmental and product fluctuations, thereby enhancing detection accuracy. Specifically, it includes: a baseline color and foreign object feature library establishment module: collecting image samples of foreign object-free areas in the batch of food being tested to construct an initial baseline template for each tested food. Simultaneously, a specialized foreign object feature library is established.
[0021] In a specific embodiment of the present invention, the image sample covers the food body to be detected, normal packaging paper and groove area. A corresponding initial reference template is generated by calculating the average RGB value of the pixels. The initial reference template includes the RGB range of the pixels of the food body to be detected, the specific color value of the normal packaging paper and the brightness threshold of the shadow area of the groove.
[0022] In a specific embodiment of the present invention, the specialized foreign object feature library includes color and morphological feature parameters corresponding to each of the detected food fragments, hair, black spots, abnormal packaging paper, and uncoated areas.
[0023] It should be noted that the specialized foreign object feature library is established in advance before being implemented in real-time detection on the food production line. During its establishment, the library first identifies the types of foreign objects that frequently appear throughout the entire production process of the target food, including debris, hair, black spots, abnormal packaging paper, and uncoated areas. Then, it collects real samples of these foreign objects and normal samples of the corresponding food. Using specialized equipment, it quantifies the color characteristic parameters (such as RGB range), hue, and morphological characteristic parameters (such as shape and size range) of each type of foreign object. Finally, these parameters are categorized and structured for storage, forming a complete specialized foreign object feature library. This provides a pre-set standard basis for comparing suspected foreign objects and determining their type during subsequent real-time detection on the production line.
[0024] This invention solves the problem of manual calibration required for product switching in traditional technologies. A special foreign object feature library is established in advance, and parameters can be quickly called up during implementation without long-term downtime for manual adjustment, thereby improving production efficiency and reducing costs.
[0025] The camera module is used to capture images of the food to be inspected in real time while the production line is running.
[0026] The foreign object type pre-identification module is used to extract the effective detection area in the image of the food to be detected, and based on the special foreign object feature library, to pre-identify the suspected foreign objects in the effective detection area and determine the type of the suspected foreign objects.
[0027] In a specific embodiment of the present invention, the method for extracting the effective detection area in the image of the food to be detected is as follows: performing preliminary region screening on the acquired image of the food to be detected, removing the production line background area contained in the image, wherein the production line background area is an area that does not contain the main body of the food to be detected and the normal packaging of the food to be detected, including but not limited to the metal frame of the conveyor belt, the shell of the detection equipment and the non-detection target associated shadow formed by ambient light.
[0028] Based on the initial benchmark templates for each food product being tested, valid detection areas are extracted from the areas after preliminary area screening. Specifically, the food product areas whose colors fall within the RGB range of the main food product pixels in the initial benchmark template, and the packaging paper areas whose colors match the specific color values of normal packaging paper in the initial benchmark template are retained. Meanwhile, the normal groove shadow areas of the food product whose brightness meets the brightness threshold of the groove shadow area in the initial benchmark template are removed.
[0029] In a specific embodiment of the present invention, the step of pre-identifying suspected foreign objects in the effective detection area based on the specialized foreign object feature library and determining the type of suspected foreign objects specifically involves: extracting the color feature parameters and morphological feature parameters of each suspected foreign object in the effective detection area; comparing the above parameters with the corresponding color and morphological feature parameters of debris, hair, black spots, abnormal packaging paper, and uncoated areas stored in the specialized foreign object feature library; and selecting the type of foreign object whose matching degree exceeds the matching degree threshold as the type of suspected foreign object in the effective detection area. The comparison result is the matching degree of the suspected foreign object in the effective detection area with debris, hair, black spots, abnormal packaging paper, and uncoated areas, respectively.
[0030] It should be noted that the matching degree can be obtained by first extracting the color feature parameters and morphological feature parameters of the suspected foreign object in the effective detection area, and then using conventional feature matching algorithms such as cosine similarity and Euclidean distance to calculate the similarity between these parameters and the feature parameters of various foreign objects such as debris and hair in the special foreign object feature library, and finally obtaining the matching degree between the suspected foreign object and each type of foreign object.
[0031] The color parameter calibration module is used to call the corresponding calibration color parameters according to the type of suspected foreign object in the food image to be detected, and to feed back the called calibration color parameters to the camera module in real time. At the same time, it updates the benchmark template based on the valid detection images within a preset period.
[0032] In a specific embodiment of the present invention, the step of calling the corresponding calibration color parameters according to the suspected foreign object type in the food image to be detected is as follows: based on the pre-identification result of the suspected foreign object in the food image to be detected, the exclusive calibration color parameters that are compatible with the optical characteristics of the suspected foreign object type are called from the foreign object type-exclusive calibration color parameter mapping table in the database.
[0033] The optical characteristics include color depth, contrast difference, and surface reflectivity.
[0034] The dedicated calibration color parameters include at least the image acquisition parameters of the camera module and the lighting parameters of the supporting multispectral lighting system.
[0035] The image acquisition parameters include, but are not limited to, exposure time, color channel gain, white balance parameters, and gamma correction curve; the illumination parameters include, but are not limited to, illumination mode, light source color component brightness, and polarization characteristics.
[0036] For example, when the suspected foreign object type is determined to be hair or a black spot, the calibrated color parameters invoked include: increasing the exposure time of the camera module by 0.5 milliseconds to 2 milliseconds, and increasing the red channel gain of the industrial-grade high-speed camera by 1 dB to 3 dB. Simultaneously, the multispectral adjustable illumination system is controlled to switch the main illumination mode to high-intensity backlighting combined with lateral near-infrared light source supplementary illumination to enhance the contrast between the fine, dark foreign object and the background.
[0037] When the suspected foreign object is determined to be a crumb with a color close to that of the main food component, the calibrated color parameters are as follows: the threshold of the RGB range of the reference color for the main food component to be detected is slightly adjusted downwards by 1% to 3%. The exposure time of the camera module is reduced by 0.2 milliseconds to 0.5 milliseconds. Simultaneously, the brightness of the blue component in the visible light source is increased by controlling the multispectral adjustable illumination system to alter the color balance and highlight the color difference between the breadcrumbs and the main food component.
[0038] When the suspected foreign object type is determined to be packaging paper abnormality, the calibrated color parameters include: controlling the camera module to correct the white balance parameters, shifting the color temperature towards a cooler tone direction of 5500K to 6500K. Simultaneously, the multispectral adjustable lighting system is controlled to switch the lighting mode to cross-polarized light lighting mode to suppress high-gloss reflections and specular reflections on the packaging paper surface. The packaging paper abnormality includes, but is not limited to, wrinkles, damage, and printing errors.
[0039] When a suspected foreign object is determined to be an uncoated area on the product surface, the calibration color parameters invoked include: controlling the camera module to adjust the gamma correction curve, increasing its brightness response nonlinearity to expand the dynamic range of the image's dark and bright areas. Simultaneously, the multispectral adjustable lighting system is controlled to switch the lighting mode to high-angle ring diffuse lighting to reduce interference from shadows and reflections on the judgment of regional brightness differences.
[0040] Subsequently, the calibration color parameters mentioned above are transmitted to the camera module in real time to adjust the image acquisition state of the camera module, ensuring that the optical difference between the suspected foreign object and the background area in the food image to be detected is effectively amplified, thereby improving the accuracy of subsequent foreign object identification.
[0041] In a specific embodiment of the present invention, the update of the reference template based on the effective detection images within a preset period is specifically as follows: the calibration color parameter module continuously collects effective detection images within a preset period. The effective detection images are images that have been filtered by the foreign object type pre-identification module, have no obvious interference information, and contain normal food and packaging. The absence of obvious interference information includes things like ambient stray light and equipment obstruction.
[0042] Based on the effective detection images, the initial benchmark template initially constructed by the benchmark color and foreign object feature library establishment module is dynamically updated to achieve adaptive adjustment of the benchmark template to product batch differences and subtle background changes during production, thereby avoiding false alarms or missed detections of foreign objects caused by background drift.
[0043] The dynamic update specifically involves calling the Exponentially Weighted Moving Average (EWMA) algorithm to incorporate the feature statistics of foreign object-free image samples in the valid detected images within a preset period into the initial baseline template with preset weights.
[0044] The preset weights mentioned above are specifically low weights, such as 0.01 to 0.05, to ensure the stability and continuity of the benchmark template and avoid the standard from going out of control due to short-term fluctuations or accidental deviations.
[0045] An effective baseline template is constructed based on the effective detection images, and the effective baseline template is compared with the initial baseline template of the food to be tested. The comparison yields the baseline template difference feature value of the food to be tested. The baseline template difference feature value includes values of 0 and 1. When the baseline template difference feature value is 0, it indicates that the difference rate between the effective baseline template and the initial baseline template of the food to be tested meets the standard. When the baseline template difference feature value is 1, it indicates that the difference rate between the effective baseline template and the initial baseline template of the food to be tested does not meet the standard.
[0046] The comparison to obtain the baseline template difference feature value of the food to be tested specifically involves comparing each feature of the effective baseline template with the initial baseline template of the food to be tested, namely, the difference rate of the RGB interval of the main body of the food, the deviation value of the normal packaging paper color value, and the non-overlapping percentage of the brightness threshold of the groove shadow area. The difference rate of the RGB interval of the main body of the food can be specifically expressed as the length of the non-overlapping part / the length of the initial interval. The deviation value of the normal packaging paper color value is specifically converted into a percentage deviation relative to the initial color value using the color difference value formula. The weighted value of the difference rates of the three types of features is taken to obtain the overall difference rate. The weights are set according to feature centrality, such as the RGB interval having the highest weight. When the overall difference rate is greater than the preset difference rate qualification threshold, the baseline template difference feature value is 1; otherwise, it is 0.
[0047] Collect the number of foreign objects detected per unit time within a preset period, the clustering type of several foreign objects in the image of the food to be detected, and the time-series statistical chart of the foreign object detection rate. The clustering type is either clustered or distributed.
[0048] If any of the following conditions are met within the preset period, the emergency recalibration process will be initiated: (1) The number of foreign objects detected per unit time exceeds the historical average number of foreign objects detected per unit time for the food to be tested, which is retrieved from the database.
[0049] (2) The aggregation type of a certain foreign object is a centralized type.
[0050] It should be noted that existing technologies can identify clustering types in the following way: First, using image recognition algorithms, the pixel coordinates of foreign objects in each food image to be detected within a preset period are marked. Then, the distance between foreign objects and the area of the concentrated region are calculated, and a preset threshold is used to determine whether the foreign objects in a single image are locally concentrated or dispersed. Finally, the results of most images within the period are statistically analyzed. If the images with a higher percentage of images have the same concentration or clustering area of foreign objects, they are identified as concentrated; otherwise, they are identified as distributed. Existing technologies are relatively mature and will not be elaborated upon here.
[0051] (3) The baseline template difference feature value of the food to be tested is 1, and at the same time, the foreign object detection rate increases sharply or the detection rate is lower than the preset threshold.
[0052] The sudden increase in the foreign object detection rate is determined by a combination of time and magnitude of the exceedance. If the detection rate of consecutive adjacent time periods exceeding a preset time period is higher than the average detection rate of the corresponding time period in the same period in history, and the magnitude of the exceedance reaches a preset threshold for sudden increase, such as 20%-30% higher, which is set according to the food detection accuracy, then the foreign object detection rate is determined to have increased sharply.
[0053] The emergency recalibration process specifically involves: confirming that the food sample is free of foreign objects, and updating the baseline template of the food to be tested based on the sample to avoid further deviation of the baseline template due to misjudgment.
[0054] This invention solves the problem of lack of adaptive capability in the prior art. The closed-loop system of pre-identification-parameter invocation-template update-secondary detection constructed in this invention responds to changes in real time and avoids the influence of background drift.
[0055] In a specific embodiment of the present invention, the mapping table of each foreign object type-specific calibration color parameter is specifically formed by experimentally testing the optical characteristics of each type of foreign object, selecting the specific calibration color parameter that can maximize the amplification of its optical difference with the background, forming a correspondence between foreign object type and specific calibration parameter, structuring the correspondence, generating a mapping table and pre-storing it in the database.
[0056] The foreign object secondary detection module is used to acquire a second image of the food to be inspected and to identify the type of foreign object in the image of the food to be inspected.
[0057] In a specific embodiment of the present invention, the secondary identification of the type of foreign object in the food image to be detected specifically involves: based on the updated baseline template of the food to be detected, extracting the effective detection area in the secondary food image to be detected, then extracting the color feature parameters and morphological feature parameters of the suspected foreign object from the effective detection area, comparing the extracted color and morphological feature parameters of the suspected foreign object with the color and morphological feature parameters of various types of foreign objects in the special foreign object feature library, identifying and outputting the specific type of foreign object in the food image to be detected based on the comparison results, and completing the secondary detection.
[0058] A second aspect of the present invention provides a foreign object visual inspection device, comprising: a processor, a memory, and a communication bus. The memory stores a computer-readable program executable by the processor. The communication bus enables communication between the processor and the memory. When the processor executes the computer-readable program, it implements the foreign object visual inspection system of the present invention.
[0059] The threshold settings in this invention are all tailored to the actual needs and conventional technical logic of food testing, and are not arbitrarily determined. They are first considered in conjunction with testing accuracy requirements, such as thresholds for judging whether differences in the baseline template are compliant and whether the foreign object detection rate has suddenly increased. They are also determined with reference to the acceptable error range for food and the fluctuations in historical normal data. Overall, the settings are based on the principle of accurate detection while conforming to production routines, which will not be elaborated upon here.
[0060] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.
[0061] Finally, the above content is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined by the present invention, they should all fall within the protection scope of the present invention.
Claims
1. A foreign object visual detection system, characterized in that, include: Reference color and foreign matter feature library establishment module: Collect image samples of foreign matter-free areas in the batch of food being tested, and construct the initial reference template for each tested food; at the same time, establish a special foreign matter feature library; The camera module is used to capture images of the food to be inspected in real time while the production line is running; The foreign object type pre-identification module is used to extract the effective detection area in the image of the food to be detected, and based on the special foreign object feature library, to pre-identify the suspected foreign objects in the effective detection area and determine the type of the suspected foreign objects. The color parameter calibration module is used to call the corresponding calibration color parameters according to the type of suspected foreign object in the food image to be detected, and to feed back the called calibration color parameters to the camera module in real time. At the same time, it updates the reference template based on the valid detection images within a preset period. The specific content of the baseline template update based on valid detected images within a preset period is as follows: The calibration color parameter module continuously acquires valid detection images within a preset period. The valid detection images are images that have been filtered by the foreign object type pre-identification module, have no obvious interference information, and contain normal food and packaging. Based on the effective detection image, the initial reference template initially constructed by the reference color and foreign object feature library establishment module is dynamically updated; The dynamic update specifically involves: calling the exponentially weighted moving average algorithm to incorporate the feature statistics of foreign object-free image samples in the valid detected images within a preset period into the initial baseline template with preset weights. An effective baseline template is constructed based on the effective detection images. Each feature in the effective baseline template is compared one-to-one with the initial baseline template of the food to be detected. The weighted value of the feature difference rate is taken to obtain the overall difference rate. When the overall difference rate is greater than the preset difference rate qualified threshold, the difference feature value of the baseline template is 1; otherwise, it is 0. Collect the number of foreign objects detected per unit time within a preset period, the clustering type of several foreign object types in the image of the food to be detected, and the time series statistics of the foreign object detection rate. The clustering type is either concentrated or distributed. If any of the following conditions are met within the preset period, the emergency recalibration process will be initiated: (1) The number of foreign objects detected per unit time exceeds the historical average number of foreign objects detected per unit time for the food to be tested retrieved from the database; (2) The aggregation type of a certain type of foreign object is a concentrated type; (3) The baseline template difference feature value of the food to be tested is 1, and at the same time, the foreign object detection rate increases sharply or the detection rate is lower than the preset threshold. The specific contents of the emergency recalibration process are as follows: confirm that there are no foreign objects in the food sample, and update the baseline template of the food to be tested based on the food sample without foreign objects. The foreign object secondary detection module is used to acquire a second image of the food to be inspected and to identify the type of foreign object in the image of the food to be inspected.
2. The foreign object visual detection system according to claim 1, characterized in that, The image samples cover the food body, normal packaging paper, and groove areas. An initial reference template is generated by calculating the average RGB values of the pixels. The initial reference template includes the RGB range of the pixels of the food body, the specific color values of the normal packaging paper, and the brightness threshold of the shadow area of the groove.
3. The foreign object visual detection system according to claim 1, characterized in that, The specialized foreign object feature library includes the color and morphological feature parameters corresponding to the fragments, hair, black spots, abnormal packaging paper, and uncoated areas of each tested food.
4. The foreign object visual detection system according to claim 1, characterized in that, The specific method for extracting the effective detection region from the image of the food to be detected is as follows: The acquired images of the food to be tested are subjected to preliminary region screening to remove the production line background area contained in the image. The production line background area is the area that does not contain the main body of the food to be tested and the normal packaging of the food to be tested, including but not limited to the metal frame of the conveyor belt, the shell of the testing equipment and the non-target associated shadow formed by ambient light. Based on the initial benchmark templates for each food product being tested, valid detection areas are extracted from the areas after preliminary area screening. Specifically, the food product areas whose colors fall within the RGB range of the main food product pixels in the initial benchmark template, and the packaging paper areas whose colors match the specific color values of normal packaging paper in the initial benchmark template are retained. Meanwhile, the normal groove shadow areas of food products whose brightness meets the brightness threshold of the groove shadow area in the initial benchmark template are removed.
5. The foreign object visual detection system according to claim 1, characterized in that, The process of pre-identifying suspected foreign objects within the effective detection area based on the specialized foreign object feature library and determining the type of suspected foreign objects involves: extracting the color and morphological feature parameters of each suspected foreign object within the effective detection area; comparing these parameters with the corresponding color and morphological feature parameters of debris, hair, black spots, abnormal packaging paper, and uncoated areas stored in the specialized foreign object feature library; and determining the type of suspected foreign object within the effective detection area based on the comparison results. The comparison results are the matching degree between the suspected foreign object within the effective detection area and debris, hair, black spots, abnormal packaging paper, and uncoated areas, respectively.
6. The foreign object visual detection system according to claim 1, characterized in that, The step of calling the corresponding calibration color parameters based on the type of suspected foreign object in the food image to be detected is as follows: Based on the pre-identification results of suspected foreign objects in the image of the food to be detected, the exclusive calibration color parameters that are compatible with the optical features of the suspected foreign object type are called from the foreign object type-exclusive calibration color parameter mapping table in the database. The dedicated calibration color parameters include at least the image acquisition parameters of the camera module and the lighting parameters of the supporting multispectral lighting system.
7. The foreign object visual detection system according to claim 6, characterized in that, The mapping table for each foreign object type and its dedicated calibration color parameter is specifically created by experimentally testing the optical characteristics of each type of foreign object, selecting the dedicated calibration color parameter that can maximize the amplification of its optical difference with the background, forming a correspondence between foreign object type and dedicated calibration parameter, structuring the correspondence, generating a mapping table, and pre-storing it in the database.
8. The foreign object visual detection system according to claim 1, characterized in that, The specific details of the secondary identification of foreign object types in the food image to be detected are as follows: Based on the updated baseline template of the food to be inspected, the effective detection area in the secondary food image is extracted. Then, the color feature parameters and morphological feature parameters of suspected foreign objects are extracted from the effective detection area. The extracted color and morphological feature parameters of suspected foreign objects are compared with the color and morphological feature parameters of various types of foreign objects in the special foreign object feature library. Based on the comparison results, the specific type of foreign object in the food image to be inspected is identified and output, thus completing the secondary inspection.
Citation Information
Patent Citations
Food safety artificial intelligence supervision system based on AI algorithm
CN117456468A
Foreign matter detection method and system for food processing
CN118706852A
Foreign matter monitoring method and system of automatic lamination stacking machine based on machine vision
CN118628985A
Electronic atomizer chip visual identification accurate calibration system
CN118641489A