By using the commands of six main remote sensing supervised classifiers, including ENVI- parallelepiped classification, minimum distance classification, Mahalanobis distance classification, maximum likelihood classification, neural network classification and support vector machine classification, we can deepen our understanding of the principle of remote sensing supervised classification, understand its technical realization process, and preliminarily grasp the basic operation of its ENVI function command.
Second, the experimental content
① parallelepiped classification of TM remote sensing images in Guilin; ② Minimum distance classification of Guilin TM remote sensing images; ③ Mahalanobis distance classification of Guilin TM remote sensing images; ④ Maximum likelihood classification of TM remote sensing images in Guilin; ⑤ Neural network classification of Guilin TM remote sensing images; ⑥ Application of support vector machine in Guilin TM remote sensing image classification; ⑦ Comparative analysis of six classification results.
Third, the experimental requirements
① Six classification methods such as parallelepiped, minimum distance, Mahalanobis distance, maximum likelihood, neural network and support vector machine are complicated in theory. In order to obtain good experimental results, it is required to preview their principles in advance before the experiment, and to understand and master their characteristics and similarities and differences theoretically. (2) Determine the known geological data required for training samples by classification processing method and prepare them in advance. ③ Write an experimental report. (4) Because of the heavy workload of doing six kinds of classification processing at the same time, we can choose to do some of them according to the actual class hours. The minimum distance is classified as a necessary method.
Fourth, the technical conditions
① Microcomputer; ② Panchromatic remote sensing data of fast birds in Guanyang area; (3) ③ENVI software; ④Photoshop software (above version 6.0) and ACDSee software (above version 4.0).
Verb (abbreviation of verb) experimental steps
The supervised classification of remote sensing images can be divided into four processes: sample selection, supervised classification, classification result evaluation and post-classification. The specific operation steps are as follows.
(a) Definition of training
1. Sample selection
(1) In the ENVI main menu, select "File & gt to open the panchromatic remote sensing data of fast birds in Guanyang area, and synthesize RGB with Band3, Band 4, Band 1 and display it in the" Display ". Through the analysis of the image, four samples, namely cultivated land, woodland, residential area and water body, are selected.
Figure 17- 1 ROI tool dialog box
(2) In the main image window, select "Overlay >; Region of interest ",open the" ROI tool "dialog box, as shown in figure 17- 1.
(3) In the "ROI tool" dialog box, select the "window" option to draw ROI in the "image", "scroll" or "zoom" window; Enter the sample name in the ROI Name field; In the color field, right-click to select a color.
(4) in the "ROI Tool" dialog box, select "ROI type >: Polygon" and draw the region of interest in the "Image", "Scroll" or "Zoom" window.
(5) After drawing a class of ROI, in the "ROI Tool" dialog box, select the New Region button to create another class of samples, and repeat the above operations.
2. Evaluate training samples
In the ROI dialog box, select the option & gt Calculate the separability of ROI, open the image file to be classified, and select all defined sample types to calculate the separability of samples, as shown in figure 17-2, which indicates the separability among various sample types, and is represented by Jeffries-Matusita distance and transformation divergence. ENVI calculates Jeffries-Matusita distance and conversion divergence of each ROI combination. At the bottom of the dialog box, the ROI combinations are listed from small to large according to the size of separability values. The values of these two parameters are between 0-2.0 and greater than 1.9, indicating that the sample has good separability and belongs to qualified samples; If it is less than 1.8, the sample needs to be re-selected; If it is less than 1, consider merging the two types of samples into one type of sample.
Figure 17-2 Sample Separability Calculation Report
(2) Implementing classified supervision.
Select "classification" Supervisred > > classifier type "to select the classifier according to the complexity and accuracy requirements of classification.
1. Parallel classifier
Parallelogram uses simple decision rules to classify multispectral data. The decision boundary forms an n-dimensional parallelepiped in the image data space. The size of the parallelepiped is determined by the threshold of the standard deviation of the average value of each selected classification. If the pixel value lies between the low threshold and the high threshold of n classified bands, it belongs to this category. If the pixel value falls in multiple classes, ENVI will classify the pixel into the last matching class. A region that does not belong to any parallelepiped category is called a classless region. The operation steps are as follows:
(1) Select "Classification >: Supervision & gt Parallelogram", select the remote sensing image to be classified in the Classification Input File dialog box, and open the Parallelogram Parameters dialog box, as shown in figure 17-3.
Figure 17-3 parallelogram classifier parameter setting dialog box
(2) Select a category from the area: click the "Select All" button to select all training samples.
(3) Set the maximum standard deviation from the average: set the standard deviation threshold. There are three types: no standard deviation threshold (None), standard deviation threshold of all categories (single value) and standard deviation threshold of each category (multi-value).
(4) Select "Single Value" and enter the standard deviation threshold in the "Maximum Standard Deviation of Average" text box.
(5) Click the Preview button to preview the classification results.
(6) Select the output path and file name of the classification result.
(7) Set "Output Regular Image": Whether to select regular image data.
(8) After setting the above parameters, click OK to classify them.
2. Minimum distance classifier
Minimum distance classification uses the average vector of each terminal unit to calculate the Euclidean distance from each unknown pixel to each average vector. All pixels are classified as the nearest category, unless the standard deviation and the limit of distance are limited (in this case, some pixels will become "unclassified" because they do not meet the selected criteria), and the operation steps are as follows:
(1) select "classification >; Supervised & gt Minimum Distance ",select the remote sensing image to be classified in the classification input file dialog box and open the" Minimum Distance "dialog box, as shown in figure 174.
Figure 17-4 Minimum Distance Classifier Parameter Settings Dialog Box
(2) Select a category from the area: click the "Select All" button to select all training samples.
(3) Set the maximum standard deviation from the average: set the standard deviation threshold. There are three types: no standard deviation threshold (None), standard deviation threshold of all categories (single value) and standard deviation threshold of each category (multi-value).
(4) Select "Single Value" and enter the standard deviation threshold in the "Maximum Standard Deviation of Average" text box.
(5) Set the maximum distance error: set the maximum allowable distance error. Pixels with a distance greater than this value will not be classified in this category. If they do not meet the maximum distance error of all categories, they will be classified as unclassified types. There are three types: no maximum distance error (none), maximum distance error of all categories (single value) and maximum distance error of each category (multi-value).
(6) Click the Preview button to preview the classification results.
(7) Select the output path and file name of the classification result.
(8) Set "Output Regular Image": Whether to select regular image data.
(9) After setting the above parameters, click OK to classify them.
.3 Mahalanobis distance classifier
Mahalanobis distance classification is a direction-sensitive distance classifier, which uses statistics in classification. It is somewhat similar to the maximum likelihood classification, but it is a faster method, assuming that the covariance of all classes is equal. All pixels are classified as the nearest ROI class, unless the user defines a distance threshold (in this case, if some pixels are not within the threshold, they will be classified as classless), and the operation steps are as follows:
(1) select "classification >; Supervised & gt Mahalanobis Distance ",select the remote sensing image to be classified in the classification input file dialog box, and open the Mahalanobis Distance dialog box, as shown in figure 17-5.
(2) Select a category from the area: click the "Select All" button to select all training samples.
Figure 17-5 Mahalanobis distance classifier parameter setting dialog box
(3) Set the maximum distance error: set the maximum allowable distance error. Pixels with a distance greater than this value will not be classified in this category. If they do not meet the maximum distance error of all categories, they will be classified as unclassified types. There are three types: no maximum distance error (none), maximum distance error of all categories (single value) and maximum distance error of each category (multi-value).
(4) Click the Preview button to preview the classification results.
(5) Select the output path and file name of the classification result.
(6) Set "Output Regular Image": Whether to select regular image data.
(7) After setting the above parameters, click OK to classify them.
4. Maximum likelihood classifier
Maximum likelihood classification assumes that each statistical class in each band is uniformly distributed and calculates the possibility that a given pixel belongs to a specific class. Unless the possibility threshold is selected, all cells will participate in the classification. Each pixel is classified into the most likely category. The operation steps are as follows:
(1) select "classification >; Supervised & gt maximum likelihood ",select the remote sensing image to be classified in the classification input file dialog box, and open the" maximum likelihood parameters "dialog box, as shown in figure 17-6.
(2) Select a class from regio: n Click the Select All Items button at point S to select all training samples.
Figure 17-6 Maximum Likelihood Classifier Parameter Settings Dialog Box
(3) Set probability threshold: set the threshold of possibility. There are three types: no maximum likelihood threshold (none), maximum likelihood threshold of all categories (single value) and maximum likelihood threshold of each category (multi-value). If single value is selected, enter 0 ~ 65438+ in the probability threshold text box.
(4) Data scale factor: enter a data scale factor, which is used to convert the shaped reflectivity or emissivity data into floating-point data. For example, for 8-bit data without radiometric calibration, the scale factor is set to 255.
(5) Click the Preview button to preview the classification results.
(6) Select the output path and file name of the classification result.
(7) Set "Output Regular Image": Whether to select regular image data.
(8) After setting the above parameters, click OK to classify them.
5. Neural network classifier
Computers are used to simulate structures entering the brain, and many small processing units are used to simulate biological neurons. The recognition, memory and thinking process of human brain are realized by algorithms and applied to image classification. The operation steps are as follows:
(1) in the ENVI main menu bar, select "classification >; Supervised & gt Neural Network ",select the remote sensing image to be classified in the classification input file dialog box, and open the" Neural Network Parameters "dialog box, as shown in figure 17-7.
(2) Select a category from the area: click the "Select All" button to select all training samples.
Figure 17-7 Parameter Setting Dialog Box of Neural Network Classifier
(3) Activation: Select activation functions, including Logistic and hyperbola.
(4) Training threshold collision: input the training contribution threshold (0 ~ 1). This parameter determines the contribution of internal weights related to the level of active nodes, and it is used to adjust the changes of internal weights of nodes. The training algorithm interactively adjusts the weights and node thresholds between nodes in order to minimize the output layer and response errors. Setting this parameter to 0 will not adjust the internal weight of the node. Good classified images can be generated by properly adjusting the internal weights of nodes, but if the weights are too large, the classification results will be adversely affected.
(5) Training speed: Set the weight adjustment speed (0 ~ 1). The larger the parameter value, the faster the training speed, but it also increases the swing or makes the training results not converge.
(6) Training momentum: set the weight to adjust the momentum (0 ~ 1). When the value is greater than 0, entering a larger value in the Training Rate text box will not cause a swing. The greater the value, the greater the training stride. The function of this parameter is to make the weight change in the current direction.
(7) Training RMS exit criteria: When the RMS error is specified, training should be stopped. RMS error values will be displayed in the chart during training. When this value is less than the input value, even if the number of iterations is not reached, the training will stop and then the classification will begin.
(8) Number of hidden layers: enter the number of hidden layers used. For linear classification, the input value is 0; For nonlinear classification, the input value should be greater than or equal to 1.
(9) Training Iteration Times: Enter the number of training iterations.
(10) Minimum output activation threshold: enter the minimum output activation threshold. If the activation value of a classified pixel is less than the threshold, the pixel will be classified as unclassified in the output classification.
(1 1) Select the output path and file name of the classification result.
(12) Set "Output Regular Image": whether to select regular image data.
(13) After setting the above parameters, click OK to classify them.
6. Support vector machine classifier
Support Vector Machine Classification (SVM) is a machine learning method based on statistical learning theory. SVM can automatically find those support vectors with great ability to distinguish and classify, thus constructing a classifier, which can maximize the interval between classes, thus having better generalization ability and higher classification accuracy. The operation steps are as follows:
(1) select "classification >: supervise > support vector machines", select the remote sensing image to be classified in the classification input file dialog box, and open the "support vector machine classification parameters" dialog box, as shown in figure 17-8.
Figure 17-8 Support Vector Machine Classifier Parameter Settings Dialog Box
(2) Select a category from the area: click the "Select All" button to select all training samples.
(The options in the Kemel type drop-down list are: linear, polynomial, radial basis function and Sigmoid.
If polynomial is selected, the degree of kernel polynomial of SVM needs to be set, the minimum value is 1 and the maximum value is 6; Rules for using vector machines need to specify "this Bias" for the kernel, and the default value is1; The "Gamma in Kernel Function" parameter is set to floating-point data greater than 0, and the default value is the reciprocal of the number of input image bands.
If "Radial Basis Function" is selected, the parameter "Gamma in Kernel Function" needs to be set to floating-point data greater than 0, and the default value is the reciprocal of the number of input image bands.
If Sigmoid is selected, you need to use vector machine rules. You need to specify "this Bias" for the kernel, and the default value is 1. Set the "Gamma in Kernel Function" parameter to floating-point data greater than 0, and the default value is the reciprocal of the number of input image bands.
(4) Penalty parameter: floating-point data greater than 0. This parameter controls the balance between sample error and rigid extension of classification. The default value is 100.
(5) Pyramid level: Set the classification level for SVM training and classification processing. If the value is 0, it will be processed at the original resolution, and the maximum value will change with the size of the image.
(6) Pyramid classification threshold (0 ~ 1): When the pyramid level value is greater than 0, this reclassification threshold needs to be set.
(7) Classification probability threshold (0 ~ 1): Set a probability threshold for classification. If all the regular probabilities calculated by a pixel are less than this value, the pixel will not be classified.
(8) Select the output path and file name of the classification result.
(9) Set "Output Regular Image": Whether to select regular image data.
(10) After setting the above parameters, click OK to classify them.
(3) Evaluation of classification results
After supervised classification, it is necessary to evaluate the classification results. In this experiment, the confusion matrix is calculated by using the real region of interest on the surface to evaluate the classification results, and the operation steps are as follows.
1. Create a real region of interest on the surface.
On high-resolution images, we can get each kind of realistic region of interest by visual interpretation. It is also possible to generate realistic regions of interest on the surface according to the survey data through field investigation. The acquisition method is the same as "(1) definition training". In order to distinguish it from the training samples, we use "vegetation, towns, rivers and farmland" as the names of the realistic areas of apparent interest.
2. Calculate the confusion matrix
(1) Open the file that defines the verification sample (that is, the full-color band of fast birds in Guanyang area) and the image classification result, so that it can be displayed in the "Available Band" list.
(2) Select "Basic & gt Region of Interest & gt Restore Saved ROI File" to open a realistic ROI file on the surface.
(3) Select "Basic & gt Region of Interest & gt Recover ROI through Map", open the "Reconcile ROI through Map" dialog box (Figure 179), select the actual region of interest corresponding to the surface, and click OK.
(4) In the "Select the source file for drawing ROI" dialog box, select the file that defines the verification sample (that is, the panchromatic band of fast birds in Guanyang District), and click OK.
(5) In the "Select target file to reconcile Roisto" dialog box, select the matching target file, that is, the classification result image.
(6) select "classification >; Post classification & gt confusion matrix & gt using realistic interest area on the ground.
Figure 17-9 "Coordinate ROI through Map" dialog box
(7) In the "Classification Input File" dialog box, select the classification result image. The real area of interest on the surface will be automatically loaded into the Match Class Parameters dialog box.
(8) In the "Match Category Parameters" dialog box, select the name to match, and then click the "Add Combination" button to match the actual area of interest on the surface with the final classification result. The matching between categories will be displayed in the list at the bottom of the dialog box, as shown in figure 17- 10. Click OK to output the confusion matrix.
Figure 17- 10 "Matching Class Parameters" dialog box
(9) In the confusion matrix parameter dialog box of the confusion matrix output window, select pixels and percentages, as shown in figure 17- 1 1.
(10) Click OK to output the confusion matrix. The output confusion matrix report includes several evaluation indexes such as overall classification accuracy, Kappa coefficient and confusion matrix.
Figure 17- 1 1 confusion matrix output dialog box
(4) Post-processing of classification
Generally speaking, the results obtained by using the above classification methods are difficult to achieve the purpose of final application, so some processing is needed to get the final ideal classification results.
Figure 17- 12 Edit classification name and color
1. Change the category color and name.
(1) Opens the classification results and displays them in the Display window.
(2) in the main image window of the classification result, select "Tools >; Color mapping & gt class color mapping ",open the" class color mapping "dialog box, as shown in figure 17- 12.
(3) Select the category to be modified from the Selected Category list and change its color or name.
(4) After modifying the color and name of the category to be modified, select Options >; Save changes "to save changes.
(5) Select File & gt Cancel to close the Category Color Mapping dialog box.
2. Clustering processing
Some small patches will inevitably appear in the classification results. From the point of view of practical application, it is necessary to remove these small patches or reclassify them. Majority/minority analysis, clustering and filtering are commonly used at present. In this experiment, the clustering method is selected to cluster and merge the adjacent similar classification areas.
The clustering process first combines the selected classification with the expansion operation, and then erodes the classified image with the transformation of the specified size in the parameter dialog box. The specific operation steps are as follows:
In ENVI main menu bar, select "Classification & gt job classification & gt cluster", and in the "classification input file" dialog box, select the classification result image and click OK to open the "cluster parameters" dialog box, as shown in figure 17- 13. The parameters of the Beam Parameters dialog box are set as follows.
(1) Select classes: click the Select All button to select all classes;
(2) Enter the size of morphological operators (number of rows and columns): 3,3 by default;
(3) Select the output path and file name, and click OK to complete the clustering process.
3. Classified statistics
Classification statistics can calculate the statistical information of related input files according to the classification results, including the number of pixels in the category, the maximum value, the minimum value, the average value and the standard deviation of each band in the category. It can also record the histogram of each category and calculate covariance matrix, correlation matrix, eigenvalue and eigenvector, and display the summary records of all categories.
(1) In the ENVI main menu bar, select "Classification & gt Job Classification & gt Class Statistics", and in the "Classification Input File" dialog box, select the classification result image and click OK.
(2) In the Statistical Input File dialog box, select an input file for statistical information calculation, click OK to open the Category Selection dialog box (figure 17- 14), select the category name to be counted in the Select Category list, and click OK. Open the "Calculate Statistical Parameters" dialog box (figure 17- 15), and select the required statistics, including the following statistics types.
Figure 17- 13 "plex parameters" dialog box
Figure 17- 14 Select Classification Dialog Box
Basic statistics: including the minimum, maximum, mean and standard deviation of all bands, and if the file is multi-band, it also includes the eigenvalue.
Histogram: Generate a statistical histogram about the frequency distribution.
Covariance: including covariance matrix and correlation matrix, eigenvalue and eigenvector.
(3) There are three ways to output the results: you can output the results to the screen and generate a statistical file (. Sta) and generate a text file, in which the generated statistical file can be displayed by "Classification >: Position Classification >; Open the "View Statistics File" command, select the output path and file name, and click OK to complete the classified statistics.
4. Transform the classification results into vectors.
(1) In the ENVI main menu bar, select "Classification & gt Job Classification & gt Classification to Vector". In the "Raster to Vector Input Band" dialog box, select the classification result image, and click OK to open the "Raster to Vector Parameters" dialog box, as shown in figure 17- 16.
(2) Select the categories to be converted into vector files, and in the Output tab, use the arrow switch button to select Single Layer to output all categories to a vector layer; Or select "One layer per class" to output each selected classification to a separate vector layer.
(3) Select the output path and file name, and click OK to complete the conversion of classification results into vector files.
Figure 17- 15 Calculation Statistics Parameter Settings Dialog Box
Figure 17- 16 raster to vector parameter setting
After supervised classification of remote sensing images, six classifiers, such as parallelepiped classifier, minimum distance classifier, Mahalanobis distance classifier, maximum likelihood classifier, neural network classifier and support vector machine classifier, are used to supervise the classification of fast bird remote sensing images in Guanyang area. The confusion matrix is used to evaluate the six classification results, and the overall classification accuracy and Kappa coefficient are obtained. Compare the six classification results, record them in a WORD file, and name it "Evaluation of classification results of six supervised classification methods for fast bird remote sensing images in Guanyang area", and save them in your own working folder.
An experimental report on intransitive verbs
(1) Briefly describe the experimental process.
(2) Answer: ① According to the experimental operation steps and their relationship, analyze the similarities and differences of supervised classification methods in model design ideas or algorithms. ② Through visual interpretation, the quality of the image recognition effect of the supervised classified images is qualitatively compared.
See Appendix 1 for the format of the experimental report.