Method for detecting dish food quality

By analyzing the difference in curvature of the three-dimensional image contour lines of packaging and food, combined with spectral detection, the nutritional detection problem of packaged dishes is solved, the detection efficiency and accuracy are improved, and the misjudgment rate and detection cost are reduced.

CN119470322AActive Publication Date: 2025-02-18BEIJING SIECAN TECH CO LTD

Patent Information

Application Number
CN202411460886.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-02-18
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

The prior art cannot effectively detect the nutrients of packaged dishes, resulting in complex processing, high detection cost and low efficiency.

Method used

By obtaining three-dimensional images of packaging and food, analyzing the curvature difference of their contour lines, determining whether there are abnormal areas, and determining the nutritional content through spectral detection to determine whether the food is deteriorated.

Benefits of technology

Rapidly screen out potential abnormal samples, reduce the number of samples detected by spectral detection, improve detection efficiency, accurately identify subtle changes in the appearance of food, reduce the rate of misjudgment, and improve the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119470322A_ABST
    Figure CN119470322A_ABST
Patent Text Reader

Abstract

The invention relates to the field of food detection, in particular to a method for detecting dish food quality, which comprises the following steps: acquiring a package three-dimensional image and a food three-dimensional image of a dish food to be detected, and respectively processing the package three-dimensional image and the food three-dimensional image to obtain a corresponding package contour map and a food contour map; analyzing contour lines of the package contour diagram and the food contour diagram, and calculating the curvature difference of each corresponding point; according to the curvature difference threshold value and the abnormal corresponding point threshold value, judging whether the to-be-detected dish food has an abnormal area or not; performing spectrum detection on the to-be-determined abnormal food sample to obtain the nutrient content, and determining whether the to-be-determined abnormal food goes bad according to the nutrient content; and storing the to-be-determined qualified product, and detecting the residual nutrient content of the to-be-determined qualified product when the rated storage time is up. According to the method, potential abnormal samples are rapidly screened out by analyzing the contour lines of the package and the food contour, the number of samples needing spectrum detection is reduced, and the overall detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of food detection, and in particular to a method for detecting the quality of dish food. Background Art

[0002] With the improvement of people's living standards and the increasing attention to food safety, dish 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 physical and chemical index measurements. 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 detection methods have gradually developed in the direction of 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 evaluate the intrinsic quality of food based solely on appearance characteristics, especially for packaged food, whose internal conditions are often difficult to observe directly.

[0004] Spectral analysis technology, especially infrared spectroscopy, provides an effective means for non-destructive detection of 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 pre-processing and high detection costs.

[0005] The patent document with publication number CN113324928A discloses a method for intelligent non-destructive detection of the nutritional content of dishes and foods based on spectral data, including: obtaining image information of a solid target to be tested and obtaining a first estimated volume of the solid target to be tested; obtaining spectral information of the solid target to be tested and obtaining a first estimated density of the solid target to be tested; obtaining a first estimated mass and nutritional content of the solid target to be tested based on the first estimated volume and the first estimated density; obtaining a second estimated volume of a liquid target to be tested through a first container; obtaining spectral information and a second estimated density of the liquid target to be tested; and obtaining a second estimated mass and nutritional content of the liquid target to be tested based on the second estimated volume and the second estimated density.

[0006] This shows the following problem: In the prior art, it is impossible to perform nutritional testing and judgment on packaged dishes, which leads to complicated processing, high testing costs and low efficiency. Summary of the invention

[0007] To this end, the present invention provides a method for detecting the quality of dish food, which is used to determine whether the food needs to be tested based on the contour fitting of the packaging of the packaged dish food and the internal food, so as to overcome the problem in the prior art that it is impossible to perform nutritional testing and judgment on the packaged dish food, resulting in complex processing, high testing cost and low efficiency.

[0008] To achieve the above object, the present invention provides a method for detecting the quality of dish food, comprising:

[0009] Step S1, obtaining a three-dimensional image of the packaging and a three-dimensional image of the food dish to be inspected, and processing the three-dimensional image of the packaging and the three-dimensional image of the food respectively to obtain a corresponding packaging outline image and food outline image;

[0010] Step S2, analyzing the contour lines of the packaging contour map and the food contour map, and calculating the curvature difference of each corresponding point on the contour lines of the two;

[0011] Step S3, determining whether the dish food to be detected has an abnormal area according to a preset curvature difference threshold and an abnormal corresponding point threshold, and determining whether to mark the dish food to be detected as an abnormal food to be determined based on the determination result;

[0012] Step S4, performing spectral detection on the sample marked as the abnormal food to be determined, obtaining the nutritional content, and determining whether the abnormal food to be determined has deteriorated according to the nutritional content, wherein:

[0013] If it is determined that the abnormal food to be determined is spoiled, the abnormal food to be determined is determined to be an unqualified product; if it is determined that the abnormal food to be determined is not spoiled, the abnormal food to be determined is determined to be a qualified product to be determined, and the process continues to step S5;

[0014] Step S5, storing the qualified products to be determined, and detecting the remaining nutritional content of the qualified products to be determined when the rated storage time is reached, calculating the nutritional reduction amount based on the nutritional content and the remaining nutritional content, comparing the nutritional reduction amount with a preset nutritional reduction threshold, and determining whether the qualified products to be determined are unqualified products based on the comparison results.

[0015] Furthermore, in the step S1, it includes:

[0016] Step S11, obtaining a three-dimensional image of the packaging and a three-dimensional image of the food of the dish to be inspected;

[0017] Step S12, denoising the packaging 3D image and the food 3D image to remove noise, performing edge sharpening to improve image edge clarity, and obtaining an optimized packaging 3D image and an optimized food 3D image;

[0018] Step S13, obtaining parallel and vertical views of the optimized packaging three-dimensional image and the optimized food three-dimensional image to obtain a packaging outline map and a food outline map, wherein the packaging outline map includes a packaging parallel outline map and a packaging vertical outline map, and the food outline map includes a food parallel outline map and a food vertical outline map.

[0019] Furthermore, in the step S2, it includes:

[0020] Step S21, projecting the package outline map and the food outline map into the same coordinate system, wherein the package parallel outline map corresponds to the food parallel outline map, and the package vertical outline map corresponds to the food vertical outline map;

[0021] Step S22, calculating the curvature of the corresponding points on the contour lines of the package parallel contour map and the food parallel contour map and the curvature of the corresponding points on the contour lines of the package vertical contour map and the food vertical contour map;

[0022] Step S23, calculating the curvature difference between the parallel corresponding points and the vertical corresponding points.

[0023] Furthermore, in step S22, the corresponding points are points on the packaging outline map and the food outline map corresponding to the same horizontal coordinate, and the curvature is calculated according to the positions of the two corresponding points before and after the corresponding points.

[0024] Furthermore, in step S3, the curvature difference threshold is preset, the curvature difference is compared with the curvature difference threshold, and whether the corresponding point is abnormal is determined based on the comparison result, wherein:

[0025] If the curvature difference is less than or equal to the curvature difference threshold, 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] Furthermore, in step S3, the abnormal corresponding point threshold 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 abnormal corresponding point threshold, and based on the comparison result, it is determined whether there is an abnormal area in the dish food to be detected, wherein:

[0028] If the number of abnormal corresponding points is less than or equal to the abnormal corresponding point threshold, it is determined that there is no abnormal area in the dish food to be detected;

[0029] If the number of abnormal corresponding points is greater than the abnormal corresponding point threshold, it is determined that the dish food to be detected has an abnormal area.

[0030] Furthermore, in the step S3, when it is determined that the dish food to be inspected does not have an abnormal area, it is determined to be a qualified product;

[0031] When it is determined that the to-be-detected dish food has an abnormal area, the to-be-detected dish food is marked as abnormal food to be determined.

[0032] Furthermore, in the step S4, it includes:

[0033] Step S41, performing infrared spectrum scanning on the abnormal food to be determined to obtain spectrum data of the abnormal food to be determined;

[0034] Step S42, analyzing the spectrum data according to a preset infrared spectrum model to obtain the nutritional content;

[0035] Step S43, comparing the nutritional content with a preset standard nutritional content, and determining whether the abnormal food to be determined is spoiled based on the comparison result.

[0036] Furthermore, in the step S43, whether the abnormal food to be determined is spoiled is determined based on the comparison result. The process includes:

[0037] If the nutritional content is less than the standard nutritional content, it is determined that the abnormal food to be determined has deteriorated;

[0038] If the nutritional content is greater than or equal to the standard nutritional content, it is determined that the abnormal food to be determined is not spoiled.

[0039] Furthermore, in step S5, the process of determining whether the qualified product to be determined is a non-qualified product based on the comparison result includes:

[0040] If the nutrient reduction is less than or equal to the preset nutrient reduction threshold, the to-be-determined qualified food is determined to be a qualified product;

[0041] If the nutrient reduction is greater than the preset nutrient reduction threshold, the to-be-determined qualified food is determined to be an unqualified product.

[0042] Compared with the prior art, the beneficial effects of the present invention are that by analyzing the contour lines of the packaging and food contours, potential abnormal samples can be quickly screened out, the number of samples that need to be spectrally detected is reduced, and the overall detection efficiency is improved. Curvature difference analysis and multiple threshold judgments are used to accurately identify subtle changes in the appearance of food, effectively reducing the misjudgment rate. By storing the qualified products to be determined and evaluating the nutritional loss of the food after storage, the accuracy of the detection is improved, which is conducive to reducing errors.

[0043] Furthermore, by acquiring views in parallel and vertical directions, parallel and vertical contour maps of the package and food are formed. By simultaneously analyzing the parallel and vertical contours, the shape differences between the food and the package can be captured more accurately, which helps to identify subtle deformations or expansions. By comparing the contours of the package and food in both parallel and vertical directions, the detection results can be cross-validated, effectively reducing the misjudgment rate caused by a single perspective.

[0044] Furthermore, by comparing the contours in the parallel and vertical directions, the changes in food shape can be fully captured, avoiding omissions that may be caused by single-direction analysis. By calculating the curvature of corresponding points, the differences in contour shape can be converted into quantifiable values, which facilitates the subsequent setting of thresholds and judgments and reduces the misjudgment rate.

[0045] Furthermore, by selecting corresponding points under the same horizontal coordinate, it is ensured that the points on the contour lines of the packaging contour map and the food contour map correspond one to one, thereby improving the accuracy of the comparison, being able to capture subtle changes in the contour, and better detecting subtle deformations or abnormalities in the shape of the food.

[0046] Furthermore, by setting the curvature difference threshold, the abnormal difference between the package and food contours can be accurately identified. This quantitative judgment standard improves the objectivity and accuracy of detection and significantly improves the detection efficiency.

[0047] Furthermore, by comparing the abnormal corresponding point threshold and the abnormal corresponding point number, 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, reduce misjudgments caused by individual abnormal points, and improve the stability and reliability of the judgment. By quickly and accurately identifying potential problem foods and quickly screening out samples that need further testing, the efficiency of the entire testing process is greatly improved while reducing the overall testing cost.

[0048] Furthermore, by determining whether there are abnormal areas in the dishes to be tested, the samples can be quickly divided into two categories: qualified products and foods to be determined to be abnormal. Qualified products can pass the test directly, while foods to be determined to be abnormal require further testing. This grading mechanism optimizes resource allocation and reduces the number of samples that require more complex and expensive testing, thereby reducing overall testing costs.

[0049] Furthermore, through infrared spectral scanning, the nutritional components of food can be accurately quantitatively analyzed, which greatly improves the detection efficiency. By comparing with the preset standard nutritional content, foods with abnormal nutritional components can be quickly detected, which is conducive to timely discovery of potential food quality problems and improving food safety levels.

[0050] Furthermore, by setting clear criteria for determination, the determination process is greatly simplified, a reduction in nutritional content can be discovered in a timely manner, unqualified products can be quickly screened out, the need for further testing is reduced, and the efficiency of food quality testing is improved.

[0051] Furthermore, by testing the amount of nutritional loss during storage of qualified food, it is possible to more accurately distinguish between normal nutritional loss and abnormal quality decline, reduce the possibility of misjudgment, make quality assessment more comprehensive, more comprehensively reflect the actual quality of the food, reduce economic losses caused by misjudgment, and facilitate the accuracy of detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A flow chart of a method for detecting the quality of dishes and food according to an embodiment of the present invention;

[0053] Figure 2 A flow chart for obtaining a contour map according to an embodiment of the present invention;

[0054] Figure 3 A flow chart of calculating curvature difference according to an embodiment of the present invention;

[0055] Figure 4 The present invention is a flowchart for determining whether the abnormal food to be determined is spoiled. DETAILED DESCRIPTION

[0056] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0057] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0058] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.

[0059] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0060] See also Figure 1 ,like Figure 1As shown, it is a flow chart of a method for detecting the quality of dish food according to an embodiment of the present invention;

[0061] Specifically, an embodiment of the present invention provides a method for detecting the quality of a dish, including:

[0062] Step S1, obtaining a three-dimensional image of the packaging and a three-dimensional image of the food dish to be inspected, and processing the three-dimensional image of the packaging and the three-dimensional image of the food respectively to obtain a corresponding packaging outline image and food outline image;

[0063] Step S2, analyzing the contour lines of the packaging contour map and the food contour map, and calculating the curvature difference of each corresponding point on the contour lines of the two;

[0064] Step S3, determining whether the dish food to be detected has an abnormal area according to a preset curvature difference threshold and an abnormal corresponding point threshold, and determining whether to mark the dish food to be detected as an abnormal food to be determined based on the determination result;

[0065] Step S4, performing spectral detection on the sample marked as the abnormal food to be determined, obtaining the nutritional content, and determining whether the abnormal food to be determined has deteriorated according to the nutritional content, wherein:

[0066] If it is determined that the abnormal food to be determined is spoiled, the abnormal food to be determined is determined to be an unqualified product; if it is determined that the abnormal food to be determined is not spoiled, the abnormal food to be determined is determined to be a qualified product to be determined, and the process continues to step S5;

[0067] Step S5, storing the qualified products to be determined, and detecting the remaining nutritional content of the qualified products to be determined when the rated storage time is reached, calculating the nutritional reduction amount based on the nutritional content and the remaining nutritional content, comparing the nutritional reduction amount with a preset nutritional reduction threshold, and determining whether the qualified products to be determined are unqualified products based on the comparison results.

[0068] Specifically, under normal circumstances, the contour curve of the sealed food packaging surface is roughly the same as the contour curve of the food inside. After bulging occurs, the contour of the packaging surface will change due to the existence of the bulge, and the curvature of the contour curve at the bulged part will be different from that of the food inside. The packaging contour curvature and the food curvature are compared to determine whether the food is likely to bulge. The nutritional content of the food that may be bulging is tested to determine whether it has deteriorated. For the food that has not been detected to be deteriorated, the nutritional reduction over a period of time is further tested to find abnormal and unqualified products.

[0069] Specifically, by analyzing the contours of packaging and food outlines, potential abnormal samples can be quickly screened out, reducing the number of samples that require spectral detection and improving overall detection efficiency. Curvature difference analysis and multiple threshold judgments can be used to accurately identify subtle changes in food appearance and effectively reduce the misjudgment rate. By storing qualified products and evaluating the nutritional loss of food after storage, the accuracy of detection is improved, which helps reduce errors.

[0070] Please continue reading Figure 2 ,like Figure 2 As shown, it is a flow chart of obtaining a contour map according to an embodiment of the present invention:

[0071] Specifically, the step S1 includes:

[0072] Step S11, obtaining a three-dimensional image of the packaging and a three-dimensional image of the food of the dish to be inspected;

[0073] Step S12, denoising the packaging 3D image and the food 3D image to remove noise, performing edge sharpening to improve image edge clarity, and obtaining an optimized packaging 3D image and an optimized food 3D image;

[0074] Step S13, obtaining parallel and vertical views of the optimized packaging three-dimensional image and the optimized food three-dimensional image to obtain a packaging outline map and a food outline map, wherein the packaging outline map includes a packaging parallel outline map and a packaging vertical outline map, and the food outline map includes a food parallel outline map and a food vertical outline map.

[0075] Specifically, the packaged food is scanned by X-ray to obtain a three-dimensional image of the protrusion of the outer packaging and a three-dimensional image of the food, the three-dimensional image is processed to make the image edge more obvious and accurate, and its edge contour map is obtained according to the three-dimensional image.

[0076] Specifically, by acquiring views in parallel and vertical directions, parallel and vertical contour maps of the package and food are formed. By simultaneously analyzing the parallel and vertical contours, the shape differences between the food and the package can be captured more accurately, which helps to identify subtle deformations or expansions. By comparing the contours of the package and food in parallel and vertical directions, the detection results can be cross-validated, effectively reducing the misjudgment rate caused by a single perspective.

[0077] Please continue reading Figure 3 ,like Figure 3 As shown, it is a flow chart of calculating curvature difference according to an embodiment of the present invention;

[0078] Specifically, the step S2 includes:

[0079] Step S21, projecting the package outline map and the food outline map into the same coordinate system, wherein the package parallel outline map corresponds to the food parallel outline map, and the package vertical outline map corresponds to the food vertical outline map;

[0080] Step S22, calculating the curvature of the corresponding points on the contour lines of the package parallel contour map and the food parallel contour map and the curvature of the corresponding points on the contour lines of the package vertical contour map and the food vertical contour map;

[0081] Step S23, calculating the curvature difference between the parallel corresponding points and the vertical corresponding points.

[0082] Specifically, the parallel contour map and the vertical contour map of the package and the food are compared with each other, and the curvature difference of the corresponding points is calculated to determine the consistency of the contour maps.

[0083] Specifically, by comparing the contours in the parallel and vertical directions, the changes in food shape can be fully captured, avoiding omissions that may be caused by single-direction analysis. By calculating the curvature of corresponding points, the differences in contour shapes can be converted into quantifiable values, which facilitates the subsequent setting of thresholds and judgments and reduces the misjudgment rate.

[0084] Specifically, in step S22, the corresponding points are points on the packaging outline map and the food outline map corresponding to the same horizontal coordinate, and the curvature is calculated according to the positions of the two corresponding points before and after the corresponding points.

[0085] Specifically, the curvature of the corresponding point with a horizontal coordinate of Xi is obtained by fitting circles with the points before and after it with horizontal coordinates of Xi-1 and Xi+1, and the curvature of the corresponding point with a horizontal coordinate of Xi is obtained by the three-point method, wherein the specific method of the three-point method is not repeated here.

[0086] Specifically, by selecting corresponding points under the same horizontal coordinate, it is ensured that the points on the contour lines of the packaging contour map and the food contour map correspond one to one, thereby improving the accuracy of the comparison, being able to capture subtle changes in the contour, and better detecting subtle deformations or abnormalities in the shape of the food.

[0087] Specifically, in step S3, the curvature difference threshold is preset, the curvature difference is compared with the curvature difference threshold, and whether the corresponding point is abnormal is determined based on the comparison result, wherein:

[0088] If the curvature difference is less than or equal to the curvature difference threshold, 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] During the specific implementation process, the curvature difference threshold is set to 0.1, and the vertical curvature difference of a corresponding point on the contour line of the parallel contour map of the packaging and the parallel contour map of the food 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 of a corresponding point on the vertical contour map of the packaging and the vertical contour map of the food 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 the 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 detection and significantly improves detection efficiency.

[0092] Specifically, in step S3, the abnormal corresponding point threshold 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 abnormal corresponding point threshold, and based on the comparison result, it is determined whether there is an abnormal area in the dish food to be detected, wherein:

[0093] If the number of abnormal corresponding points is less than or equal to the abnormal corresponding point threshold, it is determined that there is no abnormal area in the dish food to be detected;

[0094] If the number of abnormal corresponding points is greater than the abnormal corresponding point threshold, it is determined that the dish food to be detected has an abnormal area.

[0095] In the specific implementation process, the preset abnormal corresponding point threshold is 20. When 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. The number of abnormal corresponding points is 25, which is greater than the abnormal corresponding point threshold, and it is determined that there is an abnormal area in the dish food to be detected.

[0096] Specifically, by comparing the abnormal corresponding point threshold and the abnormal corresponding point number, 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, reduce misjudgments caused by individual abnormal points, and improve the stability and reliability of the judgment. By quickly and accurately identifying potential problem foods and quickly screening out samples that need further testing, the efficiency of the entire testing process is greatly improved while reducing the overall testing cost.

[0097] Specifically, in step S3, when it is determined that the dish food to be tested does not have an abnormal area, it is determined to be a qualified product;

[0098] When it is determined that the to-be-detected dish food has an abnormal area, the to-be-detected dish food is marked as abnormal food to be determined.

[0099] Specifically, when there is an abnormal area in the food to be tested, it means that there may be a problem with the packaging of the food. Bulging may occur inside, causing a change in the packaging image, and further identification of the food is required.

[0100] Specifically, by determining whether there are abnormal areas in the dishes to be tested, the samples can be quickly divided into two categories: qualified products and foods to be determined to be abnormal. Qualified products can pass the test directly, while foods to be determined to be abnormal require further testing. This grading mechanism optimizes resource allocation and reduces the number of samples that require more complex and expensive testing, thereby reducing overall testing costs.

[0101] Please continue reading Figure 4 ,like Figure 4 As shown, it is a flow chart of determining whether the abnormal food to be determined is spoiled according to an embodiment of the present invention;

[0102] Specifically, in step S4, it includes:

[0103] Step S41, performing infrared spectrum scanning on the abnormal food to be determined to obtain spectrum data of the abnormal food to be determined;

[0104] Step S42, analyzing the spectrum data according to a preset infrared spectrum model to obtain the nutritional content;

[0105] Step S43, comparing the nutritional content with a preset standard nutritional content, and determining whether the abnormal food to be determined is spoiled based on the comparison result.

[0106] Specifically, the food sample to be determined to be abnormal is placed on the sample stage of the infrared spectrometer. The infrared light source emits a light beam through the sample, the detector receives the transmitted or reflected light, records the light intensity of different wavelengths, and analyzes it according to the preset model to obtain the corresponding nutritional content.

[0107] Specifically, through infrared spectral scanning, the nutritional components of food can be accurately quantitatively analyzed, which greatly improves the detection efficiency. By comparing with the preset standard nutritional content, foods with abnormal nutritional components can be quickly detected, which is conducive to timely detection of potential food quality problems and improving food safety levels.

[0108] Specifically, in step S43, whether the abnormal food to be determined is spoiled is determined based on the comparison result. The process includes:

[0109] If the nutritional content is less than the standard nutritional content, it is determined that the abnormal food to be determined has deteriorated;

[0110] If the nutritional content is greater than or equal to the standard nutritional content, it is determined that the abnormal food to be determined is not spoiled.

[0111] During the specific implementation process, the standard protein content of a to-be-determined abnormal food is 50g. Through spectral detection of the to-be-determined abnormal food, its protein content is 40g, which is less than the standard protein content. It is determined that the to-be-determined abnormal food has deteriorated. The protein content of another to-be-determined abnormal food is detected to be 56g, which is greater than the standard protein content. It is determined that the nutritional components of the to-be-determined abnormal food have not deteriorated.

[0112] Specifically, by setting clear judgment criteria, the judgment process is greatly simplified, the reduction of nutritional content can be discovered in time, unqualified 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 qualified product to be determined is a non-qualified product based on the comparison result includes:

[0114] If the nutrient reduction is less than or equal to the preset nutrient reduction threshold, the to-be-determined qualified food is determined to be a qualified product;

[0115] If the nutrient reduction is greater than the preset nutrient reduction threshold, the to-be-determined qualified food is determined to be an unqualified product.

[0116] During the specific implementation process, the qualified food to be determined that the nutritional content was not deteriorated was stored for ten days. The preset threshold of the nutritional reduction of protein was 0.5g. The protein detected before storage was 56g. After 10 days of storage, it was detected that the protein content became 52g. The nutritional reduction of protein was 4g, which was greater than the threshold of nutritional reduction. This means that although no abnormality was detected in this qualified product before, it still did not meet the quality standards.

[0117] Specifically, by testing the amount of nutritional loss during storage of qualified food, it is possible to more accurately distinguish between normal nutritional loss and abnormal quality decline, reduce the possibility of misjudgment, make quality assessment more comprehensive, more comprehensively reflect the actual quality of the food, reduce economic losses caused by misjudgment, and facilitate the accuracy of testing.

[0118] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle 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 fall within the protection scope of the present invention.

[0119] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for detecting the quality of food, characterized in that: include: Step S1, obtaining a three-dimensional image of the packaging and a three-dimensional image of the food dish to be inspected, and processing the three-dimensional image of the packaging and the three-dimensional image of the food respectively to obtain a corresponding packaging outline image and food outline image; Step S2, analyzing the contour lines of the packaging contour map and the food contour map, and calculating the curvature difference of each corresponding point on the contour lines of the two; Step S3, determining whether the dish food to be detected has an abnormal area according to a preset curvature difference threshold and an abnormal corresponding point threshold, and determining whether to mark the dish food to be detected as an abnormal food to be determined based on the determination result; Step S4, performing spectral detection on the sample marked as the abnormal food to be determined, obtaining the nutritional content, and determining whether the abnormal food to be determined has deteriorated according to the nutritional content, wherein: If it is determined that the abnormal food to be determined is spoiled, the abnormal food to be determined is determined to be an unqualified product; if it is determined that the abnormal food to be determined is not spoiled, the abnormal food to be determined is determined to be a qualified product to be determined, and the process continues to step S5; Step S5, storing the qualified products to be determined, and detecting the remaining nutritional content of the qualified products to be determined when the rated storage time is reached, calculating the nutritional reduction amount based on the nutritional content and the remaining nutritional content, comparing the nutritional reduction amount with a preset nutritional reduction threshold, and determining whether the qualified products to be determined are unqualified products based on the comparison results.

2. The method for detecting the quality of dishes and foods according to claim 1, characterized in that: In the step S1, it includes: Step S11, obtaining a three-dimensional image of the packaging and a three-dimensional image of the food of the dish to be inspected; Step S12, denoising the packaging 3D image and the food 3D image to remove noise, performing edge sharpening to improve image edge clarity, and obtaining an optimized packaging 3D image and an optimized food 3D image; Step S13, obtaining parallel and vertical views of the optimized packaging three-dimensional image and the optimized food three-dimensional image to obtain a packaging outline map and a food outline map, wherein the packaging outline map includes a packaging parallel outline map and a packaging vertical outline map, and the food outline map includes a food parallel outline map and a food vertical outline map.

3. The method for detecting the quality of dishes and foods according to claim 1, characterized in that: In the step S2, it includes: Step S21, projecting the package outline map and the food outline map into the same coordinate system, wherein the package parallel outline map corresponds to the food parallel outline map, and the package vertical outline map corresponds to the food vertical outline map; Step S22, calculating the curvature of the corresponding points on the contour lines of the package parallel contour map and the food parallel contour map and the curvature of the corresponding points on the contour lines of the package vertical contour map and the food vertical contour map; Step S23, calculating the curvature difference between the parallel corresponding points and the vertical corresponding points.

4. The method for detecting the quality of dishes and foods according to claim 3, characterized in that: In step S22, the corresponding points are points on the packaging outline map and the food outline map corresponding to the same horizontal coordinate, and the curvature is calculated according to the positions of the two corresponding points before and after the corresponding points.

5. The method for detecting the quality of dishes and foods according to claim 1, characterized in that: In step S3, the curvature difference threshold is preset, the curvature difference is compared with the curvature difference threshold, and whether the corresponding point is abnormal is determined based on the comparison result, wherein: If the curvature difference is less than or equal to the curvature difference threshold, the corresponding point is determined to be normal; If the curvature difference is greater than the curvature difference threshold, the corresponding point is determined to be abnormal.

6. The method for detecting the quality of dishes and foods according to claim 5, characterized in that: In step S3, the abnormal corresponding point threshold 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 abnormal corresponding point threshold, and based on the comparison result, it is determined whether there is an abnormal area in the dish food to be detected, wherein: If the number of abnormal corresponding points is less than or equal to the abnormal corresponding point threshold, it is determined that there is no abnormal area in the dish food to be detected; If the number of abnormal corresponding points is greater than the abnormal corresponding point threshold, it is determined that the dish food to be detected has an abnormal area.

7. The method for detecting the quality of dishes and foods according to claim 6, characterized in that: In step S3, when it is determined that the dish food to be inspected does not have an abnormal area, it is determined to be a qualified product; When it is determined that the to-be-detected dish food has an abnormal area, the to-be-detected dish food is marked as abnormal food to be determined.

8. The method for detecting the quality of dishes and foods according to claim 1, characterized in that: In the step S4, it includes: Step S41, performing infrared spectrum scanning on the abnormal food to be determined to obtain spectrum data of the abnormal food to be determined; Step S42, analyzing the spectrum data according to a preset infrared spectrum model to obtain the nutritional content; Step S43, comparing the nutritional content with a preset standard nutritional content, and determining whether the abnormal food to be determined is spoiled based on the comparison result.

9. The method for detecting the quality of dishes and foods according to claim 8, characterized in that: In step S43, whether the abnormal food to be determined is spoiled is determined based on the comparison result. The process includes: If the nutritional content is less than the standard nutritional content, it is determined that the abnormal food to be determined has deteriorated; If the nutritional content is greater than or equal to the standard nutritional content, it is determined that the abnormal food to be determined is not spoiled.

10. The method for detecting the quality of dishes and foods according to claim 1, characterized in that: In step S5, the process of determining whether the qualified product to be determined is a non-qualified product based on the comparison result includes: If the nutrient reduction is less than or equal to the preset nutrient reduction threshold, the to-be-determined qualified food is determined to be a qualified product; If the nutrient reduction is greater than the preset nutrient reduction threshold, the to-be-determined qualified food is determined to be an unqualified product.

Citation Information

Patent Citations

  • Method for intelligently and nondestructively detecting nutrient content of dish food based on atlas data

    CN113324928A

  • Fourier transform infrared spectroscopy-based method for detecting quality of trichiurus haumela

    CN103063600A

  • Method for nondestructively and rapidly determining content of chia seed protein

    CN110231306A

  • Method for determining inorganic selenium in nutritional rice-flour noodles

    CN110779897A

  • Food packaging visual inspection method in food processing process

    CN118781104A

Cited By

  • Packaging detection method and device for high-energy fuel cell

    CN120709423A