{'fraction_non_alphanumeric': 0.023573491530715793, 'fraction_numerical': 0.004995706814456327, 'mean_word_length': 5.103858980466889, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Hyperspectral Classification of Clustering SVM Based on Modified Spatial Information

The difference in local spectral bands of the same species and the local spectral similarity between different species can easily lead to the occurrence of noise points in the region in the traditional classification results. The multi-spectral gray image weighting and the overall gray image weighting filtering algorithm are used to improve the image texture feature, and the modified image is used to perform small window clustering classification based on the high confidence class pixel. The results show that the classification model of the improved algorithm has a certain improvement in classification accuracy: it is 12.3% higher than the traditional SVM classification, and the image noise phenomenon is obviously improved.


Introduction
The spectral information of a hyperspectral image is represented by a high-dimensional vector that each pixel in the image has. Due to the difference in reflectivity of different items in the same band, the overall difference of the spectral curve is caused. Through this differential characterization, the spectral similarity and difference of each pixel in the hyperspectral image can be distinguished to realize the division of different items in the image. This process is often combined with image space information. The image processed by the hyperspectral classification has a type label for each pixel, which is convenient for future processing. It is an important research hotspot and has high utilization value in agriculture, forestry, water, food, and even military industry.
As a pixel-level classification, when a certain type of object in a hyperspectral image occupies a certain area rather than some pixels, the influence of "homologous foreign matter" and "homologous phenomenon" on the classification result is intensified. This can result in a false label in the form of noise on the classification result [1] .
In order to improve this phenomenon, a lot of research has been done on the spectral feature classification algorithm combined with spatial information. Among them, spatial grayscale features as a feature representation of the overall image, has a wide range of research applications. Wang Chenglong extracted features by combining direction gradient histogram with principal component analysis, and made a more accurate distinction between deformed, black heart, mechanical damage, germination and qualified five types of potatoes [2] . Ye Qiu, Gao Xiaohui, Zhu Jieer, etc. have all tried to combine color image and spectral matrix and achieved some results. In addition, methods such as superpixel segmentation [3] and sparse expression [4] have reduced the error classification points. The emergence of the classification effect has been improved.
Previous studies have found that even in the hyperspectral image, there are still some differences in the spectral curves of the same kind of articles. The main reason is that the spectral variability caused by geometric and incident illumination during hyperspectral image capture may change the spectral data (local spectral amplitude) and affect the classification accuracy [5] . Studies have confirmed that this difference can be corrected by grayscale texture. Therefore, this paper proposes a clustering SVM algorithm, first correcting the image information, referring to the traditional gray processing theory [6] , assigning different weights to each spectral segment, summing them, and highlighting the amplitude of the characteristic spectral segments by weights. The summation weakens the local variation of the spectrum and enhances the overall recognition ability. After the image processing is performed by using weighted filtering, the aggregation matrix is constructed, and the pixel is clustered according to the high-confidence classification pixel, and the pixel clustering is performed by using the segmented small window as the range. Comparing the classification results with the direct classification results of SVM, the advantages of clustering SVM algorithm in overall classification are verified.

Spatial Correction Algorithm
The study found that some small areas of the image are different, but there are some homogeneities in the whole. In image, this feature is generally called texture [7] .Texture information is usually included in grayscale images. A common expression is to use grayscale histograms for comparison. However, there is a blur and confusion in the grayscale texture of the single image. The advantage of hyperspectral is that multi-spectral segments are derived from multiple single-band grayscale images. The textures superimposed by the bands of these grayscale images have a certain correction effect on the defects of the single band.
The space correction vector expression (1) is shown: where Xg is a pseudo-gray feature vector. a1, a2, ... an are the weight values corresponding to the n characteristic spectral segments, respectively, x1, x2, ... xn are n-dimensional spectral characteristic spectral segments, and the value of r can be selected according to the spectral line proximity as needed.
The distribution of the weight value is determined by the difference of the spectral line to be calculated, and the weight value of the region with large difference is larger than the region with small difference. In this study, the difference is represented by the difference in amplitude between the two lines and the same spectrum.
In the hyperspectral field, each band corresponds to a complete grayscale image, and the gray level of each pixel on the image is determined by the spectral value of the band. In other words, the reflectance of the spectral line in the spectral segment reflects the level of the grayscale value of an object on the grayscale image. Therefore, when different images are subjected to weighted superposition operations, in order to highlight the difference between different objects, the difference between the spectral lines and the spectral difference is not weakened, and the corresponding grayscale image corresponding to the spectral segment should satisfy the following requirements: (1) The difference between the different spectral segments is positive or negative. That is, if the reflectance of the item a is higher than the item b in the A spectrum, it should be ensured that the reflectance of the item a in the B, C, ..., etc. sections is higher than that of the item b, and the other items are analogized in turn.
(2) There is a certain degree of discrimination in the reflectance difference between different objects to ensure a sufficiently clear texture resolution.

Clustering SVM Algorithm
Although the image texture has been improved by spatial correction, some uneven textures may exist between similar objects. For further correction, a spatial filtering algorithm is introduced, and weighted filtering is used to improve the image. The calculation formula is as shown in equation (2).
(2) * is the central pixel after weighted average filtering, is the central pixel of the gray level co-occurrence matrix, and is the other pixels in the gray level co-occurrence matrix. The whole image can construct a plurality of such matrices according to the window size. performs spectral segment filtering by weight while measuring the position of the pixel and the center pixel. Its formula is: (3) After that, the processed image is used to process the SVM classification result. When the specified condition is met, the pixel in the small window is considered to be classified and corrected: (1) The converted image matrix has a central pixel point contrast in the small window that is greater than the threshold.
(2) Within the small window, the total number of the same species is greater than half of the total number of windows.
(3) Analyze the distance of the pixel points in the window from the central pixel point, and perform weighting processing according to the distance to calculate the total classification sample. The specific calculation is as shown in equation (4) = where is the maximum classification effect probability value of the window after statistics, is the pixel point classified as y, and is the center pixel. When is greater than the threshold, the window classification is considered to require correction.
Condition (1), (2), and (3) satisfy any two, and image segmentation is performed with the pixel center as the root, and the image is classified and corrected. This process uses the algorithm used in the literature [8] to establish MSF (Minimum Spanning Forest) to find pixel tags with high confidence. The edge is stretched with a pixel label with high reliability, and then gradually corrected in a small window format. In order to construct the MSF, look for pixel tags with high confidence, use the probability estimates made for the pixel classification results, and then perform threshold filtering on the pixels in the probability map. When the probability is above the threshold, the pixel tag is considered reliable. After obtaining a reliable label, the label aggregation is centered on the reliable pixels in the window through the small window progressively.

Experimental Samples
The hyperspectral data used in this study was derived from open source hyperspectral data published by the University of Basque. Data was collected by an onboard AVIRIS sensor at the Indian Pine Test Site in northwestern Indiana, including 145 x 145 pixels and 224 spectral reflection bands with wavelengths ranging from 0.4 to 2.5 microns. The scenes of the captured Indian pine trees include two-thirds of agriculture, one-third of forests or other natural perennial vegetation. In addition, the image contains two major two-lane highways, one rail line, and some low-density housing, other building structures and smaller roads. Since the drone was filmed in June, according to some crop samples taken on site, corn and soybean were judged to be in the early stage of growth, and the coverage rate was less than 5%. The basic vegetation samples available are specified in 16 categories. In this experiment, six kinds of vegetation lines were selected for analysis and discrimination. The experimental line has removed 20 spectral segments with significant noise and filtered the water absorption band.

Space Correction Vector
The

Experimental Results and Analysis
For the image corrected by the spatial information, the image is further improved by using weighted filtering, where γ is used as the filtering degree for the image, and γ=1 is selected here. The corrected images are respectively classified using clustering SVM and classified using the conventional SVM for the corrected images. Among them, the division of the local area is recommended to use the connected domain for division. The size of the local area segmentation affects the accuracy of the classification to a certain extent. When the window is divided too small, the reliability of the marked pixel is reduced. When the local window is too large, the classification result may be too smooth. Therefore, consider 5×5, 7×7, 11×11, and the 5×5 window classification is the best. The classification results are shown in Figure 1. Among them, (a) is the original data, (b) is the unprocessed SVM direct classification result, and (c) is the clustering SVM classification result. It can be seen that, compared with the direct classification results, the clustering SVM classification results are reduced in internal noise points and the degree of misclassification is reduced. It shows that compared with the traditional SVM classification, the spatially corrected clustering SVM has higher classification ability and more accurate regional classification.
The clustering SVM classification results are compared with the previous SVM classification methods. The accuracy of the classification is shown in Table 1: Compared with SVM classification, the accuracy is improved by 12.3%, and the accuracy is improved by 0.8% compared with WMF-MSF.

Conclusion
In this paper, based on the principle of traditional gray scale algorithm and SVM supervised classification principle, the clustering SVM classification algorithm combined with spatial correction algorithm is proposed. The images were weighted by different band spectra, and then clustered by a small window model based on the flag pixels with high confidence. The results show that the clustering SVM classification algorithm can improve the overall classification accuracy. At the same time, the classification accuracy can be improved to some extent for the classification region with large sample size. After that, the problem of insufficient sample size can be further improved by combining the pre-existing sample generation theory.