Nondestructive testing method for steak quality based on optical detection
Based on optical detection methods, combined with LAB images and near infrared spectral charts, steak quality detection, the destructive and error problems of traditional detection methods are solved, and high -precision non -destructive detection is achieved.
Patent Information
- Application Number
- CN202410621501.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-05-20
AI Technical Summary
Traditional steak quality detection methods are destructive, time-consuming and error-free. The existing spectral analysis methods are susceptible to environmental interference, affecting the detection accuracy.
Based on optical detection methods, by obtaining the Steak surface LAB image and near -infrared spectral chart, combined with the three -dimensional coordinate system and spectral data characteristics, the overall color evaluation index and color spectrum evaluation indicators are constructed, and the quality expression analysis and correction evaluation are performed.
The non -destructive detection of steak quality has been achieved, the accuracy and accuracy of the detection are improved, and the waste of resources and the increase in production costs are avoided.
Smart Images

Figure CN118641537B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of physical analysis, and in particular to a nondestructive detection method for steak quality based on optical detection. Background Art
[0002] Steak quality is one of the key indicators in the food industry, which directly affects consumers' willingness to buy and market demand. Traditional steak quality detection methods usually rely on destructive methods such as meat cutting and chemical analysis, which is not only time-consuming and labor-intensive, but also causes waste of resources and increased production costs. In traditional methods, the quality of steak is usually evaluated by observing its color characteristics. Among them, the method of extracting color characteristics based on spectral data has become increasingly important. However, the existing analysis methods based only on spectra or the method of judging steak quality by observing the surface color of steak has certain limitations, and single spectral detection is easily affected by environmental interference, which may lead to errors in analysis, thereby affecting the accuracy of quality detection. Summary of the invention
[0003] The present invention provides a nondestructive detection method for steak quality based on optical detection to solve the existing problems.
[0004] The nondestructive detection method of steak quality based on optical detection of the present invention adopts the following technical scheme:
[0005] An embodiment of the present invention provides a non-destructive detection method for steak quality based on optical detection, the method comprising the following steps:
[0006] Obtaining a steak surface LAB image of a steak surface image and a plurality of near-infrared spectra of the same steak surface, wherein the horizontal axis of the near-infrared spectra is wavelength and the vertical axis is reflectivity;
[0007] A three-dimensional coordinate system is constructed according to the L, A, and B values of the pixels in the LAB image of the steak surface; on the three-dimensional coordinate system, the LAB distance of each pixel is obtained according to the distance from each pixel in the LAB image of the steak surface to the coordinate axis; and the overall evaluation index parameter of the steak color is obtained according to the LAB distance of each pixel;
[0008] According to the reflectivity corresponding to the wavelength in the preset wavelength range in the first near-infrared spectrum, the mean wavelength of the preset wavelength range is obtained; according to the wavelength with the smallest wavelength value in the preset wavelength range and the mean wavelength of the preset wavelength range, the color spectrum shift factor of the steak is obtained; the peak points in the preset wavelength range are obtained in the first near-infrared spectrum; according to the number of peak points, the color spectrum shift factor of the steak and the overall color evaluation index parameter of the steak, the color spectrum evaluation index of the steak is obtained;
[0009] The quality expression of the steak is obtained according to the reflectance difference between the first near-infrared spectrum and the other near-infrared spectrum at the same wavelength within the preset wavelength range; the color spectrum evaluation index correction value of the steak is obtained according to the quality expression of the steak and the color spectrum evaluation index of the steak;
[0010] The quality of steak was evaluated according to the corrected values of its color spectrum evaluation index.
[0011] Preferably, the three-dimensional coordinate system is constructed according to the L, A, and B values of the pixels in the LAB image of the steak surface, and the specific steps include the following:
[0012] In the LAB image of the steak surface, a three-dimensional coordinate system is constructed with the L value of the pixel as the horizontal axis, the A value of the pixel as the vertical axis, and the B value of the pixel as the vertical axis.
[0013] Preferably, the LAB distance of each pixel point is obtained according to the distance from each pixel point in the LAB image of the steak surface to the coordinate axis in the three-dimensional coordinate system, and the specific steps include the following:
[0014] In the three-dimensional coordinate system, the average of the shortest distances from each pixel in the LAB image to all coordinate axes is recorded as the LAB distance of each pixel.
[0015] Preferably, the step of obtaining the overall evaluation index parameter of the color of the steak according to the LAB distance of each pixel point includes the following specific steps:
[0016]
[0017] In the formula, α represents the overall evaluation index parameter of steak color; D i represents the LAB distance of the i-th pixel in the LAB image of the steak surface; M represents the number of pixels in the LAB image of the steak surface; e is a natural constant.
[0018] Preferably, the step of obtaining the mean wavelength of the preset wavelength range according to the reflectivity corresponding to the wavelength in the preset wavelength range in the first near-infrared spectrum graph comprises the following specific steps:
[0019] The wavelength corresponding to the average value of all reflectances of the horizontal axis in the preset wavelength range in the first near-infrared spectrum is recorded as the average wavelength of the preset wavelength range.
[0020] Preferably, the color spectrum shift factor of the steak is obtained according to the wavelength with the smallest wavelength value in the preset wavelength range and the average wavelength of the preset wavelength range, and the specific calculation formula included is as follows:
[0021]
[0022] Where: τ represents the color spectrum shift factor of the steak; λ represents the mean wavelength of the preset wavelength range; λ ′ It represents the wavelength with the smallest wavelength value in the preset wavelength range; || represents taking the absolute value; norm() represents the normalization function.
[0023] Preferably, the color spectrum evaluation index of the steak is obtained according to the number of peak points, the color spectrum shift factor of the steak and the overall color evaluation index parameter of the steak, and the specific calculation formula included is as follows:
[0024] β=norm(α×e (-N) ×τ)
[0025] Wherein: β represents the color spectrum evaluation index of steak; α represents the overall color evaluation index parameter of steak; N represents the number of peak points; τ represents the color spectrum shift factor of steak; e is a natural constant; norm() represents the normalization function.
[0026] Preferably, the quality expression of the steak is obtained according to the reflectance difference between the first near-infrared spectrum and the other near-infrared spectrum at the same wavelength within a preset wavelength range, and the specific calculation formula included is as follows:
[0027]
[0028] Where, σ represents the quality expression of steak; E represents the number of near-infrared spectra other than the first near-infrared spectra; F represents the number of wavelengths in each near-infrared spectra within the preset wavelength range; P r,j represents the reflectance of the steak at the jth wavelength in the preset wavelength range of the rth near-infrared spectrum except the first near-infrared spectrum; P j It represents the reflectance of steak at the jth wavelength in the preset wavelength range of the first near-infrared spectrum; || represents the absolute value; norm() represents the normalization function.
[0029] Preferably, the step of obtaining the color spectrum evaluation index correction value of the steak according to the quality expression of the steak and the color spectrum evaluation index of the steak comprises the following specific steps:
[0030] The product of the normalized value of the inverse proportion of the quality expression of the steak and the color spectrum evaluation index of the steak is recorded as the color spectrum evaluation index correction value of the steak.
[0031] Preferably, the step of evaluating the quality of steak according to the corrected value of the steak color spectrum evaluation index comprises the following specific steps:
[0032] When the color spectrum evaluation index correction value is less than the first preset threshold value, the steak quality is determined to be the first grade;
[0033] When the color spectrum evaluation index correction value is greater than or equal to the first preset threshold value and less than the second preset threshold value, the steak quality is determined to be the second grade;
[0034] When the color spectrum evaluation index correction value is greater than or equal to the second preset threshold value and less than the third preset threshold value, the steak quality is determined to be the third grade;
[0035] When the color spectrum evaluation index correction value is greater than or equal to the third preset threshold value and less than the fourth preset threshold value, the steak quality is determined to be the fourth level;
[0036] When the color spectrum evaluation index correction value is greater than the fourth preset threshold, the steak quality is determined to be the fifth level.
[0037] The beneficial effects of the technical solution of the present invention are: combining LAB spatial features and spectral data features, comprehensively considering the color characteristics of the steak, and realizing an overall evaluation of the color; taking into account the influence of different quality performances, the color spectrum evaluation index is corrected, and the accuracy and reliability of the evaluation are further improved; through the comparison of multiple spectra, the color characteristics of the steak can be more accurately understood, and the precision and accuracy of the evaluation are improved; and this method is based on optical detection, without the need for destructive operations on the sample, thus realizing non-destructive detection of the steak quality, maintaining the integrity of the sample, and improving the accuracy of the detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 This is a flow chart of the steps of the nondestructive detection method of steak quality based on optical detection of the present invention. DETAILED DESCRIPTION
[0040] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation method, structure, features and effects of the non-destructive detection method of steak quality based on optical detection proposed by the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0041] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0042] The specific scheme of the non-destructive detection method of steak quality based on optical detection provided by the present invention is described in detail below with reference to the accompanying drawings.
[0043] See also Figure 1 , which shows a flowchart of a method for nondestructive detection of steak quality based on optical detection provided by an embodiment of the present invention, the method comprising the following steps:
[0044] Step S001: obtaining a steak surface LAB image of a steak surface image and a plurality of near-infrared spectra of the same steak surface, wherein the horizontal axis of the near-infrared spectra is wavelength and the vertical axis is reflectivity.
[0045] The steak surface image is collected and converted into LAB three-dimensional color space to obtain the steak surface LAB image.
[0046] The same steak surface is subjected to u spectral detections to obtain a near infrared spectrum. It should be noted that a number of near infrared spectrums are obtained, wherein the horizontal axis of the near infrared spectrum is the wavelength and the vertical axis is the reflectivity. The wavelength of each spectral detection is kept consistent.
[0047] In this embodiment, the steak surface image is collected by a high-resolution camera placed above the steak; the spectral data is collected by a near-infrared spectrometer; u = 6. In other embodiments, the image collection, the acquisition of the near-infrared spectrum and the number of spectrum detections can be set according to specific usage conditions, and this embodiment does not specifically limit them.
[0048] Step S002: construct a three-dimensional coordinate system according to the L, A, and B values of the pixels in the LAB image of the steak surface; in the three-dimensional coordinate system, obtain the LAB distance of each pixel according to the distance from each pixel in the LAB image of the steak surface to the coordinate axis; obtain the overall color evaluation index parameter of the steak according to the LAB distance of each pixel.
[0049] The color characteristics of steak are reflected in its overall color degree. Bright red indicates high freshness, while dark red may be deteriorated due to excessive oxidation. Therefore, the LAB three-dimensional color space can be used to evaluate the color of steak.
[0050] Specifically, in this embodiment, in the LAB image of the steak surface, a three-dimensional coordinate system is constructed with the L value of the pixel as the horizontal axis, the A value of the pixel as the vertical axis, and the B value of the pixel as the vertical axis. In the LAB image of the steak surface, the average of the shortest distances from each pixel to the horizontal axis, the vertical axis, and the vertical axis is recorded as the LAB distance of each pixel.
[0051] This embodiment provides a calculation method for obtaining the overall evaluation index parameter of the color of steak according to the LAB distance of each pixel point as follows:
[0052]
[0053] In the formula, α represents the overall evaluation index parameter of steak color; D i represents the LAB distance of the i-th pixel in the LAB image of the steak surface; M represents the number of pixels in the LAB image of the steak surface; e is a natural constant.
[0054] In the calculation formula, It represents the index of the sum of the LAB distances of each pixel in the LBP image of the steak. The larger the LAB distance, the higher the possibility that the pixel tends to be bright red.
[0055] At this point, the overall evaluation index parameters of the steak color are obtained.
[0056] Step S003: Obtain the mean wavelength of the preset wavelength range according to the reflectivity corresponding to the wavelength in the preset wavelength range in the first near-infrared spectrum; obtain the color spectrum shift factor of the steak according to the wavelength with the smallest wavelength value in the preset wavelength range and the mean wavelength in the preset wavelength range; obtain the peak points in the first near-infrared spectrum that are in the preset wavelength range; obtain the color spectrum evaluation index of the steak according to the number of peak points, the color spectrum shift factor of the steak and the overall color evaluation index parameters of the steak.
[0057] The color quality of steak can be further analyzed by using the spectral data characteristics of steak, with the focus on the data characteristics of the near-infrared spectral band. The reflectivity in the near-infrared spectral band can reflect the degree of redness of the steak. Strong red usually means that the steak is fresh and has good color. Excessive oxidation will cause the color of the steak to tend to dark red, thus affecting the color quality. The near-infrared spectral band can reveal the degree of oxidation of the steak. Therefore, by performing near-infrared spectral analysis on steak, its color quality can be more comprehensively evaluated.
[0058] Obtain the mean of all reflectances of the horizontal axis in the preset wavelength range in the first near-infrared spectrum, and further obtain the wavelength corresponding to the mean, which is recorded as the mean wavelength of the preset wavelength range. Use the peak detection algorithm in the preset wavelength range of the first near-infrared spectrum to obtain several peak points. In this embodiment, the preset wavelength range is 850nm to 1000nm, which is described as an example. Other implementations can be set to other values, which are not limited in this embodiment. The peak detection algorithm is a well-known technology, and the specific method is not introduced here.
[0059] This embodiment provides a calculation method for obtaining the steak color spectrum evaluation index as follows:
[0060] β=norm(α×e (-N) ×τ)
[0061]
[0062] Where: β represents the color spectrum evaluation index of steak; α represents the overall color evaluation index parameter of steak; N represents the number of peak points; τ represents the color spectrum shift factor of steak; λ represents the mean wavelength of the preset wavelength range; λ ′ represents the wavelength with the smallest wavelength value in the preset wavelength range, which is 850 nm in this embodiment; || represents taking the absolute value; e is a natural constant; norm() represents a normalization function.
[0063] In this calculation formula, the larger N is, the more peak points the steak has in the preset wavelength range, that is, the color characteristics are discrete, indicating that the color quality of the steak is poor; the larger τ is, the better the color quality of the steak is, and the better the color spectrum evaluation index of the steak is; α is a confidence parameter, and the larger the value is, the greater the degree of trustworthiness of the color spectrum evaluation index is; |λ-λ ′ |Reflects the overall color level. The smaller the value, the more bright red the steak is, and the better the color quality.
[0064] Step S004: Obtain the quality performance of the steak according to the reflectance difference between the first near-infrared spectrum and the remaining near-infrared spectrum at the same wavelength within a preset wavelength range; obtain a color spectrum evaluation index correction value of the steak according to the quality performance of the steak and the color spectrum evaluation index of the steak.
[0065] Spectral data may be affected by noise. If the noise content is large, the credibility of the evaluation index is low. By analyzing the noise characteristics in the spectral data, the evaluation index can be adjusted and corrected.
[0066] The first near-infrared spectrum in the u-th spectral detection is compared with the other near-infrared spectrums in the preset wavelength range to compare the reflectance difference at the same wavelength. The greater the difference, the greater the probability of noise.
[0067] The product of the inversely proportional normalized value of the quality expression of the steak and the color spectrum evaluation index of the steak is recorded as the color spectrum evaluation index correction value of the steak; wherein the exp(-) function is used to perform inversely proportional normalization processing on σ.
[0068] This embodiment provides a calculation method for obtaining the corrected value of the steak color spectrum evaluation index as follows:
[0069] β ′ =exp(-σ)×β
[0070]
[0071] In the formula, β ′ represents the correction value of the color spectrum evaluation index of steak; β represents the color spectrum evaluation index of steak; σ represents the quality expression of steak; E represents the number of other near-infrared spectra except the first near-infrared spectrum; F represents the number of wavelengths in each near-infrared spectrum within the preset wavelength range; P r,j represents the reflectance of the steak at the jth wavelength in the preset wavelength range of the rth near-infrared spectrum except the first near-infrared spectrum; P j It represents the reflectance of steak at the jth wavelength in the preset wavelength range of the first near-infrared spectrum; exp() represents an exponential function with natural numbers as the base; || represents taking the absolute value; norm() represents the normalization function.
[0072] In the above calculation formula, the smaller σ is, the more reliable the color spectrum evaluation index obtained from the spectral data is, and the color spectrum evaluation index is adjusted accordingly; otherwise, it is adjusted down. It indicates the quality characteristic value in the spectrum. The smaller the value is, the smaller the numerical difference between the remaining sampled data and the benchmark data at the same wavelength is, which means that the noise content of the spectral data is less and the quality expression is greater.
[0073] At this point, the color spectrum evaluation index correction value of each steak is obtained.
[0074] Step S005: Evaluate the quality of the steak according to the corrected value of the color spectrum evaluation index of the steak.
[0075] According to the color spectrum evaluation index correction value β of steak ′ The color quality of each sample steak is classified and evaluated. This embodiment provides an evaluation standard: when the color spectrum evaluation index correction value is less than the first preset threshold, the steak quality is determined to be the first level; when the color spectrum evaluation index correction value is greater than or equal to the first preset threshold and less than the second preset threshold, the steak quality is determined to be the second level; when the color spectrum evaluation index correction value is greater than or equal to the second preset threshold and less than the third preset threshold, the steak quality is determined to be the third level; when the color spectrum evaluation index correction value is greater than or equal to the third preset threshold and less than the fourth preset threshold, the steak quality is determined to be the fourth level; when the color spectrum evaluation index correction value is greater than the fourth preset threshold, the steak quality is determined to be the fifth level. The higher the level, the better the color quality of the steak.
[0076] In this embodiment, the first preset threshold is 0.2, the second preset threshold is 0.4, the third preset threshold is 0.6, and the fourth preset threshold is 0.8. This is described as an example. Other implementation methods may set it to other values, which are not limited in this embodiment.
[0077] It should be noted that this evaluation standard is an example given in this embodiment, and can be set according to specific usage scenarios in other usage scenarios, and this embodiment does not make any specific limitations.
[0078] So far, the present invention is completed.
[0079] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A non-destructive detection method for steak quality based on optical detection, characterized in that: The method comprises the following steps: Obtaining a steak surface LAB image of a steak surface image and a plurality of near-infrared spectra of the same steak surface, wherein the horizontal axis of the near-infrared spectra is wavelength and the vertical axis is reflectivity; A three-dimensional coordinate system is constructed according to the L, A, and B values of the pixels in the LAB image of the steak surface; on the three-dimensional coordinate system, the LAB distance of each pixel is obtained according to the distance from each pixel in the LAB image of the steak surface to the coordinate axis; and the overall evaluation index parameter of the steak color is obtained according to the LAB distance of each pixel; According to the reflectivity corresponding to the wavelength in the preset wavelength range in the first near-infrared spectrum, the mean wavelength of the preset wavelength range is obtained; according to the wavelength with the smallest wavelength value in the preset wavelength range and the mean wavelength of the preset wavelength range, the color spectrum shift factor of the steak is obtained; the peak points in the preset wavelength range are obtained in the first near-infrared spectrum; according to the number of peak points, the color spectrum shift factor of the steak and the overall color evaluation index parameter of the steak, the color spectrum evaluation index of the steak is obtained; The quality expression of the steak is obtained according to the reflectance difference between the first near-infrared spectrum and the other near-infrared spectrum at the same wavelength within the preset wavelength range; the color spectrum evaluation index correction value of the steak is obtained according to the quality expression of the steak and the color spectrum evaluation index of the steak; The quality of steak is evaluated according to the corrected value of the steak's color spectrum evaluation index; The specific steps of obtaining the LAB distance of each pixel point in the LAB image of the steak surface from the coordinate axis in the three-dimensional coordinate system are as follows: In the three-dimensional coordinate system, the average of the shortest distances from each pixel in the LAB image to all coordinate axes is recorded as the LAB distance of each pixel; The specific steps of obtaining the overall evaluation index parameter of the steak color according to the LAB distance of each pixel point are as follows: In the formula, Indicates the overall evaluation index parameter of steak color; represents the LAB distance of the i-th pixel in the LAB image of the steak surface; Represents the number of pixels in the LAB image of the steak surface; is a natural constant; The specific calculation formula for obtaining the color spectrum shift factor of the steak according to the wavelength with the smallest wavelength value in the preset wavelength range and the average wavelength in the preset wavelength range is as follows: Where: Indicates the color spectrum shift factor of steak; Indicates the mean wavelength of a preset wavelength interval; Indicates the wavelength with the smallest wavelength value within the preset wavelength range; Indicates taking the absolute value; represents the normalization function; The color spectrum evaluation index of the steak is obtained according to the number of peak points, the color spectrum shift factor of the steak and the overall color evaluation index parameter of the steak, and the specific calculation formula included is as follows: Where: It represents the color spectrum evaluation index of steak; Indicates the overall evaluation index parameter of steak color; Indicates the number of peak points; It represents the color spectrum shift factor of steak; e is a natural constant; represents the normalization function; The specific calculation formula for obtaining the quality expression of the steak according to the reflectance difference between the first near-infrared spectrum and the other near-infrared spectrum at the same wavelength within the preset wavelength range is as follows: In the formula, Indicates the quality of steak; Indicates the number of other near infrared spectra except the first near infrared spectra; Indicates the number of wavelengths in a preset wavelength range for each near-infrared spectrum; represents the reflectance of the steak at the jth wavelength within the preset wavelength range of the rth near-infrared spectrum except the first near-infrared spectrum; represents the reflectance of the steak at the jth wavelength in the preset wavelength range of the first near-infrared spectrum; Indicates taking the absolute value; represents the normalization function; The specific steps of obtaining the color spectrum evaluation index correction value of the steak according to the quality expression of the steak and the color spectrum evaluation index of the steak include the following: In the formula, Indicates the corrected value of the color spectrum evaluation index of steak; It represents the color spectrum evaluation index of steak; Indicates the quality of steak; Represents an exponential function with natural numbers as base.
2. The method for nondestructive detection of steak quality based on optical detection according to claim 1, characterized in that: The specific steps of constructing a three-dimensional coordinate system based on the L, A, and B values of the pixel points in the LAB image of the steak surface are as follows: In the LAB image of the steak surface, a three-dimensional coordinate system is constructed with the L value of the pixel as the horizontal axis, the A value of the pixel as the vertical axis, and the B value of the pixel as the vertical axis.
3. The method for nondestructive detection of steak quality based on optical detection according to claim 1, characterized in that: The specific steps of obtaining the mean wavelength of the preset wavelength range according to the reflectivity corresponding to the wavelength in the preset wavelength range in the first near-infrared spectrum graph are as follows: The wavelength corresponding to the average value of all reflectances of the horizontal axis in the preset wavelength range in the first near-infrared spectrum is recorded as the average wavelength of the preset wavelength range.
4. The method for nondestructive detection of steak quality based on optical detection according to claim 1, characterized in that: The specific steps of evaluating the quality of steak according to the corrected value of the steak color spectrum evaluation index are as follows: When the color spectrum evaluation index correction value is less than the first preset threshold value, the steak quality is determined to be the first grade; When the color spectrum evaluation index correction value is greater than or equal to the first preset threshold value and less than the second preset threshold value, the steak quality is determined to be the second grade; When the color spectrum evaluation index correction value is greater than or equal to the second preset threshold value and less than the third preset threshold value, the steak quality is determined to be the third grade; When the color spectrum evaluation index correction value is greater than or equal to the third preset threshold value and less than the fourth preset threshold value, the steak quality is determined to be the fourth level; When the color spectrum evaluation index correction value is greater than the fourth preset threshold, the steak quality is determined to be the fifth level.
Citation Information
Patent Citations
Beef quality multi-parameter simultaneous detection method by multichannel near-infrared spectroscopy
CN102519906A
Method for evaluating browning degree of apple crisp by use of image segmentation technology
CN105631874A