Meat product quality detection device and method based on hyperspectral and near-infrared fusion
1. The meat product quality detection equipment based on hyperspectral and near-infrared fusion is characterized by comprising a variable-speed rotating motor, a conveyor belt, a high-definition imaging spectrometer, a near-infrared spectrometer, an imageable light source, an image sensor, a temperature sensor and a control center; the high-definition imaging spectrometer, the near-infrared spectrometer, the imageable light source, the image sensor and the temperature sensor are positioned above one end of the conveyor belt; placing a sample to be detected on a conveyor belt, and driving the conveyor belt to rotate by a variable-speed rotating motor; after the image sensor detects that a sample enters the detection area, the imaging light source is started, the high-definition imaging spectrometer and the near infrared spectrometer perform data acquisition on the sample to be detected and transmit the acquired data to the control center for data analysis.
2. The meat product quality detection device based on hyperspectral and near-infrared fusion of claim 1, further comprising a six-axis joint mechanical arm and a high-pressure cleaning sprayer, wherein the six-axis joint mechanical arm and the high-pressure cleaning sprayer are located above the other end of the conveyor belt, and the six-axis joint mechanical arm is provided with a disinfectant nozzle.
3. The meat product quality detection device based on the fusion of the hyperspectral and the near infrared as well as the claim 1 is characterized in that a track suspension is further arranged above the conveyor belt, a track robot is arranged on the track suspension and can slide back and forth on the track suspension, and the high-definition imaging spectrometer, the image sensor and the temperature sensor are fixed on the track robot.
4. The meat product quality detection device based on the hyperspectral and near-infrared fusion as claimed in claim 3, characterized by comprising an elevating mechanism, wherein the upper end of the elevating mechanism is positioned on a rail suspension, a rail robot is fixed at the lower end of the elevating mechanism, the elevating mechanism can slide back and forth on the rail suspension, and the rail robot can slide back and forth under the driving of the elevating mechanism and can ascend or descend along with the expansion and contraction of the elevating mechanism.
5. The meat product quality detection device based on the fusion of the hyperspectral technology and the near infrared technology as claimed in claim 1, further comprising a wireless router, wherein the wireless router is in signal connection with the control center.
6. A meat product quality detection method based on hyperspectral and near-infrared fusion is characterized by comprising the following steps:
s1: establishing a hyperspectral image prediction model of the meat product through scanning of the rail robot, opening a spectrometer for full preheating before data acquisition, and performing spectrum correction after acquiring hyperspectral images;
s2: after collecting hyperspectral data of a meat product sample, determining a volatile basic nitrogen TVB-N physicochemical value and a total bacterial count TVC;
s3: acquiring a hyperspectral image interesting region of a sample, and obtaining a sample image with background and shadow removed through binarization processing; and then, removing redundant bright spots by adopting wave band addition operation to obtain region-of-interest extracted spectral data, and combining Q residual error boundary with Hotelling T2Removing abnormal spectra from the boundary; and (3) dividing freshness into three types of freshness, sub-freshness and putrefaction for the hyperspectral image sample of the meat product used for establishing the prediction model through an SVM algorithm according to the TVB-N value.
7. The method as claimed in claim 6, wherein near infrared spectrum scanning is performed on the sample, the operating waveband of the near infrared spectrometer is between 1100 and 2500nm, and after the near infrared spectrum scanning and the temperature sensor measurement, the MSC can effectively eliminate the spectrum difference caused by different scattering levels by adopting mean value centralization and multivariate scattering correction, thereby enhancing the correlation between the spectrum and the data.
8. The method of claim 6, wherein the ideal spectrum is an average of the data of all spectra:
and carrying out unary linear regression processing on the sample spectrum and the ideal spectrum, and solving a least square method to obtain the translation amount and the offset of the sample:
subtracting the obtained translation amount and dividing by the offset amount to obtain a corrected spectrum:
after the required spectrum is obtained, Savitzky-Golay convolution smoothing filtering is used, the smoothness of the spectrum is improved, the interference of noise is reduced, and the first derivative is used for performing baseline correction and spectrum resolution preprocessing on the spectrum; through a competitive self-adaptive re-weighting algorithm and a genetic algorithm, GA searches for an optimal spectral characteristic wavelength variable by simulating natural selection of Darwin biological evolution theory and a biological evolution process of a genetic mechanism, secondary screening is carried out by combining a continuous projection algorithm, a characteristic wavelength which plays an important role in judging freshness of meat products is found, and the detection accuracy is improved.
9. The method according to claim 6, characterized in that the hyperspectral and near infrared spectra are subjected to information fusion processing, the data read by each sensor are comprehensively and reasonably applied, normalization processing is performed on the data before analysis, the spectral data values obtained by the two spectral detection techniques are normalized to be between 0 and 1, wherein the adopted normalization expression is shown as a formula:
wherein X represents raw data without normalization, XmaDenotes data maximization, XmiIt is shown that the data is minimized,
Xnrepresenting normalized data, XnHas a data value of [0,1 ]]In the meantime.
Background
Along with the rapid development of economy, the living standard of people is continuously improved, the eating quantity of meat products is also continuously increased, higher requirements are provided for the product quality of the meat products, meat product production and processing enterprises carry out strict detection and control on raw materials and semi-finished products in order to guarantee the product quality, the meat products are priced according to quality classification, and the profits of the enterprises are maximized.
The traditional meat product detection is usually measured from the aspects of meat color, tenderness and the like, and detection is realized through modes such as chemistry, physics, taste and the like, but a large amount of time is spent in the detection process to train quality testing personnel, the detection result has strong subjectivity and large error, and meanwhile, the meat product can be damaged in the detection process.
The hyperspectral image detection technology can acquire two-dimensional images of wavelength points of the meat products and spectral images of all the points, can realize simultaneous detection of the inside and the outside of the meat products under the conditions of no destructiveness, no pollution and spectrum integration, and can be fully applied to agricultural and livestock products.
The near-infrared light refers to electromagnetic waves between visible light and mid-infrared light, the wavelength range is 700-2500 nm, the near-infrared spectral region is consistent with the frequency combination of vibration of hydrogen-containing groups (O-H, N-H, C-H) in organic molecules and the absorption region of each level of frequency multiplication, characteristic information of the hydrogen-containing groups in the organic molecules in the samples can be obtained by scanning the near-infrared spectrum of the samples, and the near-infrared spectrum technology for analyzing the samples has the advantages of convenience, rapidness, high efficiency, accuracy, lower cost, no damage to the samples, no consumption of chemical reagents, no environmental pollution and the like, so the technology is favored by more and more people.
Disclosure of Invention
The invention provides equipment for improving data analysis accuracy by a hyperspectral and near infrared spectrum information fusion data analysis method, and the equipment is used for improving efficiency by acquiring hyperspectrum by using an orbital robot, comprehensively analyzing and visualizing data by depending on a large data platform, and improving the reliability of the operation of the whole set of equipment so as to solve the problems of low spectrum acquisition efficiency, poor data accuracy and the like in the existing meat product detection.
In order to achieve the above purpose, the technical scheme of the invention is as follows:
the meat product quality detection equipment based on hyperspectral and near-infrared fusion comprises a variable-speed rotating motor, a conveyor belt, a high-definition imaging spectrometer, a near-infrared spectrometer, an imageable light source, an image sensor, a temperature sensor and a control center; the high-definition imaging spectrometer, the near-infrared spectrometer, the imageable light source, the image sensor and the temperature sensor are positioned above one end of the conveyor belt; placing a sample to be detected on a conveyor belt, and driving the conveyor belt to rotate by a variable-speed rotating motor; after the image sensor detects that a sample enters the detection area, the imaging light source is started, the high-definition imaging spectrometer and the near infrared spectrometer perform data acquisition on the sample to be detected and transmit the acquired data to the control center for data analysis.
Furthermore, the device also comprises a six-axis joint mechanical arm and a high-pressure cleaning spray head, wherein the six-axis joint mechanical arm and the high-pressure cleaning spray head are positioned above the other end of the conveyor belt, and a disinfectant nozzle is arranged on the six-axis joint mechanical arm.
Further, the conveyer belt top still has the track suspension, has the track robot on the track suspension, and the track robot can make a round trip to slide on the track suspension, and high definition imaging spectrometer, image sensor, temperature sensor fix on the track robot.
Further, well including elevating system, the elevating system upper end is located the track suspension, and the track robot is fixed at the elevating system lower extreme, and elevating system can make a round trip to slide on the track suspension, and the track robot makes a round trip to slide and can rise or descend along with elevating system's flexible under elevating system's drive.
Furthermore, the system also comprises a wireless route which is in signal connection with the control center.
The invention also provides a meat product quality detection method based on hyperspectral and near-infrared fusion, which comprises the following steps:
s1: establishing a hyperspectral image prediction model of the meat product through scanning of the rail robot, opening a spectrometer for full preheating before data acquisition, and performing spectrum correction after acquiring hyperspectral images;
s2: after collecting hyperspectral data of a meat product sample, determining a volatile basic nitrogen TVB-N physicochemical value and a total bacterial count TVC;
s3: interested area of hyperspectral image of sampleObtaining a domain, namely obtaining a sample image with background and shadow removed through binarization processing; and then, removing redundant bright spots by adopting wave band addition operation to obtain region-of-interest extracted spectral data, and combining Q residual error boundary with Hotelling T2Removing abnormal spectra from the boundary; and (3) dividing freshness into three types of freshness, sub-freshness and putrefaction for the hyperspectral image sample of the meat product used for establishing the prediction model through an SVM algorithm according to the TVB-N value.
Furthermore, near infrared spectrum scanning is carried out on the sample, the working waveband of the near infrared spectrometer is 1100-2500 nm, mean value centralization and multivariate scattering correction are adopted after near infrared spectrum scanning and temperature sensor measurement, and MSC can effectively eliminate spectrum difference caused by different scattering levels, so that the correlation between the spectrum and data is enhanced.
Further, the ideal spectrum is obtained by averaging the data of all spectra:
and carrying out unary linear regression processing on the sample spectrum and the ideal spectrum, and solving a least square method to obtain the translation amount and the offset of the sample:
subtracting the obtained translation amount and dividing by the offset amount to obtain a corrected spectrum:
after the required spectrum is obtained, Savitzky-Golay convolution smoothing filtering is used, the smoothness of the spectrum is improved, the interference of noise is reduced, and the first derivative is used for performing baseline correction and spectrum resolution preprocessing on the spectrum; through a competitive self-adaptive re-weighting algorithm and a genetic algorithm, GA searches for an optimal spectral characteristic wavelength variable by simulating natural selection of Darwin biological evolution theory and a biological evolution process of a genetic mechanism, secondary screening is carried out by combining a continuous projection algorithm, a characteristic wavelength which plays an important role in judging freshness of meat products is found, and the detection accuracy is improved.
Further, information fusion processing is carried out on the hyperspectral and near infrared spectrums, data read by each sensor is comprehensively and reasonably applied, normalization processing is carried out on the data before analysis, spectrum data values obtained by the two spectrum detection technologies are normalized to be 0-1, and the adopted normalization expression is shown as a formula:
wherein X represents raw data without normalization, XmaDenotes data maximization, XmiIt is shown that the data is minimized,
Xnrepresenting normalized data, XnHas a data value of [0,1 ]]In the meantime.
Compared with the prior art, the invention has the beneficial technical effects that:
compared with the prior art, the invention has the advantages that:
firstly, the method comprises the following steps: accurate, quick, the low-power consumption short-term test in the meat products testing process is realized through track robot, and whole operation process is simple high-efficient, feeds back the detection information in real time through PC end 3D simulation trail chart, improves the inside fault-tolerant rate of equipment, provides the device machine learning database through big data platform to can realize that data analysis is visual by the web procedure, establish the basis for follow-up equipment development, provide effective reliable data.
Secondly, the method comprises the following steps: the modeling accuracy is improved by optimizing a plurality of hyperspectrums, the accuracy of a correction set and a verification set of the model is optimized, dynamic changes of partial sub-groups in the refrigerated meat product can be sensed by the near infrared spectrum, the analysis and detection speed of the device is improved, and a foundation is laid for the research and development of subsequent machines.
Thirdly, the method comprises the following steps: through the information fusion analysis of the hyperspectral and near infrared spectrums, a feature layer fusion model is established, the refrigerated and fresh meat products can be rapidly distinguished, the established discrimination model can be obviously improved, the information amount is small, the modeling efficiency is high, the model performance is good, the multi-source information can be detected, combined and evaluated after the information fusion, and the accuracy of the judgment of freshness of the meat products by equipment is improved.
Drawings
FIG. 1 is a flow chart of the operation of the present invention;
FIG. 2 is a schematic view of the structure of the detecting unit of the present invention;
FIG. 3 is a schematic view of a hyperspectral detection procedure;
FIG. 4 is a flow chart of a fusion of near infrared spectroscopy and hyperspectral spectroscopy;
in the figure: 1-a mechanical arm; 2-high pressure cleaning the spray head; 3-a variable speed rotating electrical machine; 4-a rail suspension; 5-clear imaging spectrometer; 6-near infrared spectrometer; 7-a light source; 8-a wireless routing processor; 9-a lifter; 10-an image sensor; 11-a conveyor belt; 12-an orbital robot; 13-temperature sensor.
The specific implementation mode is as follows:
the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
as shown in figure 1, the invention comprises a six-axis joint mechanical arm 1, a high-pressure cleaning spray head 2, a variable-speed rotating motor 3, a track suspension 4, a high-definition imaging spectrometer 5, a near-infrared spectrometer 6, an imaging light source 7, a wireless routing processor 8, a lifter 9, an image sensor 10, a conveyor belt 11, a track robot 12, a track robot 13 and a temperature sensor. Carry out aseptic disinfection through 1 six joint manipulator arm to operational environment before the equipment operation, high definition camera 5 is fixed on track robot's track, connects through lift 9, and image sensor 10 detects when having the sample access device, but imaging light source 7 begins work and provides required light source, and the sample transmits through 3 variable speed rotating electrical machines control conveyer belt 11, and 2 is the high pressure cleaning shower nozzle, washs the conveyer belt. And (4) carrying out data analysis on the data transmission belt control center detected by the hyperspectral and near-infrared spectrometer 6 through an 8-wireless routing processor.
In order to make the advantages of the present invention clearer, the present embodiment further describes the design of the present invention with reference to specific embodiments, and the present embodiment uses pork carcass as an experimental subject to detect freshness, PH, tenderness, etc.
The implementation process of this embodiment is as follows: after equipment reaches sterile environment and the ventilation finishes, but by the formation of image light source 7 provide the detection light source, high definition imaging spectrometer carries on track robot 12, track robot can the free motion on hanging in equipment, automated inspection and navigation self movement track, according to the operation of other equipment of control such as the sample size that the transmission came in, be connected with external control room through wireless routing, the transmission detects the content and takes notes track robot movement track. The method comprises the steps of simulating a virtual 3D track minimap and actual monitoring contents through a central control screen display equipment scene, displaying the position of a track robot in real time, as shown in figure 1, wherein 3 is a display area of the whole 3D virtual map, 1 is a track robot operation simulation track which is scaled in a mode different from the actual track in design, 2 is the real-time position of the track robot in the track, 4 is the display of the equipment state of the track robot, including the operation speed, the operation state control option (manual and automatic), the automatic alarm emergency starting option and the range of the whole operation track, carrying out overall monitoring on the equipment through the 3D track minimap, displaying the actual operation condition of the point according to the touched position through a mouse or a physical touch screen, carrying out full-automatic operation of the track robot according to an image sensor and a GPS positioning system carried by the mouse or the central control console, carrying out full-automatic operation on the track robot, And a series of manual operations such as stopping and the like are carried out, the track robot is provided with automatic alarm equipment, and the machine breaks down and feeds back to the control center in time, so that zero-error accurate positioning and acquisition are realized.
Furthermore, a hyperspectral image prediction model of the meat product is established through scanning of the rail robot, the spectrometer is started to be fully preheated 20 minutes in advance before data acquisition, and the hyperspectral image is acquired to perform spectrum correction.
Furthermore, after the hyperspectral data of the meat product sample are collected, the volatile basic nitrogen TVB-N physicochemical value is determined by referring to GB/T5009.44, and the total bacterial count TVC is determined by referring to GB4789.2 in 2016.
Further, acquiring a hyperspectral image interesting region of the sample, and obtaining the sample image without the background and the shadow through binarization processing. And then, adopting wave band addition operation to remove redundant bright spots to obtain spectral data extracted from the region of interest, wherein in the model prediction process, the accuracy of the detection result is influenced by abnormal light spots, so that Q residual error boundary is adopted in combination with Hotelling T2And boundary rejecting abnormal spectrum. And (3) dividing freshness into three types of freshness, sub-freshness and putrefaction for the hyperspectral image sample of the meat product used for establishing the prediction model by an SVM algorithm according to the TVB-N value. Through the final optimal model established by the optimal 8 spectrums, the quick and accurate detection of the freshness grade of the meat can be realized by adopting multiple spectrum modeling.
Furthermore, near infrared spectrum scanning is carried out on the sample, the working waveband of the near infrared spectrometer is 1100-2500 nm, mean value centralization (MC) and Multivariate Scattering Correction (MSC) are adopted after near infrared spectrum scanning and temperature sensor measurement, and the MSC can effectively eliminate spectrum difference caused by different scattering levels, so that the correlation between the spectrum and the data is enhanced. The method corrects baseline shift and shift phenomena of the spectral data by the ideal spectrum.
The ideal spectrum is the average of the data for all spectra:
and carrying out unary linear regression processing on the sample spectrum and the ideal spectrum, and solving a least square method to obtain the translation amount and the offset of the sample:
subtracting the obtained translation amount and dividing by the offset amount to obtain a corrected spectrum:
after the required spectrum is obtained, Savitzky-Golay convolution smoothing filtering (S-G) is used for improving the smoothness of the spectrum and reducing the interference of noise, and the first derivative (1D) is used for carrying out baseline correction and spectrum resolution preprocessing on the spectrum. The spectrum is pretreated by the method, so that the influence of an acquisition system and an external test environment is reduced, and the detection sensitivity is improved under the condition of low content of hydrogen-containing groups; through a competitive adaptive re-weighting algorithm (CARS) and a Genetic Algorithm (GA), the GA searches for an optimal spectral characteristic wavelength variable by simulating natural selection of a Darwin biological evolution theory and a biological evolution process of a genetic mechanism, and performs secondary screening by combining a continuous projection algorithm (SPA), so that a characteristic wavelength which plays an important role in judging freshness of meat products is searched, and the detection accuracy is improved.
Performing information fusion processing on the hyperspectral and the near infrared spectrum, comprehensively and reasonably applying data read by each sensor, considering that the hyperspectral waveband and the near infrared spectrum waveband are in different spectral ranges, performing normalization processing on the hyperspectral and near infrared spectrum wavebands before analysis, and normalizing the spectral data values obtained by the two spectrum detection technologies to 0-1, wherein the adopted normalization expression is shown as a formula:
wherein X represents raw data without normalization, XmaDenotes data maximization, XmiIt is shown that the data is minimized,
Xnrepresenting normalized data, XnHas a data value of [0,1 ]]In the meantime.
Furthermore, the track robot transmits the measured data to a control center through WIFI communication, each data is collected and stored through an open source framework flume, irrelevant data is removed, on the basis of the basic data, a mapredute program is customized and developed to operate a hadoop cluster, an analysis algorithm relevant to the data is selected, the freshness data is modeled, valuable data are separated from the data through a KNN algorithm and an SVM algorithm, the established data model is deployed and applied to the production flow, the data is deeply mined, and finally the big data is visually presented through a customized relevant web program.
Carry out the quality that the aassessment reachd the meat products this moment through big data platform to meat, but variable speed conveyer belt 3 adjusts self rotational speed simultaneously, and rotational speed level 1 corresponds fresh, rotational speed level 2 corresponds fresh, rotational speed level 3 corresponds putrefaction, detects corresponding speed through speed sensor, opens different transfer passage, carries out categorised conveying in the exit of whole device.
While certain exemplary embodiments of the present invention have been described above by way of illustration only, the described embodiments may be modified in various different ways without departing from the spirit and scope of the present invention. Accordingly, the drawings and description are illustrative in nature and not intended to limit the present application. Various modifications and changes may occur to those skilled in the art.