Remote sensing image classification post-processing spatial filtering method considering environment similarity
By introducing environmental variable feature information in the remote sensing image classification post-processing, dynamically constructing an environmentally similar adaptive spatial filter, solving the problem of difficulty in taking into account image detail retention and classification accuracy in the prior art, and achieving a more efficient remote sensing image classification post-processing effect.
Patent Information
- Application Number
- CN202510304133.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-03-14
AI Technical Summary
The existing remote sensing image classification post-processing methods are difficult to take into account the retention of image details when eliminating the "salt and pepper effect", and the classification accuracy is limited, and the mechanism for incorporating environmental variables is lacking, which limits its application capabilities.
A spatial filtering method for classification and post-processing of remote sensing images that take into account the environment similarity is proposed. By pre-processing the initial classification results and potential environmental variable layers, a partition layer of environmental feature encoding unique value combination is constructed, and an adaptive spatial filter for environment similarity is dynamically constructed, and each cell is low-pass filtered.
It effectively eliminates the "salt and pepper effect" and significantly improves classification accuracy. Especially under complex terrain and variable environmental conditions, it can better retain detailed information such as sporadic land objects and linear land objects.
Smart Images

Figure CN120219967A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of digital image processing and remote sensing classification, and particularly relates to a spatial filtering method for post-processing remote sensing image classification considering environmental similarity. Background Art
[0002] With the development of spatial information technology, remote sensing images have become the most important data source for land use and vegetation cover mapping. However, due to factors such as noise interference, limitations of classification algorithms, and the complexity of the ground surface itself, the preliminary classification products obtained from remote sensing images often exhibit serious noise. Although the "salt-and-pepper effect" of remote sensing classification can be improved to a certain extent through the progress of remote sensing technology and classification algorithms, the cost is often high. Moreover, the progress cycle of hardware technology is long, and it is difficult to make a breakthrough in the short term. Therefore, post-processing technology has become the main means to improve the effect of remote sensing mapping at present.
[0003] Currently, post-processing algorithms for classification mainly rely on the "majority voting" rule. The classic method is spatial sliding window filtering with the mode as the statistic. With the support of spatial convolution operations, this method takes the current pixel as the center and corrects the classification result of the current pixel according to the majority classification results within a specific local window. Under traditional spatial filtering technology, the size of the convolution kernel determines the final effect of post-processing classification. When using a smaller convolution kernel, although more detailed information can be retained, the image is often not smooth enough, and the "salt-and-pepper effect" is not eliminated thoroughly enough; while using a larger convolution kernel, although the inhibitory effect on the "salt-and-pepper effect" is better, the accuracy is often low, and it is easy to cause the loss of image details such as scattered objects and linear objects. By using a Gaussian kernel function for weight assignment, larger weights are given to pixels closer to the center, and smaller weights are given to pixels farther from the center. Although a smoother filtering effect can be obtained while retaining smaller objects, it may cause the blurring of land class boundaries. Especially in high-resolution images, some edge information may be lost. In addition, anisotropic filtering can retain linear objects to a certain extent, but this method relies on prior information such as the orientation of linear objects, and this information itself may also need to be extracted through remote sensing data analysis, with great uncertainty.
[0004] In summary, existing spatial filtering methods can eliminate the influence of the "salt-and-pepper effect" to a certain extent, thereby effectively improving the smoothness of the image, but they cannot well retain scattered objects and linear objects, and the classification accuracy is not guaranteed. The reason is that these methods do not directly aim to improve classification accuracy, but rather perform majority voting based on the preliminary classification results themselves to eliminate the "salt-and-pepper effect". In addition, due to the lack of a mechanism for incorporating third-party environmental variables, it limits their ability to apply more information. Therefore, the present invention proposes a spatial filtering method for post-processing remote sensing image classification considering environmental similarity. Summary of the Invention
[0005] To solve the above technical problems, the present invention proposes a spatial filtering method for post-processing remote sensing image classification considering environmental similarity to solve the problems existing in the above prior art.
[0006] To achieve the above object, the present invention provides a spatial filtering method for post-processing remote sensing image classification considering environmental similarity, including:
[0007] S1. Preprocess the initial classification result of the remote sensing image and the potential environmental variable layer to obtain a set of preprocessed layers, and construct an output raster data layer based on the set of preprocessed layers. The set of preprocessed layers includes: the preprocessed initial classification result layer and the preprocessed environmental variable layer;
[0008] S2. Reclassify the preprocessed environmental variable layer and construct a unique value combination partition layer of environmental feature codes through spatial overlay;
[0009] S3. Determine an initial spatial filter based on the preprocessed initial classification result layer and the application requirements of remote sensing image classification;
[0010] S4. Dynamically construct an environmentally similar adaptive spatial filter for the current processing pixel in the preprocessed initial classification result layer based on the initial spatial filter and the unique value combination partition layer of environmental feature codes;
[0011] S5. Perform low-pass filtering on the current processing pixel using the environmentally similar adaptive spatial filter to obtain a filtering result, and write the filtering result to the corresponding position of the output raster data layer to obtain the post-processing result of classification considering environmental similarity for the current processing pixel;
[0012] S6. Traverse other pixels in the preprocessed initial classification result layer, and repeat S4-S5 to obtain a complete post-processed classification image.
[0013] Optionally, the operations for preprocessing the initial classification result of the remote sensing image and the potential environmental variable layer include: projection coordinate system consistency conversion, spatial resolution normalization, and spatial range registration.
[0014] Optionally, the initial spatial filter adopts a mode filtering mechanism.
[0015] Optionally, the process of dynamically constructing an environmentally similar adaptive spatial filter for the current processing pixel includes:
[0016] Taking the current processing pixel as the center, determine a neighborhood window based on the template size of the initial spatial filter;
[0017] Extract all the pixels within the neighborhood window based on the environmental feature - encoded unique value combination partition layer to construct a neighborhood environmental feature - encoded matrix;
[0018] Compare each element in the neighborhood environmental feature - encoded matrix with the environmental feature encoding of the currently processed pixel one by one to generate an environmental similarity discrimination matrix for the currently processed pixel;
[0019] Construct an environmentally similar adaptive spatial filter for the currently processed pixel based on the initial spatial filter and the environmental similarity discrimination matrix.
[0020] Optionally, the calculation expression for the template matrix of the environmentally similar adaptive spatial filter of the currently processed pixel is:
[0021] F E =F I ⊙S E
[0022] In the formula, ⊙ is the Hadamard product operator; F I 、S E and F E represent the initial spatial filter template matrix, the environmental similarity discrimination matrix, and the environmentally similar adaptive spatial filter template matrix respectively.
[0023] Optionally, the process of classifying and post - processing the currently processed pixel using the environmentally similar adaptive spatial filter includes:
[0024] Taking the currently processed pixel as the center, determine the neighborhood window based on the template size of the initial spatial filter;
[0025] Extract all the pixels within the neighborhood window based on the pre - processed initial classification result layer to construct a neighborhood initial classification result matrix;
[0026] Based on the environmentally similar adaptive spatial filter, perform weighted frequency statistics on each element in the unique value set of the neighborhood initial classification result matrix to determine the mode;
[0027] Write the mode to the corresponding position in the output raster data layer to achieve the classification post - processing of the currently processed pixel considering environmental similarity.
[0028] Optionally, the calculation expression for performing frequency statistics on each element in the unique value set of the neighborhood initial classification result matrix based on the environmentally similar adaptive spatial filter is:
[0029]
[0030] Wherein, v ∈ V is any value within the set V of unique values of the initial neighborhood classification result matrix, f(v) is the frequency of v, NW is the neighborhood window, and (i, j) ∈ NW represents the element position index within the neighborhood window, F E represents the environmental similarity adaptive spatial filter template matrix, R I represents the initial neighborhood classification result matrix, is the indicator function.
[0031] Optionally, the potential environmental variable layer includes:
[0032] Topographic factors: such as elevation, slope, and aspect;
[0033] Vegetation characteristics: NDVI, leaf area index;
[0034] Soil parameters: type, humidity, organic matter content;
[0035] Climatic elements: temperature, precipitation.
[0036] Compared with the prior art, the present invention has the following advantages and technical effects:
[0037] A spatial filtering method for post-processing of remotely sensed image classification considering environmental similarity proposed by the present invention significantly improves the accuracy and quality of remotely sensed image classification by innovatively introducing environmental variable feature information. When traditional spatial filtering methods eliminate the "salt-and-pepper effect", it is often difficult to balance the retention of image details, and the classification accuracy is limited. The present invention performs consistency processing on the initial classification result and the potential environmental variable layer in the preprocessing stage to ensure the accuracy and matching of the data. By reclassification and spatial superposition, a unique value combination partition layer of environmental feature codes is generated, providing a basis for the dynamic construction of the filter. On this basis, combined with the initial spatial filter, an environmental similarity adaptive spatial filter is constructed for each pixel, realizing refined adjustment of post-classification processing. This technology not only effectively eliminates the "salt-and-pepper effect" but also significantly improves the classification accuracy. Especially under complex terrain and variable environmental conditions, it can better retain detail information such as scattered objects and linear objects. Experimental results show that compared with traditional methods, the classification accuracy of the present invention is significantly improved, providing an efficient and accurate new method for post-processing of remotely sensed image classification, with broad application prospects and important practical significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation of this application. In the drawings:
[0039] Figure 1Flowchart of the spatial filtering method for post - processing remotely sensed image classification considering environmental similarity according to the embodiments of the present invention;
[0040] Figure 2 Schematic diagram of the actual land use types in the first embodiment of the present invention;
[0041] Figure 3 Schematic diagram of the re - classification result layer of potential environmental variable layers and the uniquely - valued combined partition layer of environmental feature codes in the first embodiment of the present invention. Among them, Fig. (a) is the re - classification result corresponding to topography, Fig. (b) is the re - classification result corresponding to vegetation, and Fig. (c) is the uniquely - valued combined partition layer of environmental feature codes;
[0042] Figure 4 Schematic diagram of the initial classification result of the remotely sensed image in the first embodiment of the present invention;
[0043] Figure 5 Schematic diagram of the post - processed classification image in the first embodiment of the present invention. Among them, Fig. (a) is the filtering effect of the 3 × ×3 window traditional mode filtering, Fig. (b) is the filtering effect of the 5 × ×5 window traditional mode filtering, Fig. (c) is the filtering effect of the 3×3 window of the present invention, and Fig. (d) is the filtering effect of the 5 × ×5 window of the present invention.
[0044] Figure 6 Comparison curve graph in the second embodiment of the present invention. Among them, Fig. (a) is the comparison curve graph of the overall accuracy under different filtering windows (radius from 1 to 19 pixels), and Fig. (b) is the comparison curve graph of the Kappa coefficient. Detailed implementation manners
[0045] It should be noted that, without conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0046] It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer - executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0047] Embodiment 1:
[0048] The purpose of the present invention is to provide a spatial filtering method for post - processing remotely sensed image classification considering environmental similarity, which can significantly improve the classification accuracy while eliminating the "salt - and - pepper effect" of the initial classification of remotely sensed images and achieving overall smoothing.
[0049] Based on the traditional mode filtering algorithm based on spatial sliding window, the present invention introduces environmental variables such as terrain and vegetation that have an impact or indication on land use classification, and defines from two dimensions of spatial position proximity and environmental feature similarity, providing a new strategy for class adjustment of remote sensing classification, so as to improve the classification accuracy on the basis of realizing the overall smoothing of the classification result.
[0050] As Figure 1 shown, in this embodiment, a spatial filtering method for post-processing remote sensing image classification considering environmental similarity is provided, including the following steps:
[0051] Step 1: Perform spatial registration preprocessing on the initial classification result of the remote sensing image and the potential environmental variable layer to generate a set of preprocessing layers with consistent map parameters, and construct an output raster data layer with initialized null values based on the map parameters of the set of preprocessing layers. The set of preprocessing layers includes: the preprocessed initial classification result layer and the preprocessed environmental variable layer.
[0052] The initial classification result of the remote sensing image is a raster data layer obtained by operating remote sensing image processing software (such as ENVI, ArcGIS, etc.), where each pixel represents a specific category, such as river, cultivated land, forest land, etc. The initial classification result is the data preparation for the post-processing spatial filtering technology. At the same time, to ensure the accuracy of subsequent analysis, consistency checks and corrections need to be performed on the initial classification result and the potential environmental variable layer, including: projection coordinate system consistency conversion, spatial resolution normalization, and spatial extent registration.
[0053] In the initial state, the map parameters of the output raster data layer R o are the same as those of the set of preprocessing layers, but the raster values are null, and the results of the filtering process need to be written to the corresponding positions.
[0054] The data construction of this embodiment is based on the following scenario:
[0055] In the mountain valley surrounded by two small mountain ranges, a river passes through and forms a small mid-river island in the downstream. Accordingly, the land use and surface terrain features in this scenario can be inferred, such as Figure 2 and Figure 3 shown in (a). First, the river converges to form a continuous river water surface, which constitutes the main water body feature of the scenario; second, under the scouring action of the river, gentle slopes and low flatlands are formed around the river channel. The areas on both sides of the river water surface are usually developed into cultivated land, while the small mid-river island is often used as forest land due to inconvenient transportation; finally, the slopes on both sides, because of the relatively steep terrain, are mostly covered with forest land. In addition, from the perspective of vegetation coverage, the vegetation coverage of forest land and cultivated land is higher than that of the river water surface, forming a specific spatial distribution feature, that is, forest land, cultivated land > river water surface, as Figure 3 shown in (b).
[0056] In this embodiment, the initial classification results mainly include three types: rivers, cultivated land, and forest land, and their pixel values are 1, 2, and 3 respectively, as Figure 4 shown.
[0057] Step 2: Reclassify the preprocessed potential environmental variable layer to generate a corresponding reclassified layer, and construct a unique value combination partition layer of environmental feature codes through spatial overlay.
[0058] The preprocessed potential environmental variable layer refers to third-party environmental variables that will affect the classification results or can indicate the classification results, such as terrain, vegetation, soil type, etc. Incorporating the potential environmental variable layer into the post-classification processing process can make full use of environmental feature information and effectively improve the classification accuracy.
[0059] The unique value combination partition layer of environmental feature codes assigns a unique code to each partition through the spatial overlay of the reclassification results of different environmental variables, which is used to describe the spatial distribution pattern of environmental variables.
[0060] In this embodiment, terrain and vegetation are selected as environmental variables, and the corresponding reclassification results are as Figure 3 shown in (a) of Figure 3 and (b) of Figure 3 . Among them, in the terrain layer, the pixels with values of 1 and 2 represent different slope grades respectively. The value of 1 represents a low and flat slope, and the value of 2 represents a relatively steep slope; in the vegetation layer, the pixels with values of 1 and 2 represent areas without vegetation cover and areas with vegetation cover respectively.
[0061] Step 3: Based on the characteristics of the preprocessed initial classification results and the application scenario requirements of remote sensing image classification, determine the type of the initial spatial filter for post-classification processing and its template parameters.
[0062] Mode filtering is a commonly used post-classification processing technology, which is suitable for eliminating the "salt and pepper effect" in the remote sensing image classification results. In this embodiment, mode filtering is used for post-processing: its template weight matrix selects the equal weight mode, and the template sizes are set as 3×3 and 5×5 squares respectively. It should be noted that the template size of the mode filter can be set with reference to the spatial resolution of the image, the size of the smallest recognizable ground object, and the complexity of the ground object boundary, etc., in order to effectively eliminate noise.
[0063] Step 4: For the current processing pixel in the preprocessed initial classification result layer, dynamically construct an environment-similar adaptive spatial filter for the current processing pixel based on the initial spatial filter and the unique value combination partition layer of environmental feature codes. The specific process includes:
[0064] Step 4.1: Taking the current processing pixel as the center, determine the neighborhood window NW according to the size of the initial spatial filter template matrix F I ;
[0065] Step 4.2: Based on the unique value combination partition layer of the environmental feature coding, extract all the pixels within the neighborhood window NW, and construct the neighborhood environmental feature coding matrix C E ;
[0066] Step 4.3: Compare each element of the neighborhood environmental feature coding matrix C E with the environmental feature coding c of the current processing pixel one by one to generate the environmental similarity discrimination matrix S E of the current processing pixel. Its mathematical expression is as follows:
[0067] S E = [s(i, j)] m×n (1)
[0068] where,
[0069]
[0070] Here, m and n are the number of rows and columns of the initial spatial filter template matrix F I respectively, and (i, j) is the position index of the matrix element, i = 0, 1, 2,..., m - 1, j = 0, 1, 2,..., n - 1.
[0071] Step 4.4: Based on the initial spatial filter and the environmental similarity discrimination matrix, construct the environmental similarity adaptive spatial filter for the current processing pixel. The calculation expression of the template matrix of the environmental similarity adaptive spatial filter is:
[0072] F E = F I ⊙ S E (3)
[0073] In the formula, ⊙ is the Hadamard product operator; F I , S E and F E represent the initial spatial filter template matrix, the environmental similarity discrimination matrix, and the environmental similarity adaptive spatial filter template matrix respectively.
[0074] In this embodiment, taking the row-column coordinates (8, 17) as the position of the current processing pixel, first, taking the current processing pixel as the center, determine the neighborhood windows NW (3,3) and NW (5,5) with side lengths of 3 pixels and 5 pixels respectively; secondly, based on the unique value combination partition layer of the environmental feature coding, extract the neighborhood windows NW (3,3) and NW (5,5)For all pixels within the coverage, a neighborhood environment feature encoding matrix C of the currently processed pixel is constructed respectively. E,(3,3) and C E,(5,5) ; Then, each element of the neighborhood environment feature encoding matrix C E,(3,3) and C E,(5,5) is compared one by one with the environment feature encoding c = "12" of the currently processed pixel to generate the environment similarity discrimination matrices of the currently processed pixel as follows: Among them, "0" indicates that the element in the neighborhood environment feature encoding matrix is different from the environment feature encoding of the currently processed pixel, that is, the corresponding neighborhood pixel and the currently processed pixel do not belong to the same unique value combination partition, and "1" indicates that the neighborhood pixel and the currently processed pixel have the same environment feature encoding and belong to the same unique value combination partition; Finally, an environment similarity adaptive spatial filter for the currently processed pixel is constructed based on the initial spatial filter and the environment similarity discrimination matrix. The environment similarity adaptive spatial filter matrix F E,(3,3) and F E,(5,5) can be obtained by calculating the Hadamard product of the initial spatial filter template matrix F I and the environment similarity discrimination matrices C E,(3,3) and C E,(5,5) respectively.
[0075] Step 5: Perform low-pass filtering on the currently processed pixel using the environment similarity adaptive spatial filter to obtain the filtering result, and write the filtering result to the corresponding position of the output raster data layer, so as to obtain the classification post-processing result considering the environment similarity of the currently processed pixel.
[0076] The process of performing classification post-processing on the currently processed pixel using the environment similarity adaptive spatial filter includes:
[0077] Step 5.1: Taking the currently processed pixel as the center, determine the neighborhood window NW according to the size of the initial spatial filter template matrix F I .
[0078] Step 5.2: Extract all pixels within the neighborhood window NW based on the preprocessed initial classification result layer to construct a neighborhood initial classification result matrix R I .
[0079] Step 5.3: Based on the environment similarity adaptive spatial filter template matrix F E , perform weighted frequency statistics on each element in the unique value set V of the neighborhood initial classification result matrix R I , and then determine the mode, that is, the element with the most weighted frequency in the set V. The calculation expression of the weighted frequency is:
[0080]
[0081] Among them, \(v\in V\) is any value in the set \(V\) of unique values of the initial neighborhood classification result matrix, \(f(v)\) is the frequency of \(v\), \(NW\) is the neighborhood window, and \((i,j)\in NW\) represents the element position index within the neighborhood window. is the indicator function. When \(R\) I \((i,j)=v\) is true, the value is 1; otherwise it is 0.
[0082] The mode \(m\) can be expressed by the following formula:
[0083]
[0084] Among them, arg max represents "the parameter value that makes the function or expression obtain the maximum value".
[0085] Step 5.4: Write the obtained mode \(m\) to the corresponding position of the output raster data layer to implement the post-processing of classification considering the environmental similarity of the current processed pixel.
[0086] In this embodiment, for the current pixel with row and column coordinates \((8,17)\), the initial neighborhood classification result matrices are respectively: The corresponding sets of unique values are respectively: \(V\) (3,3) \(=[1,2,3]\), \(V\) (5,5) \(=[1,2,3]\). Based on the corresponding environmentally similar adaptive spatial filter template matrices \(F\) E,(3,3) and \(F\) E,(5,5) , the frequencies of all elements in the sets \(V\) (3,3) and \(V\) (5,5) can be calculated, as shown in Table 1 and Table 2 below.
[0087] Table 1
[0088]
[0089] Table 2
[0090]
[0091] Take the element with the most weighted frequency as the filtered output, that is, \(m\) (3,3) \(=2\), \(m\) (5,5) \(=2\), and write them to the pixel positions with row and column coordinates \((8,17)\) of the corresponding output raster data layer respectively as the new class labels to implement the post-processing of classification considering the environmental similarity of the current processed pixel.
[0092] Step 6: Traverse the other pixels in the preprocessed initial classification result raster image, and repeat the operations in Step 4 and Step 5 to finally obtain the complete post-processed classification image.
[0093] The complete post-processed classification image obtained in this embodiment is as Figure 5as shown Figure 5 shows the results of similarity environmental feature space filtering and traditional mode filtering based on 3×3 and 5×5 square local sliding windows in tabular form. Compared with the initial classification accuracy, as Figure 4 shown, the initial classification accuracy is 76.25%. As a key technology for post-processing, spatial filtering can improve the classification accuracy while effectively removing salt-and-pepper noise. A smaller window can effectively remove local noise, but may not be able to smooth the classification boundaries in a larger area; while a larger window can better smooth the classification results, especially in a larger homogeneous area. In addition, the similarity environmental feature space filtering has a higher classification accuracy than the traditional mode filtering, as shown in Table 3. This indicates that the similarity environmental feature space filtering technology in the post-processing of remote sensing image classification can not only effectively eliminate the "salt-and-pepper effect", but also improve the classification accuracy while retaining the image details. This technology provides an effective tool for the post-processing of remote sensing image classification, especially under complex terrain and variable environmental conditions, it can significantly improve the quality of the classification results.
[0094] Table 3
[0095]
[0096] Example 2:
[0097] To further verify the effectiveness and innovation of the spatial filtering method for post-processing of remote sensing image classification considering environmental similarity proposed by the present invention, this example selects remote sensing images of a certain area in Shanxi Province as experimental data. The spatial resolution of the images is 3 meters, and the size is 227×218 pixels. According to the ground truth data, the land cover types are divided into 5 typical land use types: construction land, cultivated land, water area, dense forest land, and sparse forest land. The results of supervised classification using ENVI 5.6 software show that there are obvious salt-and-pepper noises in the initial classified image, which seriously affect the reliability and application value of the classification results.
[0098] This example selects the normalized difference vegetation index (NDVI) and land flatness as environmental feature variables and through spatial registration preprocessing, makes them have the same map parameters as the initial classified image. Subsequently, the NDVI and terrain flatness are reclassified using ArcGIS Pro software, and are divided into two levels: high and low. Among them, the NDVI is discretized into high vegetation cover area and low vegetation cover area, and the terrain flatness is discretized into high flatness area and low flatness area. Finally, a unique value combination partition layer of environmental feature codes is generated through spatial overlay analysis.
[0099] To verify the robustness of the method of the present invention for the system, in this embodiment, circular filtering windows with radii ranging from 1 to 19 are used. The traditional mode filtering and the method of the present invention are respectively used for mode filtering of the initial classification results. At the same time, the method of the present invention is also used for mode filtering of the true land surface types, which is used as a reference. Figure 6 of (a) and Figure 6 (b) intuitively shows the comparison of the overall classification accuracy and Kappa coefficient of the true land type, initial classification, filtering results of the traditional method, and filtering results of the method of the present invention under different filtering windows. As Figure 6 can be seen, the overall accuracy of the true land type always remains above 0.9, and the Kappa coefficient also remains above 0.85, proving the reliability of the true land type labels. Affected by salt-and-pepper noise, the overall accuracy and Kappa coefficient of the supervised classification results are relatively low, being 0.8904 and 0.8231 respectively. As the radius of the filtering window increases, the method of the present invention always maintains higher classification accuracy and Kappa coefficient than the traditional method, reflecting its better anti-noise ability and detail retention effect. In contrast, the traditional filtering method results in detail loss due to excessive smoothing, and its overall accuracy and Kappa coefficient show a continuous downward trend, while the method of the present invention remains at a relatively stable level. When the window radius is 11, the method of the present invention obtains the best filtering effect, and its overall accuracy is improved to 0.9108, which is 5.2% higher than 0.8587 of the traditional classification result. In summary, this embodiment fully proves the significant advantages of the method of the present invention in terms of anti-noise performance and detail retention, while it is difficult for the traditional method to balance both.
[0100] The present invention proposes a spatial filtering method for post-processing remote sensing image classification considering environmental similarity. Based on the traditional sliding window spatial domain mode filtering algorithm, environmental variables such as terrain and vegetation that have an impact on or indicate the remote sensing image classification results are innovatively introduced. By constructing an environmental feature combination partition, the sample range for adjusting the classified categories is limited to a local pixel set with consistent environmental feature combinations. The method of the present invention improves the limitations of the existing method that only relies on the neighborhood structure. While eliminating the "salt-and-pepper effect", it effectively retains the details of scattered objects and linear objects, and improves the classification accuracy. It is a brand-new spatial domain filtering method.
[0101] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A spatial filtering method for post-processing remote sensing image classification taking into account similar environments, characterized in that: The following steps are involved: S1, preprocessing the initial classification result of the remote sensing image and the potential environmental variable layer to obtain a preprocessing layer set, and constructing an output raster data layer based on the preprocessing layer set, wherein the preprocessing layer set includes: a preprocessed initial classification result layer and a preprocessed environmental variable layer; S2, reclassifying the preprocessed environmental variable layer and constructing an environmental feature coding unique value combined partition layer through spatial superposition; S3, determining an initial spatial filter based on the preprocessed initial classification result layer and application requirements of remote sensing image classification; S4, based on the initial spatial filter and the environmental feature coding unique value combined partition layer, dynamically construct an environmental similarity adaptive spatial filter for the currently processed pixel in the pre-processed initial classification result layer; S5, using the environment similarity adaptive spatial filter to perform low-pass filtering on the current processing pixel to obtain a filtering result, and writing the filtering result into a corresponding position of the output raster data layer to obtain a classification post-processing result of the current processing pixel that takes into account the environment similarity; S6, traverse other pixels of the pre-processed initial classification result layer, and repeat S4-S5 to obtain a complete post-classification processed image.
2. The spatial filtering method for post-processing remote sensing image classification taking into account similar environments according to claim 1, characterized in that: The operations for preprocessing the initial classification results of remote sensing images and the potential environmental variable layer include: projection coordinate system consistency conversion, spatial resolution normalization, and spatial range registration.
3. The spatial filtering method for post-processing remote sensing image classification taking into account similar environments according to claim 1, characterized in that: The initial spatial filter adopts a majority filtering mechanism.
4. The spatial filtering method for post-processing remote sensing image classification taking into account similar environments according to claim 1, characterized in that: The process of dynamically constructing the environmental similarity adaptive spatial filter of the current processing pixel includes: Taking the currently processed pixel as the center, determining the neighborhood window based on the template size of the initial spatial filter; Based on the unique value combination partition layer of the environmental feature code, all pixels in the neighborhood window are extracted to construct a neighborhood environmental feature coding matrix; Compare each element in the neighborhood environment feature coding matrix with the environment feature coding of the currently processed pixel one by one to generate an environment similarity discrimination matrix of the currently processed pixel; An environment similarity adaptive spatial filter of the current processing pixel is constructed based on the initial spatial filter and the environment similarity discrimination matrix.
5. The spatial filtering method for post-processing remote sensing image classification taking into account similar environments according to claim 4, characterized in that: The template matrix calculation expression of the environment similarity adaptive spatial filter of the current processing pixel is: F E =F I ⊙S E Where ⊙ is the Hadamard product operator; F I , S E and F E They represent the initial spatial filter template matrix, the environment similarity discrimination matrix and the environment similarity adaptive spatial filter template matrix respectively.
6. The spatial filtering method for post-processing remote sensing image classification taking into account environmental similarity according to claim 1, characterized in that: The process of using the environmental similarity adaptive spatial filter to classify and post-process the current processing pixel includes: Taking the currently processed pixel as the center, determining the neighborhood window based on the template size of the initial spatial filter; Extract all pixels in the neighborhood window based on the preprocessed initial classification result layer to construct a neighborhood initial classification result matrix; Performing weighted frequency statistics on each element in the unique value set in the neighborhood initial classification result matrix based on the environment similarity adaptive spatial filter to determine the mode; The mode is written into the corresponding position of the output raster data layer to implement post-classification processing of the currently processed pixel taking into account the similarity of the environment.
7. The spatial filtering method for post-processing remote sensing image classification taking into account similar environments according to claim 6, characterized in that: The calculation expression for performing frequency statistics on each element in the unique value set in the neighborhood initial classification result matrix based on the environmental similarity adaptive spatial filter is: Where v∈V is any value in the unique value set V of the neighborhood initial classification result matrix, f(v) is the frequency of v, NW is the neighborhood window, (i,j)∈NW represents the element position index within the neighborhood window, and F E represents the environment similarity adaptive spatial filter template matrix, R I represents the neighborhood initial classification result matrix, is the indicator function.
8. The spatial filtering method for post-processing remote sensing image classification taking into account environmental similarity according to claim 1, characterized in that: The potential environmental variable layer includes: Topographic factors: such as elevation, slope, and aspect; Vegetation characteristics: NDVI, leaf area index; Soil parameters: type, moisture, organic matter content; Climate elements: temperature, precipitation.
Citation Information
Patent Citations
Method and system for managing marine environment monitoring data
CN104252665A
Birdsong recognition method and system based on spatial orientation, computer equipment and medium
CN113314127A
Raster data space analysis method fusing partition statistics and neighborhood statistics
CN118113802A
Cultivated land extraction method based on remote sensing cloud computing platform and integrated machine learning technology
CN118918492A
Built environment landscape characteristic recognition method based on network picture
WO2016192552A1