Spectral clustering method and system for hyperspectral image
By preprocessing and core image structure of hyperspectral image data, combined with the clustering method of core Laplace, the problems of high computational complexity and memory occupancy in large-scale hyperspectral image clustering are solved, and efficient and accurate clustering effect is achieved.
Patent Information
- Application Number
- CN202510169416.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-06-10
AI Technical Summary
When processing large-scale hyperspectral images, the prior art has high computational complexity and memory occupancy, making it difficult to effectively capture local structure or manifold information of the data, affecting clustering accuracy.
A hyperspectral image spectral clustering method is proposed. By preprocessing the acquired hyperspectral image data, the core map is constructed by extracting core points features, and the core Laplace map is constructed based on the core map to achieve efficient clustering tasks.
It effectively reduces the computational complexity and memory usage, improves clustering accuracy, and significantly shortens the running time. It is suitable for clustering tasks of large-scale hyperspectral image data.
Smart Images

Figure CN120125863A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data mining and image processing, and particularly to a hyperspectral image spectral clustering method and system. Background Art
[0002] Hyperspectral images (HSIs) can be acquired through various platforms, such as airplanes, drones, or orbital spectrometers. Hyperspectral images contain a large number of spatial pixels and hundreds of continuous spectral bands, and can provide rich spatial, spectral, and radiometric information about surface features and targets. Therefore, it is widely used in fields such as biomedicine, agriculture, food safety, environmental protection, military, and earth exploration.
[0003] In the field of analysis, processing, and application of hyperspectral images, machine learning and deep learning methods are usually used to mine the rich information stored in them. Among them, hyperspectral image classification is a fundamental research, aiming to divide each pixel in the hyperspectral image cube into a specific category, which is an important link in the practical application of hyperspectral images. In recent years, many hyperspectral image classification methods have been proposed, such as composite kernel methods, dictionary-based sparse representation, models combining spatial context and spectral correlation, and deep feature fusion techniques, to capture potential information and improve classification accuracy. Although these methods have improved the classification accuracy to varying degrees, they all rely on the supervised or semi-supervised strategy of the true labels of hyperspectral image pixels. However, manually annotating hyperspectral image pixels is not only time-consuming but also costly, which poses a significant limitation in practical applications.
[0004] To address the problems brought by limited labels, unsupervised clustering methods have gradually attracted attention. These methods attempt to overcome the challenge of scarce labels in hyperspectral images by dividing pixels into different groups without true labels. Compared with supervised and semi-supervised methods, hyperspectral image clustering is a more fundamental but complex task, and its complexity mainly comes from the lack of labels, high-dimensional characteristics, and spectral variations of hyperspectral images. In addition, with the increasing diversification of hyperspectral image data and the rapid growth of the number of pixels, large-scale hyperspectral image clustering still faces the problems of excessive consumption of computing resources and the complexity of learning the non-linear structure of hyperspectral data in practical applications.
[0005] At the beginning of the research, a large number of clustering methods based on different mechanisms have been proposed. For example, k-means and fuzzy c-means are the most classic centroid-based clustering algorithms, which are prone to falling into local optima. To handle complex non-linear data, graph-based clustering algorithms have become important representatives that provide competitive results. For large-scale hyperspectral images, these clustering methods face huge challenges. Graph-based clustering usually represents the similarity between pixels by constructing a graph. For example, Density Peak Clustering (DPC) has been widely applied in the field of hyperspectral image analysis. These algorithms usually construct a fully connected graph by calculating the pairwise distances between pixels, and its computational complexity is as high as O(n 2 d), where n represents the number of pixels and d represents the dimension of the feature data. In addition, spectral clustering also requires eigenvalue decomposition, further increasing the complexity to O(n 3 ), which makes it difficult for these methods to scale to large-scale hyperspectral image datasets. With the rapid growth of the number of pixels in hyperspectral images, the efficiency of these algorithms has been significantly limited. Therefore, how to efficiently and effectively process large-scale hyperspectral images has become a key issue in current research.
[0006] To address the challenges of large-scale hyperspectral image clustering, researchers have proposed various strategies. One approach is to approximate the relationship between pixels by constructing an affinity matrix between pixel points and representative points (anchors), which is efficient and easy to implement. LSHC (GraphLSHC: towards large scale spectral hypergraph clustering) further utilizes a weighted association matrix to describe the affinity between sparse original data objects and representative points. However, under complex data distributions, its method may still be limited by insufficient local information. The FSCAG (Fast spectral clustering with anchor graph for large hyperspectral images) method proposed by Wang et al. improves the construction quality of the affinity matrix by considering the relationship between the mean information of neighboring pixels of a pixel point and the anchor. However, this method requires additional parameters to balance the influence of neighboring pixels on the affinity matrix. In addition, after obtaining the approximate eigenvectors, the LSC, LSHC, and FSCAG methods all need to use the k-means clustering algorithm to determine the final clustering results. The computational overhead of this additional step is related to the number of pixel points and the number of clustering categories. Especially when dealing with large-scale hyperspectral image data, it may significantly reduce efficiency. To improve the final clustering performance, Wang et al. proposed using the affinity matrix between data objects and representative points to accelerate the construction of the similarity matrix between data objects and directly obtaining the clustering labels through a non-negative relaxation optimization method, but this increases the time cost to a certain extent.
[0007] Another way to address the scalability issue is to cover all pixel points with a small number of representative points, thereby constructing a representative point graph with a smaller scale. The KASP (Fast approximate spectral clustering) method proposed by Yan et al. selects representative points using a random or k-means algorithm and calculates the Gaussian similarity between representative points based on the Euclidean distance, thus constructing a small-scale graph. Subsequently, this method applies the traditional spectral clustering algorithm to cluster the representative points and assigns each data sample to the corresponding clustering label according to the proximity relationship between the data object and the representative point. However, this method only utilizes the similarity information between representative points and may ignore the important manifold characteristics and geometric structures in the original data, thus affecting the clustering performance to a certain extent.
[0008] However, although traditional non-linear clustering methods have good performance in dealing with complex data distributions, their computational complexity and memory occupancy become the main bottlenecks when facing large-scale hyperspectral image data. In addition, although the efficient clustering methods proposed for large-scale data can improve the clustering efficiency, they often have deficiencies in capturing local data structures or manifold information, thus affecting the clustering accuracy. Summary of the Invention
[0009] In order to overcome the problems in the prior art that when dealing with complex data distributions, there are high computational complexity and memory occupancy rate, and there are deficiencies in capturing local data structures or manifold information, thus affecting the clustering accuracy, the object of the present invention is to propose a hyperspectral image spectral clustering method and system, which can effectively reduce the computational complexity and memory occupancy rate when dealing with complex data distributions, solve the deficiencies in capturing local data structures or manifold information, and thus improve the clustering accuracy.
[0010] To achieve the object of the present invention, the present invention is implemented by adopting the following technical solutions:
[0011] A hyperspectral image spectral clustering method, the method includes the following steps:
[0012] Obtain hyperspectral image data and preprocess the hyperspectral image data;
[0013] Extract core point features based on the preprocessed hyperspectral image to construct a core graph;
[0014] Construct a core Laplacian graph according to the core graph, and cluster the core points based on the constructed core Laplacian graph to complete hyperspectral image clustering.
[0015] In the above technical solution, by preprocessing the obtained hyperspectral image data, the practicability and reliability of the image data can be effectively improved, the efficiency of subsequent data processing can be improved to a certain extent, and the computational complexity and memory occupancy rate can be reduced. Extract the core point features of the image based on the preprocessed hyperspectral image, and thus construct a core graph of the hyperspectral image according to the core point features. The core graph can effectively capture the global and local geometric structures of the data through a sparse connection method, and at the same time significantly reduce the time complexity and memory occupancy of graph construction. Furthermore, construct a core Laplacian graph according to the core graph. The constructed core Laplacian graph can assign all pixels to the corresponding core point clusters according to the cluster labels of the core points and the affinity between the pixels and the core points, and complete an efficient clustering task.
[0016] Further, the process of preprocessing the hyperspectral image data includes:
[0017] Extract the pixel points of the hyperspectral image, use the pixel points as data objects, extract the wave frequency and position information, and form a two-dimensional feature data set X;
[0018] Among them, the data set X contains n data objects x i , where n = w × h is the number of pixel points.
[0019] In the above technical solution, by extracting the pixel points of the hyperspectral image, using the pixel points as data objects, extracting the wave frequency and position information, and forming a two-dimensional feature data set X, the practicability and reliability of the image data can be effectively improved, the efficiency of subsequent data processing can be improved to a certain extent, and the computational complexity and memory occupancy rate can be reduced
[0020] Furthermore, the process of extracting the core point features to construct the core graph includes:
[0021] Generate m clusters according to the data set X, and extract the core points of each cluster according to the generated m clusters;
[0022] According to the extracted core points, calculate the affinity between the pixels and the cores;
[0023] According to the affinity between the cores, calculate the core distance between the core points, and calculate the mutual scaled core distance between the core points;
[0024] Construct the core graph according to the mutual scaled core distance between the core points.
[0025] Furthermore, the process of extracting the core points of each cluster according to the generated m clusters includes:
[0026] Use the k-means method to cluster the data set X into m clusters, and the m clusters are denoted as
[0027] Calculate the mean point of all pixel points x in each cluster i , and use the calculated mean point as the core point π of the cluster i , and the expression is:
[0028]
[0029] Among them, |C i | represents the number of data objects in the cluster C i , x j represents the jth pixel point.
[0030] In the above technical solution, the goal of the k-means algorithm is to minimize the sum of the squared distances from all data objects to the centers of their respective clusters, and all cluster centers are regarded as a representative core set in the original data; during the iterative optimization process of k-means, it is ensured that the distance between each data object within a cluster and its nearest core is as small as possible, while maximizing the difference between clusters.
[0031] Furthermore, the process of calculating the affinity between a pixel and a core includes:
[0032] Retrieve the first r nearest core points for each pixel x i to calculate the local scalar σ i for each pixel x i , and the expression is:
[0033]
[0034] According to the local scalar σ i for each pixel x i , calculate the affinity Z ij between each pixel and its first r nearest core points, and the expression is:
[0035]
[0036] where N r (x i ) represents the set of the first r nearest core points of pixel x i , and σ j represents the local scalar of core point π i .
[0037] In the above technical solution, to ensure the sparsity of the graph, the present invention only retains the r largest non-zero entries for each pixel point, thereby avoiding over-densification of the graph; the non-linear characteristics of the data manifold mean that traditional metric methods such as Euclidean distance may not be able to accurately capture the complex information covered by the core points as representatives. Therefore, the present invention introduces a distance metric method based on shared pixels to better reflect the distance of core points on the non-linear manifold.
[0038] Furthermore, the process of calculating the mutual scaled core distance between core points includes:
[0039] For any two core points π i , π j ∈M, the core distance expression between core points is:
[0040]
[0041] Calculate the mutual scaled core distance between core points using the local scaling method The expression is:
[0042]
[0043] Among them, M represents the set of core points, φ(π i , π j ) = (Z T Z) ij represents the indirect affinity between core points, Z T represents the transpose matrix of the affinity matrix Z, represents the core distance d i from the core point π c to its r-th nearest core in the set of core points M, represents the r-th nearest neighbor core point of the core point π c determined according to the distance metric d i , represents the local scaled core distance between core points.
[0044] Furthermore, the process of constructing a core graph based on the mutual scaled core distance between core points includes:
[0045] Calculate the closeness between core points according to the local scaled core distance , and then calculate the weight of the core graph according to the closeness between core points. The expression is:
[0046]
[0047] Construct the core graph G c ;
[0048] Among them, G c (π i , π j ) is the weight of the core graph G c .
[0049] In the above technical solution, the weight G c of the core graph G c (π i , π j ) directly reflects the similarity between core points; the larger the weight, the closer two core points are on the data manifold; the smaller the weight, the farther their distance in the data space; the core graph can effectively capture the global and local geometric structures of the data through a sparse connection method, while significantly reducing the time complexity and memory occupancy of graph construction.
[0050] Furthermore, the process of constructing a core Laplacian graph based on the core graph includes:
[0051] Define A as the adjacency matrix of the core graph G c ;
[0052] Calculate the corresponding diagonal matrix D based on the adjacency matrix A c , to obtain the corresponding diagonal element D C (i,i), the expression is:
[0053]
[0054] According to the diagonal elements D C (i,i), construct the core Laplacian graph L c , the expression is:
[0055]
[0056] Among them, the adjacency matrix A contains elements a ij , element a ij Represents the core point π i and π j The weight of the edge between .
[0057] Furthermore, the process of clustering the core points based on the constructed core Laplacian graph includes:
[0058] For the core Laplacian graph L c Perform eigendecomposition, extract the first k eigenvectors, and combine them into a matrix U c ;
[0059] According to the matrix U c , the k-means clustering method is used to cluster the core graph G c The core point π i Perform discrete clustering to generate k clusters;
[0060] For each core point π i Divide into a corresponding cluster and get the cluster label Y of the core point C ;
[0061] According to the cluster label Y C The pixel clustering process includes:
[0062] For each pixel x i According to its closest core point π i The distance is assigned to the core point π i Clustering is performed in the clusters to which they belong, hyperspectral image clustering is completed, and the clustering results are output.
[0063] In the above technical solution, a core Laplacian graph is constructed according to the core graph. The constructed core Laplacian graph can assign all pixels to corresponding core point clusters according to the cluster labels of the core points and the affinity between the pixels and the core points, thereby completing an efficient clustering task.
[0064] A hyperspectral image spectral clustering system, the system comprising:
[0065] An acquisition module for acquiring hyperspectral image data;
[0066] A processing module for preprocessing the hyperspectral image data;
[0067] A construction module for extracting core point features based on the preprocessed hyperspectral image to construct a core graph, and constructing a core Laplacian graph according to the core graph;
[0068] A clustering module for clustering core points based on the constructed core Laplacian graph to complete hyperspectral image clustering.
[0069] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0070] The present invention provides a hyperspectral image spectral clustering method and system. By preprocessing the acquired hyperspectral image data, the practicability and reliability of the image data can be effectively improved, the efficiency of subsequent data processing can be improved to a certain extent, and the computational complexity and memory occupancy rate can be reduced; based on the preprocessed hyperspectral image, the core point features of the image are extracted, and thus a core graph of the hyperspectral image is constructed according to the core point features. The core graph can effectively capture the global and local geometric structures of the data through a sparse connection method, and at the same time significantly reduce the time complexity and memory occupancy of graph construction. Furthermore, a core Laplacian graph is constructed according to the core graph. The constructed core Laplacian graph can assign all pixels to the corresponding core point clusters according to the cluster labels of the core points and the affinity relationship between the pixels and the core points, completing an efficient clustering task. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a flowchart of the steps of a hyperspectral image spectral clustering method provided by an embodiment of the present application;
[0072] Figure 2 It is a schematic diagram of the hyperspectral image spectral clustering process provided by an embodiment of the present application;
[0073] Figure 3 It is a schematic diagram of the structure of a hyperspectral image spectral clustering system provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0074] To facilitate the understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Preferred embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0075] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this invention belongs. The terms used in the description of the present invention herein are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0076] Example 1:
[0077] This embodiment provides a hyperspectral image spectral clustering method, and the method includes the following steps:
[0078] Step S1: Obtain hyperspectral image data and preprocess the hyperspectral image data;
[0079] Step S2: Based on the preprocessed hyperspectral image, extract core point features to construct a core graph;
[0080] Step S3: Construct a core Laplacian graph according to the core graph, and cluster the core points based on the constructed core Laplacian graph to complete hyperspectral image clustering.
[0081] As a preferred embodiment, in step S1, the process of preprocessing the hyperspectral image data includes:
[0082] For the obtained hyperspectral image data HSI, with w×h pixels and b number of bands; extract the pixel points of the hyperspectral image, use the pixel points as data objects, extract wave frequency and position information, and form a two-dimensional feature data set X;
[0083] Among them, the data set X contains n data objects x i , n = w×h is the number of pixel points, and d = b + 2 is the dimension of the feature data.
[0084] It can be understood that by extracting the pixel points of the hyperspectral image, using the pixel points as data objects, extracting wave frequency and position information, and forming a two-dimensional feature data set X, the practicability and reliability of the image data can be effectively improved, the efficiency of subsequent data processing can be improved to a certain extent, and the calculation complexity and memory occupancy rate can be reduced.
[0085] In step S2, the process of extracting core point features to construct a core graph includes:
[0086] Step S21: Generate m clusters according to the data set X, and extract the core points of each cluster according to the generated m clusters;
[0087] Step S22: Calculate the affinity between the pixels and the core according to the extracted core points;
[0088] Step S23: Calculate the core distances between core points according to the affinity between cores, and calculate the mutual scaled core distances between core points;
[0089] Step S24: Construct a core graph according to the mutual scaled core distances between core points.
[0090] As a preferred embodiment, in step S21, the process of extracting the core points of each cluster according to the generated m clusters includes:
[0091] Use the k-means method to cluster the data set X into m clusters, and generate m clusters denoted as
[0092] Calculate the mean point of all pixel points x i in each cluster, and use the calculated mean point as the core point π i of this cluster. The expression is:
[0093]
[0094] where |C i | represents the number of data objects in cluster C i , x j represents the j-th pixel point.
[0095] Specifically, the original hyperspectral image data with n pixels and d spectral bands (where each pixel point ) is clustered into m clusters through k-means where the mean of all pixel points in each cluster is used as the core point of this cluster that is, each core point where |C i | is the number of data objects in cluster C i .
[0096] It can be understood that the goal of the k-means algorithm is to minimize the sum of the squares of the distances from all data objects to the centers of their respective clusters, and regard all cluster centers as a representative core set in the original data; during the iterative optimization process of k-means, ensure that the distance between each data object in the cluster and its nearest core is as small as possible, while maximizing the difference between clusters.
[0097] As a preferred embodiment, in step S22, the process of calculating the affinity between pixels and cores includes:
[0098] Retrieve the first r nearest core points of each pixel x i to calculate the local scalar σ i of each pixel x i . The expression is:
[0099]
[0100] According to each pixel x i with a local scalar σ i , calculate the affinity Z between each pixel and its first r nearest keypoints ij , and the expression is:
[0101]
[0102] where N r (x i ) represents the set of the first r nearest keypoints of pixel x i , and σ j represents the local scalar of keypoint π i .
[0103] Specifically, after obtaining the keypoints, calculate the affinity matrix Z between the pixels and the keypoints, where each element Z ij is calculated by the following formula:
[0104]
[0105] where Z ij represents the affinity between the i-th pixel and the j-th keypoint. σ i is the local scalar of pixel x i , defined as the average distance between it and the r nearest neighbor keypoints in the set of keypoints, specifically N r (x i ) represents the set of the first r nearest keypoints of pixel x i . σ i reflects the distribution characteristics of the pixel in its local neighborhood and can adapt to the change of data density in different regions. Similarly, σ j is the local scalar of keypoint π i , defined as the average distance from all pixel points that take π i as their nearest keypoint to π i . σ j reflects the distribution characteristics of keypoint π iIts representativeness in its local neighborhood describes the importance of the core point in the global data structure; it is worth noting that inspired by the sparse representation method, in order to ensure the sparsity of the graph, the present invention only retains the r largest non-zero entries of each pixel point, thus avoiding the over-density of the graph. Each row of the affinity matrix Z represents the affinity situation of the core points connected to the pixel point. An affinity of zero means there is no connection, and greater than zero means there is a connection between the pixel point and the core. Each pixel point will only connect to its first r nearest cores, that is, if a core does not belong to the first r nearest cores of a certain pixel point, the affinity between them is zero.
[0106] The non-linear characteristics of the data manifold mean that traditional metric methods such as the Euclidean distance may not be able to accurately capture the complex information covered by the core point as a representative. For this reason, the present invention introduces a distance metric method based on shared pixels to better reflect the distance of the core point on the non-linear manifold.
[0107] It can be understood that in order to ensure the sparsity of the graph, the present invention only retains the r largest non-zero entries of each pixel point, thus avoiding the over-density of the graph; the non-linear characteristics of the data manifold mean that traditional metric methods such as the Euclidean distance may not be able to accurately capture the complex information covered by the core point as a representative. For this reason, the present invention introduces a distance metric method based on shared pixels to better reflect the distance of the core point on the non-linear manifold.
[0108] As a preferred embodiment, in step S23, the process of calculating the mutual scaled core distance between core points includes:
[0109] For any two core points π i , π j ∈M, the core distance expression between core points is:
[0110]
[0111] Adopt the local scaling method to calculate the mutual scaled core distance between core points The expression is:
[0112]
[0113] Among them, M represents the set of core points, φ(π i , π j )=(Z T Z) ij represents the indirect affinity between core points, Z T represents the transpose matrix of the affinity matrix Z, represents the core distance d i between the core point π c and its r-th nearest core in the set of core points M, represents the r-th nearest neighbor core point π c determined according to the distance metric d i of the core point, represents the local scaled core distance between core points.
[0114] Specifically, according to the affinity matrix Z, the indirect affinity between cores, Z T Each row of represents the pixel points connected by the core. An affinity of zero means there is no connection, and a value greater than zero means there is a connection between the core and the pixel point. Each core has multiple connected pixel points. Through the connection affinity with the pixel points, the indirect affinity between cores can be calculated. The specific calculation formula is: φ(π i , π j ) = (Z T Z) ij . If there are no pixel points with indirect connections between two core points, the indirect affinity between the cores is zero; calculate the core distance between any two core points. If there are connected pixel points between two core points, the core distance between the two cores is If there are no pixel points with indirect connections between two core points, the core distance is set to infinity. After calculating the core distance, the r-th nearest core point of the core point can be found according to the core distance The core π i The local scalar of is the core distance from the core point to its r-th nearest core point, that is Combined with the core distance between core points, calculate the mutual scaled core distance between core points
[0115] As a preferred embodiment, in step S24, the process of constructing the core graph according to the mutual scaled core distance between core points includes:
[0116] Calculate the proximity between core points according to the local scaled core distance , and then calculate the weight of the core graph according to the proximity between core points. The expression is:
[0117]
[0118] Construct the core graph G according to the weight of the core graph c ;
[0119] where G c (π i , π j ) is the weight of the core graph G c .
[0120] It can be understood that the weight G of the core graph G c ofc (π i , π j ) directly reflects the similarity between core points; the greater the weight, the closer two core points are on the data manifold; the smaller the weight, the farther their distance in the data space; the core graph can effectively capture the global and local geometric structures of the data through a sparse connection method, while significantly reducing the time complexity and memory occupancy of graph construction.
[0121] As a preferred embodiment, in step S3, the process of constructing the core Laplacian graph from the core graph includes:
[0122] Define A as the adjacency matrix of the core graph G c ;
[0123] Calculate the corresponding diagonal matrix D according to the adjacency matrix A c , to obtain the corresponding diagonal element D C (i, i), and the expression is:
[0124]
[0125] According to the diagonal element D C (i, i), construct the core Laplacian graph L c , and the expression is:
[0126]
[0127] Among them, the adjacency matrix A contains the element a ij , and the element a ij represents the weight of the edge between the core points π i and π j .
[0128] Furthermore, the process of clustering the core points based on the constructed core Laplacian graph includes:
[0129] Perform eigen decomposition on the core Laplacian graph L c , extract the first k eigenvectors, and combine them into a matrix U c ;
[0130] According to the matrix U c , use the k-means clustering method to discretely cluster the core points π c in the core graph G i , generating k clusters;
[0131] Assign each core point π i to a corresponding cluster, obtaining the clustering label Y of the core points C ;
[0132] According to the clustering label YC The pixel clustering process includes:
[0133] For each pixel x i According to its closest core point π i The distance is assigned to the core point π i Clustering is performed in the clusters to which they belong, hyperspectral image clustering is completed, and the clustering results are output.
[0134] Specifically, the core Laplacian graph L c Perform eigendecomposition to obtain the eigenvalue sequence V and the corresponding eigenvector matrix U; sort the eigenvalues from large to small and find the subscripts of the first k largest eigenvalues; extract the first k eigenvectors according to the subscripts of the first k largest eigenvalues and combine them into the matrix U c ;Change U c As input, run the k-means clustering method to generate k clusters; each core is divided into a cluster, and the core cluster label Y is obtained c ; Find the nearest core for each pixel, and mark the cluster label of the pixel as the label of its nearest core. Finally, the cluster label sequence Y of all pixels is obtained. Each pixel is assigned to the cluster to which the core point belongs according to the distance to its nearest core point. This allocation strategy ensures that the clustering result of the pixel is consistent with the cluster of its most relevant core point, thereby achieving global coherence and local relevance in the entire clustering process.
[0135] It can be understood that the core Laplacian graph is constructed according to the core graph. The constructed core Laplacian graph can assign all pixels to the corresponding core point clusters according to the cluster labels of the core points and the affinity between the pixels and the core points, thereby completing an efficient clustering task.
[0136] In this embodiment, by preprocessing the acquired hyperspectral image data, the practicability and reliability of the image data can be effectively improved, the efficiency of subsequent data processing can be improved to a certain extent, and the computational complexity and memory occupancy can be reduced; the core point features of the image are extracted based on the preprocessed hyperspectral image, and then a core graph of the hyperspectral image is constructed according to the core point features. The core graph can effectively capture the global and local geometric structure of the data through sparse connections, while significantly reducing the time complexity and memory occupancy of the composition, and then a core Laplacian graph is constructed according to the core graph. The constructed core Laplacian graph can assign all pixels to corresponding core point clusters according to the cluster labels of the core points and the affinity between the pixels and the core points, thereby completing efficient clustering tasks.
[0137] Embodiment 2:
[0138] This example provides corresponding experimental data for further explanation based on the method steps described in Example 1, as follows:
[0139] As shown in Table 1, on the Salinas dataset (containing 512×217 pixels, 224 bands, a total of 54,129 labeled pixels, divided into 16 classes), with the settings of the number of core points m = 1000 and the number of nearest core points r = 5 for each pixel, the performance of the efficient spectral clustering method for large-scale hyperspectral images based on core graph construction was verified. The results show that:
[0140] a) Comparison with traditional spectral clustering
[0141] In terms of clustering metrics (such as overall accuracy OA, average accuracy AA, and normalized mutual information NMI), the results of the proposed method are close to those of the traditional spectral clustering method.
[0142] The running time is significantly shortened: only 1 / 10 of the running time of traditional spectral clustering, fully demonstrating the computational efficiency of this method.
[0143] b) Comparison with other large-scale clustering algorithms (such as LSC and KASP)
[0144] In terms of indicators such as overall accuracy (OA), average accuracy (AA), and normalized mutual information (NMI), the clustering results of the proposed method perform best.
[0145] The time efficiency remains at the same order of magnitude: the running times are all within 10 seconds, but the clustering accuracy is significantly better than other methods.
[0146] The experimental results fully show that the efficient spectral clustering method for large-scale hyperspectral images based on core graph construction not only ensures high-precision clustering results but also significantly shortens the running time, demonstrating its superiority and practical value in hyperspectral image clustering tasks.
[0147] As shown in Table 1, on the Salinas dataset (containing 512×217 pixels, 224 bands, a total of 54,129 labeled pixels, divided into 16 classes), with the settings of the number of core points m = 1000 and the number of nearest core points r = 5 for each pixel, the performance of the efficient spectral clustering method for large-scale hyperspectral images based on core graph construction was verified. The results show that:
[0148] a) Comparison with traditional spectral clustering
[0149] In terms of clustering metrics (such as overall accuracy OA, average accuracy AA, and normalized mutual information NMI), the results of the proposed method are close to those of the traditional spectral clustering method.
[0150] The running time is significantly shortened: only 1 / 10 of the running time of traditional spectral clustering, fully demonstrating the computational efficiency of this method.
[0151] b) Comparison with other large-scale clustering algorithms (such as LSC and KASP)
[0152] In terms of indicators such as overall accuracy (OA), average accuracy (AA), and normalized mutual information (NMI), the clustering results of the proposed method perform best.
[0153] The time efficiency remains at the same order of magnitude: the running time is within 10 seconds, but the clustering accuracy is significantly better than other methods.
[0154] The experimental results fully demonstrate that the efficient spectral clustering method for large-scale hyperspectral images based on core graph construction not only ensures high-precision clustering results but also significantly shortens the running time, demonstrating its superiority and practical value in hyperspectral image clustering tasks.
[0155] Table 1 Comparison of the performance (indicators: OA / %, AA / %, NMI / %) and running time (RT / seconds) of the Salinas dataset (the best results are marked in bold, and the second-best results are underlined)
[0156]
[0157]
[0158] Through the combination of core graph construction and spectral clustering, the present invention significantly improves the efficiency and accuracy of hyperspectral image clustering, providing a general and efficient solution for the clustering task of large-scale hyperspectral image data.
[0159] The efficient spectral clustering method for large-scale hyperspectral images based on core graph construction proposed by the present invention, through the innovative introduction of core graph construction technology and the combination with spectral clustering algorithms, brings the following significant technical effects:
[0160] A: Reduce computational complexity
[0161] The core graph construction technology constructs a sparse core graph by selecting a small number of core points, combining local scaling technology and pixel information radiated by core points. Compared with the traditional spectral clustering algorithm that needs to construct a similarity graph between all samples, the present invention significantly reduces the time complexity and memory requirements of graph construction, improving the real-time performance and scalability of the algorithm.
[0162] B: Efficiently capture data characteristics
[0163] The core graph can effectively restore the geometric structure and manifold characteristics of the original hyperspectral image data, providing reliable global and local information support for the clustering process and ensuring the accuracy of the hyperspectral image clustering task.
[0164] C: Improve clustering performance
[0165] Experiments on multiple hyperspectral image datasets show that the clustering algorithm of the present invention is superior to traditional spectral clustering algorithms and other large-scale clustering methods in terms of metrics such as overall accuracy (OA), average accuracy (AA), and normalized mutual information (NMI). Especially when dealing with large-scale datasets, it shows more excellent performance.
[0166] D: Strong adaptability
[0167] The construction parameters of the core graph (the number of core points m and the number of the nearest core points r for each pixel) can be flexibly adjusted. By reasonably selecting parameters, a good balance can be achieved between clustering accuracy and computational efficiency, which is applicable to hyperspectral image datasets of different scales and complexities.
[0168] Embodiment Three:
[0169] This embodiment provides a hyperspectral image spectral clustering system. Refer to Figure 3 , the system includes:
[0170] An acquisition module, configured to acquire hyperspectral image data;
[0171] A processing module, configured to preprocess the hyperspectral image data;
[0172] A construction module, configured to extract core point features based on the preprocessed hyperspectral image to construct a core graph, and construct a core Laplacian graph according to the core graph;
[0173] A clustering module, configured to cluster core points based on the constructed core Laplacian graph to complete hyperspectral image clustering.
[0174] The above are only embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A hyperspectral image spectral clustering method, characterized in that: The method comprises the following steps: Acquiring hyperspectral image data, and preprocessing the hyperspectral image data; Based on the preprocessed hyperspectral image, core point features are extracted to construct a core map; A core Laplacian graph is constructed according to the core graph, and the core points are clustered based on the constructed core Laplacian graph to complete the clustering of the hyperspectral image.
2. The hyperspectral image spectral clustering method according to claim 1, characterized in that: The process of preprocessing the hyperspectral image data includes: Extracting pixel points of the hyperspectral image, taking the pixel points as data objects, extracting wave frequency and position information, and forming a two-dimensional feature data set X; The data set X contains n data objects x i , n=w×h is the number of pixels.
3. The hyperspectral image spectral clustering method according to claim 2, characterized in that: The process of extracting core point features to construct a core map includes: Generate m clusters based on the data set X, and extract the core points of each cluster based on the generated m clusters; Based on the extracted core points, the affinity between the pixel and the core is calculated; According to the affinity between cores, the core distance between core points is calculated, and the mutual scaled core distance between core points is calculated; The core graph is constructed based on the mutual scaled core distances between core points.
4. The hyperspectral image spectral clustering method according to claim 3, characterized in that: The process of extracting the core points of each cluster based on the generated m clusters includes: The k-means method is used to cluster the data set X into m clusters, and the m clusters generated are recorded as Calculate all pixels x in each cluster i The mean point is the calculated mean point as the core point of the cluster π i , the expression is: Among them, |C i | represents cluster C i The number of data objects in x j represents the jth pixel.
5. The hyperspectral image spectral clustering method according to claim 4, characterized in that: The process of calculating the affinity between a pixel and a kernel includes: Retrieve every pixel x i The first r nearest core points of , to calculate each pixel x i The local scalar σ i , the expression is: According to each pixel x i The local scalar σ i , calculate the affinity Z between each pixel and its first r nearest core points ij , the expression is: Among them, N r (x i ) represents pixel x i The set of the nearest r core points, σ j Represents the core point π i The local scalar of .
6. The hyperspectral image spectral clustering method according to claim 5, characterized in that: The process of calculating the inter-scaled core distance between core points includes: For any two core points π i ,π j ∈M, the core distance expression between core points is: The local scaling method is used to calculate the mutual scaled core distance between core points. The expression is: Among them, M represents the core point set, φ(π i ,π j )=(Z T Z) ij represents the indirect affinity between core points, Z T represents the transposed matrix of the affinity matrix Z, Represents the core point π i The core distance d to the rth closest core in the core point set M c , According to the distance metric d c Determined core point π i The rth nearest neighbor core point, Represents the local scaled core distance between core points.
7. The hyperspectral image spectral clustering method according to claim 6, characterized in that: The process of constructing a core map based on the mutually scaled core distances between core points includes: Scale core distance based on local Calculate the proximity between the core points, and then calculate the weight of the core graph according to the proximity between the core points. The expression is: Construct the core graph G according to the weight of the core graph c ; Among them, G c (π i ,π j ) Core graph G c The weight of .
8. The hyperspectral image spectral clustering method according to claim 7, characterized in that: The process of constructing the core Laplacian graph based on the core graph includes: Define A as the core graph G c The adjacency matrix of Calculate the corresponding diagonal matrix D based on the adjacency matrix A c , to obtain the corresponding diagonal element D C (i,i), the expression is: According to the diagonal elements D C (i,i), construct the core Laplacian graph L c , the expression is: Among them, the adjacency matrix A contains elements a ij , element a ij Represents the core point π i and π j The weight of the edge between .
9. The hyperspectral image spectral clustering method according to claim 8, characterized in that: The process of clustering core points based on the constructed core Laplacian graph includes: For the core Laplacian graph L c Perform eigendecomposition, extract the first k eigenvectors, and combine them into a matrix U c ; According to the matrix U c , use k-means clustering method to cluster the core graph G c The core point π i Perform discrete clustering to generate k clusters; For each core point π i Divide into a corresponding cluster and get the cluster label Y of the core point C ; According to the cluster label Y C The pixel clustering process includes: For each pixel x i According to its closest core point π i The distance is assigned to the core point π i Clustering is performed in the clusters to which they belong, hyperspectral image clustering is completed, and the clustering results are output.
10. A hyperspectral image spectral clustering system, characterized in that: The system comprises: An acquisition module, used for acquiring hyperspectral image data; A processing module, used for preprocessing the hyperspectral image data; A construction module, used for extracting core point features to construct a core graph based on the preprocessed hyperspectral image, and constructing a core Laplacian graph according to the core graph; The clustering module is used to cluster the core points based on the constructed core Laplacian graph to complete the hyperspectral image clustering.