Water Body Detection Method Based on Smooth Histogram Morphological Features in Remote Sensing Imagery

By calculating NDWI and drawing a smooth histogram in remote sensing images, the optimal segmentation threshold is determined, which solves the inaccuracy problem of water body detection in existing technologies and achieves high-precision water body extraction, applicable to various satellite image data.

CN120014456BActive Publication Date: 2025-11-14ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510086111.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-11-14
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

Existing remote sensing image water body detection methods are easily affected by noise and environmental interference when processing large-area images, resulting in inaccurate water body boundaries or overfitting. Furthermore, the OTSU algorithm is inaccurate in determining the threshold when the proportion of water body pixels is small, which affects the water body extraction effect.

Method used

By calculating the Normalized Water Index (NDWI) of remote sensing images, drawing a smooth histogram, recording the highest and second-highest peaks and troughs, and using the straight line L to calculate the optimal segmentation threshold for water body detection, the shortcomings of the OTSU algorithm in the case of small proportions of water bodies are overcome.

Benefits of technology

It improves the precision and effectiveness of water body extraction, especially when the water portion accounts for a small proportion, achieving higher classification precision and accuracy, and is applicable to different satellite imagery scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120014456B_ABST
    Figure CN120014456B_ABST
Patent Text Reader

Abstract

This invention discloses a method for water body detection in remote sensing images based on smoothed histogram morphological features, including the calculation of the NDWI water index, histogram smoothing filtering, automatic threshold determination, and water body extraction. When the water portion in a remote sensing image occupies a small proportion of the entire image, and the ratio of land and water pixels differs significantly, the image histogram does not exhibit a clear bimodal pattern. In such cases, the threshold determined by traditional algorithms is inaccurate, resulting in poor water body extraction. This invention overcomes these shortcomings to some extent. The NDWI segmentation threshold obtained using this invention is more accurate than the threshold calculated directly using the OTSU method, leading to higher precision water body extraction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of remote sensing image detection technology, specifically relating to a method for detecting water bodies in remote sensing images based on smooth histogram morphological features. Background Technology

[0002] Water body data plays a crucial geographic information role in water conservancy project planning, water resource exploration, maintenance and supervision, as well as emergency response to floods and waterlogging. Understanding the coverage of water body data has an extremely important impact on the continuous monitoring of water resources, the security of water sources, and the rational development and maintenance of water resources.

[0003] Remote sensing technology exhibits significant advantages in acquiring water body information over large spatial areas, mainly in the following aspects: ① It can conduct short-cycle observations and update data promptly; ② It has a wide observation range, covering a large area; ③ It possesses rich spatial resolution and scale information, providing detailed geographical details; ④ It has a large amount of spectral information, enabling in-depth analysis and research. Traditional methods for acquiring water body distribution information are mainly divided into two categories: one is manual visual interpretation methods, which rely on professionals' intuitive analysis and interpretation of remote sensing images. By identifying the visual characteristics of water bodies, such as color, texture, and shape, the spatial distribution of water bodies is determined; professionals manually draw the boundaries of water bodies, ultimately generating spatial vector data of the water bodies. The other category is automated extraction methods, which mainly include the following methods:

[0004] Single-band thresholding, as seen in the literature [Frazier PS, Page K J. Water body detection and delineation with Landsat TM data[J]. Photogrammetric engineering and remotesensing, 2000, 66(12): 1461-1468], distinguishes between water bodies and non-water bodies by selecting a specific band and setting a threshold. This method is simple and direct, but may be affected by background noise.

[0005] Interspectral relationship methods, such as those in the literature [Chen C, Chen H, Liang J, et al. Extraction of water body information from remote sensing imagery while considering greenness and wetness based on Tasseled Cap transformation[J]. Remote Sensing, 2022, 14(13): 3001], utilize the differences between multiple bands and extract water body features by calculating models such as differences and ratios. This method can improve the accuracy of water body extraction, but the calculation process is relatively complex.

[0006] Image classification methods, such as those in the literature [Yaqiu Y, Jiaguo L, Tao Y, et al. The Study of Object-oriented Water Body Extraction Method Based on High Resolution RS Image[J]. Bulletin of Surveying and Mapping, 2015(1):81], use classification algorithms to divide image data into two major categories: water bodies and non-water bodies. This method can utilize machine learning and other technologies to improve the accuracy of classification by training samples, and uses the boundaries of water body classification objects as the range of water area distribution.

[0007] These techniques highlight water features and distinguish between water and non-water areas by comparing and analyzing different spectra. However, these methods can be affected by image acquisition parameters (such as the spectral response range and number of bands of the satellite sensor) and the image signal-to-noise ratio. Furthermore, when processing large-area remote sensing imagery (considering a complete high-resolution satellite image series), it is common for the imagery to contain diverse environments simultaneously. These methods may incorrectly identify other surface features with similar grayscale values ​​to water areas as water areas, leading to the mislabeling of non-water information within water areas. Inappropriate threshold settings can result in inaccurate or overfitting of water area boundaries, and the thresholds need to be adjusted based on different imagery, limiting the versatility of these methods.

[0008] In determining the threshold for water body indices, the OTSU (Otsu method) is commonly used, as in the literature [Jia YL, Zhang W, Meng L K. Astudy of selection method of NDWI segmentation threshold for GF-1 image[J]. Remote Sensing for Land and Resources,2019,31(01):95-100]. However, when the proportion of water body pixels in the scene or study area is very small, and the difference between the number of non-water body pixels and water body pixels is large, the water body index histogram of the image does not show a clear bimodal state. In this case, the threshold determined by the OTSU algorithm has a poor effect on water body extraction. Summary of the Invention

[0009] In view of the above, the present invention provides a method for water body detection in remote sensing images based on smooth histogram morphological features, which is used to determine the optimal segmentation threshold of NDWI, thereby improving the accuracy and effect of water body segmentation and extraction.

[0010] A method for water body detection in remote sensing images based on smooth histogram morphological features includes the following steps:

[0011] (1) Acquire remote sensing images of the target area and perform preprocessing. The remote sensing images include spectral information of the red band, green band, blue band and near-infrared band.

[0012] (2) For the preprocessed remote sensing images, draw histograms of them with respect to NDWI (Normalized Difference Water Index) data;

[0013] (3) Filter the histogram and record the highest peak, the second highest peak, and all the valleys between the two peaks in the histogram.

[0014] (4) Determine the optimal segmentation threshold of NDWI based on the distance between the trough point and the line connecting the highest peak point and the second highest peak point for water body detection and extraction.

[0015] Furthermore, the preprocessing of the remote sensing image in step (1) includes radiometric calibration, atmospheric correction, and geometric correction.

[0016] Further, the specific implementation of step (2) is as follows: for the preprocessed remote sensing image, first calculate the NDWI value of each pixel in the remote sensing image using the following formula;

[0017]

[0018] Wherein: for any pixel in the remote sensing image, NDWI is the NDWI value of that pixel, and p(Green) and p(NIR) are the pixel values ​​of that pixel in the green band and near-infrared band, respectively.

[0019] Then, the range [-1,1] is evenly divided into multiple intervals, and the number of pixels with NDWI values ​​distributed in each interval is counted to draw a histogram of the remote sensing image with respect to the NDWI data. The horizontal axis is the median value of each interval, and the vertical axis is the number of pixels.

[0020] Further, the specific implementation of step (3) is as follows: First, the histogram is filtered by the moving average filtering algorithm, and all local maxima points in the histogram are recorded as peak points; then, the peak points are filtered, with each N interval length as a group, and only the largest peak point is retained in each group, where N is a natural number greater than 1; after filtering, the highest peak point and the second highest peak point are selected from the retained peak points, which are the highest and second highest peak points in the histogram visually, and then all local minima points between these two peak points are recorded as trough points.

[0021] Further, the specific implementation of step (4) is as follows: First, calculate and determine the straight line L that passes through the highest peak point and the second highest peak point in the histogram; then calculate the distance of all valley points along the vertical axis to the straight line L, and extract the valley point with the largest corresponding distance. Take the horizontal coordinate of the valley point in the histogram as the optimal segmentation threshold of NDWI.

[0022] Furthermore, the equation of the line L is expressed as follows:

[0023]

[0024] Where (x1,y1) and (x2,y2) are the coordinates of the highest and second highest peak points in the histogram, respectively, and (x,y) is the coordinate of any point on line L in the histogram.

[0025] Furthermore, the distance from all trough points along the vertical axis to the straight line L is calculated using the following formula:

[0026]

[0027] Where: for any trough point v, (x v ,y v Let d be the coordinates of the trough point v in the histogram. v Let v be the distance from the trough point v along the vertical axis to the straight line L. (x1, y1) and (x2, y2) are the coordinates of the highest and second highest peak points in the histogram, respectively.

[0028] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method for water body detection based on smooth histogram morphological features in remote sensing images.

[0029] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the aforementioned method for water body detection based on smooth histogram morphological features in remote sensing images.

[0030] This invention provides a complete automatic water body extraction solution for satellite remote sensing images, including NDWI water index calculation, histogram smoothing filtering, automatic threshold determination, and water body extraction. When the water portion of a remote sensing image is small and the ratio of land to water pixels differs significantly, the image histogram does not exhibit a clear bimodal pattern. In such cases, the threshold determined using the OTSU algorithm is inaccurate, resulting in poor water body extraction. This invention, based on the morphological features of smoothed histograms, overcomes these shortcomings to some extent. The water index segmentation threshold obtained using this method is more accurate than the threshold calculated directly using the OTSU method, leading to higher precision water body extraction results. For high-resolution four-channel satellite imagery, this invention can quickly and automatically extract water regions from large-format images, providing technical support for various satellite application scenarios. Attached Figure Description

[0031] Figure 1 This is a schematic flowchart of the remote sensing image water body detection method of the present invention.

[0032] Figure 2 This is the original remote sensing image.

[0033] Figure 3 This is a histogram of NDWI data imagery.

[0034] Figure 4 This is a histogram of the NDWI data image after smoothing.

[0035] Figure 5 The image of the water body region is obtained by detecting and extracting the segmentation threshold determined by the method of the present invention. Detailed Implementation

[0036] To describe the present invention in more detail, the technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0037] like Figure 1 As shown, the remote sensing image water body detection method based on smooth histogram morphological features of the present invention includes the following steps:

[0038] (1) Acquire remote sensing images of the target area and preprocess the remote sensing images; the remote sensing images include spectral information of the red band, green band, blue band and near-infrared band.

[0039] This implementation uses a Gaofen-2 satellite image as the original image, such as Figure 2 As shown, the dimensions of this image are (6908×7300).

[0040] (2) Calculate the Normalized Difference Water Index (NDWI) to obtain the NDWI data of the entire image, where each data point is a floating-point number in the range of [-1,1].

[0041] The formula for calculating NDWI is as follows:

[0042]

[0043] Where p(Green) and p(NIR) are the pixel values ​​of each pixel in the remote sensing image in the green band and near-infrared band, respectively.

[0044] (3) Divide the NDWI data in the range [-1, 1] into n = [1 - (-1)] / 0.002 = 1000 intervals with an interval interval of m = 0.002. Count the number of pixels in each interval to obtain the interval pixel count array array1 of the NDWI data. Based on this, draw a histogram of the NDWI data, as shown below. Figure 3 As shown.

[0045] at the same time, Figure 3 The segmentation threshold td0 = 0.262215033417768, determined directly using the OTSU method, was selected. Figure 3 It can be observed that the segmentation threshold td0 determined directly using the OTSU method is not located in the visually optimal position of the histogram.

[0046] (4) The interval pixel count array array1 is filtered by moving average filtering to obtain the smoothed interval pixel count array array2. Based on this, a smoothed histogram is plotted, as shown below. Figure 4 As shown.

[0047] (5) Traverse the interval pixel count array array2 and record all local maxima points in the array as histogram peaks.

[0048] (6) Filter the peaks of the histogram. Within the range of 125 intervals, only the largest peak is retained to prevent peaks that are too close from being selected at the same time.

[0049] (7) In the set of histogram peaks after filtering, find the highest peak point peak1 and the second highest peak point peak2 as the visual highest peak point and the second highest peak point, where the coordinates of peak1 are (0.01, 287737) and the coordinates of peak2 are (0.632, 96757).

[0050] (8) Traverse the pixel count array array2 in the range (0.01, 0.632) between peak1 and peak2, and record all local minimum points as the trough point V between the highest peak point and the second highest peak point in the visual perception.

[0051] (9) Draw a straight line L through the highest and second-highest peaks. From the coordinates of peak1 and peak2, the equation of line L is:

[0052]

[0053] (10) Calculate all the troughs v between the two peaks in sequence. i coordinate The distance d from the vertical axis to the straight line L i :

[0054]

[0055] (11) Find the distance d i The largest trough point V * :

[0056]

[0057] V * The x-coordinate takes the value x * Water body detection is performed using the optimal segmentation threshold for water body extraction. In this image, the trough point V, which is furthest from line L, is... * The coordinates are (0.39, 33198), so the optimal segmentation threshold is determined to be 0.39.

[0058] Water body detection was performed on the image using the segmentation threshold determined by the method of this invention, resulting in the following: Figure 5 The water body region segmentation results shown have a classification accuracy of 90.05% and an mIoU (Mean Intersection over Union) of 93.87%.

[0059] Table 1 compares the mIoU (%) accuracy of the method of this invention with that of the OTSU algorithm, logistic regression, Naive Bayes classification, and support vector machine on three public remote sensing datasets: ESWKB, GID, and WOSD. The ESWKB dataset [LuoX, Tong X, Hu Z. An applicable and automatic method for earth surface watermapping based on multispectral images[J]. International Journal of Applied Earth Observation and Geoinformation, 2021, 103: 102472] provides 95 Sentinel-2 satellite imagery data covering the globe; the GID dataset [Tong XY, Xia GS, Lu Q, et al. Land-cover classification with high-resolution remote sensing images using transferable deep models[J]. Remote Sensing of Environment, 2020, 237: 111322] provides 150 high-resolution Gaofen-2 satellite images; and the WOSD dataset [Li X, Zhang G, Cui H, et al. MCANet: Ajoint semantic segmentation framework of optical and SAR images for land use classification[J]. International Journal of Applied Earth Observation] provides 150 high-resolution Gaofen-2 satellite imagery data. [and Geoinformation, 2022, 106: 102638] provides 100 images from the Gaofen-1 satellite.

[0060] Table 1

[0061]

[0062] As can be seen from Table 1, the method of the present invention is far superior to the OTSU algorithm and comparable to machine learning algorithms such as logistic regression, Naive Bayes, and support vector machines. However, the latter require a complex training process, while the method of the present invention does not require training.

[0063] The above description of the embodiments is provided to enable those skilled in the art to understand and apply the present invention. Those skilled in the art can readily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without creative effort. Therefore, the present invention is not limited to the above embodiments, and any improvements and modifications made to the present invention by those skilled in the art based on the disclosure thereof should be within the scope of protection of the present invention.

Claims

1. A method for water body detection in remote sensing images based on smooth histogram morphological features, comprising the following steps: Step (1): Acquire remote sensing images of the target area and perform preprocessing. The remote sensing images contain spectral information of the red band, green band, blue band and near-infrared band. Step (2): For the preprocessed remote sensing image, plot its histogram with respect to NDWI data; Step (3): Filter the histogram and record the highest peak, the second highest peak, and all the valleys between the two peaks in the histogram. Step (4): Based on the distance from the trough point to the line connecting the highest and second highest peak points, determine the optimal segmentation threshold of NDWI for water body detection and extraction. Specifically: First, calculate and determine the straight line L passing through the highest and second highest peak points in the histogram; then calculate the distance of all trough points along the vertical axis to the straight line L, and extract the trough point with the largest distance. Take the horizontal coordinate of the trough point in the histogram as the optimal segmentation threshold of NDWI.

2. The method for water body detection in remote sensing images based on smooth histogram morphological features according to claim 1, characterized in that: The preprocessing of remote sensing images in step (1) includes radiometric calibration, atmospheric correction, and geometric correction.

3. The method for water body detection in remote sensing images based on smooth histogram morphological features according to claim 1, characterized in that: The specific implementation method of step (2) is as follows: For the preprocessed remote sensing image, first calculate the NDWI value of each pixel in the remote sensing image using the following formula; Wherein: for any pixel in the remote sensing image, NDWI is the NDWI value of that pixel, and p(Green) and p(NIR) are the pixel values ​​of that pixel in the green band and near-infrared band, respectively. Then, the range [-1, 1] is evenly divided into multiple intervals, and the number of pixels with NDWI values ​​distributed in each interval is counted to draw a histogram of the remote sensing image with respect to the NDWI data. The horizontal axis is the median value of each interval, and the vertical axis is the number of pixels.

4. The method for water body detection in remote sensing images based on smooth histogram morphological features according to claim 1, characterized in that: The specific implementation of step (3) is as follows: First, the histogram is filtered by the moving average filtering algorithm, and all local maxima points in the histogram are recorded as peak points; then, the peak points are filtered, with each N interval length as a group, and only the largest peak point is retained in each group, where N is a natural number greater than 1; after filtering, the highest peak point and the second highest peak point are selected from the retained peak points, which are the highest and second highest peak points in the histogram visually, and then all local minima points between these two peak points are recorded as trough points.

5. The method for water body detection in remote sensing images based on smooth histogram morphological features according to claim 1, characterized in that: The equation of the line L is expressed as follows: in: and These are the coordinates of the highest and second-highest peak points in the histogram, respectively. Let L be the coordinates of any point on line L in the histogram.

6. The method for water body detection in remote sensing images based on smooth histogram morphological features according to claim 1, characterized in that: The distance from all trough points along the vertical axis to line L is calculated using the following formula: Where: for any trough point v , trough point v Coordinates in the histogram d v trough point v The distance along the vertical axis to line L. and These are the coordinates of the highest and second-highest peak points in the histogram, respectively.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: The processor is used to execute the computer program to implement the remote sensing image water body detection method based on smooth histogram morphological features as described in any one of claims 1 to 6.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, it implements the remote sensing image water body detection method based on smooth histogram morphological features as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Optical remote sensing image large-range surface water extraction method and device

    CN113177964A

  • Method and device for recognizing license plate number

    WO2018028306A1