CN110658156A - Near infrared spectrum feature extraction method and device - Google Patents

Near infrared spectrum feature extraction method and device Download PDF

Info

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
Application number
CN201910968375.XA
Other languages
Chinese (zh)
Other versions
CN110658156B (en
Inventor
潘天红
郭威
李鱼强
陈山
皱小波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu University
Anhui University
Original Assignee
Jiangsu University
Anhui University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Jiangsu University, Anhui University filed Critical Jiangsu University
Priority to CN201910968375.XA priority Critical patent/CN110658156B/en
Publication of CN110658156A publication Critical patent/CN110658156A/en
Application granted granted Critical
Publication of CN110658156B publication Critical patent/CN110658156B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/359Investigating 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

Near infrared spectrum feature extraction method and device
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
Figure BDA0002231262160000031
According to the local model, acquiring an absorption rate model corresponding to the local model
Figure BDA0002231262160000032
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 of
Figure BDA0002231262160000034
Scaling mapping to the interval [ -1,1 []The latter value is then used to determine the value,
by the formula
Figure BDA0002231262160000035
To XtSmoothing the corresponding absorption rate to obtain
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
Figure BDA0002231262160000037
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 data
Figure BDA0002231262160000038
Taking M as an axis, cutting step length a, arranging into b rows so as to smooth the two-dimensional near infrared spectrum data
Figure BDA0002231262160000039
Conversion to a × b × N three-dimensional spectral dataConverting three-dimensional spectral data into four-dimensional spectrogram data through mapping relation f
Figure BDA0002231262160000042
Wherein the content of the first and second substances,
Figure BDA0002231262160000043
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,
Figure BDA0002231262160000051
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 of
Figure BDA0002231262160000053
The input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension of
Figure BDA0002231262160000054
The 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
Figure BDA0002231262160000061
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
Figure BDA0002231262160000063
Wherein x is*Is composed of
Figure BDA0002231262160000064
Scaling mapping to the interval [ -1,1 []The latter value is then used to determine the value,
by the formula
Figure BDA0002231262160000065
To XtSmoothing the corresponding absorption rate to obtain
XtCorresponding smoothed data of absorption rate
Figure BDA0002231262160000066
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
Figure BDA0002231262160000067
Preferably, the four-dimensional spectrogram data acquiring module is further configured to: smoothing the NxM two-dimensional near infrared spectrum data
Figure BDA0002231262160000068
Taking M as an axis, cutting step length a, arranging into b rows so as to smooth the two-dimensional near infrared spectrum data
Figure BDA0002231262160000069
Conversion to a × b × N three-dimensional spectral dataConverting three-dimensional spectral data into four-dimensional spectrogram data through mapping relation f
Figure BDA0002231262160000071
Wherein the content of the first and second substances,
Figure BDA0002231262160000072
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,
Figure BDA0002231262160000081
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 filteriComprises
Figure BDA0002231262160000082
Dimension of
Figure BDA0002231262160000083
The input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension of
Figure BDA0002231262160000084
The 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
Figure BDA0002231262160000101
According to the local model, acquiring an absorption rate model corresponding to the local model
Figure BDA0002231262160000102
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
Figure BDA0002231262160000103
Wherein x is*Is composed of
Figure BDA0002231262160000104
Scaling mapping to the interval [ -1,1 []The latter value is then used to determine the value,
by the formula
Figure BDA0002231262160000105
To XtSmoothing the corresponding absorption rate to obtain
XtCorresponding smoothed data of absorption rate
Figure BDA0002231262160000106
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
Figure BDA0002231262160000107
Obtaining two-dimensional near infrared spectrum smooth data
Figure BDA0002231262160000108
Then, 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 data
Figure BDA0002231262160000111
Conversion 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,
Figure BDA0002231262160000114
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,
Figure BDA0002231262160000121
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),
Figure BDA0002231262160000123
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 CiComprises
Figure BDA0002231262160000124
Dimension of
Figure BDA0002231262160000125
The input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension of
Figure BDA0002231262160000126
The 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 10
Figure BDA0002231262160000127
Each feature map being 28x28
Figure BDA0002231262160000128
The second layer is a neural array containing 10
Figure BDA0002231262160000129
14x14
Figure BDA00022312621600001210
A sampling layer of feature mapping, the third layer comprising 20
Figure BDA00022312621600001211
Each convolution layer of the feature mapping is 10x10
Figure BDA00022312621600001212
The fourth layer is a neural matrix containing 20A 5x5
Figure BDA00022312621600001214
And (4) in a sampling layer of feature mapping, analogizing in sequence, wherein the window dimensionalities of all the pooling layers are 2
Figure BDA0002231262160000131
After 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 transformation
Figure BDA0002231262160000132
The spectrogram features are subjected to feature arrangement to obtain the dimension of
Figure BDA0002231262160000133
The 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
Figure BDA0002231262160000141
According to the local model, acquiring an absorption rate model corresponding to the local model
Figure BDA0002231262160000142
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
Figure BDA0002231262160000143
Wherein x is*Is composed of
Figure BDA0002231262160000144
Scaling mapping to the interval [ -1,1 []The latter value is then used to determine the value,
by the formula
Figure BDA0002231262160000145
To XtSmoothing the corresponding absorption rate to obtain
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
Figure BDA0002231262160000147
Specifically, the four-dimensional spectrogram data acquisition module is further configured to: smoothing the NxM two-dimensional near infrared spectrum data
Figure BDA0002231262160000148
Taking M as an axis, cutting step length a, arranging into b rows so as to smooth the two-dimensional near infrared spectrum data
Figure BDA0002231262160000149
Conversion to a × b × N three-dimensional spectral dataConverting three-dimensional spectral data into four-dimensional spectrogram data through mapping relation f
Figure BDA0002231262160000151
Wherein the content of the first and second substances,
Figure BDA0002231262160000152
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,
Figure BDA0002231262160000161
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 CiComprises
Figure BDA0002231262160000162
Dimension of
Figure BDA0002231262160000163
The input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension of
Figure BDA0002231262160000164
The 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
Figure FDA0002231262150000012
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
Figure FDA0002231262150000013
Wherein x is*Is composed of
Figure FDA0002231262150000014
Scaling 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
Figure FDA0002231262150000016
Repeating the above stepsSmoothing the absorptance corresponding to M wavelengths in each sample to obtain NxM two-dimensional near infrared spectrum smoothing data
Figure FDA0002231262150000017
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 data
Figure FDA0002231262150000021
Taking M as an axis, cutting step length a, arranging into b rows so as to smooth the two-dimensional near infrared spectrum data
Figure FDA0002231262150000022
Conversion to a × b × N three-dimensional spectral data
Figure FDA0002231262150000023
Converting three-dimensional spectral data into four-dimensional spectrogram data through mapping relation f
Figure FDA0002231262150000024
Wherein the content of the first and second substances,
Figure FDA0002231262150000025
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,
Figure FDA0002231262150000031
r is the pixel resolution, Ψ1=[0 r' 2r'…127]T,Ψ2=[128 128+r' 128+2r'…255]T
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 filteriComprises
Figure FDA0002231262150000032
Dimension of
Figure FDA0002231262150000033
The input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension of
Figure FDA0002231262150000034
The 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
Figure FDA0002231262150000041
According to the local model, acquiring an absorption rate model corresponding to the local model
Figure FDA0002231262150000042
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 of
Figure FDA0002231262150000044
Scaling mapping to the interval [ -1,1 []The latter value is then used to determine the value,
by the formula
Figure FDA0002231262150000045
To XtSmoothing the corresponding absorption rate to obtain 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
Figure FDA0002231262150000047
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 data
Figure FDA0002231262150000049
Conversion to a × b × N three-dimensional spectral data
Figure FDA00022312621500000410
Converting three-dimensional spectral data into four-dimensional spectrogram data through mapping relation f
Figure FDA0002231262150000051
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,
Figure FDA0002231262150000061
r is the pixel resolution, Ψ1=[0 r' 2r'…127]T,Ψ2=[128 128+r' 128+2r'…255]T
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 filteriComprises
Figure FDA0002231262150000062
Dimension of
Figure FDA0002231262150000063
The input data of the convolutional layer is used as the characteristic data of the pooling layer P after convolution operationiComprising a dimension of
Figure FDA0002231262150000064
The 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.
CN201910968375.XA 2019-10-12 2019-10-12 Near infrared spectrum feature extraction method and device Active CN110658156B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
FEI MA: "《Broadly Available Imaging Devices Enable High-Quality Low-Cost Photometry》", 《CATENA》 *
程鑫: "《棉籽植酸含量的近红外光谱分析技术及其在低植酸棉花种质筛选中的应用》", 《中国优秀硕士学位论文全文数据库 农业科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
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