Meat quality analysis method and system based on machine vision
By acquiring hyperspectral images under orthogonal polarization and performing difference calculations and gray-level co-occurrence matrix analysis, the orderliness index of muscle fiber structure is extracted, which solves the blind spot of freeze-thaw damage detection in the existing technology and realizes accurate assessment of meat quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SICHUAN MURUI FOOD CO LTD
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-17
AI Technical Summary
Existing hyperspectral imaging technology has difficulty accurately identifying the degree of damage to muscle fiber structure during freeze-thaw cycles, especially early freeze-thaw damage, leading to inaccurate meat quality assessment.
By acquiring hyperspectral images under mutually orthogonal first and second polarization directions, polarization difference spectral images are obtained. Anisotropic scattering characteristic parameters are extracted through pixel-by-pixel difference calculation and multi-scale gray-level co-occurrence matrix analysis. The muscle fiber structure order index is calculated to achieve freeze-thaw history determination and quality grade assessment.
It effectively detects muscle fiber structural damage during freeze-thaw cycles, especially early damage, enabling accurate determination of the freeze-thaw history of meat and accurate assessment of structure-related quality indicators, filling a gap in existing technologies.
Smart Images

Figure CN121884332A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image analysis technology, specifically to a method and system for meat quality analysis based on machine vision. Background Technology
[0002] Meat is an important source of protein in the human diet. Low-temperature cold chain technology, by providing a suitable temperature and humidity environment, can effectively inhibit microbial growth and reduce enzyme activity, thereby slowing down meat spoilage and serving as a key technological means to ensure meat quality. However, in actual cold chain transportation and storage, due to inadequate cold chain facilities, irregular transportation management, and interruptions in cold chain connections, temperature fluctuations are still common, causing meat products to undergo frequent freezing and thawing cycles. During repeated freeze-thaw cycles, ice crystals repeatedly form and dissolve in the interstices of muscle fibers, causing irreversible physical damage to the orderly arrangement of muscle fibers. This leads to a loose and disordered muscle fiber structure, resulting in meat that is less tender, less elastic, and loses juices, severely affecting the taste, flavor, and nutritional value of meat products, and also posing potential risks to consumer health.
[0003] Machine vision technology, due to its advantages of rapid, non-destructive, and objective detection, has been widely applied in the field of meat quality analysis. Hyperspectral imaging technology, in particular, can acquire image data across multiple continuous spectral bands, simultaneously obtaining spatial distribution and spectral characteristic information of the target object, providing an effective tool for comprehensive meat quality assessment. However, muscle tissue exhibits significant optical anisotropy, and the disruption of the ordered arrangement of muscle fibers by ice crystals during freeze-thaw cycles directly weakens this anisotropy. Existing hyperspectral imaging detection methods struggle to accurately identify the degree of structural damage caused by freeze-thaw cycles from spectral signals, especially for early freeze-thaw damage, where structural damage has already occurred before significant changes in chemical composition, resulting in a clear detection blind zone.
[0004] Therefore, there is an urgent need for a machine vision-based meat quality analysis method to accurately detect the damage to muscle fiber structure caused by the freeze-thaw process, improve the accurate identification of the freeze-thaw history of meat, and accurately evaluate structure-related quality indicators. Summary of the Invention
[0005] (1) Technical problems to be solved The purpose of this invention is to provide a method and system for meat quality analysis based on machine vision, in order to solve the problem that the anisotropic scattering characteristics of muscle fiber structure are not fully considered, which leads to the inability to effectively detect the damage to the orderly arrangement of muscle fibers caused by the freeze-thaw process, and thus the inability to accurately identify the freeze-thaw history of meat and accurately evaluate its quality indicators.
[0006] (2) Technical solution To achieve the above objectives, in one aspect, the present invention provides a method for meat quality analysis based on machine vision, the method comprising: S1. By acquiring hyperspectral images of the meat sample to be tested under mutually orthogonal first and second polarization directions, a first polarization hyperspectral image and a second polarization hyperspectral image are obtained.
[0007] S2. Perform spectral correction on the first polarization hyperspectral image and the second polarization hyperspectral image respectively to obtain the first reflectance spectral image and the second reflectance spectral image.
[0008] S3. Perform pixel-by-pixel difference calculation between the first reflectance spectral image and the second reflectance spectral image to obtain a polarization difference spectral image; extract anisotropic scattering feature parameters from the polarization difference spectral image.
[0009] S4. Calculate the muscle fiber structure order index of the meat sample to be tested based on the anisotropic scattering characteristic parameters; determine the freeze-thaw history and quality grade of the meat sample to be tested based on the muscle fiber structure order index.
[0010] Furthermore, the method for extracting anisotropic scattering feature parameters from the polarization difference spectral image includes: Obtain the target wavelength range that is sensitive to changes in muscle fiber structure. Extract the polarization difference spectral curve of each pixel in the polarization difference spectral image within the target wavelength range. Perform an integral operation on the polarization difference spectral curve of each pixel within the target wavelength range to obtain the polarization difference intensity value of each pixel.
[0011] The polarization difference intensity values of all pixels are mapped to obtain a spatial distribution map of polarization difference intensity.
[0012] The polarization difference intensity values of all pixels in the spatial distribution map of polarization difference intensity are statistically analyzed to obtain the mean polarization difference intensity and the coefficient of variation of polarization difference intensity.
[0013] The mean polarization difference intensity and the coefficient of variation of polarization difference intensity are used as anisotropic scattering characteristic parameters.
[0014] Furthermore, the method for mapping the polarization difference intensity values of all pixels to obtain a spatial distribution map of polarization difference intensity includes: The polarization difference spectral image is divided into multiple sub-regions. The spatial gradient features of the polarization difference spectral curves of pixels in each sub-region are extracted, and the principal direction angle of the muscle fibers in the sub-region is determined based on the spatial gradient features.
[0015] The orientation correction coefficient for each sub-region is calculated based on the principal direction angle of the muscle fibers and the first polarization direction.
[0016] The corrected polarization difference intensity value is calculated based on the polarization difference intensity value of each pixel in each sub-region and the orientation correction coefficient of the corresponding sub-region. The corrected polarization difference intensity values of all pixels are arranged according to their spatial coordinate positions on the surface of the meat sample to be tested to obtain a spatial distribution map of polarization difference intensity.
[0017] Furthermore, the method for dividing the polarization difference spectral image into multiple sub-regions includes: The polarization difference intensity of each pixel in the polarization difference spectral image at multiple feature bands is extracted and a multidimensional feature vector is constructed.
[0018] Pixels whose multidimensional feature vector magnitude is lower than the boundary recognition threshold are marked as boundary pixels. Connectivity analysis is performed on all boundary pixels and continuous muscle bundle boundary lines are obtained through morphological processing. The polarization difference spectral image is divided into multiple independent sub-regions using the muscle bundle boundary lines as the segmentation boundary.
[0019] Furthermore, the method for calculating the boundary recognition threshold includes: The magnitude values of the multidimensional feature vectors of all pixels in the polarization difference spectral image are statistically analyzed, and a histogram of magnitude frequency distribution is constructed. The histogram of magnitude frequency distribution is fitted with a dual Gaussian mixture model to obtain a first Gaussian component and a second Gaussian component. The first Gaussian component corresponds to the low magnitude distribution of the connective tissue region, and the second Gaussian component corresponds to the high magnitude distribution of the muscle fiber region. The mean and standard deviation of the first Gaussian component and the second Gaussian component are extracted respectively. The magnitude value corresponding to the intersection point of the first Gaussian component and the second Gaussian component is calculated as the initial segmentation threshold.
[0020] The upper boundary value of connective tissue is calculated based on the mean and standard deviation of the first Gaussian component, and the lower boundary value of muscle fiber is calculated based on the mean and standard deviation of the second Gaussian component. The initial segmentation threshold is then weighted and fused with the upper boundary value of connective tissue and the lower boundary value of muscle fiber to obtain the boundary recognition threshold.
[0021] Furthermore, the method for calculating the muscle fiber structure order index of the meat sample to be tested based on the anisotropic scattering characteristic parameters includes: A grayscale image of polarization difference intensity is obtained by acquiring the spatial distribution map of polarization difference intensity and performing grayscale quantization processing. A grayscale co-occurrence matrix is then constructed based on the grayscale image of polarization difference intensity.
[0022] Extract texture energy features and texture entropy features from the gray-level co-occurrence matrix.
[0023] The positive component of orderliness is calculated based on the texture energy characteristics and the mean value of polarization difference intensity, and the negative component of orderliness is calculated based on the texture entropy characteristics and the coefficient of variation of polarization difference intensity; the muscle fiber structure orderliness index is calculated based on the positive and negative components of orderliness.
[0024] Furthermore, the method for extracting texture energy features and texture entropy features from the gray-level co-occurrence matrix includes: Multiple incremental pixel step values are set, and gray-level co-occurrence matrices of corresponding scales are constructed for each pixel step value to obtain a multi-scale gray-level co-occurrence matrix group. The texture energy value and texture entropy value of each scale gray-level co-occurrence matrix in the multi-scale gray-level co-occurrence matrix group are calculated respectively.
[0025] The texture energy values at each scale are arranged in ascending order of pixel step size to form a texture energy scale sequence, and the difference between texture energy values at adjacent scales is calculated to obtain an energy scale decay sequence; the texture entropy values at each scale are arranged in ascending order of pixel step size to form a texture entropy scale sequence, and the difference between texture entropy values at adjacent scales is calculated to obtain an entropy scale growth sequence.
[0026] The energy decay rate feature is calculated based on the energy scale decay sequence, and the entropy growth rate feature is calculated based on the entropy scale growth sequence. The weighted average of the texture energy values at each scale is fused with the energy decay rate feature to obtain the texture energy feature, and the weighted average of the texture entropy values at each scale is fused with the entropy growth rate feature to obtain the texture entropy feature.
[0027] Further, the method for calculating the energy decay rate characteristic based on the energy-scale decay sequence and the entropy growth rate characteristic based on the entropy-scale growth sequence includes: An energy decay coordinate point set is constructed using the step size of each pixel as the independent variable and the corresponding element in the energy scale decay sequence as the dependent variable. The energy decay coordinate point set is fitted with a linear regression using the least squares method to obtain an energy decay regression equation. The absolute value of the slope of the energy decay regression equation is extracted as the linear energy decay rate. The ratio of adjacent elements in the energy scale decay sequence is calculated and its logarithm is taken to obtain the energy logarithmic ratio sequence. The mean of the energy logarithmic ratio sequence is obtained to obtain the energy exponential decay rate. The energy linear decay rate and the energy exponential decay rate are weighted and summed to obtain the energy decay rate feature.
[0028] Using the step size of each pixel as the independent variable and the corresponding element in the entropy scale growth sequence as the dependent variable, an entropy growth coordinate point set is constructed. The entropy growth coordinate point set is fitted with a linear regression using the least squares method to obtain the entropy growth regression equation. The slope of the entropy growth regression equation is extracted as the linear growth rate of entropy. The ratio of the difference between adjacent elements in the entropy scale growth sequence to the previous element is calculated to obtain the relative entropy growth sequence. The mean of the relative entropy growth sequence is obtained to obtain the relative entropy growth rate. The entropy linear growth rate and the entropy relative growth rate are weighted and summed to obtain the entropy growth rate feature.
[0029] On the other hand, based on the same inventive concept, this invention also provides a meat quality analysis system based on machine vision. The system includes: a hyperspectral image acquisition module, a spectral correction module, an anisotropic scattering feature parameter extraction module, and a quality judgment and evaluation module, with each module connected in sequence via communication. The hyperspectral image acquisition module is used to acquire hyperspectral images of the meat sample under test by means of a first polarization hyperspectral image and a second polarization hyperspectral image under mutually orthogonal first polarization direction and second polarization direction.
[0030] The spectral correction module is used to perform spectral correction on the first polarization hyperspectral image and the second polarization hyperspectral image to obtain a first reflectance spectral image and a second reflectance spectral image, respectively.
[0031] An anisotropic scattering feature parameter extraction module is used to perform pixel-by-pixel difference calculation between the first reflectance spectral image and the second reflectance spectral image to obtain a polarization difference spectral image; and to extract anisotropic scattering feature parameters from the polarization difference spectral image.
[0032] The quality determination and evaluation module is used to calculate the muscle fiber structure orderliness index of the meat sample to be tested based on the anisotropic scattering characteristic parameters; and to determine the freeze-thaw history and quality grade of the meat sample to be tested based on the muscle fiber structure orderliness index.
[0033] (3) Beneficial effects Compared with the prior art, the beneficial effects of the present invention are: 1. This invention acquires polarization difference spectral images of meat samples under two mutually orthogonal polarization directions using hyperspectral imaging. This effectively separates and extracts anisotropic scattering feature information related to the ordered arrangement of muscle fibers, overcoming the limitation of existing hyperspectral imaging techniques that cannot capture the anisotropic features of muscle fiber structure. It achieves effective detection of damage to the ordered arrangement of muscle fibers caused by ice crystal formation and dissolution during freeze-thaw processes. It has a particularly good identification ability for early freeze-thaw samples where chemical composition changes are not yet significant but structural damage has already occurred, filling the blind spot of existing technologies in structural damage detection.
[0034] 2. This invention further eliminates the interference of muscle fiber orientation differences on polarization difference intensity by correcting the orientation based on the sub-region division, and extracts texture energy features and texture entropy features by combining multi-scale gray-level co-occurrence matrix. It comprehensively considers the spatial evolution law of freeze-thaw damage from microscopic muscle fiber breakage to macroscopic structural deterioration, and establishes a muscle fiber structural order index with clear physical meaning. It realizes the accurate characterization of the quantitative relationship between the number of freeze-thaw cycles and the degree of structural damage, and provides a reliable basis for the accurate identification of meat freeze-thaw history and the accurate evaluation of structure-related quality indicators. Attached Figure Description
[0035] Figure 1 This is a flowchart of the machine vision-based meat quality analysis method according to Embodiment 1 of the present invention.
[0036] Figure 2 This is a schematic diagram of the module composition of the machine vision-based meat quality analysis system according to Embodiment 2 of the present invention. Detailed Implementation
[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] Example 1: As Figure 1 As shown in the figure, this embodiment provides a machine vision-based meat quality analysis method, the method including: S1. By acquiring hyperspectral images of the meat sample under orthogonal first and second polarization directions, a first polarization hyperspectral image and a second polarization hyperspectral image are obtained. This embodiment uses a hyperspectral imaging system equipped with a linear polarization device. The system mainly includes a hyperspectral camera, a halogen light source, a linear polarizer, and a sample stage. The hyperspectral camera can be a pushbroom hyperspectral imager in the visible and near-infrared bands, with a spectral range covering 400 nm to 1000 nm, a spectral resolution better than 5 nm, and a spatial resolution better than 0.5 mm. The linear polarizer is installed in the optical path between the light source and the sample, and its polarization direction can be adjusted by rotating the support. In this embodiment, the first and second polarization directions are orthogonal. For example, the first polarization direction can be set to a horizontal direction (0 degrees), and the second polarization direction can be set to a vertical direction (90 degrees). The two orthogonal polarization directions are chosen because orthogonal polarization states show the most significant difference in response to anisotropic structures, maximizing the intensity of the polarization difference signal.
[0039] When acquiring hyperspectral images of the meat sample, the sample is placed flat on the stage, with the sample surface perpendicular to the camera's optical axis. The linear polarizer is adjusted to the first polarization direction, the light source is turned on, and a hyperspectral image scan is performed to obtain the first polarization hyperspectral image. This image is a three-dimensional data cube containing the reflection intensity information of each pixel on the sample surface across all spectral bands. The linear polarizer is then rotated 90 degrees to the second polarization direction, and a hyperspectral image scan is performed again while maintaining the sample position, light source intensity, and camera parameters to obtain the second polarization hyperspectral image. It is crucial to ensure that the sample does not shift between the two acquisitions to guarantee the spatial correspondence of subsequent pixel-by-pixel calculations.
[0040] S2. Perform spectral correction on the first and second polarization hyperspectral images respectively to obtain a first reflectance spectral image and a second reflectance spectral image. After obtaining the two polarization hyperspectral images, spectral correction needs to be performed separately to eliminate the influence of factors such as system response and uneven light source intensity. Spectral correction uses a standard white board and dark current correction method. For example, under the same polarization direction and acquisition parameters, a hyperspectral image of a standard white board is acquired as a white reference image, and a dark current image acquired after blocking the lens is acquired as a black reference image. For the original intensity value of any pixel in any band in the first polarization hyperspectral image, subtract the corresponding black reference value and divide by the difference between the white reference value and the black reference value to obtain the reflectance value of that pixel in that band. Perform the above correction operation on all pixels and all bands in the first polarization hyperspectral image to obtain the first reflectance spectral image. Use the same method to correct the second polarization hyperspectral image to obtain the second reflectance spectral image. After spectral correction, the values in both images are normalized reflectance, ranging from 0 to 1.
[0041] S3. Perform pixel-by-pixel difference calculation on the first reflectance spectral image and the second reflectance spectral image to obtain a polarization difference spectral image; extract anisotropic scattering feature parameters from the polarization difference spectral image; the specific method of pixel-by-pixel difference calculation is as follows: for a pixel at any spatial location in the image, calculate the difference between the reflectance value of that pixel in the first reflectance spectral image and the reflectance value of the corresponding pixel in the second reflectance spectral image in each spectral band, thereby obtaining the polarization difference spectrum of that pixel. Perform the above calculation on all pixels to obtain the polarization difference spectral image. The polarization difference spectral image is also a three-dimensional data cube, in which the polarization difference spectrum of each pixel reflects the scattering difference of the muscle fiber structure at that location to light of different polarization states. For fresh meat samples with orderly muscle fiber arrangement, the amplitude of the polarization difference spectrum is large due to the significant anisotropic scattering effect; while for samples that have undergone freeze-thaw damage, the orderly structure of the muscle fibers is destroyed, the anisotropy is weakened, and the amplitude of the polarization difference spectrum is correspondingly reduced.
[0042] S4. Calculate the muscle fiber structure orderliness index of the meat sample to be tested based on the anisotropic scattering characteristic parameters; determine the freeze-thaw history and quality grade of the meat sample to be tested based on the muscle fiber structure orderliness index. Freeze-thaw history determination refers to judging whether the sample to be tested has undergone freeze-thaw treatment and the approximate number of freeze-thaw cycles based on the numerical range of the muscle fiber structure orderliness index. For example, standard samples with different freeze-thaw cycles can be collected in advance and their muscle fiber structure orderliness index can be calculated to establish a correspondence curve or classification threshold between the number of freeze-thaw cycles and the orderliness index. For example, samples with an orderliness index greater than 0.8 can be judged as fresh samples, samples with an orderliness index between 0.6 and 0.8 can be judged as having undergone one to two freeze-thaw cycles, samples with an orderliness index between 0.4 and 0.6 can be judged as having undergone three to four freeze-thaw cycles, and samples with an orderliness index less than 0.4 can be judged as having undergone multiple freeze-thaw cycles and with severe structural damage. Quality grade assessment refers to classifying the sample to be tested into different quality grades, such as excellent, good, qualified, and unqualified, based on the muscle fiber structure orderliness index, providing a basis for the graded sales and quality supervision of meat products.
[0043] The method for extracting anisotropic scattering feature parameters from the polarization difference spectral image includes: A target wavelength range sensitive to changes in muscle fiber structure is obtained. Within this target wavelength range, the polarization difference spectral curves of each pixel in the polarization difference spectral image are extracted. The polarization difference intensity value of each pixel is obtained by integrating these curves within the target wavelength range. Since the polarization difference spectral image contains information from dozens or even hundreds of spectral bands, not all bands have equal sensitivity to changes in muscle fiber structure. The target wavelength range refers to the spectral interval most sensitive to changes in muscle fiber orderliness selected from all acquired wavelengths. The determination of the target wavelength range needs to be based on the optical properties of muscle fiber tissue and the freeze-thaw damage mechanism. The main components of muscle fibers include proteins such as myosin and actin, as well as pigment proteins such as myoglobin. These components have characteristic absorption peaks in specific wavelengths. Simultaneously, the microscopic structural scale of muscle fibers is comparable to the wavelengths of the visible and near-infrared bands, resulting in significant scattering effects. The muscle fiber structural damage caused by the freeze-thaw process mainly affects scattering characteristics rather than absorption characteristics; therefore, the target wavelength range should be selected from the spectral intervals where scattering effects are dominant. For example, meat standard samples that have undergone different freeze-thaw cycles are collected. Hyperspectral images of each meat standard sample are acquired under mutually orthogonal first and second polarization directions. Spectral correction and pixel-by-pixel difference calculations are then performed to obtain the corresponding polarization difference spectral images for each meat standard sample. The average polarization difference spectral curve of each meat standard sample is obtained by averaging the polarization difference spectra of all pixels in the polarization difference spectral images of each meat standard sample. For each band within the acquisition band range of the hyperspectral imaging system, the correlation coefficient between the average polarization difference spectral value of each meat standard sample in that band and the corresponding number of freeze-thaw cycles is calculated. The correlation coefficient represents the sensitivity of that band to changes in the orderliness of muscle fiber structure caused by freeze-thaw cycles. Based on the correlation coefficient, bands whose response sensitivity meets preset conditions are selected, and the spectral range covered by all selected bands is determined as the target band range. For example, the target band range for beef samples is concentrated in the red-near-infrared region from 600 nm to 800 nm.
[0044] A polarization difference spectral curve is a one-dimensional spectral sequence formed by arranging the polarization difference values of a specific pixel within a target wavelength range in wavelength order. For any pixel in a polarization difference spectral image, extracting its polarization difference values across all bands within the target wavelength range yields the polarization difference spectral curve for that pixel. For example, if the target wavelength range is 600 nm to 800 nm and the spectral resolution is 5 nm, then the polarization difference spectral curve for each pixel contains 41 data points. The purpose of integration is to compress the one-dimensional spectral curve into a single numerical value, which comprehensively reflects the overall polarization difference level of that pixel within the target wavelength range. Integration can be performed using numerical integration methods, such as the trapezoidal integral or Simpson's integral. Taking the trapezoidal integral as an example, for a polarization difference spectral curve containing n bands, with a wavelength interval of Δλ between adjacent bands, the integral value is equal to half the sum of the polarization difference values of the first and last bands plus the sum of the polarization difference values of the intermediate bands, multiplied by the wavelength interval Δλ. Through integration, each pixel obtains a polarization difference intensity value. The larger the value, the stronger the anisotropic scattering ability of the muscle fiber at that location, and the more orderly the muscle fiber arrangement.
[0045] The polarization difference intensity values of all pixels are mapped to obtain a spatial distribution map of polarization difference intensity; The polarization difference intensity values of all pixels in the spatial distribution map of polarization difference intensity are statistically analyzed to obtain the mean polarization difference intensity and the coefficient of variation of polarization difference intensity; the mean polarization difference intensity represents the overall anisotropy level of the meat sample to be tested, and the coefficient of variation of polarization difference intensity represents the uniformity of the spatial distribution of anisotropy. The mean polarization difference intensity and the coefficient of variation of polarization difference intensity are used as anisotropic scattering characteristic parameters. The purpose of statistical analysis is to extract quantitative indicators that characterize the overall properties of the sample from the spatial distribution map of polarization difference intensity. The mean polarization difference intensity is calculated by summing the polarization difference intensity values of all valid pixels and dividing by the total number of valid pixels. Valid pixels refer to pixels located within the sample area excluding the background area. The mean polarization difference intensity reflects the overall anisotropic scattering level of the meat sample being tested. Fresh samples have a higher mean value due to the orderly arrangement of muscle fibers, while freeze-thawed samples have a lower mean value due to structural damage. The coefficient of variation of polarization difference intensity is calculated by calculating the standard deviation of the polarization difference intensity values of all valid pixels and then dividing the standard deviation by the mean value. The coefficient of variation of polarization difference intensity reflects the uniformity of the spatial distribution of anisotropic scattering intensity. Fresh samples have a lower coefficient of variation due to the intact muscle fiber structure, while freeze-thawed samples have a higher coefficient of variation due to uneven local damage.
[0046] The method for mapping the polarization difference intensity values of all pixels to obtain a spatial distribution map of polarization difference intensity includes: The polarization difference spectral image is divided into multiple sub-regions. The spatial gradient features of the polarization difference spectral curves of pixels within each sub-region are extracted, and the principal orientation angle of the muscle fibers in that sub-region is determined based on these spatial gradient features. The spatial gradient features refer to the direction and rate of change of the polarization difference intensity value in space. Since muscle fibers are arranged in parallel, the change in polarization difference intensity along the fiber direction is relatively gradual, while the change is more dramatic perpendicular to the fiber direction. Therefore, by analyzing the principal orientation of the spatial gradient, the orientation of the muscle fibers can be inferred. For example, the horizontal and vertical gradients of the polarization difference intensity distribution within the sub-region are calculated, and a gradient covariance matrix is constructed. Eigenvalue decomposition is performed on the gradient covariance matrix, and the direction of the eigenvector corresponding to the smallest eigenvalue is the principal orientation of the muscle fibers. The principal orientation angle of the muscle fibers is defined as the angle between this direction and the positive horizontal axis, ranging from 0 to 180 degrees.
[0047] The orientation correction coefficient for each sub-region is calculated based on the principal direction angle of the muscle fibers and the first polarization direction. This coefficient compensates for the background difference in polarization difference intensity caused by variations in the angle between the muscle fiber orientation and the polarization direction. According to polarized light scattering theory, the polarization difference intensity has a cosine square relationship with the angle between the muscle fiber orientation and the polarization direction. Using the first polarization direction as a reference, the orientation correction coefficient is calculated based on the angle between the principal direction angle of the muscle fibers in each sub-region and this reference direction (since the two polarization directions are orthogonal, choosing either direction as the reference is equivalent). Assuming the first polarization direction is 0 degrees and the principal direction angle of a certain sub-region is θ, the theoretical polarization difference intensity of that sub-region is proportional to cos²θ. The orientation correction coefficient can be defined as 1 divided by the sum of cos²θ and a small constant. This small constant is used to avoid numerical instability caused by an excessively small denominator when θ is close to 45 degrees. By multiplying by the orientation correction coefficient, the polarization difference intensity values of each sub-region can be normalized to the same reference orientation, thereby eliminating the influence of orientation differences and retaining only the information on structural order changes caused by freeze-thaw damage.
[0048] The corrected polarization difference intensity value is calculated based on the polarization difference intensity value of each pixel in each sub-region and the orientation correction coefficient of the corresponding sub-region. The corrected polarization difference intensity values of all pixels are then arranged according to their spatial coordinates on the surface of the meat sample to be tested, resulting in a spatial distribution map of the polarization difference intensity. For any pixel, its sub-region is determined, and then the original polarization difference intensity value of that pixel is multiplied by the orientation correction coefficient of that sub-region to obtain the corrected polarization difference intensity value. The corrected polarization difference intensity value of each pixel in each sub-region and its original pixel coordinates in the polarization difference spectral image are obtained. A unified spatial coordinate system is established with the surface of the meat sample to be tested as a reference. The original pixel coordinates are mapped to the unified spatial coordinate system through coordinate transformation to obtain the spatial coordinate position of each pixel. For pixels at the boundary of adjacent sub-regions, the corrected polarization difference intensity value calculated in each adjacent sub-region is obtained. The distance weighting coefficient is calculated based on the Euclidean distance between the pixel and the center point of each adjacent sub-region. The corrected polarization difference intensity values of adjacent sub-regions are weighted and fused using the distance weighting coefficient to obtain the fused polarization difference intensity value of the boundary pixel. The corrected polarization difference intensity values of all pixels inside the sub-regions and the fused polarization difference intensity values of the boundary pixels are arranged in a two-dimensional matrix according to their corresponding spatial coordinate positions to construct an initial polarization difference intensity matrix. The initial polarization difference intensity matrix is smoothed using a spatial filtering method to eliminate the intensity discontinuity caused by the abrupt change in the orientation correction coefficient at the boundary of sub-regions, resulting in a spatial distribution map of polarization difference intensity.
[0049] The method for dividing a polarization difference spectral image into multiple sub-regions includes: Extract the polarization difference intensity of each pixel in the polarization difference spectral image at multiple feature bands and construct a multidimensional feature vector; Pixels whose multidimensional feature vector magnitudes are below the boundary recognition threshold are marked as boundary pixels. Connectivity analysis is performed on all boundary pixels, and continuous muscle bundle boundary lines are obtained through morphological processing. These muscle bundle boundary lines are used as dividing boundaries to divide the polarization difference spectral image into multiple independent sub-regions. The tissue structure on the surface of meat samples can be divided into muscle fiber regions and non-muscle fiber regions. Muscle fiber regions consist of parallel muscle fibers and exhibit significant optical anisotropy, showing high polarization difference intensity in polarization difference spectral images. Non-muscle fiber regions mainly include connective tissue, adipose tissue, and fascia. These tissues lack an ordered fiber arrangement structure, have weak optical anisotropy, and show low polarization difference intensity in polarization difference spectral images. Connective tissue is distributed between muscle bundles, forming the boundaries of the muscle bundles. Therefore, by identifying regions with low polarization difference intensity, muscle bundle boundary lines can be determined, thereby dividing the image into multiple sub-regions. Feature bands refer to several representative bands selected from the target band range. The selection principle is that these bands can effectively distinguish between muscle fiber regions and connective tissue regions. For example, 5 to 10 bands evenly distributed within the target band range can be selected as feature bands. The polarization difference intensity values of any pixel point in each feature band are extracted and arranged in band order to form a multidimensional feature vector. If n feature bands are selected, the multidimensional feature vector is an n-dimensional vector.
[0050] The magnitude of a multidimensional feature vector is defined as the square root of the sum of the squares of its components, reflecting the overall polarization difference level of the pixel across all feature bands. Pixels with magnitudes below the boundary recognition threshold are considered to be located in connective tissue regions or muscle bundle boundaries and are marked as boundary pixels. Connectivity analysis examines the spatial adjacency relationships between boundary pixels, grouping adjacent boundary pixels into the same connected region. Morphological processing includes operations such as dilation, erosion, opening, and closing to fill in breakpoints in boundary lines, smooth boundary contours, and remove isolated noise points. Through morphological processing, discrete boundary pixels can be connected into continuous muscle bundle boundary lines. The polarization difference spectral image is divided into multiple independent sub-regions using the muscle bundle boundary lines as segmentation boundaries. During segmentation, each connected region enclosed by the boundary lines is marked as a different sub-region, with each sub-region corresponding to a muscle bundle. The muscle fiber orientation within each sub-region remains largely consistent, providing a basis for subsequent orientation correction. The number of sub-regions depends on the distribution of muscle bundles on the sample surface, typically ranging from several to dozens.
[0051] The method for calculating the boundary recognition threshold includes: The magnitude values of the multidimensional feature vectors of all pixels in the polarization difference spectral image are statistically analyzed, and a histogram of magnitude frequency distribution is constructed. The histogram of magnitude frequency distribution is fitted with a dual Gaussian mixture model to obtain a first Gaussian component and a second Gaussian component. The first Gaussian component corresponds to the low magnitude distribution of the connective tissue region, and the second Gaussian component corresponds to the high magnitude distribution of the muscle fiber region. The mean and standard deviation of the first Gaussian component and the second Gaussian component are extracted respectively. The magnitude value corresponding to the intersection point of the first Gaussian component and the second Gaussian component is calculated as the initial segmentation threshold.
[0052] The upper boundary value of connective tissue is calculated based on the mean and standard deviation of the first Gaussian component, and the lower boundary value of muscle fiber is calculated based on the mean and standard deviation of the second Gaussian component. The initial segmentation threshold is then weighted and fused with the upper boundary value of connective tissue and the lower boundary value of muscle fiber to obtain the boundary recognition threshold. The modulus frequency distribution histogram, with modulus value on the horizontal axis and the number or proportion of pixels with that modulus value on the vertical axis, displays the statistical distribution of the modulus values of all pixels. Since both muscle fiber and connective tissue regions exist on the surface of meat samples, and their modulus value distribution ranges differ, the modulus frequency distribution histogram typically exhibits a bimodal shape: the peak at lower modulus values corresponds to the connective tissue region, and the peak at higher modulus values corresponds to the muscle fiber region. The dual Gaussian mixture model assumes that the observed data is generated by a mixture of two Gaussian distributions, each described by three parameters: mean, standard deviation, and mixture weight. The fitting can employ the expectation-maximization algorithm, iteratively optimizing each parameter to achieve the optimal fit between the model and the observed data. After fitting, the parameters of the two Gaussian components are obtained. The first Gaussian component corresponds to the low modulus distribution in the connective tissue region, with a smaller mean; the second Gaussian component corresponds to the high modulus distribution in the muscle fiber region, with a larger mean. Let the mean of the first Gaussian component be μ1 and the standard deviation be σ1, and the mean of the second Gaussian component be μ2 and the standard deviation be σ2. These four parameters describe the modulus distribution characteristics of the two types of tissue regions. A crossover point is a point where the probability density functions of the two Gaussian distributions are equal; at this point, the probability of belonging to either type of region is equal. The modulus of the crossover point can be obtained by solving the equation for the equality of the two Gaussian probability density functions. For two Gaussian distributions with known parameters, this equation is a quadratic equation and can be solved analytically. If two crossover points exist, the crossover point located between the two means is selected as the initial segmentation threshold.
[0053] The upper boundary value for connective tissue is calculated based on the mean and standard deviation of the first Gaussian component, and the lower boundary value for muscle fibers is calculated based on the mean and standard deviation of the second Gaussian component. The upper boundary value for connective tissue can be defined as μ1 plus k times σ1, where k is a preset coefficient, typically 2 to 3, representing the upper boundary of the modulus distribution in the connective tissue region. The lower boundary value for muscle fibers can be defined as μ2 minus k times σ2, representing the lower boundary of the modulus distribution in the muscle fiber region. These two boundary values reflect the edge positions of the modulus distributions in the two types of regions.
[0054] The initial segmentation threshold is weighted and fused with the upper boundary value of connective tissue and the lower boundary value of muscle fibers to obtain the boundary recognition threshold. The weighted fusion can use a linear weighting method, for example, multiplying the initial segmentation threshold, the upper boundary value of connective tissue, and the lower boundary value of muscle fibers by preset weights and then summing them. The weights can be adjusted according to actual application needs. If a more conservative boundary recognition is desired, i.e., to avoid misclassifying muscle fiber regions as boundaries, the weight of the lower boundary value of muscle fibers can be increased; if a more sensitive boundary recognition is desired, i.e., to identify as many boundaries as possible, the weight of the upper boundary value of connective tissue can be increased. The boundary recognition threshold obtained through weighted fusion comprehensively considers the distribution characteristics of the two types of regions, achieving robust boundary recognition results.
[0055] The method for calculating the muscle fiber structure order index of the meat sample to be tested based on the anisotropic scattering characteristic parameters includes: A polarization difference intensity grayscale image is obtained by acquiring the spatial distribution map of polarization difference intensity and performing grayscale quantization. A grayscale co-occurrence matrix (HCMM) is then constructed based on this grayscale image. Grayscale quantization is the process of discretizing continuous numerical values into a finite number of grayscale levels. For example, the minimum and maximum values of the polarization difference intensity are determined, and this range is then uniformly divided into a predetermined number of grayscale levels, such as 64 or 256 levels. Finally, the polarization difference intensity value of each pixel is mapped to its corresponding grayscale level. The resulting polarization difference intensity grayscale image is a standard grayscale image, where the grayscale value of each pixel is an integer, ranging from 0 to the grayscale level number minus 1. The grayscale co-occurrence matrix (HCMM) is a second-order statistic describing the spatial distribution characteristics of grayscale values in an image, reflecting the joint distribution of pixel pairs with specific grayscale values at specific directions and distances. Constructing the HCMM requires specifying the spatial relationships between pixel pairs, including orientation angles and pixel step sizes. For a given direction angle θ and pixel step size d, the element in the i-th row and j-th column of the gray-level co-occurrence matrix represents the number of pixel pairs with gray value j located at a distance d along the θ direction from the pixel with gray value i in the entire image. The size of the gray-level co-occurrence matrix is the number of gray levels multiplied by the number of gray levels.
[0056] Extract texture energy features and texture entropy features from the gray-level co-occurrence matrix; The positive component of orderliness is calculated based on the texture energy feature and the mean polarization difference intensity, while the negative component is calculated based on the texture entropy feature and the coefficient of variation of the polarization difference intensity. A muscle fiber structure orderliness index is then calculated from both components. The positive component reflects the positive contribution of the muscle fiber structure to orderliness; a higher value indicates higher orderliness. Both the texture energy feature and the mean polarization difference intensity are positively correlated with muscle fiber orderliness, and their product or weighted sum can be used as the positive component. For example, the geometric mean of the texture energy feature and the mean polarization difference intensity can be normalized to the range of 0 to 1 and used as the positive component. The negative component reflects the negative contribution of the muscle fiber structure to orderliness; a higher value indicates lower orderliness. Both the texture entropy feature and the coefficient of variation of the polarization difference intensity are negatively correlated with muscle fiber orderliness, and their product or weighted sum can be used as the negative component. The calculation method is similar to that of the positive component. The muscle fiber structure orderliness index comprehensively considers the contributions of both positive and negative components. It can be obtained by subtracting the negative component from the positive component and then normalizing the result. For example, the difference between the positive and negative components of orderliness can be transformed to the range of 0 to 1 using a linear transformation or a nonlinear mapping function, and used as the final muscle fiber structure orderliness index.
[0057] The method for extracting texture energy features and texture entropy features from the gray-level co-occurrence matrix includes: Multiple incremental pixel step values are set, and gray-level co-occurrence matrices of corresponding scales are constructed for each pixel step value to obtain a multi-scale gray-level co-occurrence matrix group. The texture energy value and texture entropy value of each scale gray-level co-occurrence matrix in the multi-scale gray-level co-occurrence matrix group are calculated respectively. The texture energy values at each scale are arranged in ascending order of pixel step size to form a texture energy scale sequence, and the difference between texture energy values at adjacent scales is calculated to obtain an energy scale decay sequence. Similarly, the texture entropy values at each scale are arranged in ascending order of pixel step size to form a texture entropy scale sequence, and the difference between texture entropy values at adjacent scales is calculated to obtain an entropy scale growth sequence. Freeze-thaw damage to muscle fiber structure exhibits multi-scale characteristics. At the microscale, ice crystal formation leads to localized fracture of individual muscle fibers; at the mesoscale, repeated freeze-thaw cycles cause the damaged area to gradually expand and interconnect; at the macroscale, severe freeze-thaw damage leads to the disintegration of the entire muscle bundle structure. Structural damage at different scales manifests as texture variations at different spatial frequencies in the polarization difference intensity grayscale image. Therefore, using a single-scale grayscale co-occurrence matrix is insufficient to fully capture the characteristics of freeze-thaw damage, necessitating a multi-scale analysis strategy.
[0058] The pixel stride value defines the spatial distance between pixel pairs in the gray-level co-occurrence matrix. Smaller pixel stride values correspond to smaller spatial scales, capturing detailed texture features; larger pixel stride values correspond to larger spatial scales, capturing overall texture features. The pixel stride value setting should cover a range from the muscle fiber scale to the muscle fascicle scale. For example, if the image spatial resolution is 0.2 mm per pixel, the muscle fiber diameter is approximately 0.05 to 0.1 mm, and the muscle fascicle diameter is approximately 1 to 5 mm, then pixel stride values of 1, 2, 4, 8, 16, and 32 pixels can be set, corresponding to spatial scales of 0.2, 0.4, 0.8, 1.6, 3.2, and 6.4 mm, respectively. For each pixel stride value, a corresponding gray-level co-occurrence matrix is constructed, and all gray-level co-occurrence matrices constitute a multi-scale gray-level co-occurrence matrix group.
[0059] For each pixel step value corresponding to the gray-level co-occurrence matrix, its texture energy value and texture entropy value are calculated according to the aforementioned method. Assuming there are m pixel step values, we obtain m texture energy values and m texture entropy values, corresponding to m spatial scales. The texture energy scale sequence is a one-dimensional array, where each element is the texture energy value at the corresponding scale. For fresh samples, since the myofibril structure remains ordered at all scales, the texture energy values at each scale are high and decay slowly with increasing scale. For freeze-thaw damaged samples, since structural damage first occurs at the microscale and gradually extends to the macroscale, the texture energy values at small scales decrease significantly while those at large scales decrease relatively less, leading to a faster decay rate of texture energy with increasing scale. The energy scale decay sequence is calculated by subtracting the texture energy values of two adjacent scales; for example, subtracting the texture energy value of the first scale from the texture energy value of the second scale yields the first difference value, and so on. The energy scale decay sequence contains m minus 1 elements, reflecting the trend of texture energy change with scale.
[0060] The texture entropy scale sequence is constructed in the same way as the texture energy scale sequence. For fresh samples, the texture entropy values at all scales are low and increase slowly with increasing scale; for freeze-thaw damaged samples, the texture entropy values at small scales increase significantly while the increase at large scales is relatively small, resulting in a slower rate of increase in texture entropy with increasing scale. The calculation method for the entropy scale growth sequence is similar to that for the energy scale decay sequence.
[0061] The energy decay rate feature is calculated based on the energy scale decay sequence, and the entropy growth rate feature is calculated based on the entropy scale growth sequence. The weighted average of the texture energy values at each scale is fused with the energy decay rate feature to obtain the texture energy feature, and the weighted average of the texture entropy values at each scale is fused with the entropy growth rate feature to obtain the texture entropy feature. The weighted average is calculated by multiplying the texture energy values at each scale by their corresponding weights and then summing them. The weights can be set to equal weights or differentiated weights based on the importance of each scale. A linear combination can be used for fusion, for example, multiplying the weighted average and the energy decay rate feature by a fusion coefficient and then summing them. The weighted average of the texture entropy values at each scale is fused with the entropy growth rate feature to obtain the texture entropy feature, calculated similarly to the texture energy feature. By fusing multi-scale statistics and scale change rate features, the resulting texture energy feature and texture entropy feature can comprehensively reflect the changes in myofibril structure caused by freeze-thaw damage.
[0062] The method for calculating the energy decay rate characteristic based on the energy scale decay sequence and the entropy growth rate characteristic based on the entropy scale growth sequence includes: An energy decay coordinate point set is constructed using the step size of each pixel as the independent variable and the corresponding element in the energy scale decay sequence as the dependent variable. The energy decay coordinate point set is fitted with a linear regression using the least squares method to obtain an energy decay regression equation. The absolute value of the slope of the energy decay regression equation is extracted as the linear energy decay rate. The ratio of adjacent elements in the energy scale decay sequence is calculated and its logarithm is taken to obtain the energy logarithmic ratio sequence. The mean of the energy logarithmic ratio sequence is obtained to obtain the energy exponential decay rate. The energy linear decay rate and the energy exponential decay rate are weighted and summed to obtain the energy decay rate feature.
[0063] Using the step size of each pixel as the independent variable and the corresponding element in the entropy scale growth sequence as the dependent variable, an entropy growth coordinate point set is constructed. The entropy growth coordinate point set is fitted with a linear regression using the least squares method to obtain the entropy growth regression equation. The slope of the entropy growth regression equation is extracted as the linear growth rate of entropy. The ratio of the difference between adjacent elements in the entropy scale growth sequence to the previous element is calculated to obtain the relative entropy growth sequence. The mean of the relative entropy growth sequence is obtained to obtain the relative entropy growth rate. The entropy linear growth rate and the entropy relative growth rate are weighted and summed to obtain the entropy growth rate feature.
[0064] The energy decay coordinate point set is a set of two-dimensional data points. The x-coordinate of each data point is the pixel step size, and the y-coordinate is the energy decay value at that pixel step size, i.e., the difference in texture energy between adjacent scales. For example, if the pixel step sizes are 1, 2, 4, 8, 16, and 32, then the energy decay coordinate point set contains 5 data points with x-coordinates of 1.5, 3, 6, 12, and 24, representing the mean of adjacent pixel step sizes, and y-coordinates representing the corresponding differences. Linear regression assumes a linear relationship between the dependent and independent variables, i.e., y equals ax + b, where a is the slope and b is the intercept. The least squares method determines the optimal slope and intercept parameters by minimizing the sum of squares of the differences between the observed and fitted values. After fitting, the slope a and intercept b of the energy decay regression equation are obtained.
[0065] The slope of the energy decay regression equation reflects the rate of change of energy decay value with increasing pixel step size. Since energy decay value is usually negative, meaning that the texture energy at large scales is lower than that at small scales, the sign of the slope may be positive or negative; taking its absolute value can uniformly represent the magnitude of the decay rate. The larger the linear energy decay rate, the faster the texture energy decays with increasing scale, and the more severe the freeze-thaw damage. The ratio of adjacent elements in the energy scale decay sequence is calculated and its logarithm is taken to obtain the energy logarithmic ratio sequence. This calculation is used to analyze the exponential change characteristics of energy decay. The energy exponential decay rate is the arithmetic mean of the elements in the energy logarithmic ratio sequence, reflecting the average relative change of energy decay value with increasing scale. This index can capture the nonlinear characteristics of energy decay and complements the linear energy decay rate. The weighted summation method is to multiply the linear energy decay rate by a first weighting coefficient and the exponential energy decay rate by a second weighting coefficient, and then add them together. The weighting coefficients can be set according to the contribution of the two decay rates to the freeze-thaw damage discrimination; for example, they can be set to equal weight, i.e., each 0.5. By fusing linear decay rate and exponential decay rate, the energy decay rate feature can robustly characterize the variation of texture energy with spatial scale.
[0066] An entropy growth coordinate point set is constructed using each pixel step size as the independent variable and the corresponding element in the entropy scale growth sequence as the dependent variable. The slope of the entropy growth regression equation reflects the rate of change of the entropy growth value with the increase of the pixel step size. The relative entropy growth sequence reflects the relative degree of change of the entropy growth value, and the relative entropy growth rate is the arithmetic mean of the elements in the relative entropy growth sequence. By fusing the linear entropy growth rate and the relative entropy growth rate, the entropy growth rate feature can comprehensively characterize the variation law of texture entropy with spatial scale.
[0067] Example 2: Based on the same inventive concept, such as Figure 2As shown, this embodiment also provides a meat quality analysis system based on machine vision. The system includes: a hyperspectral image acquisition module, a spectral correction module, an anisotropic scattering feature parameter extraction module, and a quality judgment and evaluation module. The modules are connected in sequence for communication. The hyperspectral image acquisition module is used to acquire hyperspectral images of the meat sample under test by means of a first polarization hyperspectral image and a second polarization hyperspectral image under mutually orthogonal first polarization direction and second polarization direction.
[0068] The spectral correction module is used to perform spectral correction on the first polarization hyperspectral image and the second polarization hyperspectral image to obtain a first reflectance spectral image and a second reflectance spectral image, respectively.
[0069] An anisotropic scattering feature parameter extraction module is used to perform pixel-by-pixel difference calculation between the first reflectance spectral image and the second reflectance spectral image to obtain a polarization difference spectral image; and to extract anisotropic scattering feature parameters from the polarization difference spectral image.
[0070] The quality determination and evaluation module is used to calculate the muscle fiber structure orderliness index of the meat sample to be tested based on the anisotropic scattering characteristic parameters; and to determine the freeze-thaw history and quality grade of the meat sample to be tested based on the muscle fiber structure orderliness index.
[0071] It should be noted that the specific methods by which each module performs operations in the system described in the above embodiments have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0072] Finally, it should be noted that 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 make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A machine vision-based method for meat quality analysis, characterized in that, The method includes: By acquiring hyperspectral images of the meat sample under the first polarization direction and the second polarization direction, which are mutually orthogonal, a first polarization hyperspectral image and a second polarization hyperspectral image are obtained. The first polarization hyperspectral image and the second polarization hyperspectral image are respectively spectrally corrected to obtain the first reflectance spectral image and the second reflectance spectral image; A polarization difference spectral image is obtained by performing pixel-by-pixel difference calculation between the first reflectance spectral image and the second reflectance spectral image; anisotropic scattering feature parameters are extracted from the polarization difference spectral image. The muscle fiber structure order index of the meat sample to be tested is calculated based on the anisotropic scattering characteristic parameters; the freeze-thaw history and quality grade of the meat sample to be tested are determined based on the muscle fiber structure order index.
2. The machine vision-based meat quality analysis method according to claim 1, characterized in that, The method for extracting anisotropic scattering feature parameters from the polarization difference spectral image includes: Obtain the target band range that is sensitive to changes in muscle fiber structure, extract the polarization difference spectral curve of each pixel in the polarization difference spectral image within the target band range, and perform an integral operation on the polarization difference spectral curve of each pixel within the target band range to obtain the polarization difference intensity value of each pixel. The polarization difference intensity values of all pixels are mapped to obtain a spatial distribution map of polarization difference intensity; The polarization difference intensity values of all pixels in the spatial distribution map of polarization difference intensity are statistically analyzed to obtain the mean polarization difference intensity and the coefficient of variation of polarization difference intensity. The mean polarization difference intensity and the coefficient of variation of polarization difference intensity are used as anisotropic scattering characteristic parameters.
3. The machine vision-based meat quality analysis method according to claim 2, characterized in that, The method for mapping the polarization difference intensity values of all pixels to obtain a spatial distribution map of polarization difference intensity includes: The polarization difference spectral image is divided into multiple sub-regions. The spatial gradient features of the polarization difference spectral curves of pixels in each sub-region are extracted, and the principal direction angle of the muscle fibers in the sub-region is determined based on the spatial gradient features. The orientation correction coefficient of each sub-region is calculated based on the principal direction angle of the muscle fibers in each sub-region and the first polarization direction. The corrected polarization difference intensity value is calculated based on the polarization difference intensity value of each pixel in each sub-region and the orientation correction coefficient of the corresponding sub-region. The corrected polarization difference intensity values of all pixels are arranged according to their spatial coordinate positions on the surface of the meat sample to be tested to obtain a spatial distribution map of polarization difference intensity.
4. The machine vision-based meat quality analysis method according to claim 3, characterized in that, The method for dividing a polarization difference spectral image into multiple sub-regions includes: Extract the polarization difference intensity of each pixel in the polarization difference spectral image at multiple feature bands and construct a multidimensional feature vector; Pixels whose multidimensional feature vector magnitude is lower than the boundary recognition threshold are marked as boundary pixels. Connectivity analysis is performed on all boundary pixels and continuous muscle bundle boundary lines are obtained through morphological processing. The polarization difference spectral image is divided into multiple independent sub-regions using the muscle bundle boundary lines as the segmentation boundary.
5. The machine vision-based meat quality analysis method according to claim 4, characterized in that, The method for calculating the boundary recognition threshold includes: The magnitude values of the multidimensional feature vectors of all pixels in the polarization difference spectral image are statistically analyzed, and a histogram of magnitude frequency distribution is constructed. The histogram of magnitude frequency distribution is fitted with a dual Gaussian mixture model to obtain a first Gaussian component and a second Gaussian component. The first Gaussian component corresponds to the low magnitude distribution of the connective tissue region, and the second Gaussian component corresponds to the high magnitude distribution of the muscle fiber region. The mean and standard deviation of the first Gaussian component and the second Gaussian component are extracted respectively. The magnitude value corresponding to the intersection point of the first Gaussian component and the second Gaussian component is calculated as the initial segmentation threshold. The upper boundary value of connective tissue is calculated based on the mean and standard deviation of the first Gaussian component, and the lower boundary value of muscle fiber is calculated based on the mean and standard deviation of the second Gaussian component. The initial segmentation threshold is then weighted and fused with the upper boundary value of connective tissue and the lower boundary value of muscle fiber to obtain the boundary recognition threshold.
6. The machine vision-based meat quality analysis method according to claim 2, characterized in that, The method for calculating the muscle fiber structure order index of the meat sample to be tested based on the anisotropic scattering characteristic parameters includes: A polarization difference intensity spatial distribution map is obtained and grayscale quantization is performed to obtain a polarization difference intensity grayscale map. A grayscale co-occurrence matrix is constructed based on the polarization difference intensity grayscale map. Extract texture energy features and texture entropy features from the gray-level co-occurrence matrix; The positive component of orderliness is calculated based on the texture energy characteristics and the mean value of polarization difference intensity, and the negative component of orderliness is calculated based on the texture entropy characteristics and the coefficient of variation of polarization difference intensity; the muscle fiber structure orderliness index is calculated based on the positive and negative components of orderliness.
7. The machine vision-based meat quality analysis method according to claim 6, characterized in that, The method for extracting texture energy features and texture entropy features from the gray-level co-occurrence matrix includes: Multiple incremental pixel step sizes are set, and gray-level co-occurrence matrices of corresponding scales are constructed for each pixel step size to obtain a multi-scale gray-level co-occurrence matrix group. The texture energy value and texture entropy value of each scale gray-level co-occurrence matrix in the multi-scale gray-level co-occurrence matrix group are calculated respectively. The texture energy values at each scale are arranged in ascending order of pixel step size to form a texture energy scale sequence, and the difference between texture energy values at adjacent scales is calculated to obtain an energy scale decay sequence; the texture entropy values at each scale are arranged in ascending order of pixel step size to form a texture entropy scale sequence, and the difference between texture entropy values at adjacent scales is calculated to obtain an entropy scale growth sequence. The energy decay rate feature is calculated based on the energy scale decay sequence, and the entropy growth rate feature is calculated based on the entropy scale growth sequence. The weighted average of the texture energy values at each scale is fused with the energy decay rate feature to obtain the texture energy feature, and the weighted average of the texture entropy values at each scale is fused with the entropy growth rate feature to obtain the texture entropy feature.
8. The machine vision-based meat quality analysis method according to claim 7, characterized in that, The method for calculating the energy decay rate characteristic based on the energy scale decay sequence and the entropy growth rate characteristic based on the entropy scale growth sequence includes: An energy decay coordinate point set is constructed using the step size of each pixel as the independent variable and the corresponding element in the energy scale decay sequence as the dependent variable. The energy decay coordinate point set is fitted with a linear regression using the least squares method to obtain an energy decay regression equation. The absolute value of the slope of the energy decay regression equation is extracted as the linear energy decay rate. The ratio of adjacent elements in the energy scale decay sequence is calculated and its logarithm is taken to obtain the energy logarithmic ratio sequence. The mean of the energy logarithmic ratio sequence is obtained to obtain the energy exponential decay rate. The energy linear decay rate and the energy exponential decay rate are weighted and summed to obtain the energy decay rate feature. Using the step size of each pixel as the independent variable and the corresponding element in the entropy scale growth sequence as the dependent variable, an entropy growth coordinate point set is constructed. The entropy growth coordinate point set is fitted with a linear regression using the least squares method to obtain the entropy growth regression equation. The slope of the entropy growth regression equation is extracted as the linear growth rate of entropy. The ratio of the difference between adjacent elements in the entropy scale growth sequence to the previous element is calculated to obtain the relative entropy growth sequence. The mean of the relative entropy growth sequence is obtained to obtain the relative entropy growth rate. The entropy linear growth rate and the entropy relative growth rate are weighted and summed to obtain the entropy growth rate feature.
9. A machine vision-based meat quality analysis system, used to perform the method according to any one of claims 1-8, characterized in that, The system includes: a hyperspectral image acquisition module, a spectral correction module, an anisotropic scattering feature parameter extraction module, and a quality determination and evaluation module, with each module connected in sequence via communication. The hyperspectral image acquisition module is used to acquire hyperspectral images of the meat sample to be tested under mutually orthogonal first and second polarization directions, and obtain a first polarization hyperspectral image and a second polarization hyperspectral image. The spectral correction module is used to perform spectral correction on the first polarization hyperspectral image and the second polarization hyperspectral image to obtain a first reflectance spectral image and a second reflectance spectral image, respectively. An anisotropic scattering feature parameter extraction module is used to perform pixel-by-pixel difference calculation between the first reflectance spectral image and the second reflectance spectral image to obtain a polarization difference spectral image; and to extract anisotropic scattering feature parameters from the polarization difference spectral image. The quality determination and evaluation module is used to calculate the muscle fiber structure orderliness index of the meat sample to be tested based on the anisotropic scattering characteristic parameters; and to determine the freeze-thaw history and quality grade of the meat sample to be tested based on the muscle fiber structure orderliness index.