A method for generating prototype spectrum sets based on superpixels
By using the superpixel-based prototype spectral set generation method in hyperspectral image processing, the problem of difficulty in extracting the standard spectral spectral of land objects in hyperspectral images is solved, and the clustering is achieved Improved stability and computational efficiency of class results.
Patent Information
- Application Number
- CN202210220828.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-08
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2042-03-08
AI Technical Summary
In hyperspectral image processing, the standard spectra of land objects is difficult to extract, and the standard spectra of land objects are greatly affected by light conditions and slightly different in different environments, resulting in the high computational complexity of existing clustering methods and unstable results, which are easy to fall into local optimality untie.
Using the prototype spectral set generation method based on superpixels, the average spectrum of fixed interval superpixel blocks is used as the initial clustering center of the k-means clustering algorithm, and the band is screened using the SSIM structure index to reduce the computational complexity and improve the clustering results. stability.
It realizes the generation of stable prototype spectral sets under unsupervised conditions, reduces the amount of clustering calculations, avoids local optimal solutions, and improves the robustness of clustering results and the ability to approach optimal solutions.
Smart Images

Figure CN114821293B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of hyperspectral image processing, and in particular relates to a method for generating a prototype spectrum set based on superpixels. Background Art
[0002] In recent years, with the widespread application of hyperspectral sensors, hyperspectral image processing technology has also developed, playing an increasingly important role in military, agriculture, forestry, environmental protection and industrial fields.
[0003] In hyperspectral remote sensing technology, the standard spectrum of ground objects is an important foundation of hyperspectral remote sensing technology, and the spectral curve is the main basis for band selection and target classification. However, due to the fact that the hyperspectral spectrum is greatly affected by lighting conditions, there are few labeled hyperspectral images, and the standard spectrum of ground objects in different environments is slightly different, it is difficult to effectively extract the standard spectrum of ground objects.
[0004] Superpixels refer to areas composed of pixels that are adjacent in position and have similar characteristics such as color and brightness. These areas generally do not destroy the boundary information of objects in the image. In hyperspectral images, superpixel blocks mainly refer to homogeneous areas with relatively close spectral information in hyperspectral images. Introducing the superpixel segmentation algorithm into the components of the prototype spectrum set can, on the one hand, effectively segment the entire image into nearly pure superpixel blocks containing only similar pixels according to the homogeneity of the pixels; on the other hand, by replacing the original pixels with superpixel blocks for subsequent calculations, the computational complexity of the subsequent clustering algorithm can be greatly reduced.
[0005] Shijin Li and Jianbian Qiu proposed a method for generating prototype spectra in 2013, which generates corresponding prototype spectrum sets by clustering hyperspectral images. On the one hand, this method has a large amount of calculation, and on the other hand, the clustering results are unstable and easily fall into the local optimal situation, making it impossible to obtain an effective prototype spectrum set.
[0006] The common region segmentation algorithm that can construct superpixels is mainly the k-means clustering method, which directly performs k-means clustering on the hyperspectral image and uses the stable cluster centers obtained by clustering as the prototype spectrum set of the hyperspectral image; however, doing so will lead to high computational time complexity; the cluster centers generated by k-means clustering are unstable, and the experimental results are inconsistent each time, and the robustness is poor; there is no clear criterion for determining the number of cluster centers, and multiple experiments are required to obtain the best result. Summary of the invention
[0007] In order to solve the problem of lack of standard spectra of ground objects or difficulty in extracting standard spectra of ground objects, the present invention proposes a prototype spectrum set generation method based on superpixels, which adopts the average spectrum of superpixel blocks with fixed intervals as the clustering center, so that the clustering results remain stable and avoid falling into the local optimal situation.
[0008] The method for generating a prototype spectrum set based on superpixels comprises the following specific steps:
[0009] Step 1: Use a hyperspectral instrument to collect bands of a certain area, and take each band as an image to form a band image set X;
[0010] X={x1,x2,...,x n ,...,x N}; N is the total number of bands;
[0011] Step 2: Randomly select 40% of the bands, sum the pixels in the image corresponding to each band, and divide it by the number of bands. The average pixel number obtained constitutes image Y;
[0012] Step 3: Select images in the image set X one by one, and calculate the SSIM structure index with image Y respectively as the score corresponding to each image;
[0013] For image x n , the calculation formula of SSIM structure index is as follows:
[0014]
[0015] where μ X is the current image x n The mean value of the pixels in Y is the mean value of the pixels in image Y, σ X is the image x n The standard deviation of the pixels in Y is the standard deviation of pixels in image Y, and C1, C2, and C3 represent constants for maintaining stability.
[0016] Step 4: Sort the images in descending order by score, select the first 40% of the bands corresponding to the scores, regenerate image Y using the mean of all pixels, and return to step 3 to repeatedly calculate the scores of each image in image set X until the currently selected band is the same as the last selected band.
[0017] Step 5: Select the first three bands with the highest SSIM structure index scores from the current stable bands, input the superpixel segmentation algorithm, and extract fixed-interval superpixel blocks from the segmentation results;
[0018] The calculation of the fixed interval is: the total number of superpixel patches divided by the actual number of objects in the area of the acquired image;
[0019] Step 6: Use the average spectrum of each superpixel block with a fixed interval as the initial clustering center of the k-means clustering algorithm, cluster the superpixel blocks segmented by all bands in the area, and obtain the prototype spectrum set of the area.
[0020] The advantages of the present invention are:
[0021] 1) A prototype spectrum set generation method based on superpixels, which uses the prototype spectrum set of hyperspectral to replace the standard spectrum of ground objects in an unsupervised manner, solves the problem of mismatch between the standard spectrum of ground objects and the actual spectrum information caused by various factors such as the fact that the hyperspectral is greatly affected by lighting conditions and the standard spectrum of ground objects in different environments is slightly different.
[0022] 2) A superpixel-based prototype spectrum set generation method uses the average spectrum of superpixel blocks to replace the original spectra of tens of thousands of individual pixels, reducing the computational complexity of the clustering process.
[0023] 3) A method for generating a prototype spectrum set based on superpixels. The traditional kmeans algorithm is very unstable and easily falls into a local optimal solution. The present invention evenly distributes the cluster centers over the entire image, and the clustering results are stable and basically tend to the optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flowchart of a method for generating a prototype spectrum set based on superpixels according to the present invention;
[0025] Figure 2 It is a schematic diagram of comparison between the prototype spectral curve calculated by the present invention and the existing hyperspectral dataset Indian_pines under two different ground objects;
[0026] Figure 3 It is a schematic diagram of the result of superpixel small block segmentation of the present invention. DETAILED DESCRIPTION
[0027] The present invention is further explained in detail below.
[0028] The present invention proposes a flow chart of a method for generating a prototype spectrum set based on superpixels. Since the input of a superpixel segmentation algorithm needs to be consistent with the format of a visible image, that is, only images of three bands are needed, while a hyperspectral image has hundreds of bands, the present invention proposes to use the SSIM structure index to extract three bands with the best structures to improve the effect of the superpixel segmentation algorithm. In view of the problem that the clustering center generated by k-means clustering is unstable, the present invention combines the label format of the SLIC superpixel block and proposes a measure of using the average spectrum of the superpixel block with a fixed interval as the clustering center, so that the clustering result remains stable and avoids falling into the local optimal state.
[0029] The method for generating a prototype spectrum set based on superpixels is as follows: Figure 1 As shown, the specific steps are as follows:
[0030] Step 1: Use a hyperspectral instrument to collect bands of a certain area, and take each band as an image to form a band image set X;
[0031] X={x1,x2,...,x n ,...,x N}; N is the total number of bands;
[0032] Step 2: Randomly select 40% of the bands, sum the pixels in the image corresponding to each band, and divide it by the number of bands. The average pixel number obtained constitutes image Y;
[0033] Step 3: Select images in the image set X one by one, and calculate the SSIM structure index with image Y respectively as the score corresponding to each image;
[0034] Due to the special imaging principle of hyperspectral images, that is, different bands are actually images generated for the same area in different narrow bands, the quality of the band can be determined by the SSIM structure index.
[0035] For image x n , the calculation formula of SSIM structure index is as follows:
[0036]
[0037] where μ X is the current image x n The mean value of the pixels in Y is the mean value of the pixels in image Y, σ X is the image x n The standard deviation of the pixels in Y is the standard deviation of the pixels in image Y. C1, C2, and C3 represent constants to avoid the denominator being 0 and maintain the stability of the formula. Usually C1=(K1×L)2 , C2=(K2×L) 2 , C3=C2 / 2 is a constant that maintains stability.
[0038] K1=0.01,K2=0.03;L is the image x n The pixel range.
[0039] Step 4: Sort the images in descending order by score, select the first 40% of the bands corresponding to the scores, regenerate image Y using the mean of all pixels, and return to step 3 to repeatedly calculate the scores of each image in image set X until the currently selected band is the same as the last selected band.
[0040] This step is mainly to propose noise bands and reduce the impact of noise bands on screening results.
[0041] Step 5: Select the first three bands with the highest SSIM structure index scores from the current stable bands, input the superpixel segmentation SLIC algorithm, obtain the corresponding superpixel segmentation results, and extract the fixed-interval superpixel blocks from the segmentation results;
[0042] The calculation of the fixed interval is: the total number of superpixel patches divided by the actual number of objects in the area of the acquired image;
[0043] Step 6: Use the average spectrum of each superpixel block with a fixed interval as the initial clustering center of the k-means clustering algorithm, cluster the superpixel blocks segmented by all bands in the area, and obtain the prototype spectrum set of the area.
[0044] In view of the problem of unstable cluster centers generated by k-means clustering; due to the general law of ground object distribution and the fact that the superpixel blocks generated by the SLIC algorithm are relatively regular and the labeling order is fixed, this application uses the average spectrum of superpixel blocks with fixed intervals as the initial cluster centers of the k-means algorithm, and effectively solves the problem of unstable clustering results by fixing the number of cluster centers.
[0045] The prototype spectral curve in the prototype spectral set calculated in this application is compared with the public hyperspectral dataset Indian_pines, as shown in Figure 2As shown, Figure a is the average spectrum of the objects with feature category 7 in the Indian_pines dataset and the prototype spectrum curve closest to it, and Figure b on the right is the average spectrum of the objects with feature category 13 in the Indian_pines dataset and the prototype spectrum curve closest to it. The solid line is the real feature spectrum curve obtained according to the real feature label provided in the data, and the dotted line is the prototype spectrum curve of this application; Figure a has the largest gap, and Figure b has the smallest gap. It can be clearly seen that this application can obtain a better prototype spectrum set that is extremely close to the real feature spectrum without the help of real feature labels. (Real feature labels are difficult to label, or it is time-consuming and laborious to label. Real feature labels are not automatically generated during the actual collection process.)
[0046] The result of superpixel block segmentation is as follows Figure 3 As shown (the effect diagram after removing the unlabeled features), it can be seen that the present application can effectively obtain superpixel blocks that are arranged regularly, compactly, and can well describe the boundaries of features.
Claims
1. A method for generating prototype spectrum sets based on superpixels, It is characterized in that The specific steps are as follows: First, use a hyperspectral instrument to collect bands in a certain area, and take each band as an image to form a band image set X; X={x 1 ,x 2 ,...,x n ,...,x N }; N is the total number of bands; Then, 40% of the bands are randomly selected, the pixel points in the image corresponding to each band are summed up, and the sum is divided by the number of bands. The average value of the pixels obtained constitutes the image Y; Next, select the images in the image set X one by one, and calculate the SSIM structure index with image Y respectively as the score corresponding to each image; sort the images in descending order by score, select the first 40% bands corresponding to the score, regenerate image Y using the mean of all pixels, and repeatedly calculate the score of each image in the image set X until the band selected this time is the same as the band selected last time; Finally, the top three bands with the highest SSIM structure index scores are selected from the current stable bands, input into the superpixel segmentation algorithm, and superpixel blocks with fixed intervals are extracted from the segmentation results; the average spectrum of each superpixel block with fixed intervals is used as the initial clustering center of the k-means clustering algorithm, and the superpixel blocks segmented from all bands in the area are clustered to obtain the prototype spectrum set of the area.
2. A method for generating a prototype spectrum set based on superpixels as claimed in claim 1, Features: The calculation process of the image score is: For image x n , the calculation formula of SSIM structure index is as follows: where μ X is the current image x n The mean value of the pixels in Y is the mean value of the pixels in image Y, σ X is the image x n The standard deviation of the pixels in Y is the standard deviation of pixels in image Y, C 1 ,C 2 ,C 3 Represents a constant that maintains stability.
3. The method for generating a prototype spectrum set based on superpixels according to claim 1, Features: The fixed interval is calculated by dividing the total number of superpixel blocks by the actual number of objects in the area of the captured image.
