Hyperspectral remote sensing image ground object classification method based on spectral fingerprint iterative matching
By constructing a spectral fingerprint template library through an iterative matching method of spectral fingerprints and using Hamming distance progressive matching, the problems of computational redundancy and noise interference in hyperspectral image classification are solved, and efficient and interpretable land cover classification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XUCHANG UNIV
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-09
AI Technical Summary
Existing hyperspectral remote sensing image classification methods suffer from computational complexity, low classification accuracy, and poor interpretability when processing high-dimensional, nonlinear, and noise-sensitive data, and lack effective end-to-end solutions.
A spectral fingerprint iterative matching method is adopted. By eliminating invalid bands and suppressing noise, a spectral fingerprint template library is constructed. Land cover classification is performed using Hamming distance and a multi-round progressive threshold matching mechanism to generate standard ENVI classification files and their header files.
It significantly reduces data complexity, improves classification accuracy and efficiency, and achieves a seamless conversion from structured tables to geospatial classification products, making it suitable for rapid classification of sample-scarce areas or new sensor data.
Smart Images

Figure CN122176413A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent interpretation technology of remote sensing images, and more specifically, to a method for classifying ground features in hyperspectral remote sensing images based on iterative matching of spectral fingerprints. Background Technology
[0002] Hyperspectral remote sensing technology, by fusing imaging and spectral analysis, can simultaneously acquire spatial and spectral information of ground features across tens to hundreds of continuous narrow bands, forming a three-dimensional data cube with "map-spectrum integration" characteristics. Its spectral resolution can reach the nanometer level (on the order of 10⁻²λ). This technological breakthrough makes it possible to capture continuous and detailed spectral features of ground features (i.e., "spectral fingerprints"), providing an unprecedented data foundation for the refined identification and quantitative inversion of ground features. Currently, hyperspectral remote sensing has shown broad application prospects in fields such as geological and mineral exploration, precision agricultural management, ecological environment monitoring, and military target identification.
[0003] However, while hyperspectral imagery provides a wealth of information, it also introduces significant technical challenges. First, hyperspectral data has extremely high dimensionality, with adjacent bands often exhibiting high correlation, leading to severe data redundancy—the so-called "curse of dimensionality" (Hughes's phenomenon). This not only increases computational and storage burdens but may also cause overfitting in classification models, affecting their generalization ability. Second, hyperspectral imagery is susceptible to interference from sensor noise, atmospheric disturbances, and changes in illumination conditions, causing variations in the spectral characteristics of ground features. This exacerbates the phenomena of "different spectra for the same type of ground feature" and "similar spectra for different types of ground features," posing a serious challenge to classification accuracy. Furthermore, the rich spectral information itself requires more efficient and robust feature extraction and classification algorithms to fully exploit its discriminative potential.
[0004] Currently, methods for land cover classification using hyperspectral imagery can be broadly categorized into two types: traditional machine learning methods and deep learning methods. Traditional methods, such as Support Vector Machines (SVM), Maximum Likelihood Classification, and Spectral Angle Mapping (SAM), while effective to some extent, often struggle to fully extract deep spectral features when processing high-dimensional, nonlinear, and noisy hyperspectral data, and are highly sensitive to the quality and quantity of training samples. In recent years, deep learning methods, represented by Convolutional Neural Networks (CNNs), have achieved significant breakthroughs in hyperspectral classification tasks by automatically learning hierarchical features, particularly excelling in spectral-spatial joint modeling capabilities. However, deep learning methods typically rely on massive amounts of labeled samples for training, resulting in complex model structures, high computational costs, and a "black box" problem with weak interpretability, limiting their application scenarios with limited samples or strict requirements for computational efficiency.
[0005] Furthermore, existing classification processes largely focus on optimizing the classifier itself, while neglecting a comprehensive, interpretable, and efficient technical solution for the entire chain from raw data to final classification results. In particular, there is a lack of an end-to-end solution that can systematically address hyperspectral data redundancy, noise interference, and spectral variability, while balancing classification accuracy, efficiency, and interpretability. Therefore, exploring a novel hyperspectral image classification method that is principled, computationally efficient, robust to noise, and capable of gradually adapting to spectral variability is of significant theoretical and practical importance for promoting the practical and intelligent development of hyperspectral remote sensing technology.
[0006] No effective solutions have yet been proposed to address the problems in the relevant technologies. Summary of the Invention
[0007] To address the problems in related technologies, this invention proposes a hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching, in order to overcome the aforementioned technical problems existing in the existing related technologies.
[0008] Therefore, the specific technical solution adopted by the present invention is as follows:
[0009] In a first aspect, this invention discloses a hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching, comprising: removing invalid bands and suppressing noise in the original hyperspectral image, while retaining core band images with high information validity; converting the core band images pixel by pixel into a spectral coding sequence composed of integer values, and organizing it into a structured CSV format dataset by rows and columns; selecting sample points of various typical land covers based on high-resolution reference images and visual interpretation, and extracting multi-band spectral feature vectors from the CSV format dataset using the spatial coordinates of the sample points to construct a spectral fingerprint template library; traversing each spectral feature vector in the CSV format dataset to be classified, and calculating the light to be classified. The Hamming distance between the spectral feature vector and the spectral feature vector in the spectral fingerprint template library is calculated, and a multi-round progressive threshold matching mechanism is used to progressively match the Hamming distance. By gradually widening the threshold in each round, spectral feature vectors with different confidence levels are covered to generate land cover classification results. The land cover classification results are reconstructed into a two-dimensional classification matrix, and the georeferenced information of the original hyperspectral image is reused to generate a standard ENVI classification file and its header file. Through user-defined reclassification mapping rules, the standard ENVI classification file and its header file are reclassified and merged, and visualization colors are configured to output land cover classification products that can be directly used for thematic mapping and analysis, so as to realize the classification of land cover in hyperspectral remote sensing imagery.
[0010] Furthermore, the process of removing invalid bands and suppressing noise from the original hyperspectral image while retaining core band images with high information validity, and converting the core band images pixel by pixel into spectral coding sequences composed of integer values, and organizing them into a structured CSV format dataset by row and column, includes: supporting user-defined removal of invalid band ranges with high noise or redundant information from the original hyperspectral image, retaining core band images with high information content and strong discriminative ability; reading raster data from the retained core band images band by band, converting them into a pixel value matrix, and organizing them into a structured CSV format file by row and column position; discretizing the continuous pixel values in the structured CSV format file of each band using the quantile discretization method to highlight the spectral differences between ground features, and forming a spectral feature coding sequence for each pixel according to the mapping rules; and horizontally concatenating the spectral feature coding sequences of each pixel according to the pixel row and column position to generate a structured CSV format dataset, providing a standardized input format for subsequent spectral fingerprint extraction and matching.
[0011] Furthermore, the step of selecting sample points of various typical land cover types based on high-resolution reference images and visual interpretation, and extracting multi-band spectral feature vectors from the CSV format dataset using the spatial coordinates of the sample points to construct a spectral fingerprint template library includes: supporting batch import of vector sample points and high-resolution reference images; automatically aligning the coordinate system of the vector sample points and the high-resolution reference images with the coordinate system and space; extracting the pixel row and column numbers of each sample point on the original hyperspectral image; using the pixel row and column numbers of the sample points to locate and extract the complete spectral feature vector of each sample point from the digitized CSV format dataset; and automatically organizing and outputting the spectral feature vectors of all sample points according to land cover categories into a structured CSV file to form a standardized spectral fingerprint template library.
[0012] Furthermore, the feature of supporting batch import of vector sample points and high-resolution reference images, automatically aligning the vector sample points and high-resolution reference images in coordinate system and space, and extracting the pixel row and column number of each sample point on the original hyperspectral image includes: selecting sample points of various typical land features by visual interpretation based on land cover classification standards and referring to the high-resolution reference image; recording and storing the spatial location and category label of the sample points as vector point sample points with geographic coordinates; uniformly converting the vector point sample points to a spatial reference system consistent with the original hyperspectral image, and calculating the pixel row and column number corresponding to each sample point.
[0013] Further, the process of traversing each spectral feature vector in the CSV format dataset to be classified, calculating the Hamming distance between the spectral feature vector to be classified and the spectral feature vectors in the spectral fingerprint template library, and using a multi-round progressive threshold matching mechanism to progressively match the Hamming distance, gradually covering spectral feature vectors with different confidence levels by relaxing the threshold in each round, and generating land cover classification results includes: reading standard spectral feature vectors of multiple land cover classes from the spectral fingerprint template library as a reference sequence, and allowing users to customize the matching order, matching round, and round threshold of the samples; traversing the CSV format dataset to be classified according to the customized matching order and matching round, calculating the Hamming distance between each spectral feature vector and the spectral feature vectors in the spectral fingerprint template library in turn; progressively matching the Hamming distance according to the multi-round progressive threshold matching mechanism, assigning corresponding category labels to the spectral feature vectors that meet the minimum threshold in the first round, and allowing unmatched spectral feature vectors to enter subsequent rounds, and performing rematching and reclassification in turn after relaxing the threshold in each round, to generate complete land cover classification results.
[0014] Furthermore, the progressive matching of Hamming distance based on a multi-round progressive threshold matching mechanism assigns corresponding category labels to spectral feature vectors that meet the minimum threshold in the first round, while unmatched spectral feature vectors enter subsequent rounds. After each round of threshold relaxation, rematching and reclassification are performed sequentially to generate a complete land cover classification result. This includes: initializing the matching process by customizing a threshold increment sequence from strict to lenient and inputting it into the spectral fingerprint template library; initiating a multi-round iterative process, the first round traversing all spectral feature vectors to be classified, and using the Hamming distance and the most stringent threshold... The system uses a threshold for each round to determine the matching, classifies the successfully matched spectral feature vectors, and generates a set of unmatched pixels. Each round of matching calculates the unmatched pixel set generated in the previous round and repeats the matching determination and classification using an incrementally relaxed round threshold sequence, dynamically updating the unmatched pixel set. This iterative loop continues until the number of rounds exceeds the preset round threshold or the unmatched pixel set is empty, at which point the loop terminates. The classification results of successfully matched pixels from all rounds are integrated, and the remaining unmatched pixels are uniformly labeled to generate a complete land cover classification result.
[0015] Furthermore, the multi-round iterative process involves first traversing all spectral feature vectors to be classified, and using the Hamming distance and the strictest round threshold for judgment. Successfully matched spectral feature vectors are classified to generate an unmatched pixel set. This includes: if the Hamming distance does not exceed the current round threshold, the cell value of the spectral feature vector is replaced with the corresponding category replacement value, and it is considered a successfully classified spectral feature vector in this round, ending subsequent matching of the spectral feature vector; if the Hamming distance exceeds the current matching threshold, it is determined that the spectral feature vector does not have sufficient similarity to any land cover template in the current round, the spectral feature vector is retained, and the spectral feature vector is input into the unmatched pixel set for the next round of matching.
[0016] Furthermore, the process of reconstructing the land cover classification results into a two-dimensional classification matrix and reusing the georeferenced information of the original hyperspectral image to generate a standard ENVI classification file and its header file includes: cleaning and organizing the unmatched cells and file structure in the land cover classification results to generate a clean two-dimensional classification matrix; and combining the two-dimensional classification matrix with the georeferenced information extracted from the original hyperspectral image to generate a standard ENVI classification file with georeferenced information and its header file.
[0017] Furthermore, the process of reclassifying and merging standard ENVI classification files and their header files using user-defined reclassification mapping rules, configuring visualization colors, and outputting land cover classification products that can be directly used for thematic mapping and analysis, thereby achieving the classification of land cover in hyperspectral remote sensing imagery, includes: according to user-defined reclassification mapping rules, unifying the multi-value labels of the same type generated by multiple rounds of matching in standard ENVI classification files and their header files into a single category identifier, and standardizing the identifier values of unclassified areas to generate standardized classification data; configuring a specified display color for each final category in the standardized classification data, and writing the display color along with georeferenced information into a new file to generate land cover classification products that can be directly used for thematic mapping; and calculating accuracy indicators by comparing and analyzing the land cover classification products with validation samples to complete the quantitative evaluation of the classification effect.
[0018] Secondly, this invention also discloses a hyperspectral remote sensing image land cover classification system based on spectral fingerprint iterative matching, the system comprising:
[0019] The image processing module is used to remove invalid bands and suppress noise in the original hyperspectral images, while retaining the core band images with high information validity; it converts the core band images pixel by pixel into a spectral coding sequence composed of integer values, and organizes them into a structured CSV format dataset by rows and columns.
[0020] The fingerprint database construction module is used to select sample points of various typical land features based on high-resolution reference images and visual interpretation, and extract multi-band spectral feature vectors from the CSV format dataset using the spatial coordinates of the sample points to construct a spectral fingerprint template library.
[0021] The iterative matching module is used to traverse each spectral feature vector in the CSV format dataset to be classified, calculate the Hamming distance between the spectral feature vector to be classified and the spectral feature vector in the spectral fingerprint template library, and use a multi-round progressive threshold matching mechanism to progressively match the Hamming distance. By gradually relaxing the threshold in each round, it gradually covers spectral feature vectors with different confidence levels to generate land cover classification results.
[0022] The geocoding module is used to reconstruct the land cover classification results into a two-dimensional classification matrix and reuse the georeference information of the original hyperspectral image to generate standard ENVI classification files and their header files.
[0023] The productization module is used to reclassify and merge standard ENVI classification files and their header files through user-defined reclassification mapping rules, configure visualization colors, and output land cover classification products that can be directly used for thematic mapping and analysis, so as to realize the classification of land cover in hyperspectral remote sensing images.
[0024] The beneficial effects of this invention are as follows:
[0025] 1. This invention effectively solves the computational redundancy and "different spectra for the same object" interference problems in traditional hyperspectral classification methods by constructing a spectral fingerprint template library and using Hamming distance iterative matching technology. It employs multi-band spectral sequence discretization encoding to transform high-dimensional spectral information into compact one-dimensional feature vectors, significantly reducing data complexity. Combined with a fast similarity measure based on Hamming distance, it greatly improves matching efficiency while maintaining classification accuracy. The template library supports the construction of multiple standard spectral fingerprints, providing interpretable and reusable discrimination criteria for different land cover categories.
[0026] 2. This invention proposes a multi-round progressive threshold matching mechanism. By gradually relaxing the Hamming distance threshold in each round, it achieves progressive coverage from high-confidence pixels to low-confidence pixels, balancing the accuracy and completeness of classification. The strict threshold in the first round ensures high-precision identification of core land cover features, while subsequent rounds gradually incorporate boundary and mixed pixels, effectively improving the coverage and robustness of the classification. This mechanism can flexibly adapt to the spectral variation characteristics of different land cover types, providing an adjustable matching strategy for land cover classification in complex scenarios.
[0027] 3. This invention achieves a seamless conversion process from structured tabular data to geospatial classification products. By reconstructing row and column positions and reusing geographic coordinate information, the classification results in CSV format are quickly converted to the standard format of remote sensing software such as ENVI, while maintaining the spatial reference and resolution information of the original image. The reclassification module supports user-defined label mapping and visualization color schemes, directly generating classification results that can be used directly for thematic mapping and spatial analysis, significantly improving the usability and engineering efficiency of the output.
[0028] 4. This invention constructs a fully automated processing system encompassing image digitization, template construction, iterative matching, and output, forming a complete lightweight hyperspectral classification solution. This method does not rely on complex model training or a large number of labeled samples, making it particularly suitable for rapid classification tasks in areas with scarce samples or using data from novel sensors. It has broad application prospects in fields such as agricultural crop identification, land use monitoring, and ecological environment assessment, providing efficient, reliable, and scalable technical support for the intelligent interpretation of hyperspectral remote sensing images. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a flowchart of a hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching according to an embodiment of the present invention;
[0031] Figure 2 This is a schematic diagram illustrating the application of the fingerprint recognition algorithm principle upon which this invention is based to an image-based ground feature classification method.
[0032] Figure 3 This is a schematic diagram illustrating how the present invention quantizes data into a specified number of integer categories (e.g., levels 1-5) using a quantile discretization method.
[0033] Figure 4 This is a schematic diagram of the multi-level progressive Hamming distance threshold matching mechanism implemented according to the present invention;
[0034] Figure 5 This is a schematic diagram illustrating the implementation of hyperspectral image preprocessing and pixel-level digital conversion according to S1 of the present invention;
[0035] Figure 6 This is a schematic diagram illustrating the construction of a spectral fingerprint template library in S2 according to the present invention, providing a standard feature reference for subsequent classification;
[0036] Figure 7 This is a schematic diagram illustrating the use of a multi-level progressive Hamming distance matching algorithm to perform refined classification of remote sensing pixels in S3 according to the present invention.
[0037] Figure 8 This is a schematic diagram illustrating the complete reconstruction of classification results from unstructured labels to geospatial products using the S4 implementation according to the present invention;
[0038] Figure 9 This is a schematic diagram illustrating the standardization and visualization optimization of classification results achieved through reclassification processing in S5 according to the present invention.
[0039] Figure 10 This is a classification result diagram based on the present invention;
[0040] Figure 11 It is based on the results of a traditional classifier. Detailed Implementation
[0041] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention. The components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0042] According to embodiments of the present invention, a method for classifying ground features in hyperspectral remote sensing images based on iterative matching of spectral fingerprints is provided.
[0043] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 and Figure 2 As shown, the hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching according to an embodiment of the present invention includes:
[0044] Step S1: Remove invalid bands and suppress noise from the original hyperspectral image, and retain the core band image with high information validity; convert the core band image pixel by pixel into a spectral coding sequence composed of integer values, and organize it into a structured CSV format dataset by rows and columns.
[0045] In this optional embodiment, the process of removing invalid bands and suppressing noise from the original hyperspectral image while retaining the core band image with high information validity, and converting the core band image pixel by pixel into a spectral coding sequence composed of integer values, and organizing it into a structured CSV format dataset by rows and columns, includes:
[0046] It supports users to customize the removal of invalid band ranges with high noise or redundant information from the original hyperspectral image, while retaining the core band image with high information content and strong discrimination ability.
[0047] The raster data in the preserved core band image is read band by band, converted into a pixel value matrix, and organized into a structured CSV file according to the row and column positions.
[0048] The quantile discretization method is used to discretize the continuous pixel values in the structured CSV file of each band, highlighting the spectral differences between ground features, and forming the spectral feature coding sequence of each pixel according to the mapping rules (such as level 1-5).
[0049] The spectral feature encoding sequence of each pixel is horizontally concatenated according to the row and column positions of the pixels to generate a structured CSV format dataset, providing a standardized input format for subsequent spectral fingerprint extraction and matching.
[0050] Specifically, such as Figure 5 As shown, this step corresponds to the fingerprint image acquisition stage in fingerprint recognition. The core task is to transform the raw hyperspectral remote sensing image into a standard data format that can be used for matching analysis. By preprocessing the image (including invalid band removal and noise suppression), the information-rich core spectral bands are retained, and the multidimensional continuous spectral response of each pixel is quantized into discrete integer values. This digitization process essentially generates unique "spectral fingerprint" raw data for each spatial pixel, laying the foundation for subsequent template construction and similarity matching.
[0051] This step aims to transform the original hyperspectral image into a structured, computable feature dataset through band selection, numerical conversion, feature discretization, and multi-band fusion, laying the foundation for subsequent spectral fingerprint construction and matching.
[0052] I. Data Acquisition and Band Selection. Data Source: Download Hyperion L1 raw data products from the Geospatial Data Cloud (http: / / www.gscloud.cn / ). This data contains 242 bands, covering the spectral range from visible light (400-1000nm) to shortwave infrared (900-2500nm), with a spatial resolution of 30m and a swath width of 7.5km.
[0053] Correlation analysis: The correlation coefficient matrix between all bands was calculated using ENVI software, and the results were exported to Excel for visualization to identify highly correlated bands (correlation coefficient ≥ 0.95) and noisy bands (such as uncalibrated or abnormal signal strength bands).
[0054] Band selection rules: First, invalid bands are removed, including sensor noise bands, uncalibrated bands, and bands with severe edge signal attenuation; the remaining bands are grouped according to correlation, and bands with a correlation coefficient ≥0.95 in each group are considered redundant; from each group of redundant bands, bands with high information content and strong discrimination ability are retained, and the remaining redundant bands are removed; users can customize the range of bands to be deleted through the program interface, such as entering "1-7, 58-76, 120-128", to flexibly adapt to different data characteristics.
[0055] Screening results: This embodiment ultimately retains 145 effective bands, significantly alleviating the "curse of dimensionality" and reducing data redundancy and computational complexity.
[0056] II. Image Data Conversion and Numericalization: Execute the program "01merge.py", which is developed based on Python's rasterio and pandas libraries to perform numerical conversion of band image data. Conversion Process: 1. The program reads a folder containing filtered band image files (TIFF format), reads the raster data band by band, and converts it into a two-dimensional numerical matrix; 2. Each band's two-dimensional matrix is saved independently as a CSV file, with the filename format "band_number.csv". The rows and columns of the CSV file correspond to the rows and columns of the image, and the cell values are the original DN values (which can be converted to reflectance values after radiometric calibration); 3. Output Results: 145 independent CSV files are generated, each recording the pixel value information of the corresponding band, ensuring the integrity and traceability of the spectral data.
[0057] III. Spectral Response Value Discretization (Reclassification): To improve subsequent matching efficiency and enhance feature separability, the continuous pixel values in each band's CSV file are discretized: Threshold Calculation: The program iterates through the values in each CSV file and calculates its 20%, 40%, 60%, and 80% quantiles as discretization thresholds. In this embodiment, as shown... Figure 3 As shown in Table 1, the threshold values are 8, 33, 76, and 89.
[0058] Table 1 Mapping Rules Table
[0059]
[0060] Core objective: To achieve data compression through quantile discretization, while highlighting spectral differences between ground features, providing a clearer feature representation for subsequent matching.
[0061] IV. Multi-band feature sequence fusion. Fusion logic: Based on the row and column coordinates of the pixel, the discrete values (1-5) of the same pixel in 145 bands are spliced together in band order to form an integer sequence of length 145. Example: If the discrete values of a pixel in bands 1 to 145 are [1,3,2,…,4], then its final spectral feature sequence is “132…4”.
[0062] Dataset generation: The feature sequences of all pixels are organized according to their row and column positions to generate a structured CSV file (named "merged_data.csv"). Each row in the file corresponds to a row of the image, each column corresponds to a column of the image, and each cell stores a 145-dimensional integer sequence of the pixel, realizing spatial-spectral alignment of the hyperspectral data.
[0063] Step S2: Based on high-resolution reference images and visual interpretation, sample points of various typical land features are selected, and multi-band spectral feature vectors are extracted from the CSV format dataset using the spatial coordinates of the sample points to construct a spectral fingerprint template library.
[0064] In this optional embodiment, the step of selecting sample points of various typical land features based on high-resolution reference imagery and visual interpretation, and extracting multi-band spectral feature vectors from the CSV format dataset using the spatial coordinates of the sample points to construct a spectral fingerprint template library includes:
[0065] It supports batch import of vector sample points (SHP format) and high-resolution reference images (TIFF format), automatically aligns the vector sample points with the high-resolution reference images in coordinate system and space, and extracts the pixel row and column number of each sample point on the original hyperspectral image.
[0066] The complete spectral feature vector of each sample point is located and extracted from the digitized CSV format dataset using the cell row and column numbers of the sample points;
[0067] The spectral feature vectors of all sample points are automatically organized according to land cover categories and output as structured CSV files, forming a standardized spectral fingerprint template library.
[0068] In this optional embodiment, the support for batch importing vector sample points and high-resolution reference images, automatically aligning the vector sample points and high-resolution reference images in coordinate system 1 and space, and extracting the pixel row and column number of each sample point on the original hyperspectral image includes:
[0069] Based on the land use classification standard "Classification of Current Land Use Status" and referring to high-resolution reference images, sample points of various typical land features were selected through visual interpretation.
[0070] Record and store the spatial location and category label of the sample points as vector point sample points with geographic coordinates;
[0071] The vector point sample points are uniformly transformed to a spatial reference frame consistent with the original hyperspectral image, and the pixel row and column number corresponding to each sample point is calculated.
[0072] Specifically, such as Figure 6 As shown, this step corresponds to feature point marking and registration in fingerprint recognition. In the preprocessed image, training sample points of various typical land features are selected based on the principles of land feature purity and representativeness. These sample points are like registered fingerprints in a fingerprint database, requiring assurance of the purity and typicality of their spectral features. Through the auxiliary interpretation of high-resolution reference images, the precise spatial location of the sample points is obtained, and then their corresponding spectral feature vectors are extracted from the digital data, forming the raw materials for constructing a "standard spectral fingerprint template."
[0073] This stage corresponds to the feature template storage in fingerprint recognition. The feature information of various land cover samples obtained in the previous step is systematically organized and stored to construct a standardized "spectral fingerprint template library." By aggregating and analyzing the features of multiple samples of the same type of land cover (such as calculating the mean vector), standard templates that can represent the spectral characteristics of this type of land cover are generated. The quality of the template library construction directly determines the accuracy of subsequent classification; therefore, it is necessary to ensure that the templates have good representativeness and discriminative power.
[0074] This step involves sample selection, feature extraction, and template generation to construct a highly representative "spectral fingerprint" template library for ground features, providing a core reference for matching and classification.
[0075] I. Sample point collection and coordinate extraction, land feature classification standards: Referring to the first-level classification standard of "Land Use Status Classification" (GB / T21010-2017) and combined with the actual land cover status of the study area, land features are divided into four core categories: urban and rural land (including urban built-up areas, rural settlements and transportation land), water areas (including rivers, lakes and reservoirs), cultivated land (including paddy fields and dry land), and forest land (including arbor forests and shrub forests);
[0076] Sample selection principles: Purity principle: Based on visual interpretation of high-resolution Google Earth imagery, ensure that the sample area is a single homogeneous land cover unit, and avoid mixed pixels, land cover boundaries, shadow and cloud-contaminated areas;
[0077] Representativeness and balance principles: A stratified random sampling strategy is adopted, the samples are evenly distributed in space within the study area, the spectral response differences of different growth stages of the covered land cover under different environmental conditions are considered, and the number of samples in each category is on the same order of magnitude (no less than 50 samples in each category).
[0078] The principles of independence and sufficiency: the training sample space and the accuracy verification sample space are completely separated, and the total number of samples meets the requirements of model learning and reliability testing;
[0079] Coordinate saving: The selected sample points are saved as vector point files (SHP format), recording the geographic coordinates (latitude and longitude) and category labels of each sample point.
[0080] II. Extraction of spectral features of sample points. Running the program: Execute the program "02sample.py". The core process is as follows: Coordinate projection transformation: The program reads the sample point SHP file and the original hyperspectral image (used to obtain geographic transformation parameters), projects the geographic coordinates of the sample points to the image coordinate system, and calculates the pixel row and column number (pixel_row, pixel_col) corresponding to each sample point.
[0081] Feature sequence extraction: Read the “merged_data.csv” file generated in step S1, locate and extract the corresponding 145-dimensional integer sequence according to the row and column numbers of the sample point, and use it as the “original spectral fingerprint” of the sample point;
[0082] Sample data storage: Generate an independent CSV file (e.g., "Farmland_Sample Fingerprint.csv") for each type of land cover. The file contains the spatial coordinates, row and column numbers of the sample points and a 145-dimensional feature sequence to ensure the traceability of the sample data.
[0083] III. Template library generation and standard spectral fingerprint calculation: For all sample points of each land cover type, calculate the average value of its 145-dimensional feature sequence to form the "standard spectral fingerprint" (145-dimensional feature vector) of that land cover type, which fully represents the spectral commonality within the class;
[0084] Template library storage: The standard spectral fingerprints of the four types of land features are summarized to form a "standard spectral fingerprint template library", which is stored in the form of a set of files. Each type of land feature corresponds to a standard spectral fingerprint file, which is used for subsequent matching and classification.
[0085] Step S3: Traverse each spectral feature vector in the CSV format dataset to be classified, calculate the Hamming distance between the spectral feature vector to be classified and the spectral feature vector in the spectral fingerprint template library, and use a multi-round progressive threshold matching mechanism to progressively match the Hamming distance. By gradually relaxing the threshold of each round, the spectral feature vectors with different confidence levels are gradually covered to generate the land cover classification results.
[0086] In this optional embodiment, the step of traversing each spectral feature vector in the CSV format dataset to be classified, calculating the Hamming distance between the spectral feature vector to be classified and the spectral feature vectors in the spectral fingerprint template library, and using a multi-round progressive threshold matching mechanism to progressively match the Hamming distance, gradually covering spectral feature vectors with different confidence levels by relaxing the threshold in each round, and generating land cover classification results includes:
[0087] The system reads spectral feature vectors of various land cover standards from the spectral fingerprint template library as reference sequences, and allows users to customize the matching order, matching rounds, and round thresholds of samples.
[0088] According to the custom matching order and matching rounds, traverse the CSV format dataset to be classified, and calculate the Hamming distance between each spectral feature vector and the spectral feature vector in the spectral fingerprint template library in turn.
[0089] The Hamming distance is progressively matched using a multi-round progressive threshold matching mechanism. Spectral feature vectors that meet the minimum threshold in the first round are assigned corresponding category labels, while unmatched spectral feature vectors enter subsequent rounds. After each round of threshold relaxation, they are rematched and reclassified to generate complete land cover classification results.
[0090] In this optional embodiment, the Hamming distance is progressively matched according to a multi-round progressive threshold matching mechanism. Spectral feature vectors that meet the minimum threshold in the first round are assigned corresponding category labels, while unmatched spectral feature vectors enter subsequent rounds. After each round of threshold relaxation, rematching and reclassification are performed sequentially to generate a complete land cover classification result, including:
[0091] The matching process is initialized by customizing a round threshold increment sequence from strict to lenient and inputting it into the spectral fingerprint template library;
[0092] Initiate a multi-round iterative process. In the first round, traverse all spectral feature vectors to be classified and use Hamming distance and the strictest round threshold to determine the classification of successfully matched spectral feature vectors, generating a set of unmatched pixels.
[0093] Each round of matching involves processing the set of unmatched pixels generated in the previous round, and repeatedly performing matching judgment and classification using an increasing sequence of progressively relaxed round thresholds, dynamically updating the set of unmatched pixels.
[0094] The loop continues iteratively until the number of iterations exceeds the preset threshold or the set of unmatched pixels is empty, at which point the loop terminates.
[0095] The system integrates the classification results of successfully matched pixels from all rounds, and uniformly identifies the remaining unmatched pixels to generate a complete land cover classification result.
[0096] In this optional embodiment, the initiation of the multi-round iterative process, the first round traversing all spectral feature vectors to be classified, and using the Hamming distance and the strictest round threshold for judgment, classifying the successfully matched spectral feature vectors, and generating a set of unmatched pixels includes:
[0097] If the Hamming distance does not exceed the threshold of the current round, the cell value of the spectral feature vector is replaced with the replacement value of the corresponding category, and it is regarded as a spectral feature vector that has been successfully classified in this round, thus ending the subsequent matching of the spectral feature vector;
[0098] If the Hamming distance exceeds the current matching threshold, it is determined that the spectral feature vector does not have sufficient similarity with any land cover template in the current round. The spectral feature vector is retained and input into the unmatched cell set for the next round of matching.
[0099] Specifically, such as Figure 7 The diagram illustrates the core steps of the entire process, corresponding to the feature comparison and identity authentication process in fingerprint recognition. The computationally efficient Hamming distance is used as the similarity metric, comparing the "spectral fingerprint" of the pixel to be classified against various standard templates in the template library one by one. An innovative multi-level progressive threshold matching strategy is employed: the first round uses a strict threshold to ensure accurate classification of high-confidence pixels; subsequent rounds gradually relax the threshold, gradually incorporating edge pixels with certain spectral variations, until the preset classification coverage or accuracy target is achieved. Finally, through label mapping and spatial reconstruction, a complete land cover classification result is generated.
[0100] This step uses Hamming distance as the similarity criterion and achieves accurate land cover classification through multi-round progressive threshold matching, balancing classification accuracy and coverage integrity. For example... Figure 4 The diagram shown is a flowchart of the relevant multi-round progressive threshold matching process.
[0101] I. Hamming distance calculation principle: For a 145-dimensional feature vector of a pixel to be classified and the standard spectral fingerprint vector of a certain type of land cover in the template library The Hamming distance is defined as the number of times corresponding positions of two objects differ, and the calculation formula is as follows:
[0102] ;
[0103] In the formula, Indicates Hamming distance; This indicates an indicator function that takes the value 1 when the condition within the parentheses is true, and 0 otherwise. This metric is computationally efficient, robust to noise, and suitable for rapid matching of large-scale hyperspectral images.
[0104] II. Parameter Configuration and Program Running: To execute the "03match.py" program, the user needs to input the following core parameters:
[0105] Sample folder path: Points to the standard spectral fingerprint template library folder generated in step S2;
[0106] The path to the CSV file to be matched: points to the "merged_data.csv" file generated in step S1;
[0107] Output CSV file path: Specifies the path to save the classification results;
[0108] Matching order: Specify the matching priority of the land feature template (e.g., entering "1324" means matching cultivated land first, then water bodies, then urban and rural land, and finally forest land).
[0109] Matching rounds and thresholds: Set the number of matching rounds (8 rounds in this embodiment), and the Hamming distance threshold and category replacement value for each round are shown in Table 2.
[0110] Table 2 Matching Rounds Table
[0111]
[0112] The matching order and rounds are user-defined. The matching order refers to the sequence in which different land cover samples are matched against the classification sequence, such as matching cultivated land type first, then water body type, and finally forest land type. The matching rounds are set according to the desired classification effect. As the number of matching rounds increases, the land cover classification accuracy will also increase.
[0113] III. Iterative matching execution, matching process: The program reads the "merged_data.csv" file and traverses the 145-dimensional feature sequence of each cell;
[0114] The matching order and rounds in this invention are determined based on spectral separability analysis, a preset accuracy target, and a model balancing computational efficiency and accuracy. Specifically, land cover with unique spectral characteristics and low intraclass variability is prioritized for matching; the threshold sequence is dynamically generated based on the classification accuracy growth curve and the convergence of unmatched pixels, achieving optimal efficiency while ensuring the target accuracy (e.g., OA > 85%) is met. This method combines physical laws with data-driven approaches to ensure a scientific, efficient, and reliable matching process.
[0115] According to the set matching order and rounds, calculate the Hamming distance between the sequence to be classified and the standard spectral fingerprint of the corresponding category in the template library round by round;
[0116] If the Hamming distance is less than or equal to the current round threshold, the cell value is replaced with the corresponding replacement value for that category, and the matching for that cell in the current round ends; if the Hamming distance is greater than the current matching threshold, the cell does not have similarity to the land cover type, and no replacement is performed before proceeding to the next round of matching.
[0117] Core advantage: By adopting a threshold strategy that gradually loosens the threshold from 15 to 50, the first round ensures accurate classification of high-confidence areas, while subsequent rounds include edge or variant pixels, thereby improving classification coverage and robustness.
[0118] IV. Round Threshold Optimization Strategy: The threshold for each round of matching is different, and the threshold is calculated according to rules from strict to lenient.
[0119] The formula for calculating the round threshold is:
[0120] ;
[0121] In the formula, =145 indicates the length of the spectral eigenvector; Represents the threshold coefficient, strict matching. Use 0.10-0.15 for general matching, 0.20-0.35 for loose matching, and 0.40-0.50 for loose matching, as shown in Table 4.
[0122] Optimization logic: After each round of matching, the overall accuracy (OA) and Kappa coefficient are calculated, and the trend of accuracy changes is tracked. As shown in Table 3, the threshold combination that makes OA and Kappa coefficient reach the optimal balance between classification accuracy and coverage integrity is selected.
[0123] Table 3. Trend of Tracking Accuracy
[0124]
[0125] Table 4 Threshold Coefficients Value table
[0126]
[0127] Example: =100, for strict matching: =0.1 × 100 = 10; In this research experiment, the feature vector to be matched was 145 bits long. Based on the strict matching principle, the initial threshold was set to 15. During the matching process, the feature values of each land cover sample were compared one by one with the 145-bit feature vector corresponding to each pixel in the merged CSV file; if the Hamming distance between the two did not exceed the current threshold, the pixel was considered to belong to the land cover category and was assigned the corresponding category label (assigned a new value). These pixels that were successfully classified in the first round of matching had the highest confidence and constituted the most reliable land cover identification results in subsequent analysis.
[0128] like Figure 4As shown, one of the core innovations of this invention lies in the design of a refined, adaptive, and controllable multi-level progressive spectral matching process. This process aims to maximize classification coverage while ensuring classification accuracy in high-confidence regions through a strategy of multiple iterations and gradual threshold relaxation, thereby achieving effective identification of complex spectral variations and mixed pixels.
[0129] I. Overall Architecture of the Matching Process: This process follows a basic framework of "initialization - multi-round iterative matching - result integration." Each round of matching uses a unified "spectral fingerprint" template library, but with different Hamming distance thresholds. The process starts with the strictest threshold and gradually relaxes it, forming a progressive identification mode "from core to edge, from certainty to probing."
[0130] II. Detailed step breakdown, Step 1: System initialization and first round of high-precision matching;
[0131] Set initial threshold: based on spectral fingerprint encoding length ( ) and strict matching principle, through formula ; Calculate the first round matching threshold In the formula, the threshold coefficient is... Smaller values, such as 0.1 to 0.15, are typically chosen to ensure extremely high matching reliability.
[0132] Perform the first round of matching: Traverse all pixels to be classified and calculate the Hamming distance between their spectral feature vectors and the standard fingerprints of each class in the template library. If the distance between a pixel and a certain class template is less than or equal to... If the match is successful, the pixel is classified as belonging to that category and marked as "classified". This round of matching results corresponds to the area of ground features with the most typical and purest spectral characteristics in the image, and has the highest classification confidence.
[0133] Generate a set of unmatched cells: All cells that did not find any match in this round (i.e., whose distance to all templates is greater than 10 ... The cells are recorded to form an "unmatched cell set", which serves as the input for the next round of matching.
[0134] Step 2: Multi-round progressive matching and threshold relaxation, threshold increment strategy: Set a threshold increment sequence ,in The increment can be set based on experience (such as a fixed step size) or dynamically adjusted based on the success rate of the previous matching round.
[0135] Iterative matching round by round: For the 1st round Wheel matching ( ≥2): Update threshold: Use a new, more lenient threshold. .
[0136] Limited matching scope: Matching calculations are performed only on pixels in the "unmatched pixel set". Pixels that have already been classified in previous rounds will not participate in subsequent matching to avoid duplicate calculations and potential erroneous coverage.
[0137] Perform matching and judgment: Calculate the Hamming distance between these unmatched cells and each type of template. If the distance between a cell and a certain type of template is less than or equal to...
[0138] If a cell is found to belong to that class, it is removed from the "unmatched cell set" and added to the already classified results.
[0139] Update set: After this round, update the "unmatched cell set", which only includes cells that have not found a home after k rounds of matching.
[0140] Loop Termination Conditions: Iterative matching continues until one of the following conditions is met: The preset maximum number of rounds n is reached. The "unmatched cell set" is empty (all cells have been classified). Further relaxing the threshold no longer significantly increases the number of matched cells, or the Kappa coefficient and other indicators of the classification results begin to decline, indicating that the overmatching stage has been entered.
[0141] Step 3: Post-processing and output of results, final category integration: All pixels that successfully matched in all rounds are integrated according to their round and category to form a complete classification result map. The "round" information of the pixel classification can be retained as an indirect measure of its classification confidence (generally, the earlier the round, the higher the confidence).
[0142] Unclassified Pixel Processing: For pixels that remain unclassified after all rounds of matching (i.e., elements in the final "unmatched pixel set"), special processing can be applied, such as assigning a label "unclassified" or "unknown." Auxiliary methods such as nearest neighbor assignment and spatial context smoothing are used for estimation. Their original spectral characteristics are preserved for manual interpretation or further analysis.
[0143] Output and Evaluation: Outputs the final land cover classification results and calculates evaluation metrics such as overall accuracy (OA) and Kappa coefficient. It can also simultaneously output a "classification confidence layer" (based on matching rounds or minimum Hamming distance) to provide users with spatial distribution information on the reliability of the results.
[0144] III. Advantages and Innovations of the Process: The Art of Balancing Accuracy and Coverage: This process cleverly achieves a dynamic balance between "strict matching to ensure accuracy" and "relaxed matching to improve coverage." The first round of high-threshold screening eliminates most uncertainties, while subsequent rounds gradually incorporate pixels with similar spectral characteristics but reasonable variations.
[0145] Combating "different spectra for the same object" and noise: For similar ground features whose spectra vary due to factors such as illumination, phenology, and slight mixing (different spectra for the same object), a strict single threshold may exclude them. Progressive matching, by gradually increasing the tolerance, can "recapture" these varied pixels back to the correct category.
[0146] Optimized computational efficiency: Since each round of matching only calculates the remaining unclassified pixels from the previous round, it avoids repeated distance calculations for classified pixels, and the overall computational load is effectively controlled.
[0147] Provide decision-making transparency: The phased results of the process (classification diagrams at each round) and the final integrated results make the classification decision-making process more transparent, making it easier to understand and analyze the classification performance under different thresholds.
[0148] In summary, the multi-step progressive matching process proposed in this invention is not simply a relaxation of the threshold, but an intelligent classification decision system with clear iterative logic, dynamic range, and termination mechanism. It fully utilizes the detailed information of hyperspectral data and achieves robust, precise, and highly interpretable land cover classification for complex remote sensing scenes through a hierarchical and progressive approach. This is the core feature that distinguishes this method from traditional one-time classification algorithms.
[0149] Step S4: Reconstruct the land cover classification results into a two-dimensional classification matrix, and reuse the georeferenced information of the original hyperspectral image to generate a standard ENVI classification file and its header file;
[0150] In this optional embodiment, the step of reconstructing the land cover classification results into a two-dimensional classification matrix and reusing the georeferenced information of the original hyperspectral image to generate a standard ENVI classification file and its header file includes:
[0151] Clean and organize the unmatched cells and file structures in the land feature classification results to generate a clean two-dimensional classification matrix;
[0152] By combining the two-dimensional classification matrix with georeferenced information extracted from the original hyperspectral image, a standard ENVI classification file with georeferenced information and its header file are generated.
[0153] Specifically, such as Figure 8 As shown, this step converts the matched CSV format classification results into a standard remote sensing image format with georeferenced information, which facilitates subsequent visualization analysis and professional applications.
[0154] I. Data Format Cleaning and Conversion, Running the Program: Execute the "04envi.py" program. The core process is as follows: Data Cleaning: Read the classification result CSV file output by step S3, and replace the unmatched cells (still the original 145-dimensional sequence or empty values) with 0. At the same time, set the first cell of the file to 0 to ensure that the format is neat; Format Conversion: Convert the cleaned CSV file into a plain text matrix format (TXT format). Each row of the CSV corresponds to each row of the TXT, and the cell values are separated by spaces to form a two-dimensional classification matrix.
[0155] II. Georeferenced Information Reuse and ENVI File Generation, Georeferenced Information Extraction: The program provides an option to add georeferenced coordinates. If "Yes" is selected, the path to the original hyperspectral image TIFF file must be entered. Georeferenced transformation parameters (affine transformation) and coordinate system information are read from this file. Image Generation: The rasterio library is used to read the TXT format classification matrix. Based on the matrix shape (number of rows and columns) and the extracted georeferenced information, a new ENVI format raster file (.dat) is written, and a corresponding header file (.hdr) is generated. The header file fully records georeferenced metadata such as data size, data type, coordinate system, cell size, and top-left corner coordinates. Finally, standard ENVI classification data with georeferenced information is generated.
[0156] Step S5: Reclassify and merge standard ENVI classification files and their header files using user-defined reclassification mapping rules, configure visualization colors, and output land cover classification products that can be directly used for thematic mapping and analysis, so as to achieve the classification of land cover in hyperspectral remote sensing images.
[0157] In this optional embodiment, the process of reclassifying and merging standard ENVI classification files and their header files using user-defined reclassification mapping rules, configuring visualization colors, and outputting land cover classification products that can be directly used for thematic mapping and analysis, thereby achieving the classification of land covers in hyperspectral remote sensing imagery, includes:
[0158] Based on user-defined reclassification mapping rules, the multi-value labels of the same type generated by multiple rounds of matching in the standard ENVI classification file and its header file are uniformly merged into a single category identifier, and the identifier values of unclassified areas are standardized to generate standardized classification data.
[0159] Configure a specified display color for each final category in the normalized classification data, and write the display color along with georeferenced information into a new file to generate a land cover classification product that can be directly used for thematic mapping.
[0160] By comparing and analyzing the land cover classification products with the validation samples, the accuracy index is calculated to complete the quantitative evaluation of the classification effect.
[0161] Specifically, such as Figure 9 As shown, this step generates an intuitive thematic map of classification through reclassification, color assignment, and accuracy verification, and verifies the effectiveness of the method.
[0162] I. Reclassification Processing and Program Execution: Execute the "05Reclassification.py" program. The core process is as follows: Image Information Reading: Read the ENVI.dat file and .hdr header file generated in step S4, and parse the image size, data type, and geographic information; Reclassification Rule Setting: The user inputs the final number of land cover categories (4 categories in this embodiment), and specifies the original numerical range for each category, as shown in Table 5.
[0163] Table 5 Final Number of Land Feature Categories
[0164]
[0165] Category merging: The program merges the category labels from different rounds in the .dat file into a single category identifier according to the above rules, and assigns a value of 0 to unclassified pixels.
[0166] II. Thematic map generation and output, color assignment: Predefine visualization colors for each final category (arable land = green, water = blue, urban and rural land = yellow, forest land = dark green, unclassified = black), and write the color table into the ENVI header file;
[0167] Output: The reclassified data is saved as a new ENVI.dat file and a matching .hdr header file, forming the final classification thematic map, which can be directly opened in software such as ENVI and ArcGIS, facilitating visual analysis and cartographic applications.
[0168] III. Classification accuracy verification and comparative analysis. Verification indicators: Confusion matrix, overall accuracy (OA), and Kappa coefficient are used as the core evaluation indicators.
[0169] Confusion Matrix: A confusion matrix is a C×C table (where C is the total number of categories) used to visually represent the correspondence between classification results and the true labels. Let the first... The row represents the true category, the first row... The columns represent the predicted categories, then the matrix elements Indicates that the reality belongs to the category. However, it was predicted by the classifier to be of category [missing information]. The number of samples. Diagonal elements. This represents the number of samples correctly classified into each category, while off-diagonal elements reflect misclassifications.
[0170] Overall accuracy ( ): The proportion of correctly classified samples out of the total sample size; overall precision is defined as the proportion of all correctly classified samples out of the total sample size, and its mathematical expression is:
[0171] ;
[0172] In the formula, It represents the most intuitive accuracy metric, but it can lead to misleading overestimation in cases of class imbalance.
[0173] Kappa coefficient: measures the consistency between the classification result and random classification; a value ≥0.8 indicates high consistency; to overcome... Ignoring the issue of random consistency, Cohen proposed the Kappa coefficient to measure the degree of consistency between classification results and random classification. Its definition is as follows:
[0174] ;
[0175] In the formula, The probability of a random expectation being consistent is expressed by the following formula:
[0176] ;
[0177] In the formula, Represents the total number of samples. Indicates the first Total number of real samples in the class (row sum), Indicates the first Total number of predicted samples for each class (column sum).
[0178] The Kappa coefficient ranges from [−1, 1], and is usually interpreted as shown in Table 6.
[0179]
[0180] Compared to OA, the Kappa coefficient can more objectively reflect the actual performance of the classifier after eliminating random factors, and is especially suitable for scenarios with multiple classes and uneven sample distribution.
[0181] Results verification: After 8 rounds of matching, the overall accuracy of this embodiment reached 88.82%, the Kappa coefficient reached 0.8498, and the classification effect was excellent.
[0182] According to another embodiment of the present invention, a hyperspectral remote sensing image land cover classification system based on spectral fingerprint iterative matching is also provided, the system comprising:
[0183] The image processing module is used to remove invalid bands and suppress noise in the original hyperspectral images, while retaining the core band images with high information validity; it converts the core band images pixel by pixel into a spectral coding sequence composed of integer values, and organizes them into a structured CSV format dataset by rows and columns.
[0184] The fingerprint database construction module is used to select sample points of various typical land features based on high-resolution reference images and visual interpretation, and extract multi-band spectral feature vectors from the CSV format dataset using the spatial coordinates of the sample points to construct a spectral fingerprint template library.
[0185] The iterative matching module is used to traverse each spectral feature vector in the CSV format dataset to be classified, calculate the Hamming distance between the spectral feature vector to be classified and the spectral feature vector in the spectral fingerprint template library, and use a multi-round progressive threshold matching mechanism to progressively match the Hamming distance. By gradually relaxing the threshold in each round, it gradually covers spectral feature vectors with different confidence levels to generate land cover classification results.
[0186] The geocoding module is used to reconstruct the land cover classification results into a two-dimensional classification matrix and reuse the georeference information of the original hyperspectral image to generate standard ENVI classification files and their header files.
[0187] The productization module is used to reclassify and merge standard ENVI classification files and their header files through user-defined reclassification mapping rules, configure visualization colors, and output land cover classification products that can be directly used for thematic mapping and analysis, so as to realize the classification of land cover in hyperspectral remote sensing images.
[0188] To verify the effectiveness and superiority of the proposed "Hyperspectral Remote Sensing Image Land Cover Classification Method Based on Spectral Fingerprint Iterative Matching" (hereinafter referred to as "this method"), this study designed a systematic comparative experiment. Using the same study area, the same set of Hyperion hyperspectral image data, and the same land cover sample set, this method was compared with four classic supervised classification methods for remote sensing images. All experiments were conducted in the same hardware and software environment to ensure the fairness of the comparison.
[0189] I. Comparison Method Selection: The following four widely used and representative traditional hyperspectral image supervised classification methods were selected as comparison benchmarks:
[0190] Support Vector Machine (SVM): A classic classifier based on statistical learning theory, it is robust in high-dimensional and small-sample situations and is a commonly used method for remote sensing classification.
[0191] Maximum Likelihood Classification (MLC): A parameterized classification method based on Bayes' theorem, assuming that the spectra of each category follow a multivariate normal distribution, it is one of the oldest classifiers in the field of remote sensing.
[0192] Spectral Angle Mapping (SAM): A non-parametric method based on spectral shape similarity, which matches spectral vectors by calculating the angle between them and is insensitive to changes in light intensity.
[0193] Spectral Information Divergence (SID): An information theory-based method for measuring spectral similarity, which makes distinctions by calculating the divergence between spectral probability distributions.
[0194] II. Experimental setup and data: The experiment used Hyperion hyperspectral imagery acquired in 2004 (scenery number: H1240362004363110PZ), covering a typical urban-rural transition zone in the western suburbs of Zhengzhou, Henan Province.
[0195] Sample Set: Identical training and validation sample sets are used. The samples include four main land cover categories: cultivated land, urban and rural land, water bodies, and forest land. Training samples are used to construct SVM and MLC classifier models and the "spectral fingerprint template library" for this method; validation samples are used to objectively evaluate the classification accuracy of all methods.
[0196] Evaluation metrics: Overall classification accuracy (OA) and Kappa coefficient (Kappa) are used as the core evaluation metrics, and are calculated based on the same validation sample points.
[0197] III. Comparison of experimental results: Under optimal parameter configuration, the classification accuracy of each method on the validation set is compared, as shown in Table 7.
[0198] Table 7 Comparison of Classification Accuracy
[0199]
[0200] Note: The result of the method in this invention is the final result after eight rounds of progressive matching (matching threshold = 50).
[0201] Accuracy Comparison Analysis: Significant Overall Accuracy Advantage: The overall accuracy of the method of this invention reaches 88.82%, which is 18.23 percentage points higher than the second-best performing maximum likelihood classification method and 25.29 percentage points higher than support vector machine. This fully demonstrates the powerful ability of this method to mine subtle features of hyperspectral data and achieve accurate discrimination.
[0202] The Kappa coefficient demonstrates higher consistency: the Kappa coefficient of the method in this invention reaches 0.8498, which belongs to the "high consistency" level (Kappa>0.8), far exceeding that of traditional methods. This indicates that the classification results of this method have excellent consistency with the actual ground cover situation, and effectively reduce the impact of accidental consistency caused by random classification.
[0203] Overcoming the limitations of traditional methods:
[0204] Compared to the maximum likelihood method, this method does not require the assumption that the spectrum follows a specific distribution, thus avoiding the decrease in accuracy caused by the actual data distribution deviating from the normality assumption.
[0205] Compared to support vector machines, this method does not rely on complex kernel functions and parameter tuning, has a simpler process, and still performs stably under small sample training without obvious overfitting or underfitting.
[0206] Compared to measurement methods based on the overall spectral shape, such as spectral angle mapping and spectral information divergence, this method constructs a discrete "spectral fingerprint" and performs bit-level comparison, which has stronger robustness to local spectral features and noise, thus significantly improving classification accuracy.
[0207] Visual comparison of classification results: through the classification result graph ( Figure 10 , Figure 11 Visual interpretation can further verify that: the boundaries and details of land features are preserved: in the classification map obtained by the method of this invention, the boundaries of various land features are clear, and the details such as the internal structure of urban and rural land use, the outline of water bodies, and the patchy distribution of forest land are well preserved. The spatial fragmentation phenomenon ("salt and pepper noise") is significantly less than that of traditional methods.
[0208] Mixed Pixel Processing Capability: In complex areas where mixed pixels are prevalent, such as urban-rural transition zones and areas where forests and farmlands intersect, the method of this invention, through a multi-level progressive matching mechanism, can more reasonably classify pixels with mixed spectral characteristics into the dominant land cover category, resulting in classification results with greater spatial coherence and physical rationality. In contrast, traditional methods (especially SAM and SID) exhibit more scattered misclassifications in these areas.
[0209] Method Efficiency and Stability Analysis: Computational Efficiency: The "spectral fingerprint" construction and Hamming distance calculation in this invention both involve integer bit operations, resulting in low computational complexity. Although multiple rounds of matching are performed, each round only processes pixels not classified in the previous round, and the computation process is highly parallelizable. Therefore, its overall execution efficiency in practical applications is comparable to the time cost of SVM training + prediction, and far lower than some complex deep learning models. Parameter Sensitivity: The core parameter of this method is the Hamming distance threshold sequence. Experiments show that a stable and excellent classification effect can be obtained through a simple progressive strategy from strict to lenient, without the need for complex kernel functions and penalty parameter grid searches like SVM. This method is easier to use and generalize.
[0210] III. Comparative Experiment Conclusions Based on the above comparative experimental results and analysis, the following conclusions can be drawn: The hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching proposed in this invention significantly surpasses traditional mainstream methods such as support vector machines and maximum likelihood classification in terms of classification accuracy, achieving higher overall accuracy and Kappa coefficient. This method effectively overcomes the limitations of traditional methods, such as reliance on assumptions about data distribution, complex parameter tuning, and sensitivity to mixed pixels and noise. Furthermore, its principle is clear, its process is simple, and its computation is efficient, demonstrating excellent practicality, robustness, and potential for widespread application. This comparative experiment strongly demonstrates the significant progress and technical advantages of this invention in improving the performance of hyperspectral remote sensing image land cover classification.
[0211] In summary, by utilizing the above-mentioned technical solution of this invention, invalid bands are removed and noise is suppressed from the original hyperspectral image, retaining the core bands with high information validity. Each band image is then converted pixel-by-pixel into a spectral coding sequence composed of integer values, organized into a structured CSV format dataset. Typical ground feature sample points are selected based on high-resolution reference images or visual interpretation, and multi-band spectral feature vectors are extracted from the CSV dataset using their spatial coordinates to construct a standard spectral fingerprint template library. Each pixel in the CSV dataset to be classified is traversed, and its spectral sequence and various template sequences are calculated sequentially. The Hamming distance between pixels is used, employing a multi-round progressive threshold matching mechanism. By gradually widening the distance threshold round by round, pixels with different confidence levels are covered, and each successfully matched pixel is assigned a corresponding category label. The labeled CSV dataset is reconstructed into a two-dimensional matrix, and the georeferenced information of the original imagery is reused to generate a classification raster file and its header file conforming to the ENVI standard. Through user-defined numerical interval mapping rules, multiple labels for the same feature generated from multiple rounds of matching are reclassified and merged, and visualization colors are configured for each final category, outputting a land cover classification product that can be directly used for thematic mapping and analysis. This invention, by introducing the idea of spectral fingerprint matching and Hamming distance similarity measurement, combined with a multi-level iterative threshold matching strategy, effectively solves the problems of dimensional redundancy, strong spectral variability, and low classification efficiency in hyperspectral data. It significantly improves the accuracy, robustness, and computational efficiency of land cover classification, and can be widely applied to high-precision land cover identification and thematic mapping in fields such as agricultural monitoring, ecological environment assessment, and land resource surveys.
[0212] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching, characterized in that, include: Invalid bands and noise suppression are performed on the original hyperspectral images, while core band images with high information validity are retained; the core band images are converted pixel by pixel into spectral coding sequences composed of integer values, and organized into a structured CSV format dataset by rows and columns; Based on high-resolution reference images and visual interpretation, sample points of various typical land features are selected. Multi-band spectral feature vectors are extracted from the CSV format dataset using the spatial coordinates of the sample points, and a spectral fingerprint template library is constructed. Iterate through each spectral feature vector in the CSV format dataset to be classified, calculate the Hamming distance between the spectral feature vector to be classified and the spectral feature vector in the spectral fingerprint template library, and use a multi-round progressive threshold matching mechanism to progressively match the Hamming distance. By gradually relaxing the threshold in each round, the spectral feature vectors with different confidence levels are covered to generate the land cover classification results. The land cover classification results are reconstructed into a two-dimensional classification matrix, and the georeferenced information of the original hyperspectral image is reused to generate a standard ENVI classification file and its header file. By using user-defined reclassification mapping rules, the standard ENVI classification files and their header files are reclassified and merged, and visualization colors are configured to output land cover classification products that can be directly used for thematic mapping and analysis, thereby realizing the classification of land cover in hyperspectral remote sensing images.
2. The hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching according to claim 1, characterized in that, The process involves removing invalid bands and suppressing noise from the original hyperspectral image while retaining the core band image with high information validity. The core band image is then converted pixel-by-pixel into a spectral coding sequence composed of integer values, and organized into a structured CSV format dataset. It supports users to customize the removal of invalid band ranges with high noise or redundant information from the original hyperspectral image, while retaining the core band image with high information content and strong discrimination ability. The raster data in the preserved core band image is read band by band, converted into a pixel value matrix, and organized into a structured CSV file according to the row and column positions. The quantile discretization method is used to discretize the continuous pixel values in the structured CSV file of each band, highlighting the spectral differences between ground features, and forming a spectral feature coding sequence for each pixel according to the mapping rules. The spectral feature encoding sequence of each pixel is horizontally concatenated according to the row and column positions of the pixels to generate a structured CSV format dataset, providing a standardized input format for subsequent spectral fingerprint extraction and matching.
3. The hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching according to claim 1, characterized in that, The process of selecting sample points of various typical land features based on high-resolution reference imagery and visual interpretation, extracting multi-band spectral feature vectors from the CSV format dataset using the spatial coordinates of the sample points, and constructing a spectral fingerprint template library includes: It supports batch import of vector sample points and high-resolution reference images, automatically aligns the vector sample points with the high-resolution reference images in coordinate system and space, and extracts the pixel row and column number of each sample point on the original hyperspectral image. The complete spectral feature vector of each sample point is located and extracted from the digitized CSV format dataset using the cell row and column numbers of the sample points; The spectral feature vectors of all sample points are automatically organized according to land cover categories and output as structured CSV files, forming a standardized spectral fingerprint template library.
4. The hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching according to claim 3, characterized in that, The system supports batch importing of vector sample points and high-resolution reference images, automatically aligning the vector sample points with the high-resolution reference images in coordinate system 1 and spatially, and extracting the pixel row and column numbers of each sample point on the original hyperspectral image, including: Based on the land cover classification standards and referring to high-resolution reference images, sample points of various typical land cover types were selected through visual interpretation. Record and store the spatial location and category label of the sample points as vector point sample points with geographic coordinates; The vector point sample points are uniformly transformed to a spatial reference frame consistent with the original hyperspectral image, and the pixel row and column number corresponding to each sample point is calculated.
5. The hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching according to claim 1, characterized in that, The process involves iterating through each spectral feature vector in the CSV format dataset to be classified, calculating the Hamming distance between the spectral feature vector to be classified and the spectral feature vectors in the spectral fingerprint template library, and using a multi-round progressive threshold matching mechanism to progressively match the Hamming distance. By gradually relaxing the threshold in each round, spectral feature vectors with different confidence levels are covered, generating land cover classification results including: The system reads spectral feature vectors of various land cover standards from the spectral fingerprint template library as reference sequences, and allows users to customize the matching order, matching rounds, and round thresholds of samples. According to the custom matching order and matching rounds, traverse the CSV format dataset to be classified, and calculate the Hamming distance between each spectral feature vector and the spectral feature vector in the spectral fingerprint template library in turn. The Hamming distance is progressively matched using a multi-round progressive threshold matching mechanism. Spectral feature vectors that meet the minimum threshold in the first round are assigned corresponding category labels, while unmatched spectral feature vectors enter subsequent rounds. After each round of threshold relaxation, they are rematched and reclassified to generate complete land cover classification results.
6. The hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching according to claim 5, characterized in that, The Hamming distance is progressively matched using a multi-round progressive threshold matching mechanism. Spectral feature vectors that meet the minimum threshold in the first round are assigned corresponding category labels. Unmatched spectral feature vectors proceed to subsequent rounds, and are re-matched and re-classified sequentially after the threshold is relaxed in each round, generating a complete land cover classification result including: The matching process is initialized by customizing a round threshold increment sequence from strict to lenient and inputting it into the spectral fingerprint template library; Initiate a multi-round iterative process. In the first round, traverse all spectral feature vectors to be classified and use Hamming distance and the strictest round threshold to determine the classification of successfully matched spectral feature vectors, generating a set of unmatched pixels. Each round of matching involves processing the set of unmatched pixels generated in the previous round, and repeatedly performing matching judgment and classification using an increasing sequence of progressively relaxed round thresholds, dynamically updating the set of unmatched pixels. The loop continues iteratively until the number of iterations exceeds the preset threshold or the set of unmatched pixels is empty, at which point the loop terminates. The system integrates the classification results of successfully matched pixels from all rounds, and uniformly identifies the remaining unmatched pixels to generate a complete land cover classification result.
7. The hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching according to claim 6, characterized in that, The multi-round iterative process begins by traversing all spectral feature vectors to be classified in the first round. The Hamming distance and the strictest round threshold are used to determine the classification of successfully matched spectral feature vectors, generating a set of unmatched pixels, including: If the Hamming distance does not exceed the threshold of the current round, the cell value of the spectral feature vector is replaced with the replacement value of the corresponding category, and it is regarded as a spectral feature vector that has been successfully classified in this round, thus ending the subsequent matching of the spectral feature vector; If the Hamming distance exceeds the current matching threshold, it is determined that the spectral feature vector does not have sufficient similarity with any land cover template in the current round. The spectral feature vector is retained and input into the unmatched cell set for the next round of matching.
8. The hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching according to claim 1, characterized in that, The process of reconstructing the land cover classification results into a two-dimensional classification matrix and reusing the georeferenced information of the original hyperspectral image to generate a standard ENVI classification file and its header file includes: Clean and organize the unmatched cells and file structures in the land feature classification results to generate a clean two-dimensional classification matrix; By combining the two-dimensional classification matrix with georeferenced information extracted from the original hyperspectral image, a standard ENVI classification file with georeferenced information and its header file are generated.
9. The hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching according to claim 1, characterized in that, The process involves reclassifying and merging the standard ENVI classification files and their header files using user-defined reclassification mapping rules, configuring visualization colors, and outputting land cover classification products that can be directly used for thematic mapping and analysis. This enables the classification of land cover in hyperspectral remote sensing imagery, including: Based on user-defined reclassification mapping rules, the multi-value labels of the same type generated by multiple rounds of matching in the standard ENVI classification file and its header file are uniformly merged into a single category identifier, and the identifier values of unclassified areas are standardized to generate standardized classification data. Configure a specified display color for each final category in the normalized classification data, and write the display color along with georeferenced information into a new file to generate a land cover classification product that can be directly used for thematic mapping. By comparing and analyzing the land cover classification products with the validation samples, the accuracy index is calculated to complete the quantitative evaluation of the classification effect.
10. A hyperspectral remote sensing image land cover classification system based on spectral fingerprint iterative matching, used to implement the hyperspectral remote sensing image land cover classification method based on spectral fingerprint iterative matching as described in any one of claims 1-9, characterized in that, The system includes: The image processing module is used to remove invalid bands and suppress noise in the original hyperspectral images, while retaining the core band images with high information validity; it converts the core band images pixel by pixel into a spectral coding sequence composed of integer values, and organizes them into a structured CSV format dataset by rows and columns. The fingerprint database construction module is used to select sample points of various typical land features based on high-resolution reference images and visual interpretation, extract multi-band spectral feature vectors from the CSV format dataset using the spatial coordinates of the sample points, and construct a spectral fingerprint template library. The iterative matching module is used to traverse each spectral feature vector in the CSV format dataset to be classified, calculate the Hamming distance between the spectral feature vector to be classified and the spectral feature vector in the spectral fingerprint template library, and use a multi-round progressive threshold matching mechanism to progressively match the Hamming distance. By gradually relaxing the threshold in each round, it gradually covers spectral feature vectors with different confidence levels to generate land cover classification results. The geocoding module is used to reconstruct the land cover classification results into a two-dimensional classification matrix and reuse the georeference information of the original hyperspectral image to generate a standard ENVI classification file and its header file. The productization module is used to reclassify and merge the standard ENVI classification files and their header files through user-defined reclassification mapping rules, configure visualization colors, and output land cover classification products that can be directly used for thematic mapping and analysis, so as to realize the classification of land cover in hyperspectral remote sensing images.