
Among many meat products, beef is favored by most consumers because of its high protein, low fat, high vitamin and mineral content, which highly meets the nutritional needs of modern people for meat. As people's pace of life accelerates, traditional cooked beef products have become a common food in supermarkets and delicatessens, and the demand and sales volume are also increasing. However, in real life, most of the cooked beef sold on the market is in bulk, and it is rich in high protein and high water content, so it is very easy to breed microorganisms and cause it to spoil during low-temperature storage. Therefore, based on reasonable and effective beef quality grading standards and systems, seeking reliable beef quality safety grading detection methods has become a top priority for the development direction of the beef market.
Hyperspectral images, also known as hypercubes, are three-dimensional data blocks (x, y, λ) composed of a series of two-dimensional spatial images (x, y) under continuous wavelength λ. As shown in the figure below, from the perspective of wavelength, hyperspectral image data (x, y, λ) is a three-dimensional data block composed of two-dimensional images (x, y); from the perspective of two-dimensional data (x, y), hyperspectral is a series of spectral curves. The principle of using HSI technology to detect the freshness of food refers to the difference in the absorption, reflection, scattering, electromagnetic energy of light and the spectral position of the peak/trough of the internal chemical composition and external physical characteristics of the object to be tested, which leads to different digital signal characteristics. For example, the peak and valley values (spectral fingerprints) of absorbance at different wavelengths can represent the physical properties of different compounds, so that qualitative or quantitative analysis of food quality can be achieved through the analysis of hyperspectral information, that is, non-destructive testing of food quality.

(1) TVC sample ROI and spectrum extraction
For the TVC sample, a 50 px×50 px muscle subsample ROI image of the hyperspectral image subsample after black and white correction was selected. The selected
cooked beef subsample image was averaged under a specific spectrum to obtain the spectral mean of each sample under a specific band. This step was implemented
on the software ENVI 5.1, mainly through the ROI Tool of the ENVI software.
The figure below shows the extraction of the ROI area of the TVC cooked beef sample in ENVI5.1 and the spectral value obtained.

(2) TVB-N sample ROI and spectrum extraction
The ROI region extraction process is the same as that of the TVC sample data in the previous paragraph. The ROI region of 50px*50px is also obtained to predict the cooked beef sample of TVB-N. It can be seen that there are certain differences in the spectral curves of the two batches of cooked beef samples (it is estimated that the two batches of Daoxiangcun cooked beef products were purchased at a long interval, which may be caused by different beef varieties). Similarly, this step for the TVB-N cooked beef sample is also implemented on the software ENVI5.1.
The figure below shows TVB-N extracting the ROI area in ENVI5.1 and obtaining the sample spectral value.

Spectral preprocessing results
The spectral information of the cooked beef sample for predicting TVC was preprocessed (in the order of S-G smoothing, vector normalization and SNV transformation). The original spectrum of the spectral information and the spectrum preprocessing result are shown in the figure below.

The same preprocessing method as that used for the cooked beef sample for predicting TVC in the previous paragraph is used to preprocess the spectral information of the hyperspectral data of the sample for predicting TVB-N value. The original spectrum and the spectrum after preprocessing are shown in the figure below:

A ten-fold cross-validation model of support vector regression (SVR) was established for the spectral data before and after preprocessing. The model performance is shown in the table and the modeling results are shown in the figure. This method is implemented in the multivariate data analysis software TheUnscrambler X10.4. The SVR method and its model performance indicators will be introduced in Section 4.1 and will not be described in detail here.
As can be seen from the table, the performance of the prediction models of the two indicators established by the preprocessed spectra has improved to a certain extent. The performance correlation coefficient R of the prediction model for TVC has increased by 16 percentage points, while the performance correlation coefficient R of the prediction model for TVB-N has increased by 9 percentage points. This verifies the necessity of spectral preprocessing, so the subsequent analysis uses the preprocessed data.


Summary and Outlook
In order to achieve rapid and non-destructive detection of the freshness of cooked meat products, this paper takes cooked beef as the research object and uses hyperspectral imaging technology to create a prediction model for the freshness of cooked beef. The changes in the freshness of cooked beef during storage and the main factors affecting the freshness of cooked beef were studied, and the microbial index TVC value and chemical index TVB-N value related to it were determined. The specific research conclusions are as follows: The possibility of using hyperspectral imaging technology to detect the freshness of cooked beef was studied, and the change trend of the freshness index TVC and TVB-N value TVC of cooked beef during storage was discussed; the performance of the SVR prediction model (using ten-fold cross validation) built before and after spectral data preprocessing was compared, and the prediction model built with the preprocessed data set had better performance; the sample set partitioning method was studied. The training set and test set generated by different sample partitioning methods were modeled and analyzed, and finally the training set and test set divided by the SPXY partitioning method were selected.