CPC G01N 33/12 (2013.01) [G06T 7/0006 (2013.01); G01J 3/2823 (2013.01); G01N 2001/2893 (2013.01); G01N 21/359 (2013.01); G01N 2021/8845 (2013.01); G01N 2021/8883 (2013.01); G06T 2207/30128 (2013.01)] | 8 Claims |
1. A method for identifying raw meat and high-quality fake meat based on a gradual linear array change of a component, specifically comprising the following steps:
step 1: construction of an identification model based on a gradual linear array change of a sectional component, which comprises the following substeps:
S1: cutting meat longitudinally or transversely to obtain a longitudinal or transverse section of the meat, the meat comprising raw meat and high-quality fake meat; and specifically providing b raw meat samples and c high-quality fake meat samples, and randomly separating the samples into a calibration set and a prediction set according to a ratio of d:1, b, c and d each are a positive integer;
S2: imaging, by using a visible or/and near-infrared hyperspectral imaging system, the section of the meat processed in S1 to obtain an M*N*W three-dimensional hyperspectral image, wherein M and N each represent a number of rows and a number of columns for image pixels at a single wavelength, and W represents a number of wavelengths of the hyperspectral image;
S3: performing independent component analysis on the 3D hyperspectral image obtained in S2 and corresponding to the section of the meat to obtain first n independent component images, IC-1, IC-2, ..., IC-(n-1) and IC-n, corresponding to the hyperspectral image for the section of the meat, wherein n is a positive integer smaller than or equal to the W;
S4: defining, with a central position of an independent component image IC-i (i∈[1, n]) obtained in S3 as a center O-i having a coordinate of (Int(M/2), Int(N/2)), a circular region having a radius of r pixels as a feature extraction region R-i; defining, in the feature extraction region R-i, a polar coordinate system with the O-i as a polar point, a horizontal ray as a polar axis Ox, a pixel as a unit length and a counterclockwise direction as a positive direction, and determining, with the polar coordinate system on the independent component image IC-i, q feature extraction segment endpoints Q-i-j having a coordinate of (r, 360*(j-1)/q), wherein j∈[1, q]; Int(M/2) represents rounding on M/2, and Int(N/2) represents rounding on N/2; q is an integer greater than 1; and r is a positive integer not greater than min(Int(M/2), Int(N/2));
S5: respectively connecting, with the polar point O-i in the independent component image IC-i in S4 as a start point, the feature extraction segment endpoints Q-i-j by using a line having a width of one pixel to obtain q feature extraction segments OQ-i-j in the independent component image IC-i;
S6: respectively converting an image covered by the q feature extraction segments OQ-i-j in the independent component image IC-i in S5 into a row vector AOQ-i-j; and taking a derivative of the row vector by viewing a pixel intensity in the row vector AOQ-i-j as a function varying with a pixel point to obtain a first-order derivative vector AOQ′-i-j and a second-order derivative vector AOQ″-i-j corresponding to the AOQ-i-j;
S7: counting a gradual linear array change B-i corresponding to the independent component image IC-i with a value a as a determination threshold, wherein B-i is a number of elements each having an absolute value greater than or equal to the threshold a in the q derivative vectors AOQ′-i-j corresponding to the independent component image IC-i and AOQ″-i-j=0, namely, |AOQ′-i-j ≥a and AOQ″-i-j=0 are met at the same time; and
the determination threshold a=|AOQ′-i-j|max*η, 0<η<1, and |AOQ′-i-j|max is a maximum value in absolute values of elements in the first-order derivative vectors AOQ′-i-j of the q feature extraction segments corresponding to the independent component image IC-i;
S8: establishing a 1*n matrix C for storing gradual linear array changes B-i (i∈[1, n]) corresponding to the n independent component images, wherein a gradual linear array change B-i corresponding to an ith independent component image is stored in C(1, i) for construction of the identification model; and a gradual linear array change dataset corresponding to a calibration set in the n independent component images is labeled as C_cal and a gradual linear array change dataset corresponding to a prediction set is labeled as C_pre; and
S9: onstructing the identification model: constructing, with a reference value 1 as raw meat and a reference value 0 as high-quality fake meat, a reference value dataset Y_cal corresponding to the calibration set and a reference value dataset Y_pre corresponding to the prediction set; constructing the identification model for the raw meat and the high-quality fake meat in combination with the feature dataset C_cal of the calibration set and the feature dataset C_pre of the prediction set in S8; and taking a correct identification rate R of the prediction set as an indicator for measuring performance of the identification model, and labeling a corresponding identification model as Yin response to R≥60%, wherein Y=F(n,a)(X) , X is gradual linear array change datasets corresponding to all independent component images of each sample, n is a positive integer smaller than or equal to W, and a is the determination threshold; and
step 2: identification of a meat sample to be tested, which comprises the following sub steps:
S1: acquiring a hyperspectral image corresponding to the meat sample to be tested, and extracting, according to substeps S1 to S8 in step 1, a gradual linear array change dataset C_uk corresponding to the meat sample to be tested; and
S2: substituting the C_uk into the identification model Y=F(n,a)(X) in S9 of step 1 to calculate a reference value corresponding to the sample to be tested, wherein when the reference value predicted by the model is 1, the sample to be tested is the raw meat; and when the reference value predicted by the model is 0, the sample to be tested is the high-quality fake meat, thereby implementing the identification on the meat sample to be tested.
|