Automatic tidal gully extraction method based on water index replacement and fusion of color space components
Through the color space component water index replacement fusion and grayscale symbiosis matrix (GLCM) technology, the extraction problem of trench trench detection in complex backgrounds is solved, and high-precision automatic trench extraction is achieved, which is suitable for large-scale trench network monitoring.
Patent Information
- Application Number
- CN202411897361.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-12-23
AI Technical Summary
Traditional trench trench detection methods are difficult to effectively distinguish narrow trench trench from adjacent objects under complex backgrounds. The existing water index method is affected by shadows and noise, resulting in unsatisfactory trench extraction effect.
A method based on the replacement and fusion of component water index of color space was adopted, and color synthesis was combined with NDWI, MNDWI and MuWI for color synthesis, and a new water index NWI was constructed through HIS transformation, and the grayscale symbiosis matrix (GLCM) and optimized top hat transformation technology were used to automatically extract the tide groove.
The spectral distinction between trench grooves and backgrounds is enhanced, the interference of complex backgrounds is reduced, the accuracy and consistency of trench groove extraction is improved, and automated monitoring of large-scale trench groove networks is realized.
Smart Images

Figure CN119832260B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote sensing image classification and extraction, and more specifically, to a tidal gully automatic extraction method based on color space component water index replacement and fusion. Background Art
[0002] Tidal creeks are linear depressions in tidal-dominated coastal landscapes, often composed of complex systems of bifurcating channels, presenting one of the most striking geometric forms found in the natural environment. Tidal creeks are not only crucial pathways for the exchange of sediments, nutrients, and pollutants, but also sustain fragile ecological habitats, maintaining a delicate balance between sedimentation and hydrodynamics. However, with overdevelopment and increased human activity in coastal areas, tidal creek morphology has undergone significant changes. As tidal creek morphology continues to evolve, traditional creek detection methods are increasingly becoming increasingly limited. Traditional field measurements, due to their short tidal exposure time and limited coverage, are difficult to apply to large-scale tidal creek network monitoring. Furthermore, aerial image analysis methods that rely on manual visual interpretation are complex and subjective, making them difficult to replicate over large areas. In contrast, water body indices are widely used for water body detection due to their high accuracy and low cost. However, in areas with significant tidal creek width variations and complex backgrounds, water body indices are often affected by shadows and noise, making them ineffective in distinguishing narrow tidal creeks from adjacent objects.
[0003] The essence of index methods is to explore the commonalities of target objects, adapt to target recognition in different scenarios, and extract target objects more flexibly than rigid classification. Water body indices are derived by mathematically calculating multiple optical bands in optical satellite imagery, aiming to enhance the spectral signal differentiation of target water bodies. Currently, a variety of indices have been successfully developed and applied in various target water body extraction studies. For tidal creek monitoring, traditional water body index methods such as NDWI and MNDWI perform well in large-scale water body detection. However, in areas with large variations in tidal creek width, especially in areas with small spectral differences between narrow tidal creeks and complex surrounding backgrounds (such as vegetation and mudflats), the extraction effect of these indices is not ideal. In addition, due to the influence of shadows, clouds, and other noise, a single water body index cannot effectively distinguish between narrow tidal creeks and tidal flat areas. Summary of the Invention
[0004] The purpose of the present invention is to address the deficiencies of the existing technology and propose an automatic tidal gully extraction method based on the replacement and fusion of color space component water index.
[0005] First, a method for automatically extracting tidal gullies based on water index replacement and fusion of color space components is provided, comprising:
[0006] Step 1: Acquire a target remote sensing image and preprocess the target remote sensing image;
[0007] Step 2: Calculate the normalized water index NDWI, the improved normalized water index MNDWI, and the multispectral water index MuWI corresponding to the target remote sensing image;
[0008] Step 3: Perform color synthesis based on the normalized water index NDWI, the improved normalized water index MNDWI, and the multispectral water index MuWI corresponding to the target remote sensing image to obtain a color image; and perform HIS transformation on the color image, and use the obtained I component as the new water index NWI;
[0009] Step 4: Calculate the gray level co-occurrence matrix (GLCM) of the NWI image to obtain the average feature;
[0010] Step 5: Processing the average feature by optimized top hat transformation;
[0011] Step 6: Statistically determine the optimal threshold for extracting tidal gullies based on the results of the optimized top-hat transformation, and generate a binary image based on the optimal threshold;
[0012] Step 7: Perform connected component analysis and morphological operations on the binary image to obtain the final result of tidal gully extraction.
[0013] Preferably, in step 2, the calculation formulas for NDWI, MNDWI and MuWI are:
[0014]
[0015] MuWI=-4ND(2,3)+2ND(3,8)+2ND(3,12)-ND(3,11)
[0016] Among them, Green is the green light band value, NIR is the near infrared band value, SWIR1 is the first shortwave infrared band value, and ND(i,j) represents the normalized difference between band i and band j.
[0017] Preferably, in step 3, color synthesis is performed using MNDWI as the red component, NDWI as the green component, and MuWI as the blue component; the calculation formula of HIS transformation is:
[0018]
[0019] H=60H t (ifH t <0,H t =H t +6)
[0020] Among them, R, G, and B are the red component, green component, and blue component respectively, max and min are the maximum and minimum values of R, G, and B of each pixel respectively, I represents the pixel brightness (brightness), S represents the color saturation (brightness) of the pixel, and Ht is an intermediate variable used to calculate the hue H; I represents the pixel brightness, and S represents the color saturation of the pixel.
[0021] Preferably, in step 4, the calculation formula is:
[0022] Gray=(0.3×B)+(0.59×R)+(0.11×GR)
[0023]
[0024] Where Gray is the grayscale value, i is the grayscale value of the first pixel, j is the grayscale value of the second pixel adjacent to the first pixel, f(x,y) is the pixel value of the image at position (x,y), (Δx,Δy) is the position offset of the adjacent pixels calculated based on the distance d and the angle θ, and p(i,j) is the joint probability of the two pixel pairs with grayscale values i and j in the GLCM.
[0025] As a preference, in step 5, the optimized top hat variation T o The calculation formula is:
[0026]
[0027] Among them, S o and S c Opening operation Structural elements of the and closing operations, I C is the complementary image of image I and is defined as follows:
[0028]
[0029] Where U is the full set of possible values for each pixel; the complementary image I of image I C The operation of (x,y) is:
[0030] I C (x,y)=max(U)-I(x,y)
[0031] Where max(U) is the maximum possible pixel value and I(x,y) is the pixel value at position (x,y) in the original image.
[0032] Preferably, in step 6, the expression to be satisfied for tidal gully extraction is:
[0033]
[0034] Among them, T o (x,y) is the T of position (x,y) o value, T o threshold.
[0035] In a second aspect, a tidal creek automatic extraction system based on color space component water index replacement and fusion is provided, which is used to execute any of the methods described in the first aspect, including:
[0036] A first acquisition module is used to acquire a target remote sensing image and pre-process the target remote sensing image;
[0037] A first calculation module is used to calculate the normalized water index NDWI, the improved normalized water index MNDWI and the multispectral water index MuWI corresponding to the target remote sensing image;
[0038] A synthesis module is used to perform color synthesis based on the normalized water index NDWI, the improved normalized water index MNDWI and the multispectral water index MuWI corresponding to the target remote sensing image to obtain a color image; and perform HIS transformation on the color image to use the obtained I component as the new water index NWI;
[0039] The second calculation module is used to calculate the gray level co-occurrence matrix GLCM of the NWI image to obtain the average feature;
[0040] a processing module, configured to process the average feature by an optimized top-hat transformation;
[0041] a determination module, configured to statistically determine an optimal threshold for extracting tidal gullies based on a result of processing using the optimized top-hat transform, and to generate a binary image based on the optimal threshold;
[0042] The second acquisition module is used to perform connected component analysis and morphological operations on the binary image to obtain the final result of tidal gully extraction.
[0043] According to a third aspect, a computer storage medium is provided, wherein a computer program is stored in the computer storage medium; when the computer program is executed on a computer, the computer executes any one of the methods described in the first aspect.
[0044] In a fourth aspect, an electronic device is provided, including:
[0045] Memory, used to store computer programs;
[0046] A processor is used to execute the computer program to implement any method as described in the first aspect.
[0047] The beneficial effects of the present invention are as follows: the present invention first replaces and fuses the color space components by combining three water body indices (NDWI, MNDWI, MuWI), thereby enhancing the spectral discrimination of different landforms, especially being able to more clearly extract tidal gullies of varying widths under complex backgrounds, overcoming the shortcomings of traditional single index in extracting narrow tidal gullies. Subsequently, by introducing the gray-level co-occurrence matrix (GLCM) and optimized top-hat transformation technology, the spatial and texture features of the image are fully utilized, the morphological characteristics of the tidal gully are effectively highlighted, the interference of complex backgrounds such as vegetation and mudflats is reduced, and the extraction results are made clearer and more accurate. Finally, based on morphological features and statistical analysis, the optimal threshold is determined for binarization processing to achieve automated extraction of tidal gullies, improve the efficiency and consistency of tidal gully extraction, and avoid the subjectivity and errors caused by human intervention. The present invention can adapt to complex coastal tidal flat areas through the fusion processing of spectral and spatial features, realize the monitoring and analysis of large-scale tidal gully networks, overcome the limitations of traditional field measurements and manual interpretation, and provide data support and reference for subsequent tidal gully morphological analysis and evolution characteristics. Therefore, the method proposed in the present invention has important practical application significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a flow chart of the automatic tidal gully extraction method based on the replacement and fusion of color space component water index;
[0049] Figure 2 Schematic diagram of the process for constructing a new water index;
[0050] Figure 3 This is a schematic diagram of the tidal gully extraction effect of the gray-level co-occurrence matrix;
[0051] Figure 4 Schematic diagram of the optimized top-hat transformation tidal gully extraction effect;
[0052] Figure 5a Schematic diagram of the original image;
[0053] Figure 5b Schematic diagram of tidal gully extraction effect. DETAILED DESCRIPTION
[0054] The present invention will be further described below with reference to the following examples. The following examples are provided only to facilitate understanding of the present invention. It should be noted that, without departing from the principles of the present invention, it is possible for a person skilled in the art to make various modifications to the present invention, and such improvements and modifications fall within the scope of the claims of the present invention.
[0055] Example 1:
[0056] Although traditional water body indices such as NDWI and MNDWI perform well in a wide range of water body detection, their extraction accuracy is obviously insufficient when the width of tidal creeks varies greatly, especially when the spectral difference between narrow tidal creeks and complex backgrounds (such as vegetation and mudflats) is small.
[0057] In order to solve the problems of the prior art, Example 1 of the present application provides an automatic tidal creek extraction method based on the replacement and fusion of color space component water indices. First, the Sentinel-2 remote sensing images are screened and preprocessed, and NDWI, MNDWI and MuWI are calculated. Then, these index images are synthesized into color images, and a new water body index NWI is constructed through HIS transformation. Subsequently, gray-level co-occurrence matrix (GLCM) analysis and optimized top-hat transformation technology are applied to further enhance the linear characteristics of the tidal creek and reduce background interference. Finally, according to the morphological characteristics of the tidal creek area, the appropriate threshold is determined through statistical analysis, and accurate tidal creek extraction is achieved through connected component analysis and morphological operations. This method effectively improves the distinction between tidal creeks and backgrounds, and can achieve more accurate automatic extraction of tidal creeks, especially in complex tidal flat environments.
[0058] Specifically, such as Figure 1 As shown, the method provided by the present invention includes:
[0059] Step 1: Acquire a target remote sensing image and preprocess the target remote sensing image.
[0060] For example, the target remote sensing image is a Sentinel-2 remote sensing image available in a target area and a target month, and the preprocessing includes atmospheric correction and cloud removal.
[0061] Step 2: Calculate the normalized water index NDWI, improved normalized water index MNDWI and multispectral water index MuWI corresponding to the target remote sensing image.
[0062] In step 2, the calculation formulas for NDWI, MNDWI, and MuWI are:
[0063]
[0064] MuWI=-4ND(2,3)+2ND(3,8)+2ND(3,12)-ND(3,11)
[0065] Among them, Green is the green light band value, NIR is the near infrared band value, SWIR1 is the first shortwave infrared band value, and ND(i,j) represents the normalized difference between band i and band j.
[0066] In this example, NIR, Red, Green, and SWIR1 are B8, B4, B3, and B11 of the Sentinel-2 data, respectively.
[0067] Step 3: Figure 2 As shown, according to the normalized water index NDWI, the improved normalized water index MNDWI and the multispectral water index MuWI corresponding to the target remote sensing image, color synthesis is performed to obtain a color image; and the color image is transformed by HIS (hue, intensity and saturation combination), and the obtained I component is used as the new water index NWI.
[0068] In step 3, MNDWI is used as the red component, NDWI as the green component, and MuWI as the blue component for color synthesis; the calculation formula of HIS transformation is:
[0069]
[0070] H=60H t (ifH t <0,H t =Ht+6)
[0071] Among them, R, G, and B are the red component, green component, and blue component respectively, max and min are the maximum and minimum values of R, G, and B of each pixel respectively, Ht is an intermediate variable used to calculate the hue H; I represents the pixel brightness (brightness), and S represents the color saturation (brightness) of the pixel.
[0072] Step 4: Figure 3 As shown, the gray level co-occurrence matrix GLCM is calculated for the NWI image to obtain the average (SumAverage) feature.
[0073] Step 5: Figure 4 As shown in FIG, the Sum Average feature is processed by optimized top hat transformation to reduce the heterogeneity of tidal flat background and enhance the linear characteristics of tidal creek.
[0074] In step 5, this application uses morphological operations to highlight the structural features of the tidal creek area and reduce background interference.
[0075] Step 6: Statistically determine the optimal threshold for extracting tidal gullies based on the results of the optimized top-hat transformation, and generate a binary image based on the optimal threshold.
[0076] Step 7: Figure 5a and Figure 5b As shown in Figure 1, connected component analysis and morphological operations are performed on the binary image to obtain the final result of tidal gully extraction.
[0077] Therefore, this application constructs a multi-feature water index (NWI) that combines multiple water index replacements and fusions to enhance the distinction between tidal gullies and other landforms. In the index construction process, spectral features and spatial texture features are combined to achieve simple and rapid extraction of tidal gullies through thresholding (as shown in Figure 5).
[0078] Example 2:
[0079] Based on Example 1, Example 2 of the present application provides a more specific method for automatically extracting tidal gullies based on the replacement and fusion of color space component water indices, including:
[0080] Step 1: Acquire a target remote sensing image and preprocess the target remote sensing image.
[0081] Step 2: Calculate the normalized water index NDWI, improved normalized water index MNDWI and multispectral water index MuWI corresponding to the target remote sensing image.
[0082] Step 3: Perform color synthesis based on the normalized water index NDWI, improved normalized water index MNDWI and multispectral water index MuWI corresponding to the target remote sensing image to obtain a color image; and perform HIS transformation on the color image, and use the obtained I component as the new water index NWI.
[0083] Step 4: Calculate the gray-level co-occurrence matrix (GLCM) of the NWI image to obtain the average feature.
[0084] In step 4, the calculation formula is:
[0085] Gray=(0.3×B)+(0.59×R)+(0.11×GR)
[0086]
[0087] Where Gray is the grayscale value, i is the grayscale value of the first pixel, j is the grayscale value of the second pixel adjacent to the first pixel, f(x,y) is the pixel value of the image at position (x,y), (Δx,Δy) is the position offset of the adjacent pixels calculated based on the distance d and the angle θ, and p(i,j) is the joint probability of the two pixel pairs with grayscale values i and j in the GLCM.
[0088] Step 5: Process the average feature through optimized top-hat transformation.
[0089] In step 5, the optimized top hat variation T o The calculation formula is:
[0090]
[0091] Among them, So and S c Opening operation Structural elements of the and closing operations, I C is the complementary image of image I and is defined as follows:
[0092]
[0093] Where U is the full set of possible values for each pixel; the complementary image I of image I C The operation of (x,y) is:
[0094] I C (x,y)=max(U)-I(x,y)
[0095] Where max(U) is the maximum possible pixel value and I(x,y) is the pixel value at position (x,y) in the original image.
[0096] Step 6: Statistically determine the optimal threshold for extracting tidal gullies based on the results of the optimized top-hat transformation, and generate a binary image based on the optimal threshold.
[0097] In step 6, the expression that needs to be satisfied for tidal gully extraction is:
[0098]
[0099] Among them, T o (x,y) is the T of position (x,y) o value, T o In this example, It is -0.02.
[0100] Step 7: Perform connected component analysis and morphological operations on the binary image to obtain the final result of tidal gully extraction.
[0101] It should be noted that the parts in this embodiment that are the same or similar to those in Example 1 can be referenced to each other and will not be described in detail in this application.
[0102] Example 3:
[0103] Based on Examples 1 and 2, Example 3 of the present application provides an automatic tidal gully extraction system based on the replacement and fusion of color space component water indices, including:
[0104] A first acquisition module is used to acquire a target remote sensing image and pre-process the target remote sensing image;
[0105] A first calculation module is used to calculate the normalized water index NDWI, the improved normalized water index MNDWI and the multispectral water index MuWI corresponding to the target remote sensing image;
[0106] A synthesis module is used to perform color synthesis based on the normalized water index NDWI, the improved normalized water index MNDWI and the multispectral water index MuWI corresponding to the target remote sensing image to obtain a color image; and perform HIS transformation on the color image to use the obtained I component as the new water index NWI;
[0107] The second calculation module is used to calculate the gray level co-occurrence matrix GLCM of the NWI image to obtain the average feature;
[0108] a processing module, configured to process the average feature by an optimized top-hat transformation;
[0109] a determination module, configured to statistically determine an optimal threshold for extracting tidal gullies based on a result of processing using the optimized top-hat transform, and to generate a binary image based on the optimal threshold;
[0110] The second acquisition module is used to perform connected component analysis and morphological operations on the binary image to obtain the final result of tidal gully extraction.
[0111] Specifically, the system provided in this embodiment is a system corresponding to the method provided in Example 1. Therefore, the parts in this embodiment that are the same or similar to those in Example 1 can be referenced to each other and will not be repeated in this application.
[0112] In summary, this method combines multiple water body images to create a new color image, applies the HIS transform to this color image, and uses the I component as the NWI image. A gray-level co-occurrence matrix and an optimized top-hat transform are then used to reduce the impact of background heterogeneity on tidal gully extraction and effectively enhance the linear characteristics of tidal gullies. This method can better distinguish gullies from the background and improve the accuracy of tidal gully extraction. This method is particularly effective in salt marsh tidal flats, where both wide and narrow gullies coexist. This method provides data support and reference for the automated extraction of tidal gullies.
Claims
1. An automatic tidal gully extraction method based on water index replacement and fusion of color space components is characterized by: include: Step 1: Acquire a target remote sensing image and preprocess the target remote sensing image; Step 2: Calculate the normalized water index NDWI, improved normalized water index MNDWI, and multispectral water index MuWI corresponding to the target remote sensing image; in step 2, the calculation formulas of NDWI, MNDWI, and MuWI are: MuWI=-4ND(2,3)+2ND(3,8)+2ND(3,12)-ND(3,11) Among them, Green is the green light band value, NIR is the near infrared band value, SWIR1 is the first shortwave infrared band value, and ND(i,j) represents the normalized difference between band i and band j; Step 3: Perform color synthesis based on the normalized water index NDWI, the improved normalized water index MNDWI, and the multispectral water index MuWI corresponding to the target remote sensing image to obtain a color image; and perform HIS transformation on the color image, and use the obtained I component as the new water index NWI; Step 4: Calculate the gray-level co-occurrence matrix (GLCM) of the NWI image, and obtain and average features; Step 5: Processing the average feature by optimized top hat transformation; In step 5, the optimized top hat variation T o The calculation formula is: Among them, S o and S c Opening operation Structural elements of the and closing operations, I C is the complementary image of image I and is defined as follows: Where U is the full set of possible values for each pixel; the complementary image I of image I C The operation of (x,y) is: I C (x,y)=max(U)-I(x,y) Where max(U) is the maximum possible pixel value, and I(x,y) is the pixel value at position (x,y) in the original image. Step 6: Statistically determine the optimal threshold for extracting tidal gullies based on the results of the optimized top-hat transformation, and generate a binary image based on the optimal threshold; Step 7: Perform connected component analysis and morphological operations on the binary image to obtain the final result of tidal gully extraction.
2. The automatic tidal creek extraction method based on color space component water index replacement and fusion according to claim 1 is characterized in that: In step 3, MNDWI is used as the red component, NDWI as the green component, and MuWI as the blue component for color synthesis; the calculation formula of HIS transformation is: H=60H t (ifH t <0,H t =Ht+6) Among them, R, G, and B are the red component, green component, and blue component respectively, max and min are the maximum and minimum values of R, G, and B of each pixel respectively, I represents the pixel brightness, S represents the color saturation of the pixel, and Ht is an intermediate variable used to calculate the hue H.
3. The automatic tidal creek extraction method based on color space component water index replacement and fusion according to claim 2 is characterized in that: In step 4, the calculation formula is: Gray=(0.3×B)+(0.59×R)+(0.11×GR) Where Gray is the grayscale value, i is the grayscale value of the first pixel, j is the grayscale value of the second pixel adjacent to the first pixel, f(x,y) is the pixel value of the image at position (x,y), (Δx,Δy) is the position offset of the adjacent pixels calculated based on the distance d and the angle θ, and p(i,j) is the joint probability of the two pixel pairs with grayscale values i and j in the GLCM.
4. The automatic tidal creek extraction method based on color space component water index replacement and fusion according to claim 3 is characterized in that: In step 6, the expression that needs to be satisfied for tidal gully extraction is: Among them, T o (x,y) is the T of position (x,y) o value, T o threshold.
5. An automatic tidal gully extraction system based on water index replacement and fusion of color space components, characterized by: The method for executing any one of claims 1 to 4 comprises: A first acquisition module is used to acquire a target remote sensing image and pre-process the target remote sensing image; A first calculation module is used to calculate the normalized water index NDWI, the improved normalized water index MNDWI and the multispectral water index MuWI corresponding to the target remote sensing image; A synthesis module is used to perform color synthesis based on the normalized water index NDWI, the improved normalized water index MNDWI and the multispectral water index MuWI corresponding to the target remote sensing image to obtain a color image; and perform HIS transformation on the color image to use the obtained I component as the new water index NWI; The second calculation module is used to calculate the gray level co-occurrence matrix GLCM of the NWI image to obtain the average feature; a processing module, configured to process the average feature by an optimized top-hat transformation; a determination module, configured to statistically determine an optimal threshold for extracting tidal gullies based on a result of processing through the optimized top-hat transformation, and to generate a binary image based on the optimal threshold; The second acquisition module is used to perform connected component analysis and morphological operations on the binary image to obtain the final result of tidal gully extraction.
6. A computer storage medium, characterized in that The computer storage medium stores a computer program; when the computer program is run on a computer, the computer executes the method according to any one of claims 1 to 4.
7. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Argillaceous coastline transition monitoring and analyzing method based on remote sensing technology
CN116189080A
Tidal creek extraction method and system cooperating with complete polarimetric SAR and multispectral remote sensing
CN117789044A