A method of detecting the quality of a culinary food product
By analyzing three-dimensional images and performing spectral analysis on packaging and food, abnormal samples can be quickly screened out, subtle changes in food can be accurately identified, the false positive rate can be reduced, resource allocation can be optimized, and the efficiency and accuracy of packaged food inspection can be improved.
Patent Information
- Application Number
- CN202411460886.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-10-18
AI Technical Summary
Existing technologies cannot efficiently and cost-effectively perform nutritional testing on packaged food products, resulting in complex and inefficient processing.
By acquiring three-dimensional images of packaging and food, the curvature difference of the contour lines is calculated, and the presence of abnormal areas is determined by combining the curvature difference with the outlier threshold. Subsequently, spectral detection is performed to determine the nutritional content and spoilage status of the food. Finally, the food quality is assessed by the amount of nutrient loss during storage.
It improves detection efficiency, reduces false positive rates and overall costs, ensures the accuracy and comprehensiveness of detection, and promptly identifies potential food quality problems.
Smart Images

Figure CN119470322B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of food testing, and more particularly to a method for testing the quality of dishes. Background Technology
[0002] With the improvement of people's living standards and increasing attention to food safety, food quality testing has become an important part of the food industry. Traditional food quality testing methods mainly rely on manual visual inspection and simple physicochemical index determination. These methods often have problems such as strong subjectivity, low efficiency and unstable test results.
[0003] In recent years, with the development of computer vision and spectral analysis technology, food quality testing methods have gradually developed towards automation and intelligence. Three-dimensional image analysis technology can quickly and accurately obtain the appearance characteristics of food, including information such as shape, size and surface quality. However, it is difficult to fully assess the internal quality of food based solely on appearance characteristics, especially for packaged foods, whose internal condition is often difficult to observe directly.
[0004] Spectroscopic analysis technology, especially infrared spectroscopy, provides an effective means for the non-destructive detection of the internal components of food. By analyzing the spectral characteristics of food, key indicators such as its nutritional content and freshness can be quickly obtained. However, spectral analysis technology also faces some challenges in practical applications, such as complex sample pretreatment and high detection costs.
[0005] Patent document CN113324928A discloses an intelligent non-destructive testing method for the nutritional content of dishes based on spectral data. The method includes: acquiring image information of a solid target and obtaining a first estimated volume of the solid target; acquiring spectral information of the solid target and obtaining a first estimated density of the solid target; obtaining a first estimated mass and nutritional content of the solid target based on the first estimated volume and the first estimated density; acquiring a second estimated volume of a liquid target through a first container; acquiring spectral information and a second estimated density of the liquid target; and obtaining a second estimated mass and nutritional content of the liquid target based on the second estimated volume and the second estimated density.
[0006] This reveals the following problems: In the existing technology, it is impossible to conduct nutritional testing and assessment on packaged food products, resulting in complex processing, high testing costs, and low efficiency. Summary of the Invention
[0007] Therefore, the present invention provides a method for detecting the quality of food products, which uses the contour fitting of the packaging and the food inside the packaged food product to determine whether food testing is required, thereby overcoming the problems of complex processing, high testing costs and low efficiency caused by the inability to perform nutritional testing on packaged food products in the prior art.
[0008] To achieve the above objectives, the present invention provides a method for detecting the quality of dishes, comprising:
[0009] Step S1: Obtain the 3D image of the packaging and the 3D image of the food to be detected, and process the packaging and food images respectively to obtain the corresponding packaging outline and food outline.
[0010] Step S2: Analyze the outlines of the packaging outline and the food outline, and calculate the curvature difference of corresponding points on the outlines of the two.
[0011] Step S3: Determine whether there is an abnormal area in the dish to be detected based on the preset curvature difference threshold and the abnormal corresponding point threshold, and determine whether to mark the dish to be detected as an abnormal food to be determined based on the determination result.
[0012] Step S4: Perform spectral analysis on the samples marked as abnormal food to obtain their nutritional content. Determine whether the abnormal food has spoiled based on the nutritional content.
[0013] If it is determined that the food to be identified as abnormal has spoiled, then the food to be identified as abnormal is determined to be a non-conforming product; if it is determined that the food to be identified as abnormal has not spoiled, then the food to be identified as abnormal is determined to be a conforming product, and the process continues to step S5.
[0014] Step S5: Store the product to be determined as qualified. When the rated storage time is reached, test the remaining nutrient content of the product to be determined as qualified. Calculate the nutrient reduction based on the nutrient content and the remaining nutrient content. Compare the nutrient reduction with a preset nutrient reduction threshold. Based on the comparison result, determine whether the product to be determined as qualified is unqualified.
[0015] Further, step S1 includes:
[0016] Step S11: Obtain a 3D image of the packaging and a 3D image of the food to be inspected;
[0017] Step S12: Denoise the packaging 3D image and the food 3D image to remove noise, and sharpen the edges to improve the image edge clarity, to obtain an optimized packaging 3D image and an optimized food 3D image;
[0018] Step S13: Obtain parallel and vertical views of the optimized packaging 3D image and the optimized food 3D image to obtain the packaging outline and the food outline. The packaging outline includes a parallel outline and a vertical outline, and the food outline includes a parallel outline and a vertical outline.
[0019] Further, step S2 includes:
[0020] Step S21: Project the packaging outline and the food outline onto the same coordinate system, wherein the packaging parallel outline corresponds to the food parallel outline, and the packaging vertical outline corresponds to the food vertical outline.
[0021] Step S22: Calculate the curvature of the corresponding points on the contour lines of the packaging parallel contour diagram and the food parallel contour diagram, and the curvature of the corresponding points on the contour lines of the packaging vertical contour diagram and the food vertical contour diagram.
[0022] Step S23: Calculate the curvature difference between parallel corresponding points and vertical corresponding points.
[0023] Furthermore, in step S22, the corresponding point is a point on the packaging outline and food outline corresponding to the same horizontal coordinate, and its curvature is calculated based on the position of the two corresponding points before and after it.
[0024] Further, in step S3, a curvature difference threshold is preset, the curvature difference is compared with the curvature difference threshold, and based on the comparison result, it is determined whether the corresponding point is abnormal.
[0025] If the curvature difference is less than or equal to the curvature difference threshold, then the corresponding point is determined to be normal;
[0026] If the curvature difference is greater than the curvature difference threshold, the corresponding point is determined to be abnormal.
[0027] Further, in step S3, a threshold for abnormal corresponding points is preset. The number of abnormal corresponding points is collected to obtain the number of abnormal corresponding points. The number of abnormal corresponding points is compared with the threshold for abnormal corresponding points. Based on the comparison result, it is determined whether the dish to be detected has an abnormal area.
[0028] If the number of abnormal corresponding points is less than or equal to the threshold of abnormal corresponding points, it is determined that the dish to be tested does not have any abnormal areas.
[0029] If the number of abnormal corresponding points is greater than the threshold of abnormal corresponding points, it is determined that there is an abnormal area in the dish to be tested.
[0030] Furthermore, in step S3, when it is determined that the dish to be tested does not have any abnormal areas, it is determined to be a qualified product;
[0031] When it is determined that there is an abnormal area in the dish to be tested, the dish to be tested is marked as an abnormal food to be determined.
[0032] Further, step S4 includes:
[0033] Step S41: Perform infrared spectral scanning on the food to be identified as abnormal to obtain spectral data of the food to be identified as abnormal.
[0034] Step S42: Analyze the spectral data according to the preset infrared spectral model to obtain the nutrient content;
[0035] Step S43: Compare the nutritional content with the preset standard nutritional content, and determine whether the food to be identified as abnormal has spoiled based on the comparison results.
[0036] Further, in step S43, the process of determining whether the food to be identified as abnormal has spoiled is based on the comparison results. This process includes:
[0037] If the nutrient content is less than the standard nutrient content, the food to be identified as abnormal is determined to have spoiled.
[0038] If the nutrient content is greater than or equal to the standard nutrient content, then the food to be identified as abnormal is determined to be unspoiled.
[0039] Further, in step S5, the process of determining whether the product to be determined as qualified is a non-qualified product based on the comparison result includes:
[0040] If the amount of nutrient reduction is less than or equal to the preset nutrient reduction threshold, then the food to be determined as qualified is determined to be qualified.
[0041] If the amount of nutrient reduction is greater than the preset nutrient reduction threshold, then the food product to be determined as qualified is determined to be unqualified.
[0042] Compared with the prior art, the beneficial effects of the present invention are as follows: by analyzing the contour lines of packaging and food, potential abnormal samples can be quickly screened out, reducing the number of samples that need to be detected by spectral analysis and improving the overall detection efficiency; by using curvature difference analysis and multiple threshold judgment, subtle changes in the appearance of food can be accurately identified, effectively reducing the false judgment rate; and by storing products to be determined as qualified and assessing the nutritional loss of food after storage, the accuracy of detection is improved, which helps to reduce errors.
[0043] Furthermore, by acquiring views in the parallel and vertical directions, parallel and vertical contour maps of the packaging and food are formed. By simultaneously analyzing the parallel and vertical contours, the shape differences between the food and the packaging can be captured more accurately, which helps to identify subtle deformations or expansions. By comparing the contours of the packaging and food in the parallel and vertical directions, the detection results can be cross-validated, effectively reducing the misjudgment rate caused by a single viewpoint.
[0044] Furthermore, by comparing the contours in both parallel and vertical directions, changes in food shape can be comprehensively captured, avoiding omissions that may occur due to analysis in a single direction. By calculating the curvature of corresponding points, the differences in contour shape can be converted into quantifiable values, which facilitates subsequent threshold setting and judgment, and reduces the false judgment rate.
[0045] Furthermore, by selecting corresponding points under the same horizontal coordinate, it is ensured that the points on the outline of the packaging outline and the food outline correspond one-to-one, thereby improving the accuracy of the comparison, capturing subtle changes in the outline, and better detecting subtle deformations or abnormalities in the shape of the food.
[0046] Furthermore, by setting a curvature difference threshold, abnormal differences between the packaging and food contours can be accurately identified. This quantitative judgment standard improves the objectivity and accuracy of the detection and significantly increases detection efficiency.
[0047] Furthermore, by comparing the threshold and number of abnormal corresponding points, it is possible to distinguish between a small number of abnormal points caused by normal manufacturing errors or image acquisition errors and a large number of abnormal points caused by food quality problems. This reduces misjudgments caused by individual abnormal points, improves the stability and reliability of the judgment, and quickly and accurately identifies potential problematic food products, rapidly screening out samples that need further testing. This greatly improves the efficiency of the entire testing process while reducing the overall testing cost.
[0048] Furthermore, by determining whether there are abnormal areas in the food to be tested, samples can be quickly divided into two categories: qualified products and products with undetermined abnormalities. Qualified products can pass the test directly, while products with undetermined abnormalities require further testing. This grading mechanism optimizes resource allocation, reduces the number of samples that need to undergo more complex and expensive testing, and thus reduces the overall testing cost.
[0049] Furthermore, infrared spectroscopy scanning enables precise quantitative analysis of the nutritional components of food, greatly improving detection efficiency. By comparing with preset standard nutrient content, foods with abnormal nutritional components can be quickly detected, which is beneficial for timely discovery of potential food quality problems and improving food safety levels.
[0050] Furthermore, by setting clear judgment criteria, the judgment process is greatly simplified, enabling timely detection of reduced nutritional content, rapid screening of substandard products, reduction of the need for further testing, and improvement of the efficiency of food quality testing.
[0051] Furthermore, by detecting the reduction in nutrients during the storage of food that has been deemed compliant, it is possible to more accurately distinguish between normal nutrient loss and abnormal quality decline, reducing the possibility of misjudgment, making the quality assessment more comprehensive, reflecting the actual quality of the food more fully, reducing economic losses caused by misjudgment, and improving the accuracy of detection. Attached Figure Description
[0052] Figure 1 This is a flowchart illustrating a method for detecting the quality of dishes according to an embodiment of the present invention;
[0053] Figure 2 This is a flowchart of obtaining a contour map according to an embodiment of the present invention;
[0054] Figure 3 This is a flowchart illustrating the calculation of curvature difference in an embodiment of the present invention;
[0055] Figure 4 This is a flowchart illustrating how to determine whether a food product is spoiled, according to an embodiment of the present invention. Detailed Implementation
[0056] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0057] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0058] It should be noted that in the description of this invention, the terms "upper", "lower", "left", "right", "inner", "outer", etc., which indicate directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and is not intended to indicate or imply that the device or element must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of this invention.
[0059] Furthermore, it should be noted that, in the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0060] Please see Figure 1 ,like Figure 1The diagram shown is a flowchart of a method for detecting the quality of dishes according to an embodiment of the present invention.
[0061] Specifically, embodiments of the present invention provide a method for detecting the quality of dishes, comprising:
[0062] Step S1: Obtain the 3D image of the packaging and the 3D image of the food to be detected, and process the packaging and food images respectively to obtain the corresponding packaging outline and food outline.
[0063] Step S2: Analyze the outlines of the packaging outline and the food outline, and calculate the curvature difference of corresponding points on the outlines of the two.
[0064] Step S3: Determine whether there is an abnormal area in the dish to be detected based on the preset curvature difference threshold and the abnormal corresponding point threshold, and determine whether to mark the dish to be detected as an abnormal food to be determined based on the determination result.
[0065] Step S4: Perform spectral analysis on the samples marked as abnormal food to obtain their nutritional content. Determine whether the abnormal food has spoiled based on the nutritional content.
[0066] If it is determined that the food to be identified as abnormal has spoiled, then the food to be identified as abnormal is determined to be a non-conforming product; if it is determined that the food to be identified as abnormal has not spoiled, then the food to be identified as abnormal is determined to be a conforming product, and the process continues to step S5.
[0067] Step S5: Store the product to be determined as qualified. When the rated storage time is reached, test the remaining nutrient content of the product to be determined as qualified. Calculate the nutrient reduction based on the nutrient content and the remaining nutrient content. Compare the nutrient reduction with a preset nutrient reduction threshold. Based on the comparison result, determine whether the product to be determined as qualified is unqualified.
[0068] Specifically, under normal circumstances, the contour curve of the packaging surface of sealed food is roughly the same as the contour curve of the food inside. When bulging occurs, the contour of the packaging surface changes due to the presence of the bulge, and the curvature of the contour curve in the bulging part will be different from that of the food inside. By comparing the curvature of the packaging contour and the curvature of the food, it is determined whether the food may have bulged. For food that may have bulged, its nutritional components are tested to determine whether it has deteriorated. For food that has not been found to be deteriorated, its nutritional loss over a period of time is further tested to identify abnormal and unqualified products.
[0069] Specifically, by analyzing the contour lines of packaging and food, potential abnormal samples can be quickly screened out, reducing the number of samples that need to be spectral detected and improving the overall detection efficiency. By using curvature difference analysis and multiple threshold judgment, subtle changes in the appearance of food can be accurately identified, effectively reducing the false judgment rate. By storing products that are to be determined to be qualified and assessing the nutritional loss of food after storage, the accuracy of detection is improved, which helps to reduce errors.
[0070] Please continue reading. Figure 2 ,like Figure 2 As shown, this is a flowchart of obtaining a contour map according to an embodiment of the present invention:
[0071] Specifically, step S1 includes:
[0072] Step S11: Obtain a 3D image of the packaging and a 3D image of the food to be inspected;
[0073] Step S12: Denoise the packaging 3D image and the food 3D image to remove noise, and sharpen the edges to improve the image edge clarity, to obtain an optimized packaging 3D image and an optimized food 3D image;
[0074] Step S13: Obtain parallel and vertical views of the optimized packaging 3D image and the optimized food 3D image to obtain the packaging outline and the food outline. The packaging outline includes a parallel outline and a vertical outline, and the food outline includes a parallel outline and a vertical outline.
[0075] Specifically, the packaged food is scanned with X-rays to obtain a three-dimensional image of the protrusions on the outer packaging and a three-dimensional image of the food. The three-dimensional images are then processed to make the image edges more obvious and accurate, and an edge contour map is obtained based on the three-dimensional images.
[0076] Specifically, by acquiring views in both parallel and vertical directions, parallel and vertical outlines of the packaging and food are formed. By simultaneously analyzing the parallel and vertical outlines, the shape differences between the food and the packaging can be captured more accurately, which helps to identify subtle deformations or expansions. By comparing the outlines of the packaging and food in both parallel and vertical directions, the detection results can be cross-validated, effectively reducing the misjudgment rate caused by a single viewpoint.
[0077] Please continue reading. Figure 3 ,like Figure 3 As shown, it is a flowchart for calculating the curvature difference in an embodiment of the present invention;
[0078] Specifically, step S2 includes:
[0079] Step S21: Project the packaging outline and the food outline onto the same coordinate system, wherein the packaging parallel outline corresponds to the food parallel outline, and the packaging vertical outline corresponds to the food vertical outline.
[0080] Step S22: Calculate the curvature of the corresponding points on the contour lines of the packaging parallel contour diagram and the food parallel contour diagram, and the curvature of the corresponding points on the contour lines of the packaging vertical contour diagram and the food vertical contour diagram.
[0081] Step S23: Calculate the curvature difference between parallel corresponding points and vertical corresponding points.
[0082] Specifically, the parallel and vertical outlines of the packaging and food are compared, and the curvature difference of corresponding points is calculated to determine the consistency of the outlines.
[0083] Specifically, by comparing the contours in both parallel and vertical directions, changes in food shape can be fully captured, avoiding omissions that may occur due to analysis in only one direction. By calculating the curvature of corresponding points, the differences in contour shape can be converted into quantifiable values, which facilitates subsequent threshold setting and judgment, and reduces the false judgment rate.
[0084] Specifically, in step S22, the corresponding point is a point on the packaging outline and food outline corresponding to the same horizontal coordinate, and its curvature is calculated based on the position of the two corresponding points before and after it.
[0085] Specifically, the curvature of the point with x-coordinate Xi is obtained by fitting a circle to the points with x-coordinates Xi-1 and Xi+1 before and after it, and the curvature of the point with x-coordinate Xi is obtained by the three-point method. The specific method of the three-point method will not be elaborated here.
[0086] Specifically, by selecting corresponding points under the same horizontal coordinate, it ensures that the points on the outline of the packaging outline and the food outline correspond one-to-one, thereby improving the accuracy of the comparison, capturing subtle changes in the outline, and better detecting subtle deformations or abnormalities in the shape of the food.
[0087] Specifically, in step S3, a curvature difference threshold is preset. The curvature difference is compared with the curvature difference threshold, and based on the comparison result, it is determined whether the corresponding point is abnormal.
[0088] If the curvature difference is less than or equal to the curvature difference threshold, then the corresponding point is determined to be normal;
[0089] If the curvature difference is greater than the curvature difference threshold, the corresponding point is determined to be abnormal.
[0090] In the specific implementation process, the curvature difference threshold is set to 0.1. The vertical curvature difference between corresponding points on the contour lines of the packaging parallel contour map and the food parallel contour map is calculated to be 0.08. If it is less than the curvature difference threshold, the corresponding point is judged to be normal. The vertical curvature difference between corresponding points on the packaging vertical contour map and the food vertical contour map is calculated to be 0.15. If the curvature difference threshold is large, the corresponding point is judged to be abnormal.
[0091] Specifically, by setting a curvature difference threshold, abnormal differences between the packaging and food contours can be accurately identified. This quantitative judgment standard improves the objectivity and accuracy of the detection and significantly increases detection efficiency.
[0092] Specifically, in step S3, a threshold for abnormal corresponding points is preset. The number of abnormal corresponding points is collected to obtain the number of abnormal corresponding points. The number of abnormal corresponding points is compared with the threshold for abnormal corresponding points. Based on the comparison result, it is determined whether the dish to be detected has an abnormal area.
[0093] If the number of abnormal corresponding points is less than or equal to the threshold of abnormal corresponding points, it is determined that the dish to be tested does not have any abnormal areas.
[0094] If the number of abnormal corresponding points is greater than the threshold of abnormal corresponding points, it is determined that there is an abnormal area in the dish to be tested.
[0095] In the specific implementation process, the preset threshold for abnormal corresponding points is 20. After comparing the parallel contour map and the vertical contour map, the number of abnormal corresponding points of the packaging and food at the contour line of the parallel contour map is 15, and the number of abnormal corresponding points at the contour line of the vertical contour map is 10. Then the number of abnormal corresponding points is 25, which is greater than the threshold for abnormal corresponding points. Therefore, it is determined that there is an abnormal area in the dish or food to be tested.
[0096] Specifically, by comparing the threshold of abnormal corresponding points and the number of abnormal corresponding points, it is possible to distinguish between a small number of abnormal points caused by normal manufacturing errors or image acquisition errors and a large number of abnormal points caused by food quality problems. This reduces misjudgments caused by individual abnormal points, improves the stability and reliability of the judgment, and quickly and accurately identifies potential problematic food products. It also rapidly screens out samples that need further testing, greatly improving the efficiency of the entire testing process while reducing the overall testing cost.
[0097] Specifically, in step S3, when it is determined that the dish to be tested does not have any abnormal areas, it is determined to be a qualified product;
[0098] When it is determined that there is an abnormal area in the dish to be tested, the dish to be tested is marked as an abnormal food to be determined.
[0099] Specifically, when abnormal areas are found in the food being tested, it indicates that there may be a problem with the packaging of the food. There may be bulging inside, which may have caused changes in the packaging image. Further investigation of the food is required.
[0100] Specifically, by determining whether there are abnormal areas in the food to be tested, samples can be quickly divided into two categories: qualified products and products with undetermined abnormalities. Qualified products can pass the test directly, while products with undetermined abnormalities require further testing. This grading mechanism optimizes resource allocation, reduces the number of samples that need to undergo more complex and expensive testing, and thus reduces the overall testing cost.
[0101] Please continue reading. Figure 4 ,like Figure 4 As shown, it is a flowchart of an embodiment of the present invention for determining whether a food product is spoiled;
[0102] Specifically, step S4 includes:
[0103] Step S41: Perform infrared spectral scanning on the food to be identified as abnormal to obtain spectral data of the food to be identified as abnormal.
[0104] Step S42: Analyze the spectral data according to the preset infrared spectral model to obtain the nutrient content;
[0105] Step S43: Compare the nutritional content with the preset standard nutritional content, and determine whether the food to be identified as abnormal has spoiled based on the comparison results.
[0106] Specifically, the abnormal food sample to be identified is placed on the sample stage of the infrared spectrometer. The infrared light source emits a beam of light that passes through the sample, and the detector receives the transmitted or reflected light, records the light intensity of different wavelengths, and analyzes it according to a preset model to obtain the corresponding nutritional content.
[0107] Specifically, infrared spectroscopy scanning enables precise quantitative analysis of the nutritional components of food, greatly improving detection efficiency. By comparing the nutritional content with preset standard values, it is possible to quickly detect foods with abnormal nutritional components, which helps to promptly identify potential food quality problems and improve food safety levels.
[0108] Specifically, in step S43, the process of determining whether the food to be identified as abnormal has spoiled is based on the comparison results. This process includes:
[0109] If the nutrient content is less than the standard nutrient content, the food to be identified as abnormal is determined to have spoiled.
[0110] If the nutrient content is greater than or equal to the standard nutrient content, then the food to be identified as abnormal is determined to be unspoiled.
[0111] In the specific implementation process, the standard protein content of a certain food to be identified as abnormal is 50g. However, through spectral detection, the protein content of the food to be identified as abnormal is found to be 40g, which is less than the standard protein content. Therefore, it is determined that the food to be identified as abnormal has spoiled. Another food to be identified as abnormal has a detected protein content of 56g, which is greater than the standard protein content. Therefore, it is determined that the nutritional components of the food to be identified as abnormal have not spoiled.
[0112] Specifically, by setting clear judgment criteria, the judgment process is greatly simplified, the reduction in nutritional content can be detected in a timely manner, substandard products can be quickly screened out, the need for further testing is reduced, and the efficiency of food quality testing is improved.
[0113] Specifically, in step S5, the process of determining whether the product to be determined as qualified is a non-qualified product based on the comparison result includes:
[0114] If the amount of nutrient reduction is less than or equal to the preset nutrient reduction threshold, then the food to be determined as qualified is determined to be qualified.
[0115] If the amount of nutrient reduction is greater than the preset nutrient reduction threshold, then the food product to be determined as qualified is determined to be unqualified.
[0116] In the specific implementation process, the food products that were found to have no change in nutritional content were stored for ten days. The preset threshold for the reduction of protein nutritional content was 0.5g. The protein content of the food products was 56g before storage. After 10 days of storage, the protein content was found to have decreased to 52g, and the reduction of protein nutritional content was 4g, which is greater than the threshold for the reduction of nutritional content. This indicates that although no abnormalities were detected in the food products that were not found to be qualified before, they still do not meet the quality standards.
[0117] Specifically, by detecting the reduction in nutrients during the storage of food that has been deemed compliant, it is possible to more accurately distinguish between normal nutrient loss and abnormal quality decline, reduce the possibility of misjudgment, make the quality assessment more comprehensive, and more fully reflect the actual quality of the food, thereby reducing economic losses caused by misjudgment and improving the accuracy of the test.
[0118] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
[0119] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting the quality of dishes, characterized in that, include: Step S1: Obtain the 3D image of the packaging and the 3D image of the food to be detected, and process the packaging and food images respectively to obtain the corresponding packaging outline and food outline. Step S2: Analyze the outlines of the packaging outline and the food outline, and calculate the curvature difference of corresponding points on the outlines of the two. Step S3: Determine whether there is an abnormal area in the dish to be detected based on the preset curvature difference threshold and the abnormal corresponding point threshold, and determine whether to mark the dish to be detected as an abnormal food to be determined based on the determination result. Step S4: Perform spectral analysis on the samples marked as abnormal food to obtain their nutritional content. Determine whether the abnormal food has spoiled based on the nutritional content. If it is determined that the food to be identified as abnormal has spoiled, then the food to be identified as abnormal is determined to be a non-conforming product; if it is determined that the food to be identified as abnormal has not spoiled, then the food to be identified as abnormal is determined to be a conforming product, and the process continues to step S5. Step S5: Store the product to be determined as qualified. When the rated storage time is reached, test the remaining nutrient content of the product to be determined as qualified. Calculate the nutrient reduction based on the nutrient content and the remaining nutrient content. Compare the nutrient reduction with a preset nutrient reduction threshold. Determine whether the product to be determined as qualified is unqualified based on the comparison result. Step S2 includes: Step S21: Project the packaging outline and the food outline onto the same coordinate system, wherein the packaging parallel outline corresponds to the food parallel outline, and the packaging vertical outline corresponds to the food vertical outline. Step S22: Calculate the curvature of the corresponding points on the contour lines of the packaging parallel contour diagram and the food parallel contour diagram, and the curvature of the corresponding points on the contour lines of the packaging vertical contour diagram and the food vertical contour diagram. Step S23: Calculate the curvature difference between parallel corresponding points and vertical corresponding points; In step S22, the corresponding point is a point on the packaging outline and food outline under the same horizontal coordinate, and its curvature is calculated based on the position of the two corresponding points before and after it. By comparing the contours in both parallel and vertical directions, the changes in food shape are fully captured, avoiding omissions that may occur due to analysis in a single direction. By calculating the curvature of corresponding points, the differences in contour shape are converted into quantifiable values, which facilitates subsequent threshold setting and judgment, and reduces the false judgment rate. In step S3, a curvature difference threshold is preset. The curvature difference is compared with the curvature difference threshold, and based on the comparison result, it is determined whether the corresponding point is abnormal. If the curvature difference is less than or equal to the curvature difference threshold, then the corresponding point is determined to be normal; If the curvature difference is greater than the curvature difference threshold, then the corresponding point is determined to be abnormal; In step S3, a threshold for abnormal corresponding points is preset. The number of abnormal corresponding points is collected to obtain the number of abnormal corresponding points. The number of abnormal corresponding points is compared with the threshold for abnormal corresponding points. Based on the comparison result, it is determined whether the dish to be detected has an abnormal area. If the number of abnormal corresponding points is less than or equal to the threshold of abnormal corresponding points, it is determined that the dish to be tested does not have any abnormal areas. If the number of abnormal corresponding points is greater than the threshold of abnormal corresponding points, it is determined that there is an abnormal area in the dish to be detected. In step S3, when it is determined that the dish to be tested does not have any abnormal areas, it is identified as a qualified product. When it is determined that there is an abnormal area in the dish to be tested, the dish to be tested is marked as an abnormal food to be determined. Step S4 includes: Step S41: Perform infrared spectral scanning on the food to be identified as abnormal to obtain spectral data of the food to be identified as abnormal. Step S42: Analyze the spectral data according to the preset infrared spectral model to obtain the nutrient content; Step S43: Compare the nutritional content with the preset standard nutritional content, and determine whether the food to be identified as abnormal has spoiled based on the comparison results. In step S43, the process of determining whether the food to be identified as abnormal has spoiled based on the comparison results includes: If the nutrient content is less than the standard nutrient content, the food to be identified as abnormal is determined to have spoiled. If the nutrient content is greater than or equal to the standard nutrient content, then the food to be identified as abnormal is determined to be unspoiled.
2. The method for detecting the quality of dishes according to claim 1, characterized in that, Step S1 includes: Step S11: Obtain a 3D image of the packaging and a 3D image of the food to be inspected; Step S12: Denoise the packaging 3D image and the food 3D image to remove noise, and sharpen the edges to improve the image edge clarity, to obtain an optimized packaging 3D image and an optimized food 3D image; Step S13: Obtain parallel and vertical views of the optimized packaging 3D image and the optimized food 3D image to obtain the packaging outline and the food outline. The packaging outline includes a parallel outline and a vertical outline, and the food outline includes a parallel outline and a vertical outline.
3. The method for detecting the quality of dishes according to claim 1, characterized in that, In step S5, the process of determining whether the product to be determined as qualified is a non-qualified product based on the comparison result includes: If the amount of nutrient reduction is less than or equal to the preset nutrient reduction threshold, then the product to be determined as qualified is determined to be qualified. If the amount of nutrient reduction is greater than the preset nutrient reduction threshold, then the product to be determined as qualified is determined to be unqualified.
Citation Information
Patent Citations
Method for intelligently and nondestructively detecting nutrient content of dish food based on atlas data
CN113324928A
Method for nondestructively and rapidly determining content of chia seed protein
CN110231306A
Leak detection system for uniform vacuum packaged products
US20130197832A1