Meat freshness detection label and identification method and identification device thereof
By using the color-developing layer of the meat freshness detection label to react with the meat and produce a color change, combined with image processing technology and the Lab value model, the problem of speed and accuracy in judging meat freshness is solved, reducing the risk of misjudgment and cost, and improving identification efficiency and food safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHAANXI NORMAL UNIV
- Filing Date
- 2022-11-04
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies cannot quickly and accurately determine the freshness of meat, leading to misjudgments, food waste, or health risks. Furthermore, traditional testing methods are costly and inefficient.
Design a meat freshness detection label comprising a color development layer and a scanning layer. The color development layer contains curcumin, which reacts with volatile basic nitrogen in the meat to produce a color change. Combined with QR code positioning markers and standard color blocks, image processing technology is used to identify the color of the color development layer, establish a Lab value and freshness model, and achieve rapid and accurate freshness judgment.
It enables rapid and accurate assessment of meat freshness, reduces the risk of misjudgment, improves identification efficiency and accuracy, reduces costs, and ensures food safety.
Smart Images

Figure CN115760727B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart label technology, specifically to a meat freshness detection label and its identification method and device. Background Technology
[0002] Inspection labels enable functions such as detection, sensing, recording, and tracking. Based on their monitoring, sensing, and recording capabilities, they convey food safety and quality information to food producers, operators, and consumers. Utilizing inspection labels allows food industry professionals to easily monitor food in real time and implement strategies, reducing food waste and loss while maximizing the preservation of flavor, texture, and nutritional value. It also allows consumers to more accurately perceive food quality and safety, improving overall food safety.
[0003] With the rapid improvement of socio-economic levels, people's demand for meat products is increasing. When judging whether meat has spoiled, people often rely on observing its color and smelling its odor to determine whether it is spoiled or fresh. This is not an accurate way for most ordinary consumers to judge the freshness of meat, and it is easily affected by environmental differences, leading to different results. This can easily cause misjudgment of meat, resulting in food waste or harm to the health of consumers. At the same time, testing the freshness of meat through testing agencies is time-consuming and costly, and sampling tests cannot accurately and comprehensively reflect the freshness of meat, failing to meet the actual needs of consumers. Summary of the Invention
[0004] The purpose of this invention is to provide a meat freshness detection label, its identification method, and identification device to solve the problem of not being able to quickly, accurately, and effectively judge the freshness of meat.
[0005] The solution of the present invention to the above-mentioned technical problems is as follows:
[0006] A meat freshness detection label is characterized by comprising a color-developing layer that reacts with the color of small molecules that are markers produced during the meat spoilage process, and a scanning layer covering the color-developing layer. The scanning layer is provided with a positioning mark, a standard color block, and a sampling area. The sampling area is used to display the color of the color-developing layer. The standard color block and the sampling area are both located around the positioning mark.
[0007] Further specifying, the color development layer contains curcumin, which reacts with color based on the volatile basic nitrogen produced during the meat spoilage process.
[0008] A method for identifying meat freshness detection labels, characterized by comprising the following steps based on the aforementioned meat freshness detection labels:
[0009] S1. Obtain the scanned layer image and perform grayscale processing on the scanned layer image to obtain the image to be scanned;
[0010] S2. Determine whether the positioning mark in the image to be scanned can be successfully recognized. If the recognition is successful, determine the position of the center of the sampling area and the position of the standard color block in the scanned layer image. If the recognition fails, adjust the method of acquiring the scanned layer image and execute step S1.
[0011] S3. Adjust the RGB values of the scanned layer image according to the color offset of the standard color blocks in the scanned layer image;
[0012] S4. Based on the location of the center of the sampling area, crop the image of the color development layer in the sampling area to obtain the sampling image, and convert the RGB values of the sampling image to the Lab space to obtain the Lab values of the sampling image.
[0013] S5. Determine whether the range of Lab values of the sampled image is valid. If yes, proceed to step S6; otherwise, indicate recognition failure.
[0014] S6. Obtain the meat freshness corresponding to the color of the color development layer based on the Lab value of the sampled image and the color / freshness model.
[0015] Further specifying, step S1 specifically includes the following steps:
[0016] S11. Capture the scanned layer to obtain an image of the scanned layer;
[0017] S12. Use the weighted average method to convert the scanned layer image into a scanned layer grayscale image;
[0018] S13. Scale the grayscale image of the scanned layer to the size of the image to be scanned according to the scaling ratio.
[0019] Further specifying, step S2 specifically includes the following steps:
[0020] S21. Compress the image to be scanned according to the set compression ratio;
[0021] S22. Binarize the compressed image to be scanned.
[0022] S23. Identify the positioning markers in the image to be scanned after binarization. If the identification is successful, proceed to step S24. If the identification fails, reset the compression ratio and proceed to step S21. Continue until the set compression ratio is equal to 1 and the identification still fails. Then adjust the method of acquiring the scanned layer image and proceed to step S1.
[0023] S24. Determine the position of the positioning marker in the scanned layer image based on the position of the positioning marker in the image to be scanned;
[0024] S25. Determine the position of the standard color block in the scanned layer image based on the positional relationship between the positioning marker and the standard color block, and determine the position of the center of the sampling area in the scanned layer image based on the positional relationship between the positioning marker and the center of the sampling area.
[0025] Further specifying, step S24 specifically includes the following steps:
[0026] The location identifier is a QR code;
[0027] S241. Determine the pixel positions of the probe patterns at three locations in the image to be scanned;
[0028] S242. Determine the pixel positions of the three probe patterns in the scanned layer image according to the scaling ratio of the image to be scanned.
[0029] S243. Using the center of the detection pattern at the middle position as the origin, and the lines connecting the centers of the other two detection patterns to the origin as the horizontal and vertical axes respectively, a rectangular coordinate system with the center of the detection pattern at the middle position as the origin is obtained.
[0030] Further specifying, step S4 specifically includes the following steps:
[0031] S41. Based on the position of the center of the sampling area in the scanned layer image, crop the image of the color development layer in the sampling area as the image to be identified;
[0032] S42. Perform Gaussian filtering on the image to be recognized to remove noise and obtain a sampled image;
[0033] S43. Convert the RGB values of the sampled image to the Lab space to obtain the Lab values of the sampled image.
[0034] Further specifying, step S6 specifically includes the following steps:
[0035] S61. Substitute the obtained Lab value of the sampled image into the color / freshness model to calculate the model value;
[0036] S62. Calculate the real-time freshness of the meat based on the model value;
[0037] S63. Display the color layer image at the corresponding position of the scanned layer image, the sampled image, and the meat freshness indicator.
[0038] Further specifying, the establishment of the color / freshness model includes the following steps:
[0039] Multiple meat products were selected and the content of volatile basic nitrogen in each product was measured to determine the freshness of each product.
[0040] Each piece of meat was measured using meat freshness testing labels, resulting in meat freshness testing labels of different colors displayed in the sampling area;
[0041] The meat freshness detection labels displaying different colors in the sampling area are processed according to steps S1 to S5 to obtain the sampling image Lab value corresponding to the volatile basic nitrogen content.
[0042] Establish a model between the volatile basic nitrogen content g(x) and the value of a in the sampled image:
[0043]
[0044] g(x) = p 11 x 3 +p 12 x 2 +p 13 x+p 14
[0045] Among them, p1=0.0000539±0.000052052, p2=-0.005895±0.004255, p3=0.1949±0.1326, p4=4.183±0.625, p=-0.7351±0.0589.
[0046] A meat freshness identification device, characterized in that it comprises:
[0047] The detection module is used to bring the meat sample to be tested close to the color development layer of the meat freshness detection label;
[0048] The image acquisition module is used to acquire images of the scanned layers;
[0049] An image recognition device is used to process a scanned layer image into grayscale to obtain a scanned image, determine whether the positioning mark in the scanned image can be successfully recognized, and if the recognition is successful, send the scanned layer image to the image processing module; if the recognition fails, re-acquire the scanned layer image through the image acquisition module.
[0050] The image processing module is used to determine the position of the center of the sampling area and the position of the standard color block in the scanned layer image, adjust the RGB value of the scanned layer image according to the color offset of the standard color block in the scanned layer image, crop the image of the color development layer in the sampling area according to the position of the center of the sampling area to obtain the sampled image, and convert the RGB value of the sampled image to the Lab space to obtain the Lab value of the sampled image.
[0051] The error correction module is used to determine whether the range of Lab values of the sampled image is valid. If it is, the Lab values of the sampled image are sent to the result calculation module. If not, the recognition failure information is sent to the detection display module.
[0052] The result calculation module obtains the meat freshness corresponding to the color of the color development layer based on the Lab value of the sampled image and the color / freshness model, and sends the meat freshness information corresponding to the color development layer color to the detection and display module.
[0053] The detection and display module is used to display the results of meat freshness detection or to indicate recognition failure.
[0054] The beneficial effects of this invention are as follows:
[0055] 1. The meat freshness detection label provided by this invention expresses the freshness of meat by reacting with the color of small molecules that are markers in the meat spoilage process through a color-developing layer. By covering the color-developing layer with a scanning layer and displaying the color of the color-developing layer through the sampling area, the judgment of meat freshness is made faster, more intuitive, and more accurate. By scanning and identifying the scanning layer of the meat freshness detection label, the location of the standard color block and the sampling area are determined by positioning marks, which improves the convenience of color collection in the sampling area. The use of standard color blocks can avoid the identification error caused by the difference between the collected sampling area color and the actual color, thus meeting the needs of practical use. The freshness of meat is then judged by the collected sampling area color, ensuring the accuracy of the identification results and making it convenient for consumers to quickly and easily judge the freshness of meat.
[0056] 2. The color reaction occurs through curcumin reacting with volatile basic nitrogen produced in meat. Because curcumin is not easily soluble in water, it does not decompose during use, allowing for long-term use and reducing costs. Furthermore, it does not contain harmful substances and poses no food safety risk to meat. The three location detection graphics in the QR code serve as positioning markers, making identification simpler and more convenient. Establishing a coordinate system based on these markers to determine the location of the standard color block and sampling area is also faster, improving the recognition of meat freshness testing labels and increasing the efficiency of meat freshness assessment.
[0057] 3. By sampling the color of the color development layer in the sampling area and then converting the RGB values of the color development layer to the Lab space, the shortcomings of RGB and CMYK modes, which rely on the color characteristics of the equipment, are compensated. At the same time, the L and a values are used to establish a model with the volatile basic nitrogen content in the meat. This can not only eliminate the RGB color model error caused by the low saturation of the label color change effect, but also simplify the model and calculation, thereby more accurately fitting the actual freshness of the meat, reducing the difficulty of recognition, improving the recognition speed, and ensuring the accuracy of recognition. Attached Figure Description
[0058] Figure 1 This is a structural diagram of the meat freshness detection label of the present invention;
[0059] Figure 2This is a flowchart illustrating the steps of the meat freshness detection label recognition method of the present invention;
[0060] Figure 3 This is a schematic diagram of the coordinate system established based on the positioning mark in the meat freshness detection label of the present invention;
[0061] Figure 4 This is a correlation model diagram of the RGB and Lab values of the color rendering layer of the present invention, wherein... Figure 4 In the diagram, 'a' represents the correlation model of the RGB values of the color rendering layer. Figure 4 In the diagram, b represents the correlation model of the Lab value of the chromogenic layer.
[0062] Figure 5 This is a statistical graph showing the Lab values of the chromogenic layer in different meat freshness detection labels during each experiment of this invention. Figure 5 In the figure, 'a' represents the statistical graph of the Lab values of the chromogenic layer in the different meat freshness detection labels during the first experiment. Figure 5 b in the figure is a statistical graph of the Lab values of the chromogenic layer in different meat freshness detection labels during the experiment; Figure 5 In the figure, c represents the statistical graph of Lab values of the chromogenic layer in different meat freshness detection labels during the experiment; Figure 5 In the figure, d represents the statistical graph of Lab values of the chromogenic layer in different meat freshness detection labels during the experiment;
[0063] Figure 6 This is a schematic diagram showing the linear relationship between the L value and the a value of the color development layer of the present invention;
[0064] Figure 7 This is a three-dimensional model diagram showing the relationship between the color development layer Lab and the volatile basic nitrogen content of this invention;
[0065] Figure 8 This is a schematic diagram of a two-dimensional decision function model of the volatile basic nitrogen content in meat products of the present invention with respect to the value of x;
[0066] Figure 9 This is a schematic diagram showing the color of the color development layer corresponding to different times using the meat freshness detection label of the present invention.
[0067] Figure 10 This is a schematic diagram of the color development layer in the meat freshness detection label of the present invention after 20 minutes under different volatile basic nitrogen equivalent concentrations;
[0068] Figure 11 This is a schematic diagram of the structure of the meat freshness identification device of the present invention. Detailed Implementation
[0069] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0070] In this application, when testing the freshness of meat products, the meat products are fresh meat and frozen meat, and the small molecules of biomarkers produced during the deterioration process of the meat products are volatile basic nitrogen.
[0071] refer to Figure 1 This embodiment provides a meat freshness detection label, including a color-developing layer and a scanning layer. The color-developing layer contains curcumin, which reacts with different concentrations of volatile basic nitrogen to produce different shades of color, thus determining whether the meat is fresh, slightly spoiled, or stale. The scanning layer covers the upper surface of the color-developing layer. In use, the meat freshness detection label is placed on the top inside the meat packaging box, with the lower surface of the color-developing layer close to the meat. The lower surface of the color-developing layer contacts the small molecules of markers produced by the meat, thus activating the color-developing layer. The packaging box is made of transparent material. In order to observe the color of the developing layer, a sampling area is opened on the scanning layer. The sampling area can display the color of the developing layer below the scanning layer. The sampling area can be set as a circle, rectangle, or polygon, such as a square structure. The exposed developing layer is also square, which makes it easy to observe the color of the developing layer. The meat freshness detection label can come into contact with the meat. When the meat freshness detection label comes into contact with the meat, it will not affect the color reaction between curcumin and volatile basic nitrogen.
[0072] Because the content of volatile basic nitrogen in meat products changes continuously over time, visual observation alone can lead to inaccurate judgments. Therefore, equipment is typically needed to identify the color of the developing layer in the sampling area. Since the colors in photos taken by the equipment can vary, standard color blocks are usually used to correct color deviations, ensuring color consistency and more accurate identification of the sampling area. Ideally, standard color blocks and positioning markers are placed on the scanning layer, with the standard color blocks and sampling area positioned around the positioning markers. For ease of manufacturing, the relative position of the standard color blocks to the positioning markers is determined as needed. Determining the position of the standard color blocks in a plane involves establishing a Cartesian coordinate system based on the positioning markers, thus determining the positional relationship between the standard color blocks and the positioning markers, as well as the positional relationship between the center of the sampling area and the positioning markers. To ensure the uniqueness of the Cartesian coordinate system established by the positioning markers, it is preferable that the positioning markers consist of three positioning points that can form an L-shaped structure. In this case, the three positioning points are located at the L-shaped structure... The three endpoints of the structure are defined, with the middle point as the origin. The lines connecting the origin to the other two points are the X and Y axes. The positions of the standard color blocks and the sampling area can be represented using (x, y) coordinates. To avoid inaccurate representation of the positions of the standard color blocks and the sampling area due to the non-fixed X and Y axes of the rectangular coordinate system established by the positioning points, it is preferable to set two standard color blocks and one sampling area. The positions of the two standard color blocks are represented as (n, m) and (m, n) respectively. Thus, the rectangular coordinate system established by the positioning points does not need to determine the directions of the X and Y axes to determine the positions of the two standard color blocks. At the same time, to avoid too many sampling areas, one sampling area is selected. In this case, the position of the sampling area can be represented as (k, k). This also allows the determination of the center position of the sampling area when the X and Y axes are not unique, improving the recognition efficiency of the sampling area color. Further, the positioning mark can be a QR code. The coordinate system can be established by using the three position detection graphics of the QR code itself. The method is more mature and convenient.
[0073] Example 2
[0074] refer to Figure 2 Based on the meat freshness detection label of Example 1, this example provides a method for identifying meat freshness detection labels, including the following steps:
[0075] S1. Obtain the scanned layer image and perform grayscale processing on the scanned layer image to obtain the image to be scanned;
[0076] S2. Identify the positioning markers in the image to be scanned. If the identification is successful, determine the position of the center of the sampling area and the position of the standard color block in the scanned layer image. If the identification fails, adjust the method of acquiring the scanned layer image and execute step S1.
[0077] S3. Adjust the RGB values of the scanned layer image according to the color offset of the standard color blocks in the scanned layer image;
[0078] S4. Based on the location of the center of the sampling area, crop the image of the color development layer in the sampling area to obtain the sampling image, and convert the RGB values of the sampling image to the Lab space to obtain the Lab values of the sampling image.
[0079] S5. Determine whether the range of Lab values of the sampled image is valid. If yes, proceed to step S6; otherwise, reacquire the scanned layer image.
[0080] S6. Obtain the meat freshness indication corresponding to the color of the color development layer based on the Lab value of the sampled image and the color / freshness model.
[0081] Step S1 specifically includes the following steps:
[0082] S11. Capture the scanned layer to obtain an image of the scanned layer;
[0083] Specifically, after the meat freshness detection label is placed on the top inside of the meat packaging, an image of the scanning layer of the meat freshness detection label is captured by an image acquisition device such as a camera or video camera. It is preferable to shoot the image of the scanning layer from the front to improve the recognition accuracy.
[0084] S12. Use the weighted average method to convert the scanned layer image into a scanned layer grayscale image;
[0085] Specifically, the RGB color scanned image is converted into a grayscale image of the scanned layer in grayscale. Since the color of the color development layer in the sampling area is not completely uniform, and to ensure more accurate grayscale conversion of the scanned layer image, a weighted average algorithm is used to calculate the grayscale value Z of the scanned layer grayscale image.
[0086] Z = a*R + b*G + c*B
[0087] Where R, G, and B are the values of the red, green, and blue color channels, respectively, and a, b, and c are the weighting parameters of R, G, and B, respectively.
[0088] Image grayscale processing simplifies the matrix and improves computational performance. It can also concentrate the light intensity information carried by different color channels, making the image shape and edge information more prominent. In this case, the weighting parameters are a = 0.299, b = 0.587, and c = 0.114.
[0089] S13. Scale the grayscale image of the scanned layer to the size of the image to be scanned according to the scaling ratio.
[0090] Since different models of imaging devices are used to capture scanned layer images, the sizes of the resulting scanned layer images vary. To reduce the computational load when identifying positioning markers, it is preferable to first scale the shorter side of the scanned layer grayscale image to a set size according to a scaling ratio. The resulting image is used as the image to be scanned. This facilitates the calculation of the pixel distances between the positioning marker and the standard color block and the sampling area, respectively. The scaling ratio of the positioning marker in the image to be scanned can then be determined based on the actual size of the positioning marker. For example, the shorter side of the scanned layer grayscale image can be scaled to 1000 pixels. If it is a square image, any side can be scaled to 1000 pixels.
[0091] Step S2 specifically includes the following steps:
[0092] S21. Compress the image to be scanned according to the set compression ratio;
[0093] To further reduce the difficulty of locating markers and eliminate the impact of high-frequency noise in high-definition images on binarization segmentation, an iterative compression and binarization method is introduced. The compression ratio of the iteration is 0.1 to 1. Initially, the compression ratio of the image to be scanned is selected as 0.1. During the iteration process, the compression ratio is increased by 0.1 sequentially until the compression ratio is 1, i.e., no compression is performed. The smaller the compression ratio, the greater the degree of compression of the image to be scanned, and the simpler the processing.
[0094] S22. Binarize the compressed image to be scanned.
[0095] After the image to be scanned is compressed, it is then binarized to make it a black and white image, which facilitates the identification of the positioning markers.
[0096] S23. Identify the positioning markers in the image to be scanned after binarization. If the identification is successful, proceed to step S24. If the identification fails, reset the compression ratio and proceed to step S21. Continue until the set compression ratio is equal to 1 and the identification still fails. Then adjust the method of acquiring the scanned layer image and proceed to step S1.
[0097] Although a compression ratio of 0.1 results in faster recognition of the positioning markers, excessive compression often leads to unclear markers. Therefore, it is necessary to re-encode the image to be scanned, setting the compression ratio to 0.2 and repeating steps S21-S23. If the positioning markers still cannot be recognized, the compression ratio is set to 0.3 again, and steps S21-S23 are repeated. This process is repeated every time recognition fails. When resetting the compression ratio after a recognition failure, it is checked whether the compression ratio is 1. If not, it is increased by 0.1 and the compression process is repeated. If it is, the process ends, indicating that the identification markers in the captured scanned layer image are incomplete and cannot be recognized. Step S1 needs to be executed to re-capture and obtain a new and better scanned layer image. If recognition is successful, it means that the positioning markers in the scanned layer image are complete and can be recognized. This method greatly reduces the amount of computation and improves the performance of the program compared to the traditional window filtering method.
[0098] S24. Determine the position of the positioning marker in the scanned layer image based on the position of the positioning marker in the image to be scanned;
[0099] Step S24 specifically includes the following steps:
[0100] S241. Determine the pixel positions of the probe patterns at three locations in the image to be scanned;
[0101] S242. Determine the pixel positions of the three probe patterns in the scanned layer image according to the scaling ratio of the image to be scanned.
[0102] S243. Using the center of the middle detection graphic as the origin, and the lines connecting the centers of the other two detection graphics to the origin as the horizontal and vertical axes respectively, a rectangular coordinate system with the center of the middle detection graphic as the origin is obtained.
[0103] In the process of recognizing the scanned layer image, in order to determine the position of the sampling area and the position of the standard color block, it is necessary to first determine the position of the positioning mark. Since the image to be scanned is obtained by scaling by setting a scaling ratio, the pixel positions of the three position detection graphics on the image to be scanned are first determined by the existing method when scanning the QR code. Then, the positions of the three position detection graphics on the grayscale image of the scanned layer are determined according to the scaling ratio, so that the positions of the three position detection graphics on the scanned layer can be obtained.
[0104] like Figure 3 As shown, a rectangular coordinate system is then established based on the three position detection patterns. The center of the middle position detection pattern is taken as the origin, and the lines connecting the centers of the other two position detection patterns to the origin are taken as the horizontal and vertical axes, respectively, to obtain a rectangular coordinate system with the center of the middle detection pattern as the origin.
[0105] S25. Determine the position of the standard color block in the scanned layer image based on the positional relationship between the positioning marker and the standard color block, and determine the position of the center of the sampling area in the scanned layer image based on the positional relationship between the positioning marker and the center of the sampling area.
[0106] like Figure 3 As shown, the standard color block in the vertical direction contains multiple color blocks. The position of each color block can be determined by a point value. Then, the recognition area of each color block in the standard color block is determined by delineating the area around the point value. Similarly, the recognition of the color layer in the sampling area is also based on the position of the center of the sampling area. The sampling recognition area of the color layer color is delineated by expanding the range of the center position. For example, if the center position detection pattern in the QR code is the origin (0, 0), then the other two position detection patterns are (0, X1) and (X1, 0), the position of the center of the sampling area is (X3, X3), and the positions of the red color blocks are (0, X3) and (X3, 0), thus conveniently and quickly determining the position of the standard color block and the sampling area.
[0107] Step S3 specifically includes the following steps:
[0108] S31. The color offset is obtained by comparing the actual RGB values of the standard color block positions in the scanned layer image with the theoretical RGB values.
[0109] S32. Adjust the RGB values of the scanned layer image based on the obtained color offset.
[0110] The color offset is obtained by comparing the RGB value of each color block in the standard color block of the scanned layer image with the actual theoretical RGB value of the standard color block. The RGB value of the scanned layer image is then adjusted using the color offset to avoid the influence of inaccurate recognition results caused by inconsistencies in the color white balance or saturation of the shooting device. This ensures that the adjusted RGB value of the scanned layer image is based on the description of standard colors.
[0111] Step S4 specifically includes the following steps:
[0112] S41. Based on the position of the center of the sampling area in the scanned layer image, crop the image of the color development layer in the sampling area as the image to be identified;
[0113] After determining the sampling recognition area in the sampling region of the scanned layer image, the image of that area is cropped as the image to be recognized for subsequent processing. At this time, there is no need to process other content in the scanned layer, so the image of the color development layer is selected from the sampling area, which helps to improve processing efficiency.
[0114] S42. Perform Gaussian filtering on the image to be recognized to remove noise and obtain a sampled image;
[0115] S43. Convert the RGB values of the sampled image to the Lab space to obtain the Lab values of the sampled image;
[0116] The RGB values of the sampled image are converted to Lab color space to obtain the Lab values of the sampled image. The method for converting the RGB values of the sampled image to Lab color space is as follows:
[0117]
[0118] S5. Determine whether the range of Lab values of the sampled image is valid. If yes, proceed to step S6; otherwise, indicate recognition failure.
[0119] After obtaining the Lab value of the sampled image, it is necessary to determine whether the Lab value range of the sampled image is valid. Since the color obtained by the color reaction between curcumin and volatile basic nitrogen is relatively stable, sampled images with severe color cast due to poor shooting environment are screened out according to Lab value. If valid, continue to step S6. If invalid, it means that the color is distorted. At this time, it is necessary to change the shooting environment to obtain a new scanning layer image to ensure the accuracy and efficiency of recognition.
[0120] Step S6 specifically includes the following steps:
[0121] S61. Substitute the obtained Lab value of the sampled image into the color / freshness model to calculate the model value;
[0122] The specific method for establishing the color / freshness model is as follows:
[0123] Multiple meat products were selected and the content of volatile basic nitrogen in each product was measured to determine the freshness of each product.
[0124] Specifically, the content of volatile basic nitrogen in meat increases over time. Therefore, by utilizing the color reaction between curcumin and different concentrations of volatile basic nitrogen, different colors can be displayed when the coloring layer comes into contact with meat products with different volatile basic nitrogen contents. This is in accordance with the national food safety standards GB2707-2016 (Fresh (Frozen) Livestock and Poultry Products) and GB... The standard 5009.228—2016 "Determination of Volatile Basic Nitrogen in Food" specifies the relevant requirements for the physicochemical indicators of fresh meat. The volatile basic nitrogen (TVB-N) content must not exceed 15 mg / 100g. Therefore, if the volatile basic nitrogen content is greater than 15 mg / 100g, the meat can be considered spoiled. If the volatile basic nitrogen content is between 0 and 5 mg / 100g (inclusive), the meat can be considered fresh. If the volatile basic nitrogen content is between 5 and 15 mg / 100g, the meat is considered not fresh.
[0125] Each piece of meat was measured using meat freshness testing labels, resulting in meat freshness testing labels of different colors displayed in the sampling area;
[0126] Specifically, the selected meat products are then tested one by one using meat freshness test labels. The meat freshness test labels are placed close to the meat products to obtain multiple meat freshness test labels of different colors. Each meat freshness test label corresponds to a meat product of a certain freshness and also corresponds to the volatile basic nitrogen content of the meat product.
[0127] The meat freshness detection labels displaying different colors in the sampling area are processed according to steps S1 to S5 to obtain the sampling image Lab value corresponding to the volatile basic nitrogen content.
[0128] refer to Figure 4 The choice to use the Lab values of the chromogenic layer instead of the RGB values to establish a model relating to volatile basic nitrogen content is based on the fact that analysis of the RGB and Lab values of the chromogenic layer color in the meat freshness test labels obtained in Experiment 1 shows that, for common samples, such as... Figure 4 In the diagram, 'a' represents the correlation model plot using RGB values for analysis. The root mean square error (RMSE) for linear RGB modeling is 14.559, and the correlation coefficient R0 is... 2 The correlation coefficient is 0.8573, which is not high. Figure 4 In the diagram, 'b' represents the Lab model, with a linear modeling root mean square error (RMSE) of 2.3189 and a correlation coefficient (R²). 2 The value of 0.9590 indicates that the samples have a greater linear correlation in the Lab color space, which facilitates the establishment of the model. On the other hand, converting RGB to Lab values makes up for the deficiency that RGB and CMYK modes must rely on the color characteristics of the device.
[0129] Specifically, each meat freshness detection label is then identified according to steps S1 to S5 above to obtain the Lab value of each meat freshness detection label, which also corresponds to the volatile basic nitrogen content.
[0130] Establish a model between the volatile basic nitrogen content f(a) and the Lab value of the sampled image:
[0131] refer to Figure 5 , Figure 5 In the figure, 'a' represents the Lab value obtained from the analysis of the chromogenic layer on the meat freshness test label after the first test on seven meat products with different freshness levels. Figure 5 In the figure, 'b' represents the Lab value obtained after analyzing the chromogenic layer of the meat freshness test label following the second experiment, which tested seven new meat products with different freshness levels. Figure 5In the figure, 'c' represents the Lab value obtained after analyzing the chromogenic layer of the meat freshness test label following the third experiment, which tested seven new meat products with different freshness levels. Figure 5 In the figure, 'd' represents the Lab value obtained after analyzing the chromogenic layer of the meat freshness test label following the testing of seven new meat products with different freshness levels in the third experiment. Since the Lab value includes L, a, and b values, and the color change in the chromogenic area is relatively fixed, when the color of the chromogenic area changes with the increase of volatile basic nitrogen content, the L and a values show a linear relationship with a high predictive trend in the Lab value trend. However, the b value fluctuates significantly. Removing the b value from the Lab value can reduce the difficulty of the model between the Lab value and volatile basic nitrogen content, thus allowing for the analysis of the model between the L and a values in the Lab value and the volatile basic nitrogen content. (Reference) Figure 6 Correlation analysis between the L and a values reveals a strong linear relationship between them. A model is established to express the change of L with respect to a value as L(a) = pa + q, where p = -0.7351 ± 0.0589, q = 83.81 ± 0.93, and the parameters are the mean and the 95% confidence interval. R0 2 =0.962.
[0132] refer to Figure 7 The color coordinates are represented by the L and a color phases of the Lab color model. By substituting the L and a values of the sampled image and the corresponding volatile basic nitrogen concentration, the L and a values in the Lab values of the resulting color development layer are compared with the volatile basic nitrogen content of the corresponding meat product to establish a model f(a,L). This model can eliminate the RGB color model error caused by the low saturation of the label color change effect, and also simplify the model and calculation, thus more accurately fitting the actual freshness of the meat product.
[0133] f(a,L)=p1+p2a+p3L+p4a 2 +p5aL+p6L 2 +p7a 3 +p8a 2 L+p9aL 2 +p 10 L 3 f(a,L)
[0134] Among them, p1=5.26±0.909, p2=2.082±4.772, p3=-0.07078±5.09122, p4=1.81±22.97, p5=3.543±40.733, p6=-0.4862±18.1938, p7=-8.941±53.429, p8=-32.34±151.06, p9=-38.06±139.36, p 10 =15.25±42.34;
[0135] Since there is a linear relationship between L and a, we substitute model L(a) into model f(a,L) to simplify model f(a,L) and obtain the simplified model g(x) which is the relationship between the value of a and the concentration of volatile basic nitrogen. This model is used as the color / freshness model.
[0136] g(x) = p 11 x 3 +p 12 x 2 +p 13 x+p 14
[0137] Where, p 11 =0.0000539±0.000052052, p 12 = -0.005895 ± 0.004255, p 13 =0.1949±0.1326, p 14 =4.183±0.625, p = -0.7351 ± 0.0589.
[0138] refer to Figure 8 It can be intuitively observed that as the value of x increases, the content of volatile basic nitrogen increases accordingly.
[0139] In practical use, after executing steps S1 to S5 and obtaining the 'a' value in the Lab value of the sampled image, the value is substituted into the color / freshness model to obtain the model value, which is the corresponding volatile basic nitrogen concentration.
[0140] S62. Calculate the real-time freshness of the meat based on the model value;
[0141] Specifically, after calculating the volatile basic nitrogen content in step S61, the freshness of the meat can be determined based on the volatile basic nitrogen content.
[0142] S63. Display the color layer image at the corresponding position of the scanned layer image, the sampled image, and the meat freshness indicator.
[0143] Specifically, the final recognition results need to be displayed. When displaying the results, the scanned layer image, the color development layer image at the corresponding position of the sampled image, and the meat freshness indicator can be shown to make the recognition results more intuitive and clear.
[0144] Example 3
[0145] This embodiment provides a verification method for identifying meat freshness detection labels, including the following steps:
[0146] refer to Figure 9A simulated equivalent meat product was selected using 0.01 mol / L ammonia solution. This product represented by the simulated meat was considered spoiled. The color development layer of a meat freshness detection label was brought into contact with this product, triggering a color reaction and executing steps S1-S6 of the meat freshness detection label recognition method. At 0 min, the recognition result was displayed as fresh. Every 2 min, the scanning layer of the meat freshness detection label was recognized, simultaneously obtaining the corresponding display layer image. The image was then compared with the corresponding display layer image in Lab space. * Value and b * Value, a * The values are a and b, which change over time. * The value is the b value that changes over time, and the identification result is obtained at 20 minutes, indicating that the meat has spoiled. Therefore, it can be concluded that the meat freshness detection label provided by this invention can be used to judge the freshness of meat after 20 minutes of proximity to it. Compared with sending it for testing, it is faster and more efficient, while ensuring the accuracy of the test results and meeting the needs of actual use.
[0147] To avoid requiring users to wait 20 minutes for the meat freshness detection label to meet the requirements for detection and identification, the meat freshness detection label and the meat can usually be placed in the same gas environment for continuous reaction monitoring. That is, during meat packaging, the meat freshness detection label is attached to the top of the inner wall of the transparent packaging, so that the color development layer is close to the meat. This allows users to scan the scanning layer of the meat freshness detection label at any time to obtain the freshness result of the meat, further improving the efficiency of meat freshness detection.
[0148] To further verify the accuracy of meat freshness testing labels, refer to Figure 10 Different concentrations of ammonia water were used to simulate different concentrations of volatile basic nitrogen in meat of different freshness. Ammonia water concentration gradients of 0 mmol / L, 3.6 mmol / L, 7.1 mmol / L, and 10.7 mmol / L were established to simulate volatile basic nitrogen concentrations of 0 mg / 100g, 5 mg / 100g, 10 mg / 100g, and 15 mg / 100g, respectively. Samples were then taken from ammonia water of different concentrations and brought into contact with the chromogenic layer of the meat freshness detection label. After 20 minutes, images of the chromogenic layer with sufficient color reaction were obtained, and then detection and identification were performed. Simultaneously, the Δa value in the Lab space of the chromogenic layer corresponding to the equivalent volatile basic nitrogen concentration was obtained. Δa represents the a value in the Lab values obtained from 0 to 20 minutes. The results obtained by executing steps S1 to S6 of the meat freshness detection label identification method are shown in Table 1.
[0149] Table 1. Experimental Results of Label Accuracy in Meat Freshness Testing
[0150] Ammonia concentration (mmol / L) Equivalent volatile basic nitrogen concentration (mg / 100g) Δa size Test results 0 0 0 Fresh 3.6 5 4 Fresh 7.1 10 5 Second fresh 10.1 15 9 Deterioration
[0151] This verifies that the measurement accuracy of the meat freshness detection label provided by this invention is accurate, and the identification method of the meat freshness detection label is accurate, meeting the needs of actual use.
[0152] Example 4
[0153] like Figure 11 As shown, this embodiment provides a meat freshness identification device, including:
[0154] The detection module is used to bring the meat sample to be tested close to the color development layer of the meat freshness detection label;
[0155] When using it, you can directly choose to set the meat freshness test label in the transparent packaging, or you can stick the meat test label to the top inside of the transparent packaging and then seal the meat, so that the color development layer of the meat freshness test label reacts with the volatile basic nitrogen.
[0156] The image acquisition module is used to acquire images of the scanned layers;
[0157] An image recognition device is used to process a scanned layer image into grayscale to obtain a scanned image, determine whether the positioning mark in the scanned image can be successfully recognized, and if the recognition is successful, send the scanned layer image to the image processing module; if the recognition fails, re-acquire the scanned layer image through the image acquisition module.
[0158] The image processing module is used to determine the position of the center of the sampling area and the position of the standard color block in the scanned layer image, adjust the RGB value of the scanned layer image according to the color offset of the standard color block in the scanned layer image, crop the image of the color development layer in the sampling area according to the position of the center of the sampling area to obtain the sampled image, and convert the RGB value of the sampled image to the Lab space to obtain the Lab value of the sampled image.
[0159] The error correction module is used to determine whether the range of Lab values of the sampled image is valid. If it is, the Lab values of the sampled image are sent to the result calculation module. If not, the recognition failure information is sent to the detection display module.
[0160] The result calculation module obtains the meat freshness corresponding to the color of the color development layer based on the Lab value of the sampled image and the color / freshness model, and sends the meat freshness information corresponding to the color development layer color to the detection and display module.
[0161] The detection and display module is used to display the results of meat freshness detection or to indicate recognition failure.
[0162] It should be noted that the modules provided in this embodiment of the invention can implement all the method steps implemented in the above method embodiment and achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
Claims
1. A method for identifying meat freshness detection labels, characterized in that, Includes the following steps: S1. Obtain the scanned layer image and perform grayscale processing on the scanned layer image to obtain the image to be scanned; S2. Determine whether the positioning mark in the image to be scanned can be successfully recognized. If the recognition is successful, determine the position of the center of the sampling area and the position of the standard color block in the scanned layer image. If the recognition fails, adjust the method of acquiring the scanned layer image and execute step S1. S3. Adjust the RGB values of the scanned layer image according to the color offset of the standard color blocks in the scanned layer image; S4. Based on the location of the center of the sampling area, crop the image of the color development layer in the sampling area to obtain the sampling image, and convert the RGB values of the sampling image to the Lab space to obtain the Lab values of the sampling image. S5. Determine whether the range of Lab values of the sampled image is valid. If yes, proceed to step S6; otherwise, indicate recognition failure. S6. Obtain the meat freshness corresponding to the color of the color development layer based on the Lab value of the sampled image and the color / freshness model; The establishment of the color / freshness model includes the following steps: Multiple meat products were selected and the content of volatile basic nitrogen in each product was measured to determine the freshness of each product. Each piece of meat was measured using meat freshness testing labels, resulting in meat freshness testing labels of different colors displayed in the sampling area; The meat freshness detection labels displaying different colors in the sampling area are processed according to steps S1 to S5 to obtain the sampling image Lab value corresponding to the volatile basic nitrogen content. Establish a model between the volatile basic nitrogen content g(x) and the value of a in the sampled image: g(x) = p 11 x 3 + p 12 x 2 + p 13 x + p 14 Where, p 11 =0.0000539±0.000052052, p 12 = -0.005895 ± 0.004255, p 13 =0.1949±0.1326, p 14 =4.183±0.625, p=-0.7351±0.0589; The meat freshness detection label identification method described above corresponds to a meat freshness detection label comprising a color-developing layer that reacts with the color of small molecules that are markers produced during the meat spoilage process, and a scanning layer covering the color-developing layer. The scanning layer is provided with a positioning mark, a standard color block, and a sampling area. The sampling area is used to display the color of the color-developing layer. The standard color block and the sampling area are both located around the positioning mark. The color-developing layer contains curcumin, which reacts with color based on the volatile basic nitrogen produced during the meat spoilage process.
2. The method for identifying meat freshness detection labels according to claim 1, characterized in that, Step S1 specifically includes the following steps: S11. Capture the scanned layer to obtain an image of the scanned layer; S12. Use the weighted average method to convert the scanned layer image into a scanned layer grayscale image; S13. Scale the grayscale image of the scanned layer to the size of the image to be scanned according to the scaling ratio.
3. The method for identifying meat freshness detection labels according to claim 2, characterized in that, Step S2 specifically includes the following steps: S21. Compress the image to be scanned according to the set compression ratio; S22. Binarize the compressed image to be scanned. S23. Identify the positioning markers in the image to be scanned after binarization. If the identification is successful, proceed to step S24. If the identification fails, reset the compression ratio and proceed to step S21. Continue until the set compression ratio is equal to 1 and the identification still fails. Then adjust the method of acquiring the scanned layer image and proceed to step S1. S24. Determine the position of the positioning marker in the scanned layer image based on the position of the positioning marker in the image to be scanned; S25. Determine the position of the standard color block in the scanned layer image based on the positional relationship between the positioning marker and the standard color block, and determine the position of the center of the sampling area in the scanned layer image based on the positional relationship between the positioning marker and the center of the sampling area.
4. The method for identifying meat freshness detection labels according to claim 3, characterized in that, Step S24 specifically includes the following steps: The location identifier is a QR code; S241. Determine the pixel positions of the probe patterns at three locations in the image to be scanned; S242. Determine the pixel positions of the three probe patterns in the scanned layer image according to the scaling ratio of the image to be scanned. S243. Using the center of the detection pattern at the middle position as the origin, and the lines connecting the centers of the other two detection patterns to the origin as the horizontal and vertical axes respectively, a rectangular coordinate system with the center of the detection pattern at the middle position as the origin is obtained.
5. The method for identifying meat freshness detection labels according to claim 4, characterized in that, Step S4 specifically includes the following steps: S41. Based on the position of the center of the sampling area in the scanned layer image, crop the image of the color development layer in the sampling area as the image to be identified; S42. Perform Gaussian filtering on the image to be recognized to remove noise and obtain a sampled image; S43. Convert the RGB values of the sampled image to the Lab space to obtain the Lab values of the sampled image.
6. The method for identifying meat freshness detection labels according to claim 5, characterized in that, Step S6 specifically includes the following steps: S61. Substitute the obtained Lab value of the sampled image into the color / freshness model to calculate the model value; S62. Calculate the real-time freshness of the meat based on the model value; S63. Display the color layer image at the corresponding position of the scanned layer image, the sampled image, and the meat freshness indicator.
7. A meat freshness identification device, wherein the meat freshness identification device is used to implement the meat freshness detection label identification method according to claim 1, characterized in that, include: The detection module is used to bring the meat sample to be tested close to the color development layer of the meat freshness detection label; The image acquisition module is used to acquire images of the scanned layers; An image recognition device is used to process a scanned layer image into grayscale to obtain a scanned image, determine whether the positioning mark in the scanned image can be successfully recognized, and if the recognition is successful, send the scanned layer image to the image processing module; if the recognition fails, re-acquire the scanned layer image through the image acquisition module. The image processing module is used to determine the position of the center of the sampling area and the position of the standard color block in the scanned layer image, adjust the RGB value of the scanned layer image according to the color offset of the standard color block in the scanned layer image, crop the image of the color development layer in the sampling area according to the position of the center of the sampling area to obtain the sampled image, and convert the RGB value of the sampled image to the Lab space to obtain the Lab value of the sampled image. The error correction module is used to determine whether the range of Lab values of the sampled image is valid. If it is, the Lab values of the sampled image are sent to the result calculation module. If not, the recognition failure information is sent to the detection display module. The result calculation module obtains the meat freshness corresponding to the color of the color development layer based on the Lab value of the sampled image and the color / freshness model, and sends the meat freshness information corresponding to the color development layer color to the detection and display module. The detection and display module is used to display the results of meat freshness detection or to indicate recognition failure.
Citation Information
Patent Citations
Coding indication label, accurate recognition method and intelligent processing system
CN110659710A
Chilled pomfret freshness evaluation method based on MU-SVM
CN111768402A
Meat freshness detection label
CN219369575U