Method and system for nondestructively measuring oxymyoglobin on surface of longissimus dorsi muscle of cattle
Through image processing and convolutional neural network model, the high cost and destructive problems of measuring oxygenated myoglobin in meat products in the prior art are solved, and non-destructive and accurate prediction of oxygenated myoglobin content is achieved.
Patent Information
- Application Number
- CN202510528814.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-11
AI Technical Summary
The prior art has problems such as high cost, strong destructiveness and large measurement errors when measuring myoglobin in meat products, and it is difficult to accurately reflect the oxygenated myoglobin content of meat products.
The non-destructive measurement method is used to predict the oxygenated myoglobin content on beef through image acquisition, preprocessing, segmentation and feature extraction, combined with the convolutional neural network model, and the destructive operation of meat products is avoided.
High-precision, non-destructive measurement of the oxygenated myoglobin content on beef surface reduces costs and improves the accuracy and efficiency of measurement.
Smart Images

Figure CN120293975A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food detection, and particularly to a method and system for non-destructively measuring surface oxygenated myoglobin of the longissimus dorsi muscle of cattle. Background Art
[0002] Meat color plays a crucial role in consumers' purchasing decisions. Consumers will select meat products based on color and appearance because appearance is the first characteristic that people can perceive. The quality of meat color directly affects consumers' willingness to buy. Meat color is also an important indicator for measuring the quality of meat and meat products, and to a certain extent, it can reflect the quality of a piece of meat. In the production and circulation of meat products, how to effectively monitor meat color and prevent color deterioration is an urgent problem to be solved. In addition, consumers' expectations for purchasing meat and meat products with specific sensory characteristics are constantly increasing, and objective evaluation methods for meat quality have become increasingly important.
[0003] The formation of red color in meat is mainly affected by myoglobin in animals. Among the 8 α-helices of myoglobin, the iron atom at the central position is located in the hydrophobic core of the protein. Among the 6 bonds connected to this iron atom, 4 bonds connect the iron to the heme ring, the fifth bond connects to the proximal histidine-93, and the sixth bond can reversibly bind to diatomic oxygen, carbon monoxide, water, and nitric oxide. The ligand and the valence state of iron at this ligand-binding site determine the four chemical forms of myoglobin: deoxymyoglobin (DMb), oxymyoglobin (OMb), carboxymyoglobin (COMb), and metmyoglobin (MMb), thus affecting meat color.
[0004] In the laboratory, a colorimeter is generally used to measure meat color. However, in the practical process of measuring the surface color of whole-cut meat, people have gradually realized that there are some unreasonable aspects in principle. The colorimeter measurement takes points on the meat surface, and there are often fat or intermuscular connective tissues on the meat surface. The colors of these parts are very different from those of the lean meat part, and many factors such as different light angles during storage also cause the color distribution on the meat surface to be uneven, resulting in a large measurement error, and the error cannot be reduced by the method of taking the average of multiple measurements.
[0005] Currently, the detection methods for myoglobin in meat include techniques such as spectrophotometry, mass spectrometry, chromatography, and electrochemical measurement. However, these methods are costly, destructive to samples, and time-consuming. Summary of the Invention
[0006] Aiming at the deficiencies of the prior art, the present invention provides a method and system for non-destructively measuring the oxygenated myoglobin on the surface of the longissimus dorsi muscle of cattle. The present invention does not require the beef to be broken by chemical methods to extract myoglobin. Only by giving pictures of the beef surface at any time, the storage time and the content of oxygenated myoglobin at that moment can be predicted through a model, which has the characteristics of simple operation, time-saving and labor-saving, and high prediction accuracy.
[0007] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] In the first aspect, the present invention provides a method for non-destructively measuring the oxygenated myoglobin on the surface of the longissimus dorsi muscle of cattle, including the following steps:
[0009] Step 1: Simulate the storage conditions in a supermarket for fresh longissimus dorsi muscle of cattle, and collect image information of its surface in contact with oxygen at different storage time points;
[0010] Step 2: Perform preprocessing such as color adjustment and resolution unification on the collected images, and then segment the images into background, effective muscle tissue, ineffective connective tissue, and intramuscular fat to obtain the effective muscle tissue part in the images;
[0011] Step 3: Extract the overall color information of the effective muscle tissue part in each image, specifically the L* and a* values of the red pixel points, and calculate its statistical features according to its overall distribution, including mean, standard deviation, skewness, kurtosis, and 25%, 50%, 75% quantiles, a total of 7 features;
[0012] Step 4: Measure the reflectance on the surface of the longissimus dorsi muscle of cattle with a colorimeter, and calculate the relative content of oxygenated myoglobin on the surface of each piece of beef;
[0013] Step 5: Input the storage time, the collected color information, and the measured relative content of oxygenated myoglobin corresponding to each sample into the model, and predict the storage time and the corresponding relative content of oxygenated myoglobin of any given unknown beef based on a convolutional neural network.
[0014] In an embodiment of the present invention, step 1 specifically includes:
[0015] Take the longissimus dorsi muscle of cattle slaughtered about 4 hours ago, pack it on a tray, cover it with plastic wrap, and put it in a 4°C refrigerator, keeping continuous light on the beef surface to simulate the storage environment of commercially available beef in a supermarket;
[0016] Fix the lighting conditions and camera parameters in a light - proof photography studio, and collect images of the surface of the longissimus dorsi muscle of cattle in contact with oxygen at different storage times. Among them, the lighting conditions are as follows: set two 60 - cm - long LED light panels on the top of the photography studio, with a color temperature of 5500K, and the rest of the photography studio is a reflector, ensuring that no external natural light penetrates. The shooting angle of the camera and the angle of the beef surface are fixed at 90°, the shutter speed is 1 / 200, the aperture is F8.0, the ISO is 640, and the focal length is 24mm.
[0017] In an embodiment of the present invention, step 2 specifically includes:
[0018] Step 21, Image color adjustment:
[0019] Each captured beef image contains a standard color checker. Run the ColorChecker Camera Calibration program corresponding to the standard color checker in Adobe Lightroom software to perform white - balance correction to unify the white - balance parameters. Use Grabcut to find the meat block and extract the muscle part from the picture containing the background, meat block, and color checker.
[0020] Step 22, Image resolution adjustment:
[0021] Use the Python programming language to convert the raw image format with a resolution of 6960×4640 into the jpg image format with a resolution of 600×400.
[0022] Step 23, Image background segmentation:
[0023] Use the Grabcut function of the Python programming language to recognize and segment the image into three parts: background, color checker, and beef, and obtain a complete image of the beef part.
[0024] Step 24, Extraction of the effective muscle part:
[0025] Adopt the global threshold segmentation algorithm in Python to perform specific image segmentation on the obtained beef image, remove the white connective tissue and intramuscular fat on the beef surface, and obtain an effective muscle part image with only red muscle.
[0026] In an embodiment of the present invention, the extraction of the effective muscle part in step 24 specifically includes:
[0027] First, the image is grayscale processed to convert it into a single-channel grayscale image; then the Otsu binarization method is used to calculate the threshold. The initial threshold T is selected as 150, and the specific image is segmented into regions G1 with grayscale values > T and G2 with grayscale values < T to remove the white connective tissue and intramuscular fat on the beef surface, obtaining an effective muscle part image with only red muscle.
[0028] In an embodiment of the present invention, step 3 specifically includes:
[0029] Step 31: Obtain L* and a* values:
[0030] In Python, traverse the pixel points that meet the composite requirements, and screen the pixel points that meet the requirements. The specific method is to specify that the RGB value range of the pixel points is R > 50 and G, B < 100; then convert the RGB color space in the image to the CIE XYZ color space. The specific operation is to first normalize the RGB values, then apply gamma correction and the standard matrix to convert the RGB values to XYZ values, and then normalize the XYZ values with the D65 reference white point; finally, convert the XYZ values to the CIE LAB color space to obtain the L* and a* values of the red muscle part of the beef.
[0031] Step 32: Calculate the overall color distribution characteristics:
[0032] Use the Python programming language to calculate the statistical characteristics of the L and A values, including the mean, standard deviation, skewness, kurtosis, and 25%, 50%, 75% quantiles, a total of 7 characteristics, which describe the color distribution characteristics of the red pixels.
[0033] In an embodiment of the present invention, step 4 specifically includes:
[0034] Step 41: Measure the reflectance:
[0035] Use a colorimeter to measure the reflectance at wavelengths of 474 nm, 525 nm, 572 nm, and 730 nm on the surface of each longissimus dorsi muscle in contact with oxygen. 8 points are taken on the surface of each piece of meat as parallels;
[0036] Step 42: Calculate the relative content of oxymyoglobin:
[0037] Substitute the reflectance at the four wavelengths into the following formula:
[0038]
[0039] %OMb = 100 - (%MMb + %DMb)
[0040] Calculate the relative content of oxymyoglobin, where R represents reflectance, A represents reflection attenuation, %MMb represents the relative content of metmyoglobin, %DMb represents the relative content of deoxymyoglobin, %OMb represents the relative content of oxymyoglobin, and A 572 represents the reflection attenuation at 572 nm, and A 730 represents the reflection attenuation at 730 nm, and A 525 represents the reflection attenuation at 525 nm, and A 474 represents the reflection attenuation at 474 nm.
[0041] In an embodiment of the present invention, step 5 specifically includes:
[0042] Taking the beef storage time obtained from all images, the L* and a* values of the effective muscle tissue obtained by image segmentation, and the relative content of oxymyoglobin in the corresponding beef as data inputs, introducing a convolutional neural network to train the model, capturing eigenvalue, obtaining the correlation equation between the surface color of the longissimus dorsi muscle and the storage time and oxymyoglobin. The model can finally predict according to any given unknown longissimus dorsi muscle image, and predict the storage time and relative content of oxymyoglobin in the longissimus dorsi muscle according to the beef color information read by it. The specific steps to build a convolutional neural network model using the Python programming language are as follows:
[0043] Step 51. Set the random seed:
[0044] Set the random seed number to 20;
[0045] Step 52. Data augmentation:
[0046] Randomly flip the image horizontally and vertically, and set the image to be randomly rotated, with the maximum rotation angle being 0.2 radians;
[0047] Step 53. Build a convolutional neural network model:
[0048] The first convolutional layer uses 32 3x3 convolutional kernels, the activation function is ReLU, and the input shape is (400, 600, 3);
[0049] The second convolutional layer uses 64 3x3 convolutional kernels;
[0050] The fully connected layer uses 128 neurons;
[0051] Set the Dropout step to discard 30% of the neurons to prevent overfitting;
[0052] Step 52. Train the model:
[0053] The training cycle epochs = 50, and 20% of the training set is divided as the validation set: that is, the sample set is divided into a training set and a prediction set according to a ratio of 5:1. The beef images provided in the validation set are predicted for the storage time and the relative content of oxymyoglobin using linear regression, random forest algorithm, neural network (MLP regression), decision tree, and the convolutional neural network of the present invention respectively. The predicted results are compared with the original measurement data to obtain the determination coefficient r of each model prediction. 2 And the root mean square error RMSE, and these two are used to characterize the prediction accuracy.
[0054] In a second aspect, the present invention provides a system for non-destructively measuring oxymyoglobin on the surface of the longissimus dorsi muscle of cattle. The system includes a black light-shielding cloth arranged on the outside, an aluminum foil reflector arranged on the inner layer, a white dinner plate arranged inside for placing beef samples, a standard colorimetric card, a camera arranged above the white dinner plate, and light strips arranged on both sides of the camera; the system further includes:
[0055] An image acquisition module for simulating the storage of fresh longissimus dorsi muscle of cattle under supermarket conditions and acquiring image information of the surface in contact with oxygen at different storage time points.
[0056] An image preprocessing module for preprocessing the acquired images by color adjustment and resolution unification, and then segmenting the images into background, effective muscle tissue, ineffective connective tissue, and intramuscular fat to obtain the effective muscle tissue part in the images.
[0057] An image extraction module for extracting the overall color information of the effective muscle tissue part in each image, specifically the L* and a* values of the red pixel points, and calculating its statistical features according to its overall distribution, including mean, standard deviation, skewness, kurtosis, and 25%, 50%, 75% quantiles, a total of 7 features.
[0058] A calculation module for measuring the reflectance of the surface of the longissimus dorsi muscle of cattle and calculating the relative content of oxymyoglobin on the surface of each piece of beef.
[0059] A prediction module for inputting the storage time, the acquired color information, and the measured relative content of oxymyoglobin corresponding to each sample into the model, and predicting the storage time of any given unknown beef and the corresponding relative content of oxymyoglobin based on the convolutional neural network.
[0060] In a third aspect, the present invention provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the method for non-destructively measuring oxymyoglobin on the surface of the longissimus dorsi muscle of cattle are implemented.
[0061] Fourthly, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for non-destructively measuring the surface oxymyoglobin of the longissimus dorsi muscle of cattle are realized.
[0062] Beneficial effects achieved by the present invention:
[0063] The method and system for non-destructively measuring the surface oxymyoglobin of the longissimus dorsi muscle of cattle provided by the present invention are based on machine learning. By extracting the color information of the photo and establishing a correlation with the measured reference value of oxymyoglobin, a new method for non-destructively measuring the surface oxymyoglobin of the longissimus dorsi muscle of cattle is provided. By segmenting the pixel points in the acquired image that meet the freshness determination requirements, extracting the RGB values of the pixel points, converting them into L* and a* values in the LAB color space, and jointly training the model with the measured oxymyoglobin values, a model is established based on a convolutional neural network for predicting the storage time and oxymyoglobin content of the given beef surface picture.
[0064] The present invention avoids the limitations of the "point-taking" measurement of the colorimeter by extracting the pixel points of the red meat part in the photo and calculating the overall color distribution, and can more accurately and intuitively reflect the meat color of a piece of meat as a whole. By constructing and training the model to predict the oxymyoglobin content of a piece of meat, the coefficient of determination of the prediction time after model construction reaches 0.926, and the coefficient of determination of the predicted relative content of oxymyoglobin reaches 0.893. Compared with the traditional method for measuring myoglobin, it saves time and effort, reduces costs, does not involve chemical methods, and is non-destructive to the sample. Description of the drawings
[0065] Figure 1 It is a schematic diagram of the image acquisition system provided by the present invention.
[0066] Figure 2 It is a schematic diagram of the surface photo of the longissimus dorsi muscle of cattle provided by the present invention.
[0067] Figure 3 It is a schematic diagram of the comparison before and after color adjustment of the surface photo of the longissimus dorsi muscle of cattle provided by the present invention.
[0068] Figure 4 It is a schematic diagram of image segmentation of meat and background provided by the present invention.
[0069] Figure 5 It is a schematic diagram of image segmentation of effective muscle tissue and white part provided by the present invention. Detailed implementation manners
[0070] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0071] As Figures 1 to 5 shown, the present invention provides a method for non-destructively measuring the oxygenated myoglobin on the surface of the longissimus dorsi muscle of cattle. In some embodiments, it includes the following steps:
[0072] Step 1: Store the fresh longissimus dorsi muscle of cattle under simulated supermarket conditions (4°C, light, covered with plastic wrap), and collect the image information of the surface in contact with oxygen at different storage time points.
[0073] Step 2: Perform preprocessing such as color adjustment and resolution unification on the collected images, and then segment the images into background, effective muscle tissue, ineffective connective tissue, and intramuscular fat to obtain the effective muscle tissue part in the images.
[0074] Step 3: Extract the overall color information of the effective muscle tissue part in each image, specifically the L* and a* values of the red pixel points, and calculate its statistical features according to its overall distribution, including mean, standard deviation, skewness, kurtosis, and 25%, 50%, 75% quantiles, a total of 7 features.
[0075] Step 4: Measure the reflectance on the surface of the longissimus dorsi muscle of cattle with a colorimeter, and calculate the relative content of oxygenated myoglobin on the surface of each piece of beef.
[0076] Step 5: Input the storage time, the collected color information, and the measured relative content of oxygenated myoglobin corresponding to each sample into the model, and predict the storage time and the corresponding relative content of oxygenated myoglobin of any given unknown beef based on the convolutional neural network.
[0077] In some embodiments, step 1 specifically includes:
[0078] Take 120 pieces of the longissimus dorsi muscle of cattle freshly slaughtered for about 4 hours, pack them in trays, cover them with plastic wrap, and put them in a 4°C refrigerator, keeping continuous light on the surface of the beef to simulate the storage environment of commercially available beef in the supermarket.
[0079] Fix the lighting conditions and camera parameters in a light - proof photography studio, and collect images of the surface of the longissimus dorsi muscle of cattle in contact with oxygen stored for different times. Among them, the lighting conditions in step 1 are to set two 60 - cm - long LED light panels on the top of the photography studio, with a color temperature of 5500K, and the rest of the photography studio is a reflector, ensuring that no external natural light penetrates. The camera parameters are Canon EOS 90D, the shooting angle is fixed at 90° with the beef surface angle, the shutter speed is 1 / 200, the aperture is F8.0, ISO is 640, and the focal length is 24mm.
[0080] In some embodiments, step 2 specifically includes:
[0081] Step 21, Image color adjustment:
[0082] As Figure 3 shown, each captured beef image contains a standard color checker. Run the ColorChecker Camera Calibration program corresponding to the standard color checker in Adobe Lightroom software to perform white - balance correction to unify the white - balance parameters and make the color of beef in each photo closer to reality. The comparison before and after color adjustment is as Figure 4 shown; Use Grabcut to find the meat block and extract the muscle part from the picture containing the background, meat block, and color checker.
[0083] Step 22, Image resolution adjustment:
[0084] Use the Python programming language to convert the raw image format with a resolution of 6960×4640 into a jpg image format with a resolution of 600×400.
[0085] Step 23, Image background segmentation:
[0086] Use the Grabcut function of the Python programming language to recognize and segment the image into three parts: background, color checker, and beef, and obtain the complete beef part image as shown in the figure, as Figure 5 shown;
[0087] Step 24, Extraction of the effective muscle part:
[0088] In Python, adopt the Global threshold segmentation (GTS) algorithm to perform specific image segmentation on the obtained beef image, remove the white connective tissue and intramuscular fat on the beef surface, and obtain an effective muscle part image with only red muscle, which specifically includes:
[0089] First, grayscale the image to convert it into a single-channel grayscale image. Then, use the Otsu binarization method to calculate the threshold. Select the initial threshold T as 150, and segment the specific image into regions G1 (gray value > T) and G2 (gray value < T) to remove the white connective tissue and intramuscular fat on the beef surface, obtaining an effective muscle part image with only red muscle, as Figure 5 shown.
[0090] In some embodiments, step 3 specifically includes:
[0091] Step 31: Obtain L* and a* values:
[0092] Traverse the pixel points that meet the composite requirements in Python, and screen the pixel points that meet the requirements. The specific method is to specify the RGB value range of the pixel points as R > 50 and G, B < 100. Then, convert the RGB color space in the image to the CIE XYZ color space. The specific operation is to first normalize the RGB values, then apply gamma correction (nonlinear transformation) and standard matrix (linear transformation) to convert the RGB values to XYZ values, and then normalize the XYZ values with the D65 reference white point. Finally, convert the XYZ values to the CIE LAB color space to obtain the L* and a* values of the red muscle part of the beef;
[0093] Step 32: Calculate the overall color distribution characteristics:
[0094] Use the Python programming language to calculate the statistical characteristics of the L and A values, including the mean, standard deviation, skewness, kurtosis, and 25%, 50%, 75% quantiles, a total of 7 characteristics, which describe the color distribution characteristics of the red pixels.
[0095] In some embodiments, step 4 specifically includes:
[0096] Step 41: Measure the reflectance:
[0097] Use a colorimeter with the model UltraScan PRO, Hunterlab to measure the reflectance R at wavelengths of 474 nm, 525 nm, 572 nm, and 730 nm on the surface of the longissimus dorsi muscle of 120 cattle in contact with oxygen. Take 8 points on the surface of each piece of meat as parallels;
[0098] Step 42: Calculate the relative content of oxymyoglobin:
[0099] Substitute the reflectance values at the four wavelengths obtained into the empirical formula for the relationship between the reflectance R and the myoglobin content in the American Meat Science Association Guidelines for Meat Color Measurement published in 2012, as follows:
[0100]
[0101] %OMb = 100 - (%MMb + %DMb)
[0102] Substitute into this formula to calculate the relative content of oxymyoglobin. Among them, R represents the reflectance, A represents the reflection attenuation, %MMb represents the relative content of metmyoglobin, %DMb represents the relative content of deoxymyoglobin, %OMb represents the relative content of oxymyoglobin, A 572 represents the reflection attenuation at 572 nm, A 730 represents the reflection attenuation at 730 nm, A 525 represents the reflection attenuation at 525 nm, A 474 represents the reflection attenuation at 474 nm.
[0103] In some embodiments, step 5 specifically includes:
[0104] Take the beef storage time data obtained from all images in the above steps, the L*, a* values of the effective muscle tissue obtained through image segmentation, and the relative content of oxymyoglobin in the corresponding beef of the image as data inputs, introduce a convolutional neural network to train the model, capture the eigenvalue, and obtain the correlation equation between the surface color of the longissimus dorsi muscle of cattle and the storage time and oxymyoglobin. The model can finally predict according to any given unknown image of the longissimus dorsi muscle of cattle. According to the beef color information read by it, accurately predict the storage time and the relative content of oxymyoglobin of the longissimus dorsi muscle of cattle; The specific steps to build a convolutional neural network (CNN) model using the Python programming language are as follows:
[0105] Step 51. Set the random seed:
[0106] Set the random seed number to 20;
[0107] Step 52. Data augmentation:
[0108] Randomly flip the image horizontally and vertically, and set the image to be randomly rotated, with the maximum rotation angle being 0.2 radians. Improve the generalization ability of the model.
[0109] Step 53. Build a convolutional neural network model:
[0110] The first convolutional layer uses 32 3x3 convolutional kernels, the activation function is ReLU, and the input shape is (400, 600, 3).
[0111] The second convolutional layer uses 64 3x3 convolutional kernels.
[0112] The fully connected layer uses 128 neurons.
[0113] Set the Dropout step to discard 30% of the neurons to prevent overfitting.
[0114] Step 52. Train the model:
[0115] The number of training epochs is 50, and 20% of the training set is divided as the validation set:
[0116] That is, 120 sample sets are divided into a training set and a prediction set according to a ratio of 5:1. The storage time and the relative content of oxymyoglobin of the beef images provided in the validation set are predicted using linear regression, random forest algorithm, neural network (MLP regression), decision tree, and the convolutional neural network of the present invention respectively. The predicted results are compared with the original measurement data to obtain the determination coefficient (r 2 ) and the root mean square error (RMSE) of each model prediction, and these two are used to characterize the prediction accuracy. The results are shown in Table 1:
[0117] Table 1 Comparison of the accuracy of three models in predicting the storage time and the relative content of oxymyoglobin
[0118]
[0119] According to the convolutional neural network algorithm adopted in this embodiment, the determination coefficients for predicting the storage time and the content of oxymyoglobin can be increased to 0.926 and 0.893 respectively.
[0120] In summary, the method of predicting the storage time of beef and the relative content of oxymyoglobin by machine vision, image segmentation, and convolutional neural network adopted in the present invention is convenient, time-consuming, does not require chemical operations, and does not damage the meat sample itself, and has outstanding advantages compared with other oxymyoglobin measurement methods.
[0121] A method for non-destructively measuring the surface oxygenated myoglobin of the longissimus dorsi muscle of cattle based on a convolutional neural network, comprising: placing fresh longissimus dorsi muscle of cattle in a simulated supermarket environment (4°C, light, covered with plastic wrap), acquiring images of the surface of beef stored for different times, then segmenting the images to extract effective muscle tissue, and obtaining the L* and a* values of this part; measuring the reflectance R of four wavelengths on the surface of the muscle at the corresponding moment with a colorimeter, substituting it into the formula to calculate the relative content of oxygenated myoglobin, and using the above image information and relative content of oxygenated myoglobin as a data set; establishing a prediction model through a convolutional neural network algorithm to predict the storage time and relative content of oxygenated myoglobin for any given beef photo, and the determination coefficient r 2 reached 0.926 and 0.893 respectively. By segmenting the images from the taken photos, removing undesirable intermuscular fibers or connective tissues, and establishing the relationship between the overall L* and a* distributions of the effective muscle tissue in the pictures and the storage time and relative content of oxygenated myoglobin, the present invention conducts non-destructive prediction, thereby quickly and conveniently characterizing the freshness and oxidation stage of beef.
[0122] In addition, the present invention also provides a system for non-destructively measuring the surface oxygenated myoglobin of the longissimus dorsi muscle of cattle based on a convolutional neural network. The system includes a black light-shielding cloth arranged on the outside, an aluminum foil reflector arranged on the inner layer, a white dinner plate arranged inside for placing beef samples, a standard color comparison card, a camera arranged above the white dinner plate, and light strips arranged on both sides of the camera; the system further includes:
[0123] An image acquisition module for storing fresh longissimus dorsi muscle of cattle under simulated supermarket conditions and acquiring image information of its surface in contact with oxygen at different storage time points;
[0124] An image preprocessing module for preprocessing the acquired images by color adjustment and resolution unification, and then segmenting the images into background, effective muscle tissue, ineffective connective tissue, and intramuscular fat to obtain the effective muscle tissue part in the images;
[0125] An image extraction module for extracting the overall color information of the effective muscle tissue part in each image, specifically the L* and a* values of red pixel points, and calculating its statistical features according to its overall distribution, including mean, standard deviation, skewness, kurtosis, and 25%, 50%, 75% quantiles, a total of 7 features;
[0126] A calculation module for measuring the reflectance of the surface of the longissimus dorsi muscle and calculating the relative content of oxygenated myoglobin on the surface of each piece of beef;
[0127] A prediction module, which is configured to input the storage time corresponding to each sample, the collected color information, and the measured relative content of oxymyoglobin into a model, and based on a convolutional neural network, predict the storage time of unknown beef and the corresponding relative content of oxymyoglobin given arbitrarily.
[0128] In addition, the present invention also provides a computer device, which may include a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the processor is caused to execute the steps of the method for non-destructively measuring the surface oxymyoglobin of the longissimus dorsi muscle of cattle as described in any of the above embodiments.
[0129] For the working process, working details, and technical effects of the computer device provided in this embodiment, reference may be made to the embodiments of the method for non-destructively measuring the surface oxymyoglobin of the longissimus dorsi muscle of cattle in the foregoing text, and details will not be repeated here.
[0130] In addition, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for non-destructively measuring the surface oxymyoglobin of the longissimus dorsi muscle of cattle as described in any of the above embodiments are implemented. Among them, the computer-readable storage medium refers to a carrier for storing data, and may include, but is not limited to, a floppy disk, an optical disc, a hard disk, a flash memory, a USB flash drive, and / or a memory stick, etc. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices.
[0131] For the working process, working details, and technical effects of the computer-readable storage medium provided in this embodiment, reference may be made to the embodiments of the method for non-destructively measuring the surface oxymyoglobin of the longissimus dorsi muscle of cattle in the foregoing text, and details will not be repeated here.
[0132] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM).
[0133] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments, or equivalently replace some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for non-destructively measuring the surface oxygenated myoglobin of the longissimus dorsi muscle of cattle, characterized in that, It includes the following steps: Step 1: Simulate the storage conditions in a supermarket for fresh longissimus dorsi muscles of cattle, and collect the image information of the surface in contact with oxygen at different storage time points; Step 2: Preprocess the collected images by color adjustment and resolution unification, and then segment the images into background, effective muscle tissue, ineffective connective tissue, and intramuscular fat to obtain the effective muscle tissue part in the images; Step 3: Extract the overall color information of the effective muscle tissue part in each image, specifically the L* and a* values of red pixel points, and calculate its statistical features according to its overall distribution, including mean, standard deviation, skewness, kurtosis, and 25%, 50%, 75% quantiles, a total of 7 features; Step 4: Measure the reflectance of the surface of the longissimus dorsi muscle of cattle with a colorimeter, and calculate the relative content of oxymyoglobin on the surface of each piece of beef; Step 5: Input the storage time, the collected color information, and the measured relative content of oxymyoglobin corresponding to each sample into the model, and predict the unknown storage time of beef and the corresponding relative content of oxymyoglobin based on a convolutional neural network.
2. The method for non-destructively measuring the surface oxygenated myoglobin of the longissimus dorsi muscle of cattle according to claim 1, wherein, The specific content of Step 1 includes: Take the longissimus dorsi muscle of cattle slaughtered about 4 hours ago, package it in a tray, cover it with plastic wrap, and put it in a 4°C refrigerator, keeping continuous light on the surface of the beef to simulate the storage environment of commercially available beef in a supermarket; Fix the lighting conditions and camera parameters in a light-tight photography studio, and collect images of the surface in contact with oxygen of the longissimus dorsi muscle of cattle stored for different times; among them, the lighting conditions are to set two 60-cm-long LED light panels on the top of the photography studio, with a color temperature of 5500K, and the rest of the photography studio is a reflector, and ensure that no external natural light penetrates; the camera shooting angle and the beef surface angle are fixed at 90°, the shutter speed is 1 / 200, the aperture is F8.0, the ISO is 640, and the focal length is 24 mm.
3. The method for non-destructively measuring the surface oxygenated myoglobin of the longissimus dorsi muscle of cattle according to claim 2, characterized in that, The specific content of Step 2 includes: Step 21: Image color adjustment: A standard color checker is included in each captured beef image. Run the ColorChecker Camera Calibration program corresponding to the standard color checker in Adobe Lightroom software to correct the white balance to unify the white balance parameters, and use Grabcut to find the meat block and extract the muscle part from the picture containing the background, meat block, and color checker; Step 22: Image resolution adjustment: Use the Python programming language to convert the raw image format with a resolution of 6960×4640 into a jpg image format of 600×400; Step 23: Image background segmentation: Use the Grabcut function of the Python programming language to recognize and segment the image into three parts: background, color checker, and beef to obtain a complete beef part image; Step 24: Extraction of effective muscle part: Adopt a global threshold segmentation algorithm in Python to perform specific image segmentation on the obtained beef image, remove the white connective tissue and intramuscular fat on the surface of the beef, and obtain an effective muscle part image with only red muscle.
4. A method for non-destructively measuring the surface oxygenated myoglobin of the longissimus dorsi muscle of cattle according to claim 3, characterized in that, The specific content of the extraction of the effective muscle part in Step 24 includes: First, grayscale the image to convert it into a single-channel grayscale image. Then, use the Otsu binarization method to calculate the threshold. Select the initial threshold T as 150, and segment the specific image into regions G1 with gray values > T and G2 with gray values < T to remove the white connective tissue and intramuscular fat on the beef surface, obtaining an effective muscle part image with only red muscle.
5. A method for non-destructively measuring the surface oxygenated myoglobin of the longissimus dorsi muscle of cattle according to claim 4, characterized in that, Step 3 specifically includes: Step 31: Obtain L* and a* values: Traverse the pixel points that meet the requirements in Python, and screen the pixel points that meet the requirements. The specific method is to specify that the RGB value range of the pixel points is R > 50 and G, B < 100. Then, convert the RGB color space in the image to the CIE XYZ color space. The specific operation is to first normalize the RGB values, then apply gamma correction and a standard matrix to convert the RGB values to XYZ values, and then normalize the XYZ values with the D65 reference white point. Finally, convert the XYZ values to the CIE LAB color space to obtain the L* and a* values of the red muscle part of the beef. Step 32: Calculate the overall color distribution characteristics: Use the Python programming language to calculate the statistical features of the L and A values, including the mean, standard deviation, skewness, kurtosis, and 25%, 50%, 75% quantiles, a total of 7 features, which describe the color distribution characteristics of the red pixels.
6. The method for non-destructively measuring surface oxygenated myoglobin of the longissimus dorsi muscle of cattle according to claim 5, wherein Step 4 specifically includes: Step 41: Measure the reflectance: Use a colorimeter to measure the reflectance at wavelengths of 474 nm, 525 nm, 572 nm, and 730 nm on the surface of each longissimus dorsi muscle in contact with oxygen. Take 8 points on the surface of each piece of meat as parallels. Step 42: Calculate the relative content of oxymyoglobin: Substitute the reflectance at the four wavelengths into the following formula: %OMb = 100 - (%MMb + %DMb) Calculate the relative content of oxymyoglobin, where R represents reflectance, A represents reflection attenuation, %MMb represents the relative content of metmyoglobin, %DMb represents the relative content of deoxymyoglobin, %OMb represents the relative content of oxymyoglobin, A 572 represents the reflection attenuation at 572 nm, A 730 represents the reflection attenuation at 730 nm, A 525 represents the reflection attenuation at 525 nm, A 474 represents the reflection attenuation at 474 nm.
7. A method for non-destructively measuring oxygenated myoglobin on the surface of the longissimus dorsi muscle of cattle according to claim 6, characterized in that, Step 5 specifically includes: Take the beef storage time obtained from all images, the L* and a* values of the effective muscle tissue obtained through image segmentation, and the relative content of oxymyoglobin in the corresponding beef of the image as data inputs, introduce a convolutional neural network to train the model, capture the eigenvalue, and obtain the correlation equation between the surface color of the longissimus dorsi muscle, the storage time, and oxymyoglobin. The model can finally predict according to any given unknown longissimus dorsi muscle image. According to the beef color information read by it, predict the storage time and relative content of oxymyoglobin of the longissimus dorsi muscle. The specific steps to build a convolutional neural network model using the Python programming language are as follows: Step 51: Set the random seed: Set the random seed number to 20. Step 52: Data augmentation: Randomly flip the image horizontally and vertically, and set the image to be randomly rotated, with the maximum rotation angle being 0.2 radians. Step 53: Build a convolutional neural network model: The first convolutional layer uses 32 3x3 convolutional kernels, the activation function is ReLU, and the input shape is (400, 600, 3). The second convolutional kernel uses 64 3x3 convolutional kernels. The fully connected layer uses 128 neurons. Set the Dropout step to discard 30% of the neurons to prevent overfitting. Step 52, Training the model: The number of training epochs = 50. 20% of the training set is divided as the validation set: that is, the sample set is divided into a training set and a prediction set according to a ratio of 5:
1. The storage time and the relative content of oxymyoglobin in the beef images provided in the validation set are predicted using linear regression, random forest algorithm, neural network (MLP regression), decision tree, and the convolutional neural network of the present invention respectively. The predicted results are compared with the original measurement data to obtain the coefficient of determination r of each model's prediction. 2 and the root mean square error RMSE, and these two are used to characterize the prediction accuracy.
8. A system for non-destructively measuring oxygenated myoglobin on the surface of the longissimus dorsi muscle of cattle, characterized in that, The system includes a black light-shielding cloth arranged on the outside, an aluminum foil reflector arranged on the inner layer, a white dinner plate for placing beef samples arranged inside the inner layer, a standard color comparison card, a camera arranged above the white dinner plate, and light strips arranged on both sides of the camera; the system further includes: An image acquisition module, which is used to simulate the storage conditions in a supermarket for the fresh longissimus dorsi muscle, and acquire the image information of the surface in contact with oxygen at different storage time points. An image preprocessing module, which is used to perform color adjustment and unified resolution preprocessing on the acquired images, and then segment the images into background, effective muscle tissue, ineffective connective tissue, and intramuscular fat to obtain the effective muscle tissue part in the images. An image extraction module, which is used to extract the overall color information of the effective muscle tissue part in each image, specifically the L* and a* values of the red pixel points, and calculate its statistical features according to its overall distribution, including mean, standard deviation, skewness, kurtosis, and 25%, 50%, 75% quantiles, a total of 7 features. A calculation module, which is used to measure the reflectance of the surface of the longissimus dorsi muscle and calculate the relative content of oxymyoglobin on the surface of each piece of beef. A prediction module, which is used to input the storage time corresponding to each sample, the acquired color information, and the measured relative content of oxymyoglobin into the model, and predict the storage time of any given unknown beef and the corresponding relative content of oxymyoglobin based on a convolutional neural network.
9. A computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that when the processor executes the computer program, it implements the steps of the method for non-destructively measuring the oxymyoglobin on the surface of the longissimus dorsi muscle according to any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that when the computer program is executed by the processor, it implements the steps of the method for non-destructively measuring the oxymyoglobin on the surface of the longissimus dorsi muscle according to any one of claims 1-7.