Spectrum classifier and classification method based on push-broom spectrum imager
Technical Field
The invention belongs to the technical field of optics, and relates to a spectrum classifier and a classification method based on a push-broom spectrum imager.
Background
The hyperspectral imaging technology can detect the two-dimensional geometric space and the one-dimensional spectral information of the target at the same time, and has the characteristic of 'map-in-one'; the hyperspectral imaging technology realizes breakthrough improvement of spectral resolution, the number of wave bands is more, and the spectral information corresponding to each pixel can be drawn into a complete and continuous spectral curve as a function of wavelength, so that diagnostic spectral characteristics capable of distinguishing different substances are reflected. The characteristics determine that the hyperspectral image has stronger ground feature recognition and fine classification capability than other remote sensing images.
The fine classification of objects using hyperspectral data is one of the core content of hyperspectral imaging technology applications, the final objective of which is to assign a unique class identification to each pixel in a hyperspectral image. At present, the hyperspectral classification algorithm takes a data cube obtained by reconstructing data output by a hyperspectral imager as a research object, analyzes spectrum and space information of various substances, performs feature extraction, and performs classification judgment by a proper classification method.
However, hyperspectral imaging acquires the rich spatial, radiation and spectral information of the target, and brings a new challenge while bringing opportunities for fine classification of the target. The huge data volume inevitably brings pressure to a data processing system, and the huge operation volume causes the great increase of the computer load; meanwhile, the large data volume also brings time and storage space bottlenecks to the data transmission system and the storage system.
Many novel imaging spectrum technologies, such as a computational spectrum imaging technology based on a compressed sensing theory, proposed by students at home and abroad in recent years reduce the system overhead to a certain extent by reducing the data acquisition amount. However, these advanced novel imaging spectroscopic techniques, the reconstruction algorithms of which tend to be relatively complex and difficult to implement, the reconstruction effect being dependent on the sparsity of the spectroscopic data cube. Moreover, its ultimate goal is still the reconstruction of the data cube, and thus still faces the large data volume problem with the reconstructed data cube.
Disclosure of Invention
In order to solve the technical problem that the load of a data transmission, storage and processing system is greatly increased due to the fact that the reconstructed data volume of a data cube is too large in the conventional imaging spectrum technology, the invention provides a spectrum classifier based on a push-broom spectrum imager and a classification method.
The technical scheme of the invention is as follows:
the spectrum classifier based on the push-broom spectrum imager is characterized by comprising the push-broom spectrum imager, a spatial light modulator, a controller, a detector and a signal processing module;
the push-broom spectrum imager is used for scanning and dispersing one row of target pixels to form a spectrum after light splitting, which is arranged according to the wavelength sequence and is projected onto the spatial light modulator;
the spatial light modulator modulates the spectrum after light splitting according to the digital voltage signal output by the controller; the digital voltage signal is a quantized value of a feature vector in a projection matrix obtained by projecting a spectrum space of a data cube into an N-1 dimensional feature space through a linear discriminant analysis algorithm, and the quantized value is sequentially output by the controller according to the feature value of the feature vector from large to small; n is the category number of the known spectrum;
the detector is used for receiving the light information modulated by the spatial light modulator and extracting the characteristics of the current line target pixels;
the signal processing module receives the characteristic information output by the detector, and carrying out classification judgment on the current row of target pixels, and outputting classification results.
Further, the spatial light modulator is a two-dimensional digital micro-mirror array, and comprises a plurality of micro-mirror units, wherein each two rows of micro-mirror units correspond to one target pixel; the reflecting mirrors of the micro mirror units are respectively controlled to rotate by the controller to realize independent optical switches, and the optical information is modulated by controlling the optical switching time of each micro mirror unit;
the number of the micro mirror units in each row of the two-dimensional digital micro mirror array is more than or equal to the band number of the spectrum after light splitting, and the number of the micro mirror units in each column is more than or equal to 2 times of the pixel number of one row of target pixels; in the two-dimensional digital micromirror array, the micromirror units in the odd-numbered rows are controlled by the quantized values corresponding to the positive values in the feature vectors, and the micromirror units in the even-numbered rows are controlled by the quantized values corresponding to the negative values in the feature vectors; the modulated light output by each two rows of micro mirror units is received by two corresponding detection units in the detector.
Further, the signal processing module is used for classifying and judging the current line target pixels according to a Bayesian judgment criterion.
The invention also provides a method for carrying out spectrum classification on the target pixel by utilizing the spectrum classifier based on the push-broom spectrum imager, which comprises the following steps:
1) The push-broom spectrum imager scans and disperses a row of target pixels to form a spectrum after light splitting, which is arranged according to the wavelength sequence;
2) The controller outputs a digital voltage signal to control the spatial light modulator to carry out optical modulation on the spectrum after the light splitting generated in the step 1); the digital voltage signal is determined by a linear discriminant analysis algorithm: projecting the spectrum space of the training sample set to an N-1 dimensional feature space to obtain a projection matrix, and quantizing feature vectors in the projection matrix to obtain the digital voltage signal after quantization; the digital voltage signal is controlled by the controller according to the characteristics the characteristic values corresponding to the vectors are sequentially output from large to small; n is the category number of the known spectrum;
3) The detector receives the spectrum information modulated in the step 2) and realizes the feature extraction of the current line target pixels;
4) The signal processing module receives the characteristic information extracted in the step 3), carries out classification judgment on the current line target pixels, and outputs classification results of the current line target pixels;
5) Repeating the steps 1) -4), and completing the spectrum classification of the target pixels of the other rows line by line in sequence.
Further, the optical modulation in the step 2) is implemented by using a two-dimensional digital micromirror array, where the two-dimensional digital micromirror array includes a plurality of micromirror units, and each two rows of micromirror units corresponds to one target pixel; the reflecting mirrors of the micro mirror units are respectively controlled to rotate by the controller to realize independent optical switches, and the optical information is modulated by controlling the optical switching time of each micro mirror unit;
the number of the micro mirror units in each row of the two-dimensional digital micro mirror array is more than or equal to the band number of the spectrum after light splitting, and the number of the micro mirror units in each column is more than or equal to 2 times of the pixel number of one row of target pixels; in the two-dimensional digital micromirror array, the micromirror units in the odd-numbered rows are controlled by the quantized values corresponding to the positive values in the feature vectors, and the micromirror units in the even-numbered rows are controlled by the quantized values corresponding to the negative values in the feature vectors; the modulated light output by each two rows of micro mirror units is received by two corresponding detection units in the detector.
Further, in the step 4), classification judgment is performed on the current target pixel according to a bayesian judgment criterion, wherein the judgment criterion is as follows:
in the above formula, x refers to an N-1 dimensional vector obtained by extracting features of a current sample, and c refers to each spectrum category existing in a training sample set; p (c) is the prior probability of each spectral class c, estimated by the frequency of occurrence of each class sample in the training sample set; p (x|c) is the class conditional probability of x for each spectral class c; mu (mu) c Sum sigma c Respectively the mean value and the variance of each class of samples in the training sample set; x is x i Refers to the ith dimension value of x; n is the number of known spectral categories; sigma (sigma) c,i Sum mu c,i Respectively sigma c Sum mu c Is the i-th dimensional value of (2);
the judging method comprises the following steps: and according to the formula, calculating the P 'of each category in the training sample set corresponding to the current target pixel, wherein the spectrum category corresponding to the maximum value of the P' is judged to be the spectrum category to which the current target pixel belongs.
The invention has the advantages that:
based on the compression coding principle, the method directly applies a classification algorithm (linear discriminant analysis and Bayesian judgment criterion) to the spectrum after light splitting in the push-broom spectrum imager to realize spectrum classification; the invention can directly output the classification result without reconstructing the data cube, can effectively avoid the problem of large data volume faced at present, and greatly lightens the load of a data transmission, storage and processing system.
Drawings
Fig. 1 is a schematic block diagram of the spectral classifier of the present invention.
FIG. 2 is a diagram of a classification process of a spectrum classifier according to an embodiment of the invention.
Detailed Description
The present invention will be described in detail with reference to the accompanying drawings.
FIG. 1 is a schematic block diagram of a spectrum classifier of the invention, which structurally comprises a push-broom spectrum imager, a spatial light modulator, a controller, a detector and a signal processing module.
Firstly, scanning a row of target pixels by a push-broom type spectrum imager, dispersing, and forming a spectrum after light splitting, which is arranged according to a wavelength sequence; then, the spatial light modulator modulates the spectrum after light splitting according to the digital voltage signal (namely the conversion coefficient, which is determined by a linear discriminant analysis algorithm) provided by the controller, and then the detector receives the modulated light information to realize the feature extraction of the current line target pixel; finally, the signal processing module receives the data output by the detector, namely the extracted characteristic information, carries out classification judgment (determined by Bayesian judgment criteria) on the target pixels, and outputs classification results.
Referring to fig. 2, the spatial light modulator of this embodiment employs a two-dimensional array of digital micromirrors. The two-dimensional digital micro-mirror array is an electrically addressed spatial light modulator, and is formed by arranging a plurality of micro-mirror units into a two-dimensional array, wherein each two rows of micro-mirror units correspond to one target pixel; the reflector of each micro mirror unit is independently controlled to rotate by a digital voltage signal output by the controller, so that an independent optical switch is realized, and the modulation of optical information is realized by adjusting the time of the optical switch.
The number of micro mirror units of each row of a two-dimensional digital micro mirror array (DMD) is more than or equal to the band number of the spectrum after light splitting, and the number of micro mirror units of each column is more than or equal to 2 times of the pixel number of a row of target pixels; in other embodiments, the number of micromirrors in each column of a two-dimensional digital micromirror array (DMD) is greater than or equal to the number of bands of the spectrum after light splitting, and the number of micromirrors in each row is greater than or equal to 2 times the number of pixels of a row of target pixels, where the specific structural form is determined according to the direction of light dispersion during light splitting; since the signal controlling the two-dimensional digital micromirror array is a positive digital voltage signal, the eigenvectors in the projection matrix W are analog and have positive and negative values. Firstly, converting a feature vector in a projection matrix W into a digital signal through quantization, then, projecting a spectrum corresponding to each target pixel onto two rows of micro-mirror units of a two-dimensional digital micro-mirror array through light path adjustment, wherein one row of micro-mirror units is controlled by a quantization value corresponding to a positive numerical value in the feature vector, one row of micro-mirror units is controlled by a quantization value corresponding to a negative numerical value in the feature vector, and modulated light output by each two rows of micro-mirror units is respectively received by two corresponding detection units on a detector; and subtracting the data received by the two detection units corresponding to the current target pixel to obtain the characteristics of the current target pixel. In this embodiment, the micromirror units in the odd-numbered rows are controlled by the quantized values corresponding to the positive values in the feature vectors, and the micromirror units in the even-numbered rows are controlled by the quantized values corresponding to the negative values in the feature vectors.
And the signal processing module receives the characteristics of the target pixels acquired and output by the detector, performs classification judgment and outputs classification results. The specific process comprises two major parts of characteristic extraction and classification judgment of target pixels (namely unknown pixels). In view of the fact that hyperspectral data have a large number of bands, the correlation among the bands is strong, and the data redundancy is high, data dimension reduction, namely feature extraction, is needed first, high-dimension data information is effectively expressed by utilizing low-dimension data, and features with the largest difference in different categories are obtained through feature extraction while the data size is compressed. And then, processing the extracted features by using a proper classification judgment algorithm to realize classification.
1. Feature extraction
The feature extraction process corresponds to a process of mathematically transforming the spectral space of the data cube. While spatial light modulators are one of the key devices in the modern optical field, they contain a number of individual cells arranged in a spatial array, each of which is independently controllable to modulate light in real time. Therefore, the spectrum after being split by the push-broom spectrum imager can be directly modulated by using the spatial light modulator, and the spectrum space band coding process of the characteristic extraction algorithm is realized.
The Linear Discriminant Analysis (LDA) algorithm is a supervision dimension reduction method, and the idea is that: given a training sample set, a projection direction is sought to be found based on a multidimensional normal distribution. In this direction, the projections of the different classes of samples can be best separated, i.e. with maximum inter-class distance and minimum intra-class discreteness. In the multi-classification task, the projection operator is obtained by the following formulas (1) to (3).
S b W=λS w W (1)
Wherein S is b Is an inter-class divergence matrix; s is S W Is an intra-class divergence matrix; n is the number of known spectral categories; m is m i Is the number of training samples for each category; mu (mu) i Is the mean vector of each class training sample; μ is the mean vector of all training samples; x is an N-1 dimensional vector obtained by extracting features of a current sample; lambda isIs a characteristic value of (2); w is a projection matrix and is composed of eigenvectors corresponding to N-1 maximum eigenvalues.
The spectrum space of the training sample set can be projected to the N-1 dimension feature space through LDA, so that the data dimension reduction is realized. The larger the eigenvalue λ, the greater the class separability in the corresponding eigenvector direction. Here, the feature vector in the projection matrix W is a transform coefficient in the feature extraction process.
Therefore, by analyzing the known samples, the projection matrix W can be calculated in advance, and then the controller in fig. 1 sequentially outputs the transform coefficients (feature vectors) in the projection matrix W in order of the corresponding feature values from the large to the small to control the spatial light modulator, thereby realizing feature extraction.
2. Classification judgment
The invention realizes the classification judgment of the target pixel based on Bayes judgment criteria (Bayes). The Bayes criterion is that, to minimize the overall risk, only that spectral class label c that minimizes the conditional risk R (c|x) needs to be selected on each X, as shown in equation (4).
R(c|x)=1-P(c|x) (4)
P (c|x) is the posterior probability of x, which can be written as equation (5); thus, the Bayes criterion may be interpreted as selecting the class label that maximizes the posterior probability. While for a given x, P (x) is a fixed value, independent of the class mark. Thus, the Bayes criterion can be converted to equation (6).
P(c|x)=P(c)P(x|c)/P(x) (5)
P′=P(c)P(x|c) (6)
In the above formula, c refers to each spectrum class existing in the training sample set; p (c) is the prior probability for each spectral class c, which can be estimated by the frequency of occurrence of each class sample in the training sample set; p (x|c) is the class conditional probability of x for each spectral class c, one classical approach to estimate P (x|c) is maximum likelihood estimation, as shown in equation (7) in the case of continuous properties, where μ c Sum sigma c The mean and variance of each class of samples in the training sample set are respectively.
The dimension of the hyperspectral data after being extracted by the LDA features is N-1, so that for the case that the category number N is more than 2, the extracted features are multidimensional, according to naive Bayes,
wherein x is i Refers to the ith dimension value of x in the N-1 dimension vector after feature extraction; sigma (sigma) c,i Sum mu c,i Respectively sigma c Sum mu c Is the i-th dimensional value of (c).
In summary, when the present invention is used for spectrum classification, the projection matrix W is first calculated in advance according to the formulas (1) - (3), where the size of the projection matrix W is p× (N-1), where P is the spectral band number of the original data (i.e. the data before the dimension reduction, i.e. the data before the feature extraction). I.e. W consists of N-1 eigenvectors, each column being a P-dimensional eigenvector, each eigenvector corresponding to an eigenvalue. The controller sequentially outputs the feature vectors in the quantized projection matrix W according to the order of the corresponding feature values from large to small, thereby sequentially extracting each feature, and sequentially receiving each extracted feature (the feature=positive feature-negative feature) by the detector. After all the features are extracted, calculating P 'of each pixel for each spectrum class c by a signal processing module according to the formula (8), selecting the spectrum class corresponding to the maximum value of P', judging the spectrum class as the class to which the pixel belongs, and outputting a classification result.