A morphological-based fast surface cover classification optimization processing method
By optimizing land cover classification in remote sensing images using morphological methods, the fragmentation phenomenon was resolved, efficient fragmentation area processing was achieved, and classification accuracy and efficiency were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGGUANG SATELLITE TECH CO LTD
- Filing Date
- 2023-12-05
- Publication Date
- 2026-06-26
AI Technical Summary
Existing remote sensing image land cover classification suffers from fragmentation, leading to inaccurate classification results and hindering rapid and efficient automated processing.
A morphology-based approach is adopted to construct a multi-class dataset, statistically analyze fragmented regions, and reassign the categories of fragmented regions to optimize land cover classification. This includes masking operations, fragmented region integration, and neighboring pixel category statistics, thereby achieving automated processing of fragmented regions.
It improves the accuracy and efficiency of land cover classification, reduces processing time, and enhances the practicality of classification results.
Smart Images

Figure CN117671518B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical remote sensing technology applications, and in particular to a rapid land cover classification and optimization method based on morphology. Background Technology
[0002] With the rapid development of spatial information science and sensor technology, spatial data, represented by remote sensing images of various resolutions, is constantly emerging, ushering in the era of remote sensing big data. Land cover classification of remote sensing images is a primary means of acquiring remote sensing interpretation information, with wide applications and significant importance in map updating, target identification, disaster monitoring, and resource utilization. The accuracy of land cover classification directly affects the practicality of the interpretation results. As remote sensing technology continues to advance, the resolution of multispectral satellite remote sensing data is increasing, and the spectral information is becoming richer, bringing both opportunities and challenges to land cover interpretation technology.
[0003] When interpreting land surface types in remote sensing images, automated processing has become the mainstream choice for faster and more efficient interpretation. However, both traditional machine learning classification techniques and emerging deep learning-based classification techniques inevitably suffer from misclassification in areas with complex texture information due to the limitations of the algorithms themselves and the complex land surface conditions in remote sensing images, resulting in fragmentation. Summary of the Invention
[0004] The present invention aims to solve the technical problems in the prior art by providing a rapid land cover classification and optimization method based on morphology.
[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0006] A morphology-based method for rapid land cover classification and optimization includes the following steps:
[0007] Step 1: Construct a multi-category dataset;
[0008] Calculate a histogram for the input land cover classification data, count all category values that appear in the data, and record them;
[0009] Based on the recorded category values, a masking operation is performed on the land cover classification data to extract the actual distribution data for each category.
[0010] Step 2: Analyze the fragmented areas;
[0011] For the input set of categorical data, each individual category of data is traversed and processed.
[0012] Step 3: Integrate the fragmented areas;
[0013] After traversing all single-class data in the category dataset, all the obtained fragmented regions are integrated together to obtain fragmented distribution data; this data is then overlaid back into the original surface classification data, and all fragmented regions are filled with non-class values.
[0014] Step 4: Reassign values to the fragmented areas;
[0015] During the traversal process, a neighborhood pixel category table is established for the fragmentation region; all neighboring pixels around the fragmentation region are searched, and the number of each category value is recorded in the table; the category value with the most occurrences in the category table is taken as the new category of the fragmentation; all fragments are reassigned to obtain the optimized new land cover classification data.
[0016] In the above technical solution, in step one, the classification data for each category only contains the value of the current category and the background value.
[0017] In the above technical solution, step two specifically involves:
[0018] First, locate all independently distributed category regions in the data;
[0019] Create a flag table with the same size as the classification data to record the traversal of pixels of each category in the data;
[0020] Establish a pixel traversal order queue to record the positions of the pixels that need to be traversed;
[0021] Starting from the top left pixel, traverse the data. For each pixel traversed, mark it as 1 at the corresponding position in the flag bit table. Repeat the traversal of the current category data until all values in the flag bit table are 1.
[0022] Record the positions of all inserted pixels in the order queue during the traversal process and count the number of pixels; identify areas with a number less than a set threshold T as fragmented areas and record them in the fragmented area list.
[0023] In the above technical solution, in step two, during the traversal process, the head pixel of the sequence queue is extracted first for traversal.
[0024] In the above technical solution, in step two, during the traversal process, if the order queue is empty, the first category pixel that has not been marked in the flag table is found by traversing according to the set spatial order; the unmarked category pixels in the 8-neighborhood of the category pixel are searched, and the unmarked category pixels in the neighborhood are added to the order queue and marked in the flag table.
[0025] In the above technical solution, in step two, during the traversal process,
[0026] The positive X-axis is the primary direction of movement, and the positive Y-axis is the secondary direction; or
[0027] The positive Y-axis is the primary direction of movement, and the positive X-axis is the secondary direction of movement.
[0028] The present invention has the following beneficial effects:
[0029] This invention simplifies the complex multi-class result optimization problem into a single-class optimization problem, reducing the statistical difficulty. It employs morphological methods and intermediate result recording to efficiently process fragmented regions. The category with the highest contour contact number is statistically determined, and the fragmented region is reassigned to this category.
[0030] The morphology-based rapid land cover classification optimization method of the present invention can automate the optimization process, greatly reduce processing time, and improve the overall classification accuracy. Attached Figure Description
[0031] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0032] Figure 1 This is a schematic flowchart of the morphology-based rapid land cover classification and optimization method of the present invention.
[0033] Figure 2 This is a schematic diagram of the main direction of pixel traversal.
[0034] Figure 3 This is a schematic diagram of an 8-neighborhood.
[0035] Figure 4 This is a schematic diagram of the traversal process.
[0036] Figure 5 This is a schematic diagram of a 4-neighborhood.
[0037] Figure 6 A schematic diagram showing the distribution of sample plots for verifying the accuracy of land cover classification in Tonghua City.
[0038] Figure 7 The diagram illustrates the effects of different processing methods. (a) shows a true-color image; (b) shows the ground truth labels; (c) shows the original classification result; and (d) shows the effect of the processing method described in this invention.
[0039] Figure 8 A comparative diagram showing the optimization of classification results for large-area coverage. (a) is a true-color image; (b) is the original classification result; (c) is the optimized result of this invention.
[0040] Figure 9 This is a schematic diagram of the classification results for Tonghua City. (a) is a true-color image; (b) is the original classification result; (c) is the optimized result of this invention. Detailed Implementation
[0041] The inventive concept of this invention is as follows: This invention proposes a morphology-based rapid land cover classification optimization method. The complex problem of reassigning fragmented categories is broken down into two main parts: finding fragmented regions and assigning appropriate new values. First, the number of land cover categories and the values of each category are automatically counted. Based on the category values, the land cover classification data is split into multiple single-class distribution data. Then, using neighborhood statistics, the fragmented regions in each category are quickly obtained. The fragmented regions of all categories are merged together to obtain fragmented distribution data, which is then superimposed on the original land cover classification data. For each independent fragmented region, the number of values of each category for pixels surrounding its outline is counted, and the fragment is reassigned to the category with the most values, until no fragments remain. Through this morphology-based rapid land cover classification optimization method, land cover classification data can be optimized efficiently, minimizing the impact of fragmentation on classification accuracy and improving the practicality of the overall classification results.
[0042] The morphology-based rapid land cover classification optimization method of the present invention optimizes the disordered classification phenomenon and improves the accuracy of land cover information interpretation through optimization processing technology, playing an important role in the precise analysis of remote sensing information.
[0043] The present invention will now be described in detail with reference to the accompanying drawings.
[0044] This invention presents a morphology-based rapid land cover classification optimization method that can quickly perform fragmentation statistics on classification data and optimize the results. It breaks down complex multi-category information into multiple single-category information and extracts fragmentation data separately for each category. Then, it integrates the fragmented regions, fusing them into a single spatial distribution data set, which is then superimposed on the original classification result. To ensure that the modified attribute values better conform to spatial distribution logic, it performs neighborhood category statistics on the fragmented region, using the category with the most frequent contact in the neighborhood as the new value for the fragment. By optimizing the classification results, the overall classification accuracy can be improved, better meeting the requirements for visual quality.
[0045] First, the input land cover classification data is statistically analyzed to obtain the values of all representative categories in the classified image, and a histogram is created and recorded. Based on the category values, the land cover classification data is split into a dataset containing the distribution data of each category. A threshold T for the number of pixels in fragmented areas is established; in subsequent operations, areas with fewer than this threshold T are considered fragmented.
[0046] In the categorical dataset, each category is processed separately. An 8-neighborhood traversal is used to count the number of pixels in each independently distributed region. During the count, the number of pixels within each region and the location information of all pixels within each region are recorded. Independent regions with fewer than a set threshold of pixels are considered fragments, and all fragments in that category are extracted. The regions of fragments from all categories are then uniformly overlaid onto the original overlay classification result.
[0047] Finally, a 4-neighborhood approach is used to find all fragmented regions in the land cover classification results, and the class values of the pixels bordering the contour edges are counted during the traversal. The class with the most neighboring pixels in a region is used as the new class value for that fragmented region. After reassigning values to each fragmented region, the optimized land cover classification data is obtained.
[0048] The flowchart of the morphology-based rapid land cover classification optimization method of the present invention is as follows: Figure 1 As shown, the implementation steps of the present invention will be described in detail below.
[0049] Step 1: Construct a multi-category dataset.
[0050] When statistically analyzing fragmented areas in land cover classification data, the diversity of categories can lead to complex recording processes, excessive memory usage, and long computation times. This invention simplifies this complex problem by transforming a multi-category problem into a single-category problem, thereby reducing statistical operations and improving efficiency. A histogram is calculated on the input land cover classification data to statistically analyze and record all category values appearing in the data. Based on the recorded category values, a masking operation is performed on the land cover classification data to extract the actual distribution data for each category. In each category's classification data, only the value of that category and the background value exist. That is, classification data with N categories is split into a dataset with N single-category data points, which serves as the input for the next step.
[0051] Step 2: Analyze the fragmented areas.
[0052] For the categorical data set input in the previous step, we need to process the individual categorical data separately. First, we need to find all independently distributed categorical regions in the data. Independent distribution means that spatially, the categorical pixels in this region are not adjacent to pixels in other regions.
[0053] Create a flag table with the same size as the classification data. This table records the traversal status of pixels for each category in the data. Untraversed positions are set to 0, and traversed positions are set to 1. Initialize all flags to 0.
[0054] Establish a pixel traversal order queue to record the position (x, y) of the next pixel to be traversed.
[0055] The positive X-axis is the primary direction of movement, and the positive Y-axis is the secondary direction of movement, such as... Figure 2 As shown in the diagram. Starting from the top-left pixel (x0, y0), the process iterates through the pixels, marking each pixel with a 1 at the corresponding position in the flag table. During the traversal, the first pixel in the order queue is prioritized for traversal. If the order queue is empty, the process continues traversing in the pre-defined spatial order to find the first unmarked pixel of that category. Then, it searches within the 8-neighborhood of this pixel, adding unmarked pixels to the order queue and marking them in the flag table. The 8-neighborhood is shown below. Figure 3 As shown. Repeatedly traverse the current category data until all values in the flag table are 1. The specific process is as follows: Figure 4 As shown.
[0056] When the ordered queue goes through a process of going from empty to full and then back to empty, it means that an independent region has been found. Record the positions of all inserted pixels in the ordered queue during this process and count the number of pixels. Regions with a count less than a set threshold T are identified as fragmented regions and recorded in the fragmented region list.
[0057] Step 3: Integrate the fragmented areas.
[0058] After iterating through all single-class data in the category set, all resulting fragmented regions are integrated to obtain fragmented distribution data. This data is then overlaid onto the original surface classification data, and all fragmented regions are filled with non-class values.
[0059] Step 4: Reassign values to the fragmented areas.
[0060] Because the superposition of different types of fragments may cause adjacent fragments to merge into a larger fragment, a 4-neighbor traversal method is used to find new independent fragment regions, where the 4-neighbor is as follows: Figure 5 As shown.
[0061] During the traversal, a neighborhood pixel category table is built for each fragment region. All neighboring pixels around the fragment region are searched, and the frequency of each category value is recorded in the table. Finally, the category value with the highest frequency in the category table is used as the new category for that fragment. All fragments are then reassigned to obtain the optimized new land cover classification data.
[0062] The following analysis uses land cover classification results from Tonghua City, Jilin Province, to verify the practicality of the method of this invention. The Tonghua City classification image used has four categories: cultivated land, forest land, water area, and impermeable surface, with a size of 32137*46510, which is a typical ultra-large image.
[0063] To verify the effectiveness of the classification optimization method of this invention, 100 areas of 500m × 500m were randomly selected as verification quadrats, and the distribution of land features within these 100 areas was manually delineated. The accuracy before and after the classification optimization process was calculated using the quadrats and compared. The quadrat distribution range is as follows: Figure 6 As shown.
[0064] Regions with fewer than 100 pixels are defined as fragmented regions. Accuracy information is calculated for the classification data before and after processing, and the results are shown in Table 1 below:
[0065] Table 1 Comparison of accuracy of land cover classification results
[0066] In-situ land cover classification data Optimized land cover classification data Overall accuracy 80.90% 81.91%
[0067] The overall accuracy of the original classification was 80.90%, and after optimization by this invention, the accuracy reached 81.91%, an improvement of 1%. This invention directly improves data accuracy through optimization alone, without changing the classification algorithm, further enhancing the practicality of the classification results. In processing the classification results for Tonghua City, the optimization of ultra-large datasets was completed in just 62 seconds, demonstrating extremely high efficiency.
[0068] like Figure 7 The image shows the processing results from different formats. (a) is a true-color image; (b) is the ground truth label; (c) is the original classification result; and (d) is the effect of the present invention. Compared to (c), the present invention effectively filters out small-area fragments in the classification result, more closely resembling the result with the ground truth label in (b).
[0069] Figure 8 The images show a comparison of the optimized classification results for large-area coverage, where (a) is a true-color image; (b) is the original classification result; and (c) is the extraction result of this invention. Figure 8 This is an optimized map of land cover classification results for Tonghua City, where (a) is a true-color image; (b) is the original classification result; and (c) is the extraction result of this invention. Figure 8 and Figure 9 In this invention, the optimization results significantly improve the visual effect, effectively filter out fragments, and fill in the correct categories, thereby improving the practicality of the classification results.
[0070] This invention simplifies the complex multi-class result optimization problem into a single-class optimization problem, reducing the statistical difficulty. It employs morphological methods and intermediate result recording to efficiently process fragmented regions. The category with the highest contour contact number is statistically determined, and the fragmented region is reassigned to this category.
[0071] The morphology-based rapid land cover classification optimization method of the present invention can automate the optimization process, greatly reduce processing time, and improve the overall classification accuracy.
[0072] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A rapid land cover classification and optimization method based on morphology, characterized in that, Includes the following steps: Step 1: Construct a multi-category dataset; Calculate a histogram for the input land cover classification data, count all category values that appear in the data, and record them; Based on the recorded category values, a masking operation is performed on the land cover classification data to extract the actual distribution data for each category. Step 2: Analyze the fragmented areas; For the input set of categorical data, each individual category of data is traversed and processed. Step 3: Integrate the fragmented areas; After traversing all single-class data in the category dataset, all the obtained fragmented regions are integrated together to obtain fragmented distribution data; The data is overlaid back into the original surface classification data, and all fragmented areas are filled with non-class values. Step 4: Reassign values to the fragmented areas; During the traversal process, a neighboring pixel category table is established for the fragmentation region; all neighboring pixels around the fragmentation region are searched, and the number of occurrences of each category value is recorded in the table; The category value with the most occurrences in the category table is used as the new category for the fragment; all fragments are reassigned to obtain the optimized new land cover classification data.
2. The morphology-based rapid land cover classification and optimization method according to claim 1, characterized in that, In step one, the categorical data for each category contains only the value of the current category and the background value.
3. The method for rapid land cover classification and optimization based on morphology according to claim 1, characterized in that, Step two is as follows: First, locate all independently distributed category regions in the data; Create a flag table with the same size as the classification data to record the traversal of pixels of each category in the data; Establish a pixel traversal order queue to record the positions of the pixels that need to be traversed; Starting from the top left pixel, traverse the array. For each pixel traversed, mark it as 1 at the same position in the corresponding flag bit table. Repeatedly traverse the current category data until all values in the flag table are 1; Record the positions of all inserted pixels in the ordered queue during the traversal process, and count the number of pixels. Areas with fewer than a set threshold T are identified as fragmented areas and recorded in the fragmented area list.
4. The morphology-based rapid land cover classification and optimization method according to claim 3, characterized in that, In step two, during the traversal process, the first pixel in the ordered queue is extracted and traversed first.
5. The morphology-based rapid land cover classification and optimization method according to claim 3, characterized in that, In step two, during the traversal process, if the order queue is empty, the first category pixel that has not been marked in the flag table is found by traversing according to the set spatial order. Search within the 8-neighborhood of the pixel of this category, add the unmarked pixels of this category in the neighborhood to the order queue, and mark them in the flag table.
6. The morphology-based rapid land cover classification and optimization method according to claim 3, characterized in that, In step two, during the traversal process, The positive X-axis is the primary direction of movement, and the positive Y-axis is the secondary direction; or The positive Y-axis is the primary direction of movement, and the positive X-axis is the secondary direction of movement.