CN110658156A - Near infrared spectrum feature extraction method and device - Google Patents
Near infrared spectrum feature extraction method and device Download PDFInfo
- Publication number
- CN110658156A CN110658156A CN201910968375.XA CN201910968375A CN110658156A CN 110658156 A CN110658156 A CN 110658156A CN 201910968375 A CN201910968375 A CN 201910968375A CN 110658156 A CN110658156 A CN 110658156A
- Authority
- CN
- China
- Prior art keywords
- data
- dimensional
- near infrared
- infrared spectrum
- feature extraction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000002329 infrared spectrum Methods 0.000 title claims abstract description 71
- 238000000605 extraction Methods 0.000 title claims abstract description 60
- 238000000034 method Methods 0.000 claims abstract description 20
- 238000001228 spectrum Methods 0.000 claims abstract description 18
- 238000007781 pre-processing Methods 0.000 claims abstract description 10
- 230000003595 spectral effect Effects 0.000 claims description 35
- 238000011176 pooling Methods 0.000 claims description 31
- 238000009499 grossing Methods 0.000 claims description 28
- 238000010521 absorption reaction Methods 0.000 claims description 24
- 238000013527 convolutional neural network Methods 0.000 claims description 22
- 238000013507 mapping Methods 0.000 claims description 21
- 239000000126 substance Substances 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 8
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000005520 cutting process Methods 0.000 claims description 6
- 238000002835 absorbance Methods 0.000 claims description 5
- 230000009466 transformation Effects 0.000 claims description 5
- 238000012216 screening Methods 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 description 23
- 238000001514 detection method Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000001537 neural effect Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 238000003860 storage Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000009659 non-destructive testing Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 239000003208 petroleum Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
- G01N21/35—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
- G01N21/359—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light
Abstract
The invention discloses a near infrared spectrum feature extraction method and a device, wherein the method comprises the following steps: obtaining N samples to be detected; acquiring near infrared spectrum data of N samples to be detected by using a spectrometer; preprocessing the near infrared spectrum data to obtain two-dimensional near infrared spectrum smooth data; arranging and converting the two-dimensional near infrared spectrum smooth data to obtain four-dimensional spectrogram data; extracting the features of the four-dimensional spectrogram data; performing feature arrangement on the four-dimensional spectrogram data after feature extraction to obtain two-dimensional feature data; the invention has the advantages that: the integrity of data can be guaranteed, the features can be extracted in a full spectrum interval, and information cannot be lost.
Description
Technical Field
The invention relates to the field of pattern recognition and nondestructive testing, in particular to a near infrared spectrum feature extraction method and device.
Background
The near infrared spectrum analysis technology is an analysis method for realizing qualitative and quantitative rapid detection of a detection object by utilizing the optical characteristics of chemical substances in a near infrared spectrum interval, and has the advantages of less sample consumption, no damage to samples, high analysis speed, low detection cost, no waste pollution and the like which cannot be compared with the conventional detection and analysis methods. Through technical development and improvement for many years, the technology is widely applied to the national important production fields of agriculture, petroleum, medicine, chemical industry, food and the like. With the continuous development of market economy and the improvement of quality of life standards in China, the requirements of international markets and general consumers on product quality are continuously improved, the traditional analysis method mainly based on chemical inspection cannot meet the market requirements and the requirements of people due to the defects of time consumption, pollution and the like, and the near infrared spectrum analysis method replacing the traditional detection analysis method can realize the rapid and nondestructive detection of samples. However, the data obtained while ensuring the integrity of the sample are generally high dimensional data, and the existing analysis methods have the following disadvantages:
(1) there is a high degree of dependency on the analysis objects. The existing feature extraction algorithm has different effects according to the characteristics of an analysis object and acquired data, and is specifically embodied in that all analysis methods have no universality and only can act on the analysis object with one or more data structures, and when the change frequency of a detection object is high, the effectiveness of the existing analysis method cannot be ensured;
(2) the feature data integrity is low. The integrity of the characteristic data determines the effectiveness, stability and comprehensiveness of the established model, the existing analysis method can only realize selection or data compression on a low-beam spectrum data interval, and cannot realize characteristic extraction on a full-spectrum interval, so that the integrity of final modeling data cannot be ensured, and the existing analysis model is difficult to optimize.
(3) The feature extraction result has limitations. The existing feature extraction algorithm is based on finding data correlation in a linear space, and the nonlinear features of the low-beam spectrum data cannot be effectively analyzed. When the number of samples of the low-beam spectrum data is smaller than the data dimension, the existing nonlinear kernel function topological method can make the hyperplane data dimension lower than the original data dimension, so that the information is lost.
Chinese patent publication No. CN108446631A discloses an intelligent spectrogram analysis method based on deep learning of convolutional neural network, which obtains a spectral image set to be analyzed; preprocessing a frequency spectrum image; training a Convolutional Neural Network (CNN) module; inputting the required frequency spectrum image into the trained CNN for feature extraction and performance analysis; and outputting the result. The method solves the problem that the model structure is not universal due to the fact that the data dimensionality in the processed spectrum data is too high or uncertain. However, the spectrum image is input, and the two-dimensional data sample cannot be analyzed, so that the two-dimensional data sample is easy to lose, the characteristic extraction of a full spectrum interval cannot be realized, and the integrity of final data cannot be guaranteed.
Disclosure of Invention
The technical problem to be solved by the invention is how to provide a near infrared spectrum feature extraction method and device which have high data integrity and extract features of a full spectrum interval.
The invention solves the technical problems through the following technical means: a method of near infrared spectral feature extraction, the method comprising:
obtaining N samples to be detected;
acquiring near infrared spectrum data of N samples to be detected by using a spectrometer;
preprocessing the near infrared spectrum data to obtain two-dimensional near infrared spectrum smooth data;
arranging and converting the two-dimensional near infrared spectrum smooth data to obtain four-dimensional spectrogram data;
extracting the features of the four-dimensional spectrogram data;
and performing feature arrangement on the four-dimensional spectrogram data after feature extraction to obtain two-dimensional feature data.
The near infrared spectrum data are converted into the four-dimensional spectrogram data, the four-dimensional spectrogram data are used as input variables for feature extraction, the data integrity is guaranteed, the nonlinear feature extraction of a full-spectrum interval is realized, the problem that the feature information of the existing analysis method is lost is solved, the effective information of a sample is increased, and the accuracy of a system is improved.
Preferably, the preprocessing the near infrared spectrum data to obtain two-dimensional near infrared spectrum smooth data includes: constructing a local model with the length of 2 lambda +1 of the current sample to be detected
According to the local model, acquiring an absorption rate model corresponding to the local model
Wherein, XtIs the wavelength of the central point of the current sample to be measured at the moment t, YtIs XtThe corresponding absorption rate;
scaling and mapping the local interval [ t-lambda, t + lambda ] to the interval [ -1,1], and obtaining the weight function of the local interval
Wherein x is*Is composed ofScaling mapping to the interval [ -1,1 []The latter value is then used to determine the value,
XtCorresponding smoothed data of absorption rate
Repeating the steps, smoothing all the absorbances corresponding to the M wavelengths in each sample to obtain the smooth data of the NxM two-dimensional near infrared spectrum
Preferably, the obtaining of the four-dimensional spectrogram data by arranging and converting the two-dimensional near infrared spectrum smooth data includes: smoothing the NxM two-dimensional near infrared spectrum dataTaking M as an axis, cutting step length a, arranging into b rows so as to smooth the two-dimensional near infrared spectrum dataConversion to a × b × N three-dimensional spectral dataConverting three-dimensional spectral data into four-dimensional spectrogram data through mapping relation f
Wherein the content of the first and second substances,for the converted four-dimensional spectrogram data, r is a spectral data step interval, r' is an RGB step interval, Dic is an RGB dictionary,
wherein the content of the first and second substances,r is the pixel resolution, Ψ1=[0 r' 2r'…127]T,Ψ2=[128 128+r' 128+2r'…255]T。
Preferably, the feature extraction of the four-dimensional spectrogram data includes: taking four-dimensional spectrogram data as an input layer of a convolutional neural network, performing operation according to the sequence of convolution, pooling, convolution and pooling … … through L convolutional layers and pooling layers to obtain spectrogram features, and completing feature extraction of the four-dimensional spectrogram data, wherein each convolutional layer C is connected with a convolutional layer C, and each convolutional layer C is connected with a convolutional layer C through a filteriComprisesDimension ofThe input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension ofThe pooling window of (a).
Preferably, the performing feature arrangement on the four-dimensional spectrogram data after feature extraction to obtain two-dimensional feature data includes: and performing feature arrangement on the spectrogram features in an inverse transformation mode to obtain two-dimensional feature data.
An apparatus for near infrared spectral feature extraction, the apparatus comprising:
the screening module is used for acquiring N samples to be detected;
the spectrum data acquisition module is used for acquiring near infrared spectrum data of the N samples to be detected by using a spectrometer;
the smoothing processing module is used for preprocessing the near infrared spectrum data to obtain two-dimensional near infrared spectrum smoothing data;
the four-dimensional spectrogram data acquisition module is used for acquiring four-dimensional spectrogram data by arranging and converting the two-dimensional near infrared spectrum smooth data;
the characteristic extraction module is used for extracting the characteristics of the four-dimensional spectrogram data;
and the feature arrangement module is used for carrying out feature arrangement on the four-dimensional spectrogram data after feature extraction to obtain two-dimensional feature data.
Preferably, the smoothing module is further configured to: constructing a local model with the length of 2 lambda +1 of the current sample to be detected
According to the local model, acquiring an absorption rate model corresponding to the local model
Wherein, XtIs the wavelength of the central point of the current sample to be measured at the moment t, YtIs XtThe corresponding absorption rate;
scaling and mapping the local interval [ t-lambda, t + lambda ] to the interval [ -1,1], and obtaining the weight function of the local interval
Wherein x is*Is composed ofScaling mapping to the interval [ -1,1 []The latter value is then used to determine the value,
Repeating the steps, smoothing all the absorbances corresponding to the M wavelengths in each sample to obtain the smooth data of the NxM two-dimensional near infrared spectrum
Preferably, the four-dimensional spectrogram data acquiring module is further configured to: smoothing the NxM two-dimensional near infrared spectrum dataTaking M as an axis, cutting step length a, arranging into b rows so as to smooth the two-dimensional near infrared spectrum dataConversion to a × b × N three-dimensional spectral dataConverting three-dimensional spectral data into four-dimensional spectrogram data through mapping relation f
Wherein the content of the first and second substances,for the converted four-dimensional spectrogram data, r is a spectral data step interval, r' is an RGB step interval, Dic is an RGB dictionary,
wherein the content of the first and second substances,r is the pixel resolution, Ψ1=[0 r' 2r'…127]T,Ψ2=[128 128+r' 128+2r'…255]T。
Preferably, the feature extraction module is further configured to: taking four-dimensional spectrogram data as an input layer of a convolutional neural network, performing operation according to the sequence of convolution, pooling, convolution and pooling … … through L convolutional layers and pooling layers to obtain spectrogram features, and completing feature extraction of the four-dimensional spectrogram data, wherein each convolutional layer C is connected with a convolutional layer C, and each convolutional layer C is connected with a convolutional layer C through a filteriComprisesDimension ofThe input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension ofThe pooling window of (a).
Preferably, the feature arrangement module is further configured to: and performing feature arrangement on the spectrogram features in an inverse transformation mode to obtain two-dimensional feature data.
The invention has the advantages that:
(1) the near infrared spectrum data are converted into four-dimensional spectrogram data, the four-dimensional spectrogram data are used as input variables for feature extraction, the data integrity is guaranteed, meanwhile, a convolutional neural network is used as an analysis model, the nonlinear feature extraction of a full spectrum interval is achieved, the problem that feature information of an existing analysis method is lost is solved, effective information of a sample is increased, and the accuracy of a system is improved;
(2) the four-dimensional spectrogram data is used as an input variable, the processing capacity of the convolutional neural network on big data is combined, the effective input variable is greatly improved, although the input variable is increased, the calculation amount and the storage requirement are effectively reduced by parameter sharing and sparse interaction of the convolutional neural network, and the rapidity of the system is effectively improved;
(3) by combining image analysis and a convolutional neural network, the characteristic extraction of spectral data of different analysis objects can be realized, and the defect that the characteristic extraction of the spectral data is realized only according to a data structure can be effectively avoided;
(4) by adopting convolutional neural network feature extraction, when the near infrared spectrum data of different substances are faced, the updating effect can be achieved only by adjusting the weight in the full-connection layer after the feature extraction, and the subsequent maintenance and updating of the model are facilitated.
Drawings
Fig. 1 is an overall architecture diagram of a near infrared spectrum feature extraction method disclosed in embodiment 1 of the present invention;
FIG. 2 is a flow chart of the design of a method for extracting near infrared spectral features disclosed in embodiment 1 of the present invention;
fig. 3 is a schematic processing procedure diagram of a convolutional neural network of a near infrared spectrum feature extraction method disclosed in embodiment 1 of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. 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
A method of near infrared spectral feature extraction, the method comprising:
firstly, acquiring N samples to be detected from a total sample by adopting conventional selection or an expert system, wherein the conventional selection refers to selecting complete, good-quality and non-deteriorated samples in a manual screening mode, the expert system refers to fusing expert experience into an information system, and the work of selecting the samples is completed by a computer instead of manual work;
then, the N samples to be detected and the spectrograph are placed on a near infrared spectrum detection table, and the spectrograph is used for obtaining near infrared spectrum data of the N samples to be detected;
after the near infrared spectrum data is obtained, preprocessing the near infrared spectrum data to obtain two-dimensional near infrared spectrum smooth data, which comprises the following steps: constructing a local model with the length of 2 lambda +1 of the current sample to be detected
According to the local model, acquiring an absorption rate model corresponding to the local model
Wherein, XtIs the wavelength of the central point of the current sample to be measured at the moment t, YtIs XtThe corresponding absorption rate;
scaling and mapping the local interval [ t-lambda, t + lambda ] to the interval [ -1,1], and obtaining the weight function of the local interval
Wherein x is*Is composed ofScaling mapping to the interval [ -1,1 []The latter value is then used to determine the value,
Repeating the steps, smoothing all the absorbances corresponding to the M wavelengths in each sample to obtain the smooth data of the NxM two-dimensional near infrared spectrum
Obtaining two-dimensional near infrared spectrum smooth dataThen, the two-dimensional near infrared spectrum smooth data is arranged and converted to obtain four-dimensional spectrogram data, and the specific process is as follows: smoothing the NxM two-dimensional near infrared spectrum dataTaking M as an axis, cutting step length a, arranging into b rows so as to smooth the two-dimensional near infrared spectrum dataConversion to a × b × N three-dimensional spectral dataConverting three-dimensional spectral data into four-dimensional spectrogram data through mapping relation f
Wherein the content of the first and second substances,for the converted four-dimensional spectrogram data, r is a spectral data step interval, r' is an RGB step interval, Dic is an RGB dictionary, RGB is a color channel formed by three primary colors of red, green and cyan,
wherein the content of the first and second substances,r is the pixel resolution, Ψ1=[0 r' 2r'…127]T,Ψ2=[128 128+r' 128+2r'…255]T。
After obtaining the four-dimensional spectrogram data of a multiplied by b multiplied by RGB multiplied by N, the feature extraction is carried out on the four-dimensional spectrogram data, and the specific process is as follows: taking four-dimensional spectrogram data as an input layer of a convolutional neural network, performing operation according to the sequence of convolution-pooling … … through L convolutional layers and pooling layers to obtain a dimension ofThe spectral characteristics of (a) a (b),representing the number of feature expansion after L times of convolution, wherein C and d are single feature dimensions, completing feature extraction of four-dimensional spectrogram data, wherein each convolution layer CiComprisesDimension ofThe input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension ofThe pooling window of (a).
As shown in fig. 3, the schematic processing procedure of the convolutional neural network mainly includes an input layer, convolutional layers, pooling layers, and feature arrangement layers, where the input layer is spectrogram data of a sample to be detected, the output is feature data of the sample to be detected, the convolutional layers and pooling layers are combined by parameter sharing and sparse interaction to perform layer-by-layer sparse feature extraction, the number of layers determines the depth of the convolutional neural network, and the adjustment is performed in combination with different samples to be detected in the specific implementation process. During the detection process, different output layer functions are selected according to different output layer variables, and the first convolution layer is 10Each feature map being 28x28The second layer is a neural array containing 1014x14A sampling layer of feature mapping, the third layer comprising 20Each convolution layer of the feature mapping is 10x10The fourth layer is a neural matrix containing 20A 5x5And (4) in a sampling layer of feature mapping, analogizing in sequence, wherein the window dimensionalities of all the pooling layers are 2After the depth is set according to the sample to be measured, the last layer is a feature arrangement layer, and the step length of the whole network is set to be 1 in the calculation process. The processing procedure of the convolutional neural network belongs to the prior art, and is not described in detail herein.
Finally, dimension is converted into dimension by means of inverse transformationThe spectrogram features are subjected to feature arrangement to obtain the dimension ofThe two-dimensional feature data of (1).
Through the technical scheme, the near infrared spectrum feature extraction method provided by the embodiment 1 of the invention has the advantages that the near infrared spectrum data are converted into the four-dimensional spectrogram data, the four-dimensional spectrogram data are used as input variables for feature extraction, the data integrity is ensured, meanwhile, the convolutional neural network is used as an analysis model, the nonlinear feature extraction of a full spectrum interval is realized, the problem of loss of feature information of the existing analysis method is solved, the effective information of a sample is increased, and the accuracy of a system is improved; the four-dimensional spectrogram data is used as an input variable, the processing capacity of the convolutional neural network on big data is combined, the effective input variable is greatly improved, although the input variable is increased, the parameter sharing and sparse interaction of the convolutional neural network effectively reduce the calculation amount and the storage requirement, and the rapidity of the system is effectively improved.
Example 2
Corresponding to embodiment 1 of the present invention, embodiment 2 of the present invention further provides a near infrared spectrum feature extraction device, including:
the screening module is used for acquiring N samples to be detected;
the spectrum data acquisition module is used for acquiring near infrared spectrum data of the N samples to be detected by using a spectrometer;
the smoothing processing module is used for preprocessing the near infrared spectrum data to obtain two-dimensional near infrared spectrum smoothing data;
the four-dimensional spectrogram data acquisition module is used for acquiring four-dimensional spectrogram data by arranging and converting the two-dimensional near infrared spectrum smooth data;
the characteristic extraction module is used for extracting the characteristics of the four-dimensional spectrogram data;
and the feature arrangement module is used for carrying out feature arrangement on the four-dimensional spectrogram data after feature extraction to obtain two-dimensional feature data.
Specifically, the smoothing module is further configured to: constructing a local model with the length of 2 lambda +1 of the current sample to be detected
According to the local model, acquiring an absorption rate model corresponding to the local model
Wherein, XtIs the wavelength of the central point of the current sample to be measured at the moment t, YtIs XtThe corresponding absorption rate;
scaling and mapping the local interval [ t-lambda, t + lambda ] to the interval [ -1,1], and obtaining the weight function of the local interval
Wherein x is*Is composed ofScaling mapping to the interval [ -1,1 []The latter value is then used to determine the value,
XtCorresponding smoothed data of absorption rate
Repeating the steps, smoothing all the absorbances corresponding to the M wavelengths in each sample to obtain the smooth data of the NxM two-dimensional near infrared spectrum
Specifically, the four-dimensional spectrogram data acquisition module is further configured to: smoothing the NxM two-dimensional near infrared spectrum dataTaking M as an axis, cutting step length a, arranging into b rows so as to smooth the two-dimensional near infrared spectrum dataConversion to a × b × N three-dimensional spectral dataConverting three-dimensional spectral data into four-dimensional spectrogram data through mapping relation f
Wherein the content of the first and second substances,for the converted four-dimensional spectrogram data, r is a spectral data step interval, r' is an RGB step interval, Dic is an RGB dictionary,
wherein the content of the first and second substances,r is the pixel resolution, Ψ1=[0 r' 2r'…127]T,Ψ2=[128 128+r' 128+2r'…255]T。
Specifically, the feature extraction module is further configured to: taking four-dimensional spectrogram data as an input layer of a convolutional neural network, passing through L convolutional layers and pooling layers, and performing convolution-pooling-convolution according to the formulaPerforming operation in sequence of pooling … …' to obtain spectrogram features, and completing feature extraction of four-dimensional spectrogram data, wherein each convolution layer CiComprisesDimension ofThe input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension ofThe pooling window of (a).
Specifically, the feature arrangement module is further configured to: and performing feature arrangement on the spectrogram features in an inverse transformation mode to obtain two-dimensional feature data.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A method for near infrared spectral feature extraction, the method comprising:
obtaining N samples to be detected;
acquiring near infrared spectrum data of N samples to be detected by using a spectrometer;
preprocessing the near infrared spectrum data to obtain two-dimensional near infrared spectrum smooth data;
arranging and converting the two-dimensional near infrared spectrum smooth data to obtain four-dimensional spectrogram data;
extracting the features of the four-dimensional spectrogram data;
and performing feature arrangement on the four-dimensional spectrogram data after feature extraction to obtain two-dimensional feature data.
2. The method of claim 1, wherein the pre-processing of the near infrared spectrum data to obtain two-dimensional near infrared spectrum smoothing data comprises: constructing a local model with the length of 2 lambda +1 of the current sample to be detected
According to the local model, acquiring an absorption rate model corresponding to the local model
Wherein, XtIs the wavelength of the central point of the current sample to be measured at the moment t, YtIs XtThe corresponding absorption rate;
scaling and mapping the local interval [ t-lambda, t + lambda ] to the interval [ -1,1], and obtaining the weight function of the local interval
Wherein x is*Is composed ofScaling mapping to the interval [ -1,1 []The latter value is then used to determine the value,
by the formulaTo XtSmoothing the corresponding absorption rate to obtain XtCorresponding smoothed data of absorption rate
3. The method of claim 2, wherein the arranging and converting the two-dimensional nir spectrum smooth data to obtain four-dimensional spectrogram data comprises: smoothing the NxM two-dimensional near infrared spectrum dataTaking M as an axis, cutting step length a, arranging into b rows so as to smooth the two-dimensional near infrared spectrum dataConversion to a × b × N three-dimensional spectral dataConverting three-dimensional spectral data into four-dimensional spectrogram data through mapping relation f
Wherein the content of the first and second substances,for the converted four-dimensional spectrogram data, r is a spectral data step interval, r' is an RGB step interval, Dic is an RGB dictionary,
4. The near infrared spectral feature extraction method of claim 3, wherein the feature extraction of the four-dimensional spectral data comprises: taking four-dimensional spectrogram data as an input layer of a convolutional neural network, performing operation according to the sequence of convolution, pooling, convolution and pooling … … through L convolutional layers and pooling layers to obtain spectrogram features, and completing feature extraction of the four-dimensional spectrogram data, wherein each convolutional layer C is connected with a convolutional layer C, and each convolutional layer C is connected with a convolutional layer C through a filteriComprisesDimension ofThe input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension ofThe pooling window of (a).
5. The near infrared spectrum feature extraction method of claim 4, wherein the feature arrangement of the four-dimensional spectrogram data after feature extraction to obtain two-dimensional feature data comprises: and performing feature arrangement on the spectrogram features in an inverse transformation mode to obtain two-dimensional feature data.
6. An apparatus for near infrared spectral feature extraction, the apparatus comprising:
the screening module is used for acquiring N samples to be detected;
the spectrum data acquisition module is used for acquiring near infrared spectrum data of the N samples to be detected by using a spectrometer;
the smoothing processing module is used for preprocessing the near infrared spectrum data to obtain two-dimensional near infrared spectrum smoothing data;
the four-dimensional spectrogram data acquisition module is used for acquiring four-dimensional spectrogram data by arranging and converting the two-dimensional near infrared spectrum smooth data;
the characteristic extraction module is used for extracting the characteristics of the four-dimensional spectrogram data;
and the feature arrangement module is used for carrying out feature arrangement on the four-dimensional spectrogram data after feature extraction to obtain two-dimensional feature data.
7. The near infrared spectral feature extraction device of claim 6, wherein the smoothing module is further configured to: constructing a local model with the length of 2 lambda +1 of the current sample to be detected
According to the local model, acquiring an absorption rate model corresponding to the local model
Wherein, XtIs the wavelength of the central point of the current sample to be measured at the moment t, YtIs XtThe corresponding absorption rate;
scaling and mapping the local interval [ t-lambda, t + lambda ] to the interval [ -1,1], and obtaining the weight function of the local interval
Wherein x is*Is composed ofScaling mapping to the interval [ -1,1 []The latter value is then used to determine the value,
by the formulaTo XtSmoothing the corresponding absorption rate to obtain XtCorresponding smoothed data of absorption rate
8. The near infrared spectral feature extraction device of claim 7, wherein the four-dimensional spectral data acquisition module is further configured to: smoothing the NxM two-dimensional near infrared spectrum dataTaking M as an axis, cutting step length a, arranging into b rows so as to smooth the two-dimensional near infrared spectrum dataConversion to a × b × N three-dimensional spectral dataConverting three-dimensional spectral data into four-dimensional spectrogram data through mapping relation f
Wherein the content of the first and second substances,for the converted four-dimensional spectrogram data, r is a spectral data step interval, r' is an RGB step interval, Dic is an RGB dictionary,
9. The near infrared spectral feature extraction device of claim 8, wherein the feature extraction module is further configured to: taking four-dimensional spectrogram data as an input layer of a convolutional neural network, performing operation according to the sequence of convolution, pooling, convolution and pooling … … through L convolutional layers and pooling layers to obtain spectrogram features, and completing feature extraction of the four-dimensional spectrogram data, wherein each convolutional layer C is connected with a convolutional layer C, and each convolutional layer C is connected with a convolutional layer C through a filteriComprisesDimension ofThe input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension ofThe pooling window of (a).
10. The near infrared spectral feature extraction device of claim 9, wherein the feature arrangement module is further configured to: and performing feature arrangement on the spectrogram features in an inverse transformation mode to obtain two-dimensional feature data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910968375.XA CN110658156B (en) | 2019-10-12 | 2019-10-12 | Near infrared spectrum feature extraction method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910968375.XA CN110658156B (en) | 2019-10-12 | 2019-10-12 | Near infrared spectrum feature extraction method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110658156A true CN110658156A (en) | 2020-01-07 |
CN110658156B CN110658156B (en) | 2022-03-11 |
Family
ID=69040591
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910968375.XA Active CN110658156B (en) | 2019-10-12 | 2019-10-12 | Near infrared spectrum feature extraction method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110658156B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111466876A (en) * | 2020-03-24 | 2020-07-31 | 山东大学 | Alzheimer's disease auxiliary diagnosis system based on fNIRS and graph neural network |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6280381B1 (en) * | 1999-07-22 | 2001-08-28 | Instrumentation Metrics, Inc. | Intelligent system for noninvasive blood analyte prediction |
CN104361131A (en) * | 2014-12-08 | 2015-02-18 | 黑龙江大学 | Establishment method of four-dimensional face model database |
CN108801936A (en) * | 2018-04-20 | 2018-11-13 | 中国农业大学 | Plant haulm section " tissue-component " synchronized analyzing method based on light spectrum image-forming |
US20180374213A1 (en) * | 2015-12-15 | 2018-12-27 | The Regents Of The University Of California | Systems and Methods For Analyzing Perfusion-Weighted Medical Imaging Using Deep Neural Networks |
CN109540292A (en) * | 2018-11-28 | 2019-03-29 | 重庆大学 | A kind of preprocess method of spectrum |
CN109559358A (en) * | 2018-10-22 | 2019-04-02 | 天津大学 | It is a kind of that the method for sampling is risen from the image pattern of coding based on convolution |
-
2019
- 2019-10-12 CN CN201910968375.XA patent/CN110658156B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6280381B1 (en) * | 1999-07-22 | 2001-08-28 | Instrumentation Metrics, Inc. | Intelligent system for noninvasive blood analyte prediction |
CN104361131A (en) * | 2014-12-08 | 2015-02-18 | 黑龙江大学 | Establishment method of four-dimensional face model database |
US20180374213A1 (en) * | 2015-12-15 | 2018-12-27 | The Regents Of The University Of California | Systems and Methods For Analyzing Perfusion-Weighted Medical Imaging Using Deep Neural Networks |
CN108801936A (en) * | 2018-04-20 | 2018-11-13 | 中国农业大学 | Plant haulm section " tissue-component " synchronized analyzing method based on light spectrum image-forming |
CN109559358A (en) * | 2018-10-22 | 2019-04-02 | 天津大学 | It is a kind of that the method for sampling is risen from the image pattern of coding based on convolution |
CN109540292A (en) * | 2018-11-28 | 2019-03-29 | 重庆大学 | A kind of preprocess method of spectrum |
Non-Patent Citations (2)
Title |
---|
FEI MA: "《Broadly Available Imaging Devices Enable High-Quality Low-Cost Photometry》", 《CATENA》 * |
程鑫: "《棉籽植酸含量的近红外光谱分析技术及其在低植酸棉花种质筛选中的应用》", 《中国优秀硕士学位论文全文数据库 农业科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111466876A (en) * | 2020-03-24 | 2020-07-31 | 山东大学 | Alzheimer's disease auxiliary diagnosis system based on fNIRS and graph neural network |
CN111466876B (en) * | 2020-03-24 | 2021-08-03 | 山东大学 | Alzheimer's disease auxiliary diagnosis system based on fNIRS and graph neural network |
Also Published As
Publication number | Publication date |
---|---|
CN110658156B (en) | 2022-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112101381B (en) | Tensor collaborative drawing discriminant analysis remote sensing image feature extraction method | |
CN110763698A (en) | Hyperspectral citrus leaf disease identification method based on characteristic wavelength | |
Azcarate et al. | Modeling second-order data for classification issues: Data characteristics, algorithms, processing procedures and applications | |
CN111896495A (en) | Method and system for discriminating Taiping Houkui production places based on deep learning and near infrared spectrum | |
CN107121407B (en) | The method that near-infrared spectrum analysis based on PSO-RICAELM identifies Cuiguan pear maturity | |
CN113313059B (en) | One-dimensional spectrum classification method and system | |
CN110849828A (en) | Saffron crocus classification method based on hyperspectral image technology | |
CN111178177A (en) | Cucumber disease identification method based on convolutional neural network | |
CN107679569A (en) | Raman spectrum substance automatic identifying method based on adaptive hypergraph algorithm | |
CN113420838B (en) | SAR and optical image classification method based on multi-scale attention feature fusion | |
CN113902622B (en) | Spectrum super-resolution method based on depth priori joint attention | |
CN110826552A (en) | Grape nondestructive automatic detection device and method based on deep learning | |
CN110658156B (en) | Near infrared spectrum feature extraction method and device | |
CN101059427A (en) | Method for quickly non-destructive measurement for nitrogen content of tea using multiple spectrum imaging technology | |
CN111398211A (en) | Information distinguishing and processing method of rhizoma atractylodis granules | |
CN109271874B (en) | Hyperspectral image feature extraction method fusing spatial and spectral information | |
CN102135496A (en) | Infrared spectrum quantitative analysis method and infrared spectrum quantitative analysis device based on multi-scale regression | |
CN114295556A (en) | Hyperspectral physicochemical index fitting method and system based on one-dimensional convolution | |
Zhang et al. | Identification of jujube trees diseases using neural network | |
CN112818920A (en) | Double-temporal hyperspectral image space spectrum joint change detection method | |
CN109447009B (en) | Hyperspectral image classification method based on subspace nuclear norm regularization regression model | |
CN114972879A (en) | Green tide area remote sensing monitoring method based on machine learning | |
CN114332619A (en) | Remote sensing data bloom extraction method based on deep learning | |
Tosin et al. | Precision maturation assessment of grape tissues: Hyperspectral bi-directional reconstruction using tomography-like based on multi-block hierarchical principal component analysis | |
CN113705454A (en) | Method for extracting forest land containing infrared spectrum remote sensing image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |