Element stripping method, device and equipment based on multispectral data and medium
By employing adaptive window filtering and feature fusion, the challenge of balancing noise and ground feature details in multispectral data processing was solved, enabling accurate identification of ground features and extraction of key elements in complex terrain areas.
Patent Information
- Application Number
- CN202511614024.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-11-06
AI Technical Summary
Existing multispectral data processing technologies struggle to balance noise reduction with the preservation of ground feature details in complex terrain areas, resulting in insufficient accuracy in extracting key elements.
An adaptive window filtering algorithm is adopted to calculate the window adjustment coefficient based on noise density, gray-level variance and gradient magnitude. The multispectral image is preprocessed and combined with spectral features and texture features. Then, the random forest algorithm is used for land cover classification.
It achieves accurate identification of land features in complex terrain areas, improves the accuracy of key element extraction, and solves the problem that traditional filtering methods cannot balance noise reduction and detail preservation.
Smart Images

Figure CN121074690B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of remote sensing image processing, in particular to a feature stripping method and device based on multispectral data, equipment and medium. BACKGROUND
[0002] The complex terrain area has the characteristics of severe terrain undulation, poor road accessibility, dense vegetation coverage and complex types. In order to scientifically protect and develop the planning of the area, it is necessary to obtain accurate spatial information and quantitative indicators of key elements inside and around the area. With the development of unmanned aerial vehicle oblique photography technology, multispectral imaging has become an important means for spatial information extraction in complex terrain areas because it can simultaneously collect multi-band data such as blue, green, red, red edge and near infrared.
[0003] However, the existing multispectral data processing technology has obvious shortcomings in adapting to complex scenes. In the data processing link, it is difficult to balance the noise processing effect and the ground object detail retention, resulting in output data that cannot meet the accuracy requirements of key element extraction. SUMMARY
[0004] The purpose of the present application is to provide a feature stripping method and device based on multispectral data, equipment and medium, which solves the problem of the existing multispectral data processing technology that it is difficult to balance the noise processing effect and the ground object detail retention in the data processing link, resulting in output data that cannot meet the accuracy requirements of key element extraction.
[0005] To achieve the above purpose, the present application provides the following solutions:
[0006] In a first aspect, a feature stripping method based on multispectral data includes:
[0007] Collecting multispectral images of a target area;
[0008] Using an adaptive window filtering algorithm to pre-process the multispectral images to obtain multispectral enhanced images, wherein the adaptive window filtering algorithm calculates a window adjustment coefficient based on noise density, gray variance and gradient amplitude;
[0009] Extracting spectral features and texture features from the multispectral enhanced images;
[0010] Fusing the spectral features and the texture features to construct fusion features of each pixel in the multispectral enhanced images;
[0011] Determining the ground object class of each pixel based on the fusion features to strip out multiple vectorized layers containing different elements;
[0012] The step of preprocessing the multispectral image using an adaptive window filtering algorithm to obtain a multispectral enhanced image specifically includes:
[0013] A window is set on the multispectral image, and the noise density, gray-level variance, and gradient magnitude within the window are calculated.
[0014] The noise density, gray-level variance, and gradient magnitude are normalized and weighted to obtain the window adjustment coefficient, which is used to adjust the window.
[0015] Based on the adjusted window, a weighted median filter is performed on the multispectral image to obtain a multispectral enhanced image;
[0016] The formula for calculating the window adjustment coefficient is as follows:
[0017]
[0018] In the formula, Indicates noise density weight; Indicates the weight of grayscale variance; Indicates the gradient magnitude weight; This represents the normalized noise density; This represents the normalized grayscale variance; This represents the normalized gradient magnitude; Indicates the window adjustment factor, when A value greater than 0 indicates that the multispectral image contains a lot of noise, and the window needs to be increased. When the value is less than 0, it indicates that the multispectral image contains many details and edges, and the window size needs to be reduced. When =0, it indicates that the window is adapted and remains unchanged;
[0019] The noise density is calculated as follows:
[0020] (0≤D≤1)
[0021] in, Display window The number of pixels within that area that are identified as noise. Display window The total number of pixels contained within;
[0022] The formula for calculating the variance of gray levels is:
[0023]
[0024] in, Indicates coordinates as The pixel values of the corresponding bands in the multispectral image. Display window Total number of pixels contained within It is a window The average value of all pixels within the range;
[0025] The formula for calculating the gradient magnitude is:
[0026]
[0027] in, Represents the gradient in the horizontal direction. This represents the gradient in the vertical direction.
[0028] In one embodiment, the step of extracting spectral features from the multispectral enhanced image specifically includes:
[0029] Calculate the reflectance of each band of the multispectral enhanced image;
[0030] The spectral features are obtained by combining the reflectance of different bands, and the spectral features include the normalized vegetation index, the normalized water index, and the normalized building index.
[0031] In one embodiment, the step of extracting texture features from the multispectral enhanced image specifically includes:
[0032] The grayscale values of the multispectral enhanced image are quantized;
[0033] The texture features are obtained by statistically analyzing the frequency of occurrence of pixel pairs with different gray values at specific directions and distances using the gray-level co-occurrence matrix. The texture features include contrast, entropy, correlation, and inverse difference moment.
[0034] In one embodiment, the step of determining the land cover category of each pixel in the multispectral enhanced image based on the fusion features to extract multiple vectorized layers containing different features specifically includes:
[0035] Based on the fusion features, the random forest algorithm is used to determine the land cover category of each pixel through voting among multiple decision trees;
[0036] Land features of the same category are stripped from the multispectral enhanced image to obtain multiple vectorized layers containing different features.
[0037] Secondly, this application provides a feature stripping device based on multispectral data, comprising:
[0038] The data acquisition module is used to acquire multispectral images of the target area;
[0039] The data preprocessing module is used to preprocess the multispectral image using an adaptive window filtering algorithm to obtain a multispectral enhanced image. The adaptive window filtering algorithm calculates the window adjustment coefficient based on noise density, gray-level variance, and gradient magnitude.
[0040] The feature extraction module is used to extract spectral features and texture features from the multispectral enhanced image;
[0041] The feature fusion module is used to fuse the spectral features and the texture features to construct the fused features of each pixel in the multispectral enhanced image;
[0042] The feature stripping module is used to determine the land cover category of each pixel based on the fusion features, so as to strip out multiple vectorized layers containing different features.
[0043] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.
[0044] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.
[0045] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0046] According to the specific embodiments provided in this application, the following technical effects are disclosed:
[0047] This application provides a method, apparatus, device, and medium for feature stripping based on multispectral data. It employs an adaptive window filtering algorithm to preprocess multispectral images to obtain enhanced multispectral images. The adaptive window filtering algorithm calculates a window adjustment coefficient based on noise density, gray-level variance, and gradient magnitude. This allows for the fusion of these three indicators, enabling dynamic adaptive changes in the filtering window size. The window size can be flexibly adjusted according to the actual conditions of different areas in complex terrain, solving the problem of difficulty in balancing noise reduction and detail preservation in traditional fixed-window filtering. Furthermore, this invention deeply fuses the spectral and texture features of the enhanced multispectral image to construct a multidimensional feature vector. Combined with a random forest classification algorithm, it achieves accurate ground feature identification, solving the problem of misclassification of objects with the same spectrum but different features, and improving the accuracy of ground feature classification in complex scenes. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this application 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a flowchart illustrating a feature stripping method based on multispectral data according to an embodiment of this application.
[0050] Figure 2 This is a schematic diagram of an image preprocessing process for a feature stripping method based on multispectral data according to an embodiment of this application;
[0051] Figure 3 This is a schematic diagram illustrating the feature extraction and feature stripping process of a feature stripping method based on multispectral data according to an embodiment of this application;
[0052] Figure 4 This is a block diagram of a feature stripping device based on multispectral data according to an embodiment of this application;
[0053] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0055] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0056] See Figure 1 This application provides a feature stripping method based on multispectral data, comprising the following steps:
[0057] Step 100: Acquire multispectral images of the target area;
[0058] Step 200: The multispectral image is preprocessed using an adaptive window filtering algorithm to obtain a multispectral enhanced image. The adaptive window filtering algorithm calculates the window adjustment coefficient based on noise density, gray-level variance, and gradient magnitude.
[0059] Step 300: Extract spectral and texture features from the multispectral enhanced image;
[0060] Step 400: Fuse spectral features and texture features to construct fused features for each pixel in the multispectral enhanced image;
[0061] Step 500: Determine the land cover category for each pixel based on the fusion features to extract multiple vectorized layers containing different features.
[0062] In step 100, during the multispectral image data acquisition process, the UAV flight path is planned to ensure coverage of the entire target area. For example, the target area can be a traditional village and its surrounding key areas. The UAV platform is equipped with a multispectral imaging device, which is configured to conduct aerial photography of the target traditional village and its surrounding area along a preset flight path, simultaneously acquiring image data in multiple spectral bands such as blue, green, red, red-edge, and near-infrared to obtain the unique spectral response characteristics of different ground features. The UAV platform possesses precise positioning and attitude measurement capabilities, providing accurate geographical location and attitude information for the images.
[0063] In step 200, the adaptive window filtering algorithm is used to preprocess the multispectral image to obtain a multispectral enhanced image. Specifically, this includes: setting a window on the multispectral image and calculating the noise density, gray-level variance, and gradient magnitude within the window; normalizing the noise density, gray-level variance, and gradient magnitude and assigning weights to obtain window adjustment coefficients to adjust the window; and performing weighted median filtering on the multispectral image based on the adjusted window to obtain the multispectral enhanced image.
[0064] For example, the steps to set up a window include: setting the processing pixel as... The initial window is × The formula for the window range is:
[0065]
[0066] in, This represents the coordinates of the pixel to be processed, where, It is the x-coordinate of that pixel. It is the ordinate; This represents the side length of the window; the initial value can be 3, and... An odd number is used to ensure that the window is centered at the pixel. symmetry; This indicates the pixel area covered by the window.
[0067] The set of pixels within the window is Total pixels ;in, Indicates coordinates as The pixel values of the corresponding bands in the multispectral image; Display window The total number of pixels contained within, since the window is × Therefore, the total pixels .
[0068] For example, the steps for calculating the noise density within a window include: calculating the noise density using an adaptive threshold, and calculating the pixel mean within the window.
[0069]
[0070] in, It is a window The mean value of all pixels within the window is obtained by summing the grayscale values of each pixel within the window and dividing by the total number of pixels. This is obtained and used to reflect the average brightness level of the pixels within the window.
[0071] Furthermore, the standard deviation of pixels within the window is calculated as follows:
[0072]
[0073] in, It is a window The standard deviation of an intra-pixel is used to measure the pixel value relative to the mean. The degree of dispersion indicates that the greater the dispersion, the more obvious the difference in pixel values within the window.
[0074] Furthermore, the noise pixel is defined as , meets 3 The criterion is that the number of noises is... The noise density is calculated as follows:
[0075] (0≤D≤1)
[0076] in, Display window The number of pixels identified as noise is based on 3. Criteria, namely pixel value and mean The absolute value of the difference is greater than 3 times the standard deviation. The pixels were statistically determined as noise pixels.
[0077] For example, the steps for calculating the grayscale variance within a window include: Grayscale variance is used to assess the texture of vegetation and the edges of buildings, reflecting the complexity of terrain features. The calculation formula is:
[0078]
[0079] in, Gray-level variance is an indicator that measures the degree of dispersion of pixel gray-level values in an image. The greater the dispersion, the richer the texture, edges, and other details of the features, and the more complex the features. When the gray-level variance... A higher value indicates rich detail in the terrain features of the area; to preserve this detail, a small window is needed for processing. When the grayscale variance... A lower value indicates that the terrain features in the area are relatively simple, and a larger window is needed for better noise suppression.
[0080] For example, the steps for calculating the gradient magnitude within a window include: the gradient magnitude is used to detect edges in an image, such as road and building outlines, and the gradient is typically calculated using convolution operations.
[0081] The formula for calculating the horizontal gradient is:
[0082]
[0083] in, The gradient represents the horizontal direction, reflecting how the pixel grayscale value changes in the horizontal direction; This represents a convolution operation, used to highlight grayscale changes in the horizontal direction of an image, thereby detecting edge information in the horizontal direction.
[0084] The formula for calculating the vertical gradient is:
[0085]
[0086] in, It represents the gradient in the vertical direction, reflecting the change of pixel grayscale value in the vertical direction.
[0087] In summary, the formula for calculating the average gradient magnitude within the window is:
[0088]
[0089] in, This represents the gradient magnitude, used to measure the rate of change of pixel grayscale values in an image. The greater the rate of change, the more pronounced the edges.
[0090] In this embodiment, the noise density, gray-level variance, and gradient magnitude are normalized to eliminate dimensional differences and mapped to the [0,1] interval. The specific processing steps are as follows:
[0091] The noise density itself is already within the [0,1] range, so it can be used directly. ,in, This represents the normalized noise density.
[0092] The gray variance is normalized as follows:
[0093]
[0094] in, This represents the normalized variance of the gray level; This represents the maximum possible variance of the image, with pixel grayscale values ranging from 0 to 255.
[0095] Gradient magnitude normalized as follows:
[0096]
[0097] in, This represents the normalized gradient magnitude, which takes values in the interval [0,1]. This represents the maximum gradient magnitude of the image. For example, for an 8-bit image, the maximum variation of pixel grayscale value is from 0 to 255, so the maximum possible gradient values in both the horizontal and vertical directions are 255.
[0098] After normalizing the three indicators mentioned above, weights are assigned based on the characteristics of the target area (e.g., a village scenario), and a window adjustment coefficient is introduced. The calculation formula is as follows:
[0099]
[0100] in, Indicates noise density weight; Indicates the weight of grayscale variance; This represents the gradient magnitude weight. When... A value greater than 0 indicates that there is a lot of noise in the multispectral image data, and the window needs to be increased. When the value is less than 0, it indicates that the multispectral image data contains many details and edges, and the window size needs to be reduced; when... When =0, it indicates that the window is adapted and remains unchanged.
[0101] For example, the steps of performing weighted median filtering on a multispectral enhanced image based on an adjusted window to obtain a multispectral enhanced image include:
[0102] Assuming the window adjustment step size is 2, the maximum window size is... The smallest window is The window resizing rule is as follows:
[0103]
[0104] in, Indicates the updated window size; This represents the threshold for increasing the window size, with a value of 0.1. When the window coefficient... Greater than or equal to This indicates that the window size needs to be increased to better suppress noise; The threshold for reducing the window size is 0.1. Less than or equal to This indicates that the window size needs to be reduced to better preserve details.
[0105] After window adjustment, filtering is performed on the multispectral image, and the weights of the pixels within the window are calculated using the following formula:
[0106]
[0107] in, The window that performs the filtering. The pixel weights are determined by their distance from the center of the window; the closer the pixel is to the center of the window, the greater its weight. Indicates the coordinates of the center pixel to be processed; This represents a parameter in the weight calculation, whose value is related to the scale of the adaptive window, and its value is... .
[0108] Sort the pixels within the window by value, find the median position based on the cumulative weight distribution, and replace the center pixel with that pixel value. The filtering formula is:
[0109]
[0110] in, This indicates the center pixel after weighted median filtering. The new grayscale value; This is the window used for the current filtering operation after dynamic adjustment.
[0111] To reduce computational load and improve filtering efficiency, the following iteration convergence conditions are set:
[0112] 1) The window size remains unchanged for two consecutive times, i.e. ,in, The previous window size;
[0113] 2) The number of iterations reaches the upper limit, that is... Where t represents the current iteration number, starting from 0; This represents the maximum number of iterations. It can be set to 5 to prevent computational redundancy and balance accuracy and efficiency.
[0114] In step 300, for example, the step of extracting spectral features from a multispectral enhanced image includes:
[0115] Multispectral images contain multiple bands, each corresponding to a specific spectral range. Ground features exhibit different reflectivities in different bands, and reflectivity itself is an important spectral characteristic. Let a multispectral enhanced image have B bands, then the k-th band is... The coordinates in the image are The reflectance of a pixel in the k-th band The calculation formula is:
[0116]
[0117] in, It is the gain coefficient of the k-th band; It is the offset coefficient of the k-th band.
[0118] Spectral features calculated by combining reflectance in different bands can enhance the characteristics of specific ground features, making them easier to distinguish.
[0119] Normalized Difference Vegetation Index (NDVI) ): Used to detect the growth status and distribution of vegetation, the calculation formula is:
[0120]
[0121] in, It is the reflectivity in the near-infrared band; This refers to the reflectance in the red light band. It should be noted that vegetation... The value is generally positive, and the denser the vegetation, the better. The larger the value.
[0122] Normalized Difference Water Index (NDDI) ): Used to extract water body information, the calculation formula is:
[0123]
[0124] in, This refers to the reflectivity in the green light band. It should be noted that this applies to water bodies. Values are usually high for non-aquatic features. The value is low.
[0125] Normalized Building Index (NBI) ): This helps in identifying building areas; the calculation formula is:
[0126]
[0127] in, This refers to the reflectivity in the shortwave infrared band. It should be noted that this refers to the reflectivity of the building area. The value is relatively large.
[0128] For example, the steps for extracting texture features from a multispectral enhanced image include:
[0129] Texture features of the image are extracted using the gray-level co-occurrence matrix (GLCM) to reflect the texture information of ground features, which is helpful for subsequent feature stripping. To reduce computational cost and highlight differences between gray levels, the gray values are quantized. Let the coordinates in the original image be... The pixel grayscale value The quantized grayscale value The quantification formula is:
[0130]
[0131] in, Indicates the quantization interval; This indicates rounding down to the nearest integer.
[0132] Calculate the frequency of pixel pairs with different gray values appearing in an image at a specific direction and distance. Specifically, use coordinates... Centered on, according to direction Given 0°, 45°, 90°, and 135°, and a distance d=1, find another pixel. ;in, The value is determined by direction The distance d is determined; the number of times pixels with gray values m and n appear under the above conditions is counted and denoted as . After traversing the entire image, the gray-level co-occurrence matrix is obtained. .
[0133] Based on the obtained gray-level co-occurrence matrix, the contrast C, entropy E, correlation Corr, and inverse difference moment Hom index in the image are calculated to extract information that reflects the texture features of ground objects from the multispectral enhanced image.
[0134] In step 400, for example, the step of fusing spectral features and texture features to construct fused features for each pixel in the multispectral enhanced image includes:
[0135] The reflectance and spectral indices of each band are fused with texture features extracted from the gray-level co-occurrence matrix (GLCM) for each pixel in the image. The formula for constructing the fused feature vector is as follows:
[0136]
[0137] Indicates the coordinates in the image are Pixel fusion features; Indicates the coordinates in the image are The reflectance values of the pixel in the first to the Bth multispectral bands; This represents the values of the 1st to Mth spectral indices calculated based on multispectral reflectance; This indicates that the coordinates extracted from the gray-level co-occurrence matrix are... The contrast texture feature value of the region where the pixel is located; This indicates that the coordinates extracted from the gray-level co-occurrence matrix are... The entropy texture feature value of the region where the pixel is located; This indicates that the coordinates extracted from the gray-level co-occurrence matrix are... The correlated texture feature values of the region where the pixel is located; This indicates that the coordinates extracted from the gray-level co-occurrence matrix are... The inverse difference moment texture feature value of the region where the pixel is located.
[0138] In step 500, the step of determining the land cover category of each pixel in the multispectral enhanced image based on the fusion features, in order to extract multiple vectorized layers containing different features, specifically includes: determining the land cover category of each pixel by voting through multiple decision trees using the random forest algorithm based on the fusion features; and extracting land cover of the same category from the multispectral enhanced image to obtain multiple vectorized layers containing different features.
[0139] For example, based on fused features, the steps of determining the land cover category of each pixel using the random forest algorithm through voting among multiple decision trees include:
[0140] A random forest method is used for land cover classification. The random forest consists of N decision trees, each trained based on a randomly selected subset of features and samples. For pixel-level fusion features... Each tree outputs a category prediction, and the final land cover category of a pixel is determined by voting using the following formula:
[0141]
[0142] in, Indicates the coordinates in the image are The predicted land cover category is obtained by classifying the pixels using a random forest. l This indicates the category labels for land features; different categories, such as buildings, vegetation, roads, and water bodies, correspond to different labels. l value; This indicates the category that maximizes the summation; N represents the number of decision trees in the random forest. It is the prediction function of the i-th decision tree in the random forest; It is an indicator function; it takes the value 1 if the condition in parentheses is met, and takes the value 0 otherwise.
[0143] For example, the steps of stripping land features of the same category from a multispectral enhanced image to generate multiple vectorized layers containing different features include:
[0144] After classifying ground features, post-processing such as smoothing and edge optimization is applied to the classification results. Features of the same category are separated from the original data, generating independent vectorized layers containing spatial boundaries and attribute information. In other words, after classifying ground features, Gaussian filtering is used to smooth the classification map, and edge detection is performed to extract feature boundaries, thus extracting core elements. This application can present the extracted individual ground feature elements as independent data layers, clearly defining their spatial location and boundaries through precise coordinates, while also including attribute information, providing intuitive and operable data support for planning and assessment in complex terrain areas.
[0145] In this embodiment, visualization processing can also be performed on the stripped-off vector layers of buildings, vegetation, and water bodies to transform abstract geographic information into intuitive thematic maps. Regarding data storage, the original results and intermediate data before and after visualization processing are stored in a database according to a standardized geographic data format, achieving long-term data retention and providing fundamental support for multi-time-dimensional dynamic monitoring of villages. In terms of data analysis, GIS spatial analysis tools are used to deeply mine the stored data, outputting quantitative results such as building density, road connectivity, and ecological indicators.
[0146] This application designs a dynamic window adjustment algorithm that integrates noise density, gray-level variance, and gradient magnitude for special scenarios in complex regions. It eliminates dimensional differences through normalization and constructs weights to generate window adjustment coefficients, thereby achieving adaptive changes in window size instead of relying on fixed windows or manual parameters. At the same time, it introduces iterative convergence conditions to balance denoising and detail preservation, breaking through the limitations of traditional filtering that makes it difficult to balance denoising and detail preservation.
[0147] Based on the same inventive concept, this application also provides an element stripping device based on multispectral data. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more element stripping device embodiments based on multispectral data provided below can be found in the limitations of the element stripping method based on multispectral data above, and will not be repeated here.
[0148] See Figure 4 This application provides a feature stripping device based on multispectral data, comprising:
[0149] The data acquisition module is used to acquire multispectral images of the target area;
[0150] The data preprocessing module uses an adaptive window filtering algorithm to preprocess the multispectral image to obtain a multispectral enhanced image. The adaptive window filtering algorithm calculates the window adjustment coefficient based on noise density, gray-level variance, and gradient magnitude.
[0151] The feature extraction module is used to extract spectral and texture features from multispectral enhanced images;
[0152] The feature fusion module is used to fuse the spectral features and the texture features to construct the fused features of each pixel in the multispectral enhanced image;
[0153] The feature stripping module is used to determine the land cover category of each pixel based on the fusion features, in order to strip out multiple vectorized layers containing different features.
[0154] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 5 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection.
[0155] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0156] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0157] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0158] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0159] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0160] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0161] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0162] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0163] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A feature stripping method based on multispectral data, characterized in that, include: Acquire multispectral images of the target area; An adaptive window filtering algorithm is used to preprocess the multispectral image to obtain a multispectral enhanced image. The adaptive window filtering algorithm calculates the window adjustment coefficient based on noise density, gray-level variance, and gradient magnitude. Extract spectral and texture features from the multispectral enhanced image; The spectral features and the texture features are fused to construct the fused features for each pixel in the multispectral enhanced image; Based on the fusion features, the land cover category of each pixel is determined to extract multiple vectorized layers containing different features; The step of preprocessing the multispectral image using an adaptive window filtering algorithm to obtain a multispectral enhanced image specifically includes: A window is set on the multispectral image, and the noise density, gray-level variance, and gradient magnitude within the window are calculated. The noise density, gray-level variance, and gradient magnitude are normalized and weighted to obtain the window adjustment coefficient, which is used to adjust the window. Based on the adjusted window, a weighted median filter is performed on the multispectral image to obtain a multispectral enhanced image; The formula for calculating the window adjustment coefficient is as follows: In the formula, Indicates noise density weight; Indicates the weight of grayscale variance; Indicates the gradient magnitude weight; This represents the normalized noise density; This represents the normalized grayscale variance; This represents the normalized gradient magnitude; Indicates the window adjustment factor, when A value greater than 0 indicates that the multispectral image contains a lot of noise, and the window needs to be increased. When the value is less than 0, it indicates that the multispectral image contains many details and edges, and the window size needs to be reduced. When =0, it indicates that the window is adapted and remains unchanged; The noise density is calculated as follows: (0≤D≤1) in, Display window The number of pixels within that area that are identified as noise. Display window The total number of pixels contained within; The formula for calculating the variance of gray levels is: in, Indicates coordinates as The pixel values of the corresponding bands in the multispectral image. Display window Total number of pixels contained within It is a window The average value of all pixels within the range; The formula for calculating the gradient magnitude is: in, Represents the gradient in the horizontal direction. This represents the gradient in the vertical direction.
2. The feature stripping method based on multispectral data according to claim 1, characterized in that, The step of extracting spectral features from the multispectral enhanced image specifically includes: Calculate the reflectance of each band of the multispectral enhanced image; The spectral features are obtained by combining the reflectance of different bands, and the spectral features include the normalized vegetation index, the normalized water index, and the normalized building index.
3. The feature stripping method based on multispectral data according to claim 1, characterized in that, The step of extracting texture features from the multispectral enhanced image specifically includes: The grayscale values of the multispectral enhanced image are quantized; The texture features are obtained by statistically analyzing the frequency of occurrence of pixel pairs with different gray values at specific directions and distances using the gray-level co-occurrence matrix. The texture features include contrast, entropy, correlation, and inverse difference moment.
4. The feature stripping method based on multispectral data according to claim 1, characterized in that, The step of determining the land cover category of each pixel in the multispectral enhanced image based on the fusion features, in order to extract multiple vectorized layers containing different features, specifically includes: Based on the fusion features, the random forest algorithm is used to determine the land cover category of each pixel through voting among multiple decision trees; Land features of the same category are stripped from the multispectral enhanced image to obtain multiple vectorized layers containing different features.
5. A feature stripping device based on multispectral data, characterized in that, include: The data acquisition module is used to acquire multispectral images of the target area; The data preprocessing module is used to preprocess the multispectral image using an adaptive window filtering algorithm to obtain a multispectral enhanced image. The adaptive window filtering algorithm calculates the window adjustment coefficient based on noise density, gray-level variance, and gradient magnitude. The step of preprocessing the multispectral image using an adaptive window filtering algorithm to obtain a multispectral enhanced image specifically includes: A window is set on the multispectral image, and the noise density, gray-level variance, and gradient magnitude within the window are calculated. The noise density, gray-level variance, and gradient magnitude are normalized and weighted to obtain the window adjustment coefficient, which is used to adjust the window. Based on the adjusted window, a weighted median filter is performed on the multispectral image to obtain a multispectral enhanced image; The formula for calculating the window adjustment coefficient is as follows: In the formula, Indicates noise density weight; Indicates the weight of grayscale variance; Indicates the gradient magnitude weight; This represents the normalized noise density; This represents the normalized grayscale variance; This represents the normalized gradient magnitude; Indicates the window adjustment factor, when A value greater than 0 indicates that the multispectral image contains a lot of noise, and the window needs to be increased. When the value is less than 0, it indicates that the multispectral image contains many details and edges, and the window size needs to be reduced. When =0, it indicates that the window is adapted and remains unchanged; The noise density is calculated as follows: (0≤D≤1) in, Display window The number of pixels within that area that are identified as noise. Display window The total number of pixels contained within; The formula for calculating the variance of gray levels is: in, Indicates coordinates as The pixel values of the corresponding bands in the multispectral image. Display window Total number of pixels contained within It is a window The average value of all pixels within the range; The formula for calculating the gradient magnitude is: in, Represents the gradient in the horizontal direction. Represents the gradient in the vertical direction; The feature extraction module is used to extract spectral features and texture features from the multispectral enhanced image; The feature fusion module is used to fuse the spectral features and the texture features to construct the fused features of each pixel in the multispectral enhanced image; The feature stripping module is used to determine the land cover category of each pixel based on the fusion features, so as to strip out multiple vectorized layers containing different features.
6. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the feature stripping method based on multispectral data as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the feature stripping method based on multispectral data as described in any one of claims 1-4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the feature stripping method based on multispectral data as described in any one of claims 1-4.
Citation Information
Patent Citations
Gradient weighted-based adaptive SFIM image fusion algorithm
CN105303542A
Crop identification method based on multispectral satellite image
CN118736436A