A method and system for extracting water bodies from remote sensing images
Patent Information
- Application Number
- CN202611150205.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-08-28
AI Technical Summary
[0005]本发明针对现有技术中存在的技术问题,提供一种遥感影像水体提取方法及系统,克服现有水体提取方法的漏检、误检的缺陷
[0039] This invention provides a method and system for water body extraction from remote sensing images. It automatically acquires water color parameters through a thumbnail-driven self-calibration mechanism, adapting to different water color scenarios such as clear water, turbid water, silty water surfaces, and plateau lakes without manual parameter adjustment. A dual-window texture joint criterion is employed to reliably distinguish water bodies from forest land. An innovative coarse-to-fine scale texture ratio index is introduced to specifically remedy the systematic omission of granular silty water surfaces in existing methods. This invention solves core engineering problems in remote sensing water body extraction, including cross-scene adaptability, elimination of aquatic vegetation confusion, and capture of silty water surfaces. Multi-scenario testing and verification show that the water body extraction IoU is improved by 18–24 percentage points compared to the fixed threshold baseline method, effectively solving the problem of missed detection of granular silty water surfaces.
Smart Images

Figure CN122657482A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote sensing image processing technology, and more specifically, to a method and system for extracting water bodies from remote sensing images. Background Technology
[0002] Remote sensing water extraction has poor adaptability to changes in water color: Existing methods generally use fixed HSV or NDWI thresholds, and manual parameter readjustment is required for different water color scenarios such as clear water, turbid water (silt type), and plateau lakes (blue-green shift), resulting in extremely weak batch processing capabilities.
[0003] The problem of color confusion between water bodies and forest land remains unresolved: The H and S components of dark green vegetation in tropical and subtropical regions highly overlap with turbid water bodies. Existing color-based extraction methods frequently misidentify forest land as water bodies, and there is a lack of effective texture identification mechanisms.
[0004] High rate of missed detection for granular sediment water surfaces: Sediment water surfaces appear as granular, low-texture features in remote sensing images, and their spectral characteristics are between those of land and water, making them difficult to distinguish effectively with existing methods; the literature on remote sensing water extraction generally does not report on the processing of such water surfaces. Summary of the Invention
[0005] This invention addresses the technical problems existing in the prior art by providing a method and system for extracting water bodies from remote sensing images, overcoming the defects of missed detections and false detections in existing water body extraction methods.
[0006] According to a first aspect of the present invention, a method for extracting water bodies from remote sensing images is provided, comprising:
[0007] A thumbnail of the input remote sensing image is generated. Water candidate regions are constructed on the thumbnail through texture-color joint screening. The color threshold range required for water body extraction in the whole image is automatically calibrated based on the pixel statistical distribution of the water candidate regions.
[0008] Based on the color threshold range, basic color filtering is performed on the entire image, and combined with hue uniformity constraints, color candidate regions are obtained;
[0009] For large connected regions in the color candidate region with an area not lower than a preset area threshold, perform dual-window texture forest identification: when the large connected region simultaneously satisfies that the standard deviation of the small-scale window of the grayscale image is not lower than the first texture threshold and the standard deviation of the large-scale window of the grayscale image is not lower than the second texture threshold, it is determined to be a vegetation area and excluded, thus obtaining a preliminary water body mask.
[0010] The preliminary water mask is remedied for granular sediment surface using a preset coarse-fine scale texture ratio index, where the coarse-fine scale texture ratio is the ratio of the standard deviation of the small-scale window of the grayscale image to the standard deviation of the large-scale window of the grayscale image.
[0011] The result after particle repair is used as the final water mask output.
[0012] Based on the above technical solution, the present invention can also be improved as follows.
[0013] Optionally, the process of generating a thumbnail of the input remote sensing image involves constructing water candidate regions on the thumbnail through a joint texture-color screening process, and automatically determining the color threshold range required for water body extraction from the entire image based on the pixel statistical distribution of the water candidate regions, including:
[0014] Generate a thumbnail of the input remote sensing image, wherein the long side of the thumbnail does not exceed a preset pixel limit, and the spatial relative distribution characteristics of the original image are preserved;
[0015] Calculate the standard deviation of the small-scale window of the grayscale image and the variance of the large-scale window of the tone channel on the thumbnail;
[0016] The water candidate region is constructed using the following joint screening conditions: the standard deviation of the small-scale window of the grayscale image is lower than the first candidate quantile threshold, the variance of the large-scale window of the tone channel is lower than the second candidate quantile threshold, the brightness channel falls within the effective range, and low-saturation, high-brightness road-type pixels are excluded.
[0017] Connectivity verification is performed on the water candidate region. After the verification is passed, the quantile ranges of each channel of hue, saturation and brightness of the pixels in the water candidate region are calculated. The lower limit of each channel quantile minus the expansion margin and the upper limit of each channel quantile plus the expansion margin are used as the color threshold range for water extraction in the whole image.
[0018] Optionally, connectivity verification is performed on the water candidate region, including:
[0019] Verify that the percentage of the number of pixels of the largest connected component in the water candidate region is not less than a first preset percentage, and the percentage of the number of pixels of the largest connected component in the total number of pixels in the entire image is not less than a second preset percentage; if the verification fails, it is determined that the current image does not contain a reliable water candidate region, and the self-calibration is terminated using a preset default color parameter group.
[0020] Optionally, the small-scale window is a 7×7 pixel window, the large-scale window is a 31×31 pixel window, the first texture threshold is taken from the 90th quantile of the thumbnail candidate area plus 1.0, and the second texture threshold is taken from the 90th quantile of the thumbnail candidate area plus 1.0.
[0021] Optionally, the step of applying a preset coarse-to-fine texture ratio to the initial water mask for granular sediment surface remediation includes:
[0022] Calculate the coarse-to-fine scale texture ratio of the region corresponding to the preliminary water mask;
[0023] Regions that satisfy the condition that the ratio of coarse and fine scale textures exceeds a preset ratio threshold, the standard deviation of small scale textures is lower than a preset upper limit threshold, and the preset color constraint condition are identified as particle candidate regions.
[0024] After performing a morphological closing operation on the particle candidate region, the component that is connected to the preliminary water mask is retained and merged into the final water mask.
[0025] Optionally, the preset color constraints include hue within a preset mud and sand hue range, saturation within a preset mud and sand saturation range, and brightness within a preset mud and sand brightness range.
[0026] Optionally, it also includes connected component texture quality scoring:
[0027] Calculate the mean of the local texture standard deviation of pixels in each connected component in the preliminary water mask, and assign a texture score based on the comparison result of the mean and the preset graded texture threshold.
[0028] For connected components whose area does not exceed a preset small water body area threshold, calculate the standard deviation of their brightness channel pixels, and assign a uniformity bonus based on the comparison result between the standard deviation of the brightness channel pixels and the preset graded uniformity threshold.
[0029] Only connected components whose sum of texture score and uniformity bonus score is not lower than a preset comprehensive score threshold are retained as the initial water body mask for subsequent granular sediment surface remediation.
[0030] Optionally, after generating the color candidate regions, a distance transformation extension is also included:
[0031] A strict seed region is determined in the preliminary water mask. Based on the strict seed region, the distance field of each pixel in the entire image is calculated by a single Euclidean distance transformation. Pixels whose distance does not exceed a preset extension distance threshold and satisfy the relaxed color condition are selected as candidate extension regions and included in the preliminary water mask. The preset extension distance threshold is adaptively calculated according to the spatial resolution of the remote sensing image to keep the geographical range of the extension constant.
[0032] Optionally, the input remote sensing image is an image containing only the RGB visible light three bands.
[0033] According to a second aspect of the present invention, a remote sensing image water body extraction system is provided, comprising:
[0034] The calibration module is used to generate a thumbnail of the input remote sensing image, construct water candidate regions on the thumbnail through texture-color joint initial screening, and automatically calibrate the color threshold range required for water body extraction in the whole image based on the pixel statistical distribution of the water candidate regions.
[0035] The filtering module is used to perform basic color filtering on the entire image based on the color threshold range, and combine it with hue uniformity constraints to obtain color candidate areas;
[0036] The generation module is used to perform dual-window texture forest identification on large connected regions in the color candidate region whose area is not less than a preset area threshold: when the large connected region simultaneously satisfies that the standard deviation of the small-scale window of the grayscale image is not less than the first texture threshold and the standard deviation of the large-scale window of the grayscale image is not less than the second texture threshold, it is determined to be a vegetation area and excluded, and a preliminary water mask is generated.
[0037] The remediation module is used to perform granular sediment surface remediation on the preliminary water mask using a preset coarse-fine scale texture ratio index, wherein the coarse-fine scale texture ratio is the ratio of the standard deviation of the small-scale window of the grayscale image to the standard deviation of the large-scale window of the grayscale image.
[0038] The output module is used to output the results of particle remediation as the final water mask.
[0039] This invention provides a method and system for water body extraction from remote sensing images. It automatically acquires water color parameters through a thumbnail-driven self-calibration mechanism, adapting to different water color scenarios such as clear water, turbid water, silty water surfaces, and plateau lakes without manual parameter adjustment. A dual-window texture joint criterion is employed to reliably distinguish water bodies from forest land. An innovative coarse-to-fine scale texture ratio index is introduced to specifically remedy the systematic omission of granular silty water surfaces in existing methods. This invention solves core engineering problems in remote sensing water body extraction, including cross-scene adaptability, elimination of aquatic vegetation confusion, and capture of silty water surfaces. Multi-scenario testing and verification show that the water body extraction IoU is improved by 18–24 percentage points compared to the fixed threshold baseline method, effectively solving the problem of missed detection of granular silty water surfaces. Attached Figure Description
[0040] Figure 1 A flowchart of a method for extracting water bodies from remote sensing images, provided in one embodiment of the present invention;
[0041] Figure 2 This is a flowchart of thumbnail-driven adaptive color self-calibration according to an embodiment of the present invention;
[0042] Figure 3 This is a flowchart of a three-layer adaptive water extraction architecture according to an embodiment of the present invention;
[0043] Figure 4 This is a flowchart of texture scoring and coarseness ratio particle water surface repair according to an embodiment of the present invention;
[0044] Figure 5 This is a structural block diagram of a remote sensing image water extraction system provided in one embodiment of the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. In addition, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined with each other to form feasible technical solutions. Such combinations are not constrained by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0046] Figure 1 A flowchart of a method for extracting water bodies from remote sensing images according to an embodiment of the present invention is shown, as follows: Figure 1 As shown, the method includes the following steps:
[0047] Step 1: Generate a thumbnail of the input remote sensing image. On the thumbnail, construct water candidate regions through texture-color joint initial screening. Based on the pixel statistical distribution of the water candidate regions, automatically calibrate the color threshold range required for water body extraction in the whole image.
[0048] Understandably, existing remote sensing image water body extraction methods fix parameter thresholds in configuration files, leading to significant errors in vegetation extraction in turbid water scenes and the omission of most water bodies in silty water scenes. The purpose of this invention is to construct a thumbnail-driven self-calibration mechanism for water body parameters. This mechanism automatically estimates candidate water regions through joint texture-color screening of the full-image thumbnail, and calibrates the HSV threshold range based on statistical quantiles of these candidate regions, eliminating the need for manual parameter tuning. Furthermore, this invention is based on the HSV color space, requiring only the RGB visible light bands, making it suitable for a large number of high-resolution visible light images lacking near-infrared bands, thus broadening its applicability.
[0049] For details, please refer to Figure 2 For a remote sensing image of size H×W, where H and W are the height and width of the image respectively, the generated size is... The following self-calibration process steps are performed on the thumbnail:
[0050] (1) Constructing water candidate regions based on texture-color joint preliminary screening. The goal is to identify the regions most likely to belong to "water" from remote sensing images by analyzing the texture complexity and color features around pixels. This includes several steps:
[0051] Step 1: Calculate two key values. Specifically, for each pixel in the remote sensing image, calculate two statistical values for a small region (window) surrounding it: calculate the standard deviation of the 7×7 window of the grayscale image. (First convert the color image to grayscale, then look at the standard deviation of the grayscale values in the 7x7 pixel squares surrounding each pixel.) This refers to the standard deviation of the small-scale window of the grayscale image and the variance of the 51×51 window of the HSV hue. (Convert the color image to HSV (Hue, Saturation, Value) space, take only the Hue component, and then look at the variance of the Hue values in the 51×51 pixel square surrounding each pixel.) This refers to the large-scale window variance of the color channel.
[0052] Step 2: Selection criteria for water candidate regions: based on the standard deviation of a small-scale window in the grayscale image. Below the first candidate quantile threshold, large-scale window variance of the hue channel Water candidate areas were selected based on the following joint screening criteria: pixels below the second candidate quantile threshold, brightness channels within the valid range, and low-saturation, high-brightness road-like pixels excluded. Specifically, Less than the p25 quantile (the 25th percentile of the standard deviation of all pixels in a grayscale image) and Pixels with a value less than the p40 quantile (the 40th percentile of the hue variance) and a V component in the range [20, 235], and which are not road samples (i.e., gray pixels with an S component less than 15 and a V component in the range [60, 180]), are included in the initial texture screening candidate area. .
[0053] (2) Connectivity confidence verification: for the initial screening of candidate regions Perform connected component labeling to find the largest connected component (maximum connected component). Check if the maximum connected component meets two hard criteria: first, its number of pixels is ≥ 10% of the total number of candidate pixels; second, its number of pixels is ≥ 0.1% of the total number of pixels in the entire image. If the maximum connected component meets these two requirements, it is considered to have found a sufficiently reliable water body region, and subsequent processing is based on this maximum connected component. If the maximum connected component does not meet either condition (for example, the candidate points are very scattered, and the maximum block is less than 10%; or although it accounts for 90% of the candidates, it only has 100 pixels in the entire image, less than 0.1%), it is judged as "no water body" or "water body is unreliable", and a fallback default parameter set (the value of H is in the range of [25,130]) is used to avoid mislabeling.
[0054] (3) Statistical self-calibration: from the validated initial screening candidate region The H / S / V channels of all pixels are extracted, and the [5th, 95th] quantile range of each channel's pixel value is calculated. To prevent the window from becoming too rigid and to avoid missing true targets, a margin is added outward from this range (the exact amount of addition is usually controlled by another parameter). Ultimately, this expanded range serves as the extraction window for that channel, i.e., the parameter threshold range. The threshold is calculated by multiplying the 90th quantile of the candidate region by 1.5. / The threshold is the 90th quantile of the candidate region plus 1.0. The standard deviation is the 31×31 window size for the grayscale image.
[0055] Step 2: Perform basic color filtering on the entire image based on the color threshold range, and combine it with hue uniformity constraints to obtain color candidate regions.
[0056] Understandably, step 1 self-calibrates the color threshold range for subsequent processing using the thumbnail. Based on the calibrated color threshold range, this step performs a three-layer architecture to extract water bodies from the entire remote sensing image.
[0057] Among them, see Figure 3 The first layer uses the base color and hue uniformity to filter out candidate color regions across the entire image. =H in [ And S is not less than And V is in [ , ]and Not exceeding the threshold The region. Among them, [ ], and[ , All of these are color threshold ranges determined in step 1.
[0058] Step 3: For the large connected regions in the color candidate region whose area is not less than the preset area threshold, perform dual-window texture forest identification: when the large connected region simultaneously satisfies that the standard deviation of the small-scale window of the grayscale image is not less than the first texture threshold and the standard deviation of the large-scale window of the grayscale image is not less than the second texture threshold, it is determined to be a vegetation area and excluded, thus obtaining a preliminary water body mask.
[0059] Understandably, further processing of the color candidate regions is required; specifically, a dual-window texture forest identification process is performed on the color candidate regions. The area is not less than the area threshold. A fully connected region, if simultaneously satisfying Not lower than the corresponding threshold (First texture threshold) and Not lower than the corresponding threshold (Second texture threshold), then it is determined to be woodland. Excluding forest land from the water body, the candidate water body area after excluding forest land is represented as: = The dual-window joint criterion, unlike the single texture window, can distinguish vegetation areas that overlap with the water color.
[0060] Second-level strict seed region generation: And the S component is not less than ( +45) and normalized green-red difference index Pixels smaller than 0.65; for water body candidate areas By marking connected components, multiple connected components are obtained. The connected components containing the strict seed point are retained to obtain the first-stage connected components. ;right Further constraints yield a safe area And local density Not less than 0.10 (51×51 mean filter density constraint), where, for For each pixel in the array, calculate the local density within a 51×51 window surrounding it. .
[0061] Third-layer distance transformation extension (computational optimization): based on the distance transformation obtained in the previous stage. (High-confidence water core region, pixel value is 1, all others are 0), perform Euclidean distance transformation (EDT) on the entire image. The algorithm traverses every pixel in the entire image (complexity is only O(H×W), where H and W are the image height and width), calculating the straight-line distance from that pixel to the nearest water core region pixel. This generates a "distance field" grid, in which the pixel distance inside the core area of the water body is 0, and the pixel value increases as you move outwards.
[0062] Filter candidate expansion regions, candidate expansion regions =distance Not exceeding the extended distance threshold Furthermore, the color of this pixel satisfies the relaxed color condition, and this pixel does not belong to the original color. Core region. Traditional methods use binary dilation to expand the water body area, which requires N iterations (e.g., expanding 50 meters on a 0.5-meter resolution image requires approximately 100 dilation operations). This is not only computationally intensive, but each dilation introduces block-shaped discrete errors, resulting in a jagged final boundary that does not conform to the natural smooth shape of the water body. This algorithm replaces this cumbersome iterative process with Euclidean distance transformation: first, the high-confidence water body core region ( Perform a distance transformation once to calculate the shortest distance from every pixel in the entire image to the core region, generating a distance field; then, simply filter out pixels in the distance field whose values do not exceed a certain threshold. The expansion can be completed by using a certain number of pixels. The expansion distance threshold here is expressed as: , The spatial resolution of the image is used as the basis for the extended distance threshold, which can automatically adapt to the resolution.
[0063] This optimization simplifies the expansion operation, which originally required 99 iterations, into a single distance field calculation plus a threshold screening. While ensuring the accuracy and consistency of the physical expansion distance, it improves the computational efficiency by nearly 100 times and completely eliminates the jagged discrete error caused by the traditional expansion method, making the water body edge smoother and more natural.
[0064] The preliminary water mask is obtained through the above three-layer architecture extraction.
[0065] The detailed description of each parameter involved in the initial water mask extraction is as follows:
[0066] (a) Normalized Green-Red Difference Index The definition information is as follows:
[0067] (1) Parameter name and purpose:
[0068] Normalized Green-Red Difference Index (NGRDI).
[0069] In the second (strict seed selection) and third (relaxed expansion) layers of the three-layer water extraction architecture, As an auxiliary discrimination indicator, it is used to remove dense vegetation pixels from water body candidates to prevent vegetation areas (especially waterside green belts) from being misidentified as water bodies.
[0070] (2) Calculation method:
[0071] Step 1: Convert the input RGB image to the LAB color space. The LAB color space completely separates the color information (A and B channels) and luminance information (L channel) of the image.
[0072] In the LAB color space, a local contrast enhancement (CLAHE) was performed. Specifically, based on the set grid division parameter `tileGridSize = 8×8`, the image was divided into 8×8 small regions. The light distribution of each region was analyzed one by one. Darker areas were appropriately brightened, and brighter areas were appropriately darkened, optimizing the contrast within each region. Each adjustment was clipped (contrast clipping parameter `clipLimit = 2.0`) to prevent the enhancement of water reflections into glaring white spots. The entire process only adjusted brightness, not color, to ensure that the blue-green hues of the water remained unchanged. The enhancement result was then converted back to the RGB color space to obtain the enhanced image.
[0073] Step 2: Extract the green channel pixel values of the enhanced image. With red channel pixel values Calculate the normalized green-red difference index using the following formula:
[0074]
[0075] In the formula, = 10⁻ 6 To prevent extremely small quantities with a denominator of zero; The value range is (−1, +1).
[0076] The purpose of the CLAHE enhancement step is to eliminate the effect of uneven illumination on the green-to-red ratio, making... It maintains the effectiveness of vegetation / water body discrimination in both shaded and highlighted areas.
[0077] (3) Typical values for various land features are shown in Table 1 below.
[0078] Table 1
[0079] Ground feature types Typical range illustrate Clean water 0.0 ~ 0.4 Green light is slightly stronger than red light, with a positive but moderate index. Particulate / Sediment Water −0.1 ~ 0.3 High sand content increases red light reflection, resulting in a lower index. Dense vegetation 0.4 ~ 0.9 Chlorophyll strongly absorbs red light, and its index is significantly higher. Buildings / Roads −0.2 ~ 0.2 Red and green are close to neutral.
[0080] (4) Use in the method of this invention:
[0081] Strict seed selection stage: meets the following requirements < 0.65, ensuring that the seed pixel does not belong to dense vegetation;
[0082] Relaxation and expansion phase: conditions are relaxed to < 0.75, pixels with a slightly greenish tint at the edge of the water body (such as pixels mixed with aquatic plants in shallow water areas) are allowed to be included in the expanded candidate area;
[0083] The synergistic effect of two thresholds: for water bodies with a reddish hue (muddy water) (Lower than clean water) to maintain a high recall rate, while minimizing the false positive rate for dense vegetation.
[0084] (two) Explanation of the deduction logic:
[0085] (1) Purpose of the parameter:
[0086] Extended distance threshold ( ) is the core parameter of the third layer (distance transform extension), representing the seed safe zone ( Starting from a point (e.g., the maximum pixel radius extending outwards), the distance transform calculates the Euclidean distance from each non-seed pixel in the image to the nearest seed pixel, where the distance does not exceed a certain threshold. Only pixels that meet the minimum requirements can enter the relaxation candidate region.
[0087] (2) Calculation logic:
[0088] Step 1: Obtain the pixel ground resolution r (meters / pixel) from the geographic transformation metadata.
[0089] Read the GeoTIFF affine transformation parameters of the image and perform the conversion in two cases depending on the coordinate reference system (CRS) type:
[0090] Geographic coordinate system (coordinates in degrees): r = |transform.a|×111000 (meters / pixel)
[0091] Projected coordinate system (coordinate unit is meters): r = |transform.a| (meters / pixels)
[0092] Where transform.a is the first element of the affine transformation matrix, representing the pixel size in the X direction; 1 degree of latitude is approximately equal to 111,000 meters.
[0093] Step 2: Convert the fixed physical distance of 50 meters into pixels.
[0094] (pixels)
[0095] In the formula, Indicates the number of pixels that need to be expanded. The lower limit of resolution is set to 0.5 m / px to prevent ultra-high resolution images (such as drones with a resolution of 0.1 m / px) from generating excessively large extended areas of more than 100 pixels, thereby controlling the false positive rate.
[0096] (3) Typical resolution values are shown in Table 2 below.
[0097] Table 2
[0098] Image resolution Corresponding geographical range 0.5 m / px (orthogonal shot from a low-altitude drone) 100 px 50 m 1 m / px (high-resolution satellite) 50 px 50 m 2 m / px 25 px 50 m 10 m / px (Sentinel-2) 5 px 50 m
[0099] (4) Design basis.
[0100] Regardless of changes in image resolution, the geographical extent of the water body's edge extending outward remains constant at 50 meters. This ensures consistent behavior across different sensor platforms, including UAVs, high-resolution satellites, and medium-resolution satellites, eliminating the need for users to manually adjust the number of extended pixels.
[0101] The 50-meter threshold is selected based on the fact that the width of the water-land transition zone of most natural water bodies (rivers, lakes, and reservoirs) does not exceed 50 meters; pixels outside this range, even if their colors meet the relaxed color conditions, do not have sufficient geographical continuity and should not be forcibly classified as water bodies.
[0102] Step 4: Perform granular sediment surface repair on the preliminary water mask using a preset coarse-fine scale texture ratio index. The coarse-fine scale texture ratio is the ratio of the standard deviation of the small-scale window of the grayscale image to the standard deviation of the large-scale window of the grayscale image.
[0103] Understandably, steps 2 and 3, which extract the initial water mask using a three-layer architecture, may miss some granular sediment surfaces. Therefore, this step is used to remedy granular sediment surfaces.
[0104] For details, see Figure 4 Calculate the texture mean of each connected component in the preliminary water mask. (The average of the standard deviations of the 7×7 grayscale window for all pixels within this connected component) and the standard deviation of brightness. (The standard deviation of the brightness V channel of all pixels within this connected component in HSV space). Texture scoring and uniformity scoring are performed on each connected component to obtain the texture score for each connected component. and uniformity score .
[0105] The rule for texture scoring is as follows: when When less than 2.0, 50 points; when When less than 3.5, 30 points; when When less than 4.5, 10 points.
[0106] The rules for scoring uniformity are as follows: When less than 3.0, 20 points; When less than 5.0, 10 points.
[0107] Total score = Not less than Connectivity components with a score of 30 or higher (default) are considered reliable water bodies and retained; those with scores below 30 are considered false positives and discarded. Bincount aggregation is approximately 100 times faster than component-by-component masking.
[0108] After reliable water bodies are selected based on the scoring mechanism, a remedial extraction is performed specifically for a special type of water body that is easily missed, namely granular sediment water surfaces (such as turbid rivers and lakes with high sediment content). Finally, the results are combined to obtain the final water body results.
[0109] Calculate the texture ratio of each pixel identified as a real water body. When H is in [45, 80] and S is in [70, 130] and V is in [20, 200] and Greater than the proportional threshold (Default 0.85) and Less than (Default 6.5) This pixel represents a granular sediment surface pixel. Traversing each pixel yields candidate regions for particles. These candidate regions are then merged with the scored regions, and a morphological closing operation with a 20×20 kernel is performed. Components connected to the scored regions are retained to obtain the final water body extraction result. .
[0110] in, High values indicate rich fine-scale texture and smooth coarse-scale texture, which is a characteristic indicator that distinguishes granular sediment water surfaces from land.
[0111] The candidate color constraint H∈[45,80] is specifically set for the spectral characteristics of sediment water surfaces, covering the yellow-brown hue range of sediment suspended on the water surface, and is intentionally wider than the main color extraction threshold to capture sediment water bodies with colors close to earth tones. Conditions below the upper threshold exclude true land areas—the pixel-scale surface texture of bare land and vegetation is significantly higher than that of muddy water surfaces. (usually exceeding the upper limit threshold), thus... High ratio and Upper limit constraints are used to coordinate the control of particulate sediment water surface ( medium, (Low) accurate positioning, effectively distinguishing false candidates of high-texture land with similar tex_ratio.
[0112] The effectiveness of the indicator has a clear physical cause: the surface of a normal water body is smooth and uniform. (Pixel-level texture) and (Regional-level texture) values are both low, with a ratio of approximately 1; the land surface structure (bare land, vegetation, etc.) exhibits significant texture changes at both the pixel and regional levels. and The average height is high, and the ratio is also approximately 1; in granular sediment water, suspended sediment particles in the water or on shallow beaches form discrete high-brightness spots at the pixel scale in optical images, making... The elevation is relatively high, while the uniform aggregation and distribution of sediment particles under the influence of fluid dynamics makes the macroscopic texture of a large area tend to be smooth. Keep the value low, thus forming Unique features exceeding the judgment threshold (in typical scenarios, measured values are generally greater than 1, often exceeding 1.5). The above three types of land features... The distribution is characterized by three separations: normal water bodies (low at both levels), land (high at both levels), and granular sediment water surfaces (high at the fine scale and low at the coarse scale). It is the only effective criterion for distinguishing granular water surfaces from land when color and single texture features fail. Its effectiveness is determined by the physical structure of the surface of the land feature, rather than by specific sensors or parameter selection.
[0113] Using ratio ( / ) rather than difference ( - Mathematical necessity analysis: Assume the typical statistical values of three types of land features are as follows: Normal water bodies: ≈1.5, ≈1.5; Bare land: ≈12, ≈10; granular silt water surface: ≈4.5, ≈1.5. Using the difference (diff= - When: normal water body diff≈0, granular sediment water surface diff≈3.0, bare land diff≈2.0; however, when bare land is in a locally shaded or uniformly textured area ( ≈5, When ≈2), diff≈3.0, completely overlapping with the water surface of granular sediment, rendering the difference criterion invalid. The ratio ( = / At this time: normal water body ≈1.0, granular sediment water surface ≈3.0, even if the shaded area is bare ( ≈5, ≈4) ≈1.25, still significantly different from the granular sediment water surface, and no mixing occurs. The ratio form has two mathematical advantages that the difference method cannot replace: (i) scale invariance: normalizes the changes in absolute texture intensity, making the ratio threshold of 0.85 robust under different lighting, resolutions, and sensor radiation characteristics; (ii) three-separation preservation: maintains the separation of the three types of land features in cross-scene applications with a large range of absolute texture values, a property that the difference index cannot guarantee in scenarios with high changes in absolute texture. Therefore, Using ratios is a necessary mathematical condition for achieving reliable separation of particles, sediment, and water surface; it cannot be simply replaced by difference indices.
[0114] Step 5: Output the result after particle repair as the final water mask.
[0115] Understandably, the results of water extraction after particulate remediation are... Perform rasterio vectorization to generate a polygon set and output. .shp and .tif (GeoTIFF with coordinate system). It can be directly used as a non-water body prior constraint input for downstream tasks such as road extraction.
[0116] The following examples illustrate the water extraction method from remote sensing images provided by the present invention.
[0117] Example 1: Extraction from turbid water bodies and wetlands in urban areas.
[0118] Input data: Satellite imagery of a certain urban area, resolution 0.8m, RGB band, image size 8000×6000 pixels, including urban waterways (water color is greenish and turbid, H about 55-95) and suburban wetland areas.
[0119] Results: Self-calibration using 1000-pixel thumbnails yielded H range [42,112] and S range [48,188]; Dual-window textures eliminated 13 misextracted areas in suburban green spaces; Four sandbar areas within the river channel were identified through particulate surface remediation; the final water IoU reached 0.847, an improvement of approximately 18 percentage points compared to the fixed NDWI threshold baseline; ablation experiment: prohibited. When the particle recovery module was used, four sandbars in the river channel (accounting for approximately 4.3% of the total water area) were completely missed. After activation, they were all correctly identified and merged into the final mask, improving the sediment surface recall rate by approximately 31 percentage points compared to the fixed parameter threshold method.
[0120] Example 2: Water extraction from plateau lake areas.
[0121] Input data: Multispectral image of a certain area, resolution 10m, RGB band, including plateau lakes (blue-green offset water color, H approx. 185-215) and surrounding plateau meadow vegetation (low texture, H approx. 55-90).
[0122] Results: The thumbnail's automatic calibration H range [162, 218] (significantly different from the H range [30, 115] in urban water bodies) demonstrates the self-calibration mechanism's ability to automatically adapt to different water color scenarios; the dual-window texture in the alpine meadow ( In scenarios with an average value of approximately 2.1, the joint criterion was used to exclude false detections of low-texture meadows, resulting in a water body IoU of 0.892, which is about 24 percentage points higher than the fixed HSV threshold method. This invention remediates the identification of two shallow gravelly water areas along the shores of plateau lakes. These areas are systematically missed in existing color indexing methods because their color is similar to bare land. This invention eliminates the need for parameter readjustment in multiple scenarios, including clear water, murky water, and plateau lakes.
[0123] Comparative Example 3: A comparison of texture features with the existing yellowness index method for detecting granular sediment water surfaces.
[0124] Input data: Satellite imagery of the middle reaches of the Yellow River, resolution 0.5m, RGB three channels, including turbid river channels with high sediment content (granular sediment on the water surface, yellowish-brown water color, H about 50-75), clear tributaries and bare loess land (the hue is very similar to the sediment water surface and difficult to distinguish in the spectral domain).
[0125] The Yellow Index method (Yellow = Green + Red - 2 Blue) uses spectral methods to capture the spectral shift caused by high concentrations of suspended sediment across the entire water surface. A fixed threshold YI > 0.3 is used to identify sediment-laden water surfaces. In areas with high sediment content and bare loess soil, the ratio of green and red channels to blue channels is similar to that of sediment-laden water surfaces, making the Yellow Index ineffective in distinguishing between bare soil and sediment-laden water surfaces, resulting in numerous false positives. Tributaries with low sediment content are missed because their color is similar to clear water. The overall F1 (harmonic mean of precision and recall) value is 0.74, and the precision is 0.68. This invention... method( = / ) Utilizing the physical properties of granular sediment water surfaces—rich texture in fine-grained 7×7 windows and relatively smooth texture in coarse-grained 31×31 windows—this scene... The measured values were generally greater than 1.5 (the method's judgment threshold was 0.85, a conservative setting to ensure a high recall rate); although the color of the bare loess land was similar, its two-level texture was higher ( Approaching 1), Effectively distinguish between bare land and muddy water surfaces; clear water tributaries Approximately 1, independently covered by the main extraction process; overall F1 score reaches 0.91, with an accuracy of 0.89.
[0126] Compared with the yellowness index method, the present invention improves the accuracy by about 21 percentage points and the recall rate of sediment water surface by about 15 percentage points in the scenario where it is confused with land of similar color tone. The advantage of this method lies in extracting distinguishing features from the texture domain rather than the spectral domain. It can still reliably distinguish between land and water in scenes where the colors are highly mixed, thus verifying the innovation of the technical solution of this invention compared with existing spectral index methods.
[0127] Example 4: Water body extraction from low-altitude aerial orthophotos taken by UAVs.
[0128] Input data: UAV orthophoto of a densely water-networked area in Jiangnan, with a ground resolution of 0.1m / pixel, RGB three-channel, and an image size of approximately 15000×12000 pixels, including small irrigation canals (2-5m wide), fish ponds, and shallow water beaches.
[0129] Execution result: Thumbnail self-calibration H range [35, 105]; Because the resolution clamping logic (max(r,0.5)=0.5m / px) automatically calculates to 100px (keeping the 50m geographic range unchanged); the dual-window texture identification has a more significant filtering effect on the row and row of vegetation along the water at an ultra-high resolution of 0.1m, eliminating 11 false extraction areas; The remedial mechanism identified three shallow water areas in the tidal flats (these areas were systematically missed during the color screening stage due to their color resemblance to silt); the final water IoU reached 0.871, an improvement of approximately 20 percentage points compared to the fixed threshold method. This embodiment verifies its applicability under ultra-high resolution UAV aerial photography platforms. The resolution adaptive mechanism effectively prevents false exposures caused by excessively large extended areas in 0.1m scenes. It shares the same parameter logic with satellite imagery scenes, requiring no manual adjustment, demonstrating the engineering consistency of this method across sensor platforms.
[0130] Example 5: Cross-regional verification of high-resolution satellite imagery.
[0131] Input data: Panchromatic fusion image of a certain region, resolution 0.5m / pixel, RGB three channels, image size 10000×8000 pixels, containing tropical reddish-brown muddy rivers and tropical rainforest vegetation (H and S components highly overlap with turbid water bodies).
[0132] Results: Thumbnail self-calibration H range [38, 98] (automatically biased towards reddish-brown tone, no manual intervention required), S range [55, 195] (high saturation of sediment and water surface); dual-window texture identification in tropical rainforest areas ( The average is approximately 9.5. The mean value is approximately 8.2. 17 false positive areas were filtered out (accounting for approximately 12% of the color candidate area). The remedial mechanism successfully addressed the issue at four sandbars (totaling approximately 6.8 hectares) at river bifurcation points. These sandbars are highly similar in color to tropical red soil, making them indistinguishable by color alone. The final water IoU reached 0.861, with a difference of less than 1.5 percentage points compared to domestic test scenarios. This embodiment verifies the method's cross-regional adaptability across different continents and satellite platforms, demonstrating that the technical approach is independent of sensor manufacturers and band response characteristics, relying solely on the universal availability of the RGB three-band architecture.
[0133] See Figure 5 The present invention provides a remote sensing image water body extraction system according to one embodiment, comprising:
[0134] The calibration module 501 is used to generate a thumbnail of the input remote sensing image, construct water candidate areas on the thumbnail through texture-color joint preliminary screening, and automatically calibrate the color threshold range required for water body extraction in the whole image based on the pixel statistical distribution of the water candidate areas.
[0135] The filtering module 502 is used to perform basic color filtering on the entire image based on the color threshold range, and combine it with the hue uniformity constraint to obtain color candidate areas;
[0136] The generation module 503 is used to perform dual-window texture forest identification on large connected regions in the color candidate region whose area is not less than a preset area threshold: when the large connected region simultaneously satisfies that the gray standard deviation of the small-scale window is not less than the first texture threshold and the gray standard deviation of the large-scale window is not less than the second texture threshold, it is determined to be a vegetation area and excluded, and a preliminary water mask is generated.
[0137] The remediation module 504 is used to perform granular sediment water surface remediation on the preliminary water mask with a preset coarse-fine scale texture ratio index, wherein the coarse-fine scale texture ratio is the ratio of the standard deviation of the small-scale window to the standard deviation of the large-scale window of the grayscale image.
[0138] Output module 505 is used to output the result of particle remediation as the final water mask.
[0139] It is understood that the remote sensing image water body extraction system provided by the present invention corresponds to the remote sensing image water body extraction method provided in the foregoing embodiments. The relevant technical features of the remote sensing image water body extraction system can be referred to the relevant technical features of the remote sensing image water body extraction method, and will not be repeated here.
[0140] The method and system for extracting water bodies from remote sensing images provided in this invention have the following beneficial effects:
[0141] (1) Cross-scene water body extraction without manual parameter adjustment: The self-calibration mechanism enables the optimal HSV parameters to be automatically obtained in scenarios such as clear water / turbid water / mud / plateau lake, eliminating the parameter adjustment iteration cycle and significantly improving batch processing efficiency.
[0142] (2) The forest land false positive rate is greatly reduced: the dual-window texture forest land identification mechanism can make distinctions by using texture scale features when the color space cannot distinguish them, and the accuracy of water bodies is significantly improved in tropical vegetation coverage scenarios.
[0143] (3) Significantly improved recall rate of particulate water surfaces: The coarse-to-fine ratio remediation mechanism is specifically designed for sediment water surfaces, making up for the systematic omissions of existing methods for such water surfaces and expanding the types of water bodies to which the method is applicable.
[0144] (4) Large image processing speed is greatly improved: Distance transformation instead of iterative dilation saves about 99% of the computation time at 0.5m resolution; bincount aggregation scoring is about 100 times faster than component-by-component masking loop.
[0145] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0146] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0147] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0148] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0149] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0150] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0151] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for extracting water bodies from remote sensing images, characterized in that, include: A thumbnail of the input remote sensing image is generated. Water candidate regions are constructed on the thumbnail through texture-color joint screening. The color threshold range required for water body extraction in the whole image is automatically calibrated based on the pixel statistical distribution of the water candidate regions. Based on the color threshold range, basic color filtering is performed on the entire image, and combined with hue uniformity constraints, color candidate regions are obtained; For large connected regions in the color candidate region with an area not lower than a preset area threshold, perform dual-window texture forest identification: when the large connected region simultaneously satisfies that the standard deviation of the small-scale window of the grayscale image is not lower than the first texture threshold and the standard deviation of the large-scale window of the grayscale image is not lower than the second texture threshold, it is determined to be a vegetation area and excluded, thus obtaining a preliminary water body mask. The preliminary water mask is remedied for granular sediment surface using a preset coarse-fine scale texture ratio index, where the coarse-fine scale texture ratio is the ratio of the standard deviation of the small-scale window of the grayscale image to the standard deviation of the large-scale window of the grayscale image. The result after particle repair is used as the final water mask output.
2. The method according to claim 1, characterized in that, The process involves generating a thumbnail of the input remote sensing image, constructing water candidate regions on the thumbnail through a joint texture-color screening, and automatically determining the color threshold range required for water body extraction from the entire image based on the pixel statistical distribution of the water candidate regions. Generate a thumbnail of the input remote sensing image, wherein the long side of the thumbnail does not exceed a preset pixel limit in order to preserve the spatial relative distribution characteristics of the original remote sensing image; Calculate the standard deviation of the small-scale window of the grayscale image and the variance of the large-scale window of the tone channel on the thumbnail; The water candidate region is constructed using the following joint screening conditions: the standard deviation of the small-scale window of the grayscale image is lower than the first candidate quantile threshold, the variance of the large-scale window of the tone channel is lower than the second candidate quantile threshold, the brightness channel falls within the effective range, and low-saturation, high-brightness road-type pixels are excluded. Connectivity verification is performed on the water candidate region. After the verification is passed, the quantile ranges of each channel of hue, saturation and brightness of the pixels in the water candidate region are calculated. The lower limit of each channel quantile minus the expansion margin and the upper limit of each channel quantile plus the expansion margin are used as the color threshold range for water extraction in the whole image.
3. The method according to claim 2, characterized in that, Perform connectivity verification on the water candidate region, including: Verify that the percentage of the number of pixels of the largest connected component in the water candidate region is not less than a first preset percentage, and the percentage of the number of pixels of the largest connected component in the total number of pixels in the entire image is not less than a second preset percentage; if the verification fails, it is determined that the current image does not contain a reliable water candidate region, and the self-calibration is terminated using a preset default color parameter group.
4. The method according to claim 1, characterized in that, The small-scale window is a 7×7 pixel window, and the large-scale window is a 31×31 pixel window. The first texture threshold is taken from the 90th quantile of the thumbnail candidate area plus 1.0; the second texture threshold is taken from the 90th quantile of the thumbnail candidate area plus 1.
0.
5. The method according to claim 1, characterized in that, The step of using a preset coarse-to-fine texture ratio index to perform granular sediment surface remediation on the initial water mask includes: Calculate the coarse-to-fine scale texture ratio of the region corresponding to the preliminary water mask; Regions that satisfy the condition that the ratio of coarse and fine scale textures exceeds a preset ratio threshold, the standard deviation of small scale textures is lower than a preset upper limit threshold, and the preset color constraint condition are identified as particle candidate regions. After performing a morphological closing operation on the particle candidate region, the component that is connected to the preliminary water mask is retained and merged into the final water mask.
6. The method according to claim 5, characterized in that, The preset color constraints include hue within the preset mud and sand hue range, saturation within the preset mud and sand saturation range, and brightness within the preset mud and sand brightness range.
7. The method according to claim 1, characterized in that, It also includes connected component texture quality scoring: Calculate the mean of the local texture standard deviation of pixels in each connected component in the preliminary water mask, and assign a texture score based on the comparison result of the mean and the preset graded texture threshold. For connected components whose area does not exceed a preset small water body area threshold, calculate the standard deviation of their brightness channel pixels, and assign a uniformity bonus based on the comparison result between the standard deviation of the brightness channel pixels and the preset graded uniformity threshold. Only connected components whose sum of texture score and uniformity bonus score is not lower than a preset comprehensive score threshold are retained as the initial water body mask for subsequent granular sediment surface remediation.
8. The method according to claim 1, characterized in that, After generating the color candidate regions, a distance transform extension is also included: A strict seed region is determined in the preliminary water mask. Based on the strict seed region, the distance field of each pixel in the entire image is calculated by a single Euclidean distance transformation. Pixels whose distance does not exceed a preset extension distance threshold and satisfy the relaxed color condition are selected as candidate extension regions and included in the preliminary water mask. The preset extension distance threshold is adaptively calculated according to the spatial resolution of the remote sensing image to keep the geographical range of the extension constant.
9. The method according to any one of claims 1 to 8, characterized in that, The input remote sensing image is an image containing only the RGB visible light bands.
10. A method for extracting water bodies from remote sensing images, characterized in that, include: The calibration module is used to generate a thumbnail of the input remote sensing image, construct water candidate regions on the thumbnail through texture-color joint initial screening, and automatically calibrate the color threshold range required for water body extraction in the whole image based on the pixel statistical distribution of the water candidate regions. The filtering module is used to perform basic color filtering on the entire image based on the color threshold range, and combine it with hue uniformity constraints to obtain color candidate areas; The generation module is used to perform dual-window texture forest identification on large connected regions in the color candidate region whose area is not less than a preset area threshold: when the large connected region simultaneously satisfies that the standard deviation of the small-scale window of the grayscale image is not less than the first texture threshold and the standard deviation of the large-scale window of the grayscale image is not less than the second texture threshold, it is determined to be a vegetation area and excluded, and a preliminary water mask is generated. The remediation module is used to perform granular sediment surface remediation on the preliminary water mask using a preset coarse-fine scale texture ratio index, wherein the coarse-fine scale texture ratio is the ratio of the standard deviation of the small-scale window of the grayscale image to the standard deviation of the large-scale window of the grayscale image. The output module is used to output the results of particle remediation as the final water mask.