Mountain river water surface vector extraction method and system, electronic equipment and storage medium

By using the relative deviation matching between current and historical remote sensing images in mountain river surface extraction technology to replace the shadowed area, the problem of shadow interference is solved, and high-precision extraction of mountain river surface information is achieved.

CN119693792APending Publication Date: 2025-03-25CHINA INST OF WATER RESOURCES & HYDROPOWER RES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411717446.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the alpine canyon environment, existing water body extraction technology is difficult to accurately distinguish shadows from water surfaces, resulting in a significant reduction in the accuracy of river water surface vector extraction.

Method used

By obtaining the current optical remote sensing image and historical optical remote sensing image, the water surface area of ​​the river section at the same location upstream and downstream of the shadowed area is determined, and the relative deviation is calculated based on the basic principles of hydrology, matching the appropriate historical image for replacement, and generating a shadowless river surface vector.

Benefits of technology

It effectively solves the interference of shadows on water extraction, and achieves complete, fast and accurate extraction of water surface information in mountainous rivers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693792A_ABST
    Figure CN119693792A_ABST
Patent Text Reader

Abstract

The invention relates to a mountain river water surface vector extraction method and system, electronic equipment and a storage medium, and the extraction method comprises the steps: in a current optical remote sensing image and each historical optical remote sensing image, determining a current water surface area and a historical water surface area of a river reach with a preset length at the same upstream and downstream positions of a shadow region; when the relative deviation between the current water surface area and each historical water surface area accords with a preset deviation, taking the corresponding historical optical remote sensing image as a matched optical remote sensing image; extracting a replacement water surface vector matched with the position information of the shadow area from the matched optical remote sensing image; the water surface vector of the shadow area is replaced by the replacement water surface vector, and a river water surface vector of the preset mountain river area is generated. According to the scheme, by analyzing the optical remote sensing image of the mountainous area water body, the shadow area in the current optical remote sensing image is replaced by the historical optical remote sensing image, the interference of the shadow on water body extraction can be effectively solved, and the complete, rapid and accurate extraction of the mountainous area river water surface information is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of optical remote sensing technology, and in particular relates to a method, system, electronic equipment and storage medium for extracting water surface vectors of mountain rivers. Background Art

[0002] Remote sensing technology uses multispectral or hyperspectral image data obtained by satellite or aircraft sensors to identify and measure water bodies by analyzing the reflectivity of different bands. This method overcomes the shortcomings of traditional measurement methods such as high investment, long cycle and low efficiency, and can quickly obtain comprehensive, objective and accurate water surface area information in a wide area.

[0003] Existing water extraction technologies, such as algorithms based on water index, perform well in flat and open areas. However, in mountainous canyon environments, due to the dramatic terrain fluctuations and frequent shadowing, these indices often have difficulty accurately distinguishing between shadows and water surfaces. Especially under conditions where the spectral responses of shadows and water bodies are similar, misidentification is prone to occur, resulting in a significant reduction in the accuracy of river surface vector extraction. Existing practices often directly remove shadow areas to achieve overall accuracy in the classification of the entire image. However, monitoring and evaluation of mountain rivers require complete and accurate water surface vector information. Summary of the invention

[0004] The problem that our patent aims to solve is to obtain the river surface vector file in the shadow area in order to carry out river hydrological monitoring. This disclosure provides a method, system, electronic device and storage medium for extracting river surface vectors in mountainous areas. Based on the continuity of water flow and the stability of mountainous river channels, the shadow area in the current optical remote sensing image is replaced by the historical optical remote sensing image, which can effectively solve the interference of shadows on water body extraction and realize the complete, fast and accurate extraction of mountainous water body information.

[0005] In order to solve the above technical problems, the first aspect of the present invention proposes a method for extracting water surface vectors of mountain rivers, the method comprising:

[0006] Acquire a current optical remote sensing image and a historical optical remote sensing image of a preset mountain river area, and determine a shadow area in the current optical remote sensing image; the surface of the river water body in the historical optical remote sensing image has no shadow;

[0007] In the current optical remote sensing image and each historical optical remote sensing image, determine the current water surface area and the historical water surface area of ​​a river section of a preset length at the same position upstream and downstream of the shadow area; wherein the water surface of the river section has no shadow;

[0008] Based on the basic principles of hydrology, the relative deviation between the current water surface area and each of the historical water surface areas is calculated, and when the relative deviation meets the preset deviation, the corresponding historical optical remote sensing image is used as a matching optical remote sensing image;

[0009] Based on the position information of the shadow area in the current optical remote sensing image, extracting a replacement water surface vector adapted to the position information from the matching optical remote sensing image, and constructing a replacement water surface vector library based on the replacement water surface vector;

[0010] The water surface vector of the shadow area is replaced by the replacement water surface vector to generate the river water surface vector of the preset mountain river area.

[0011] According to a preferred embodiment of the present invention, the determining of the shadow area in the current optical remote sensing image includes:

[0012] Determine the water shadow area in the current optical remote sensing image according to the spectral data of different bands, and determine the mountain shadow area in the current optical remote sensing image according to the solar altitude angle and terrain data in the preset mountain river area;

[0013] The shadow area in the current optical remote sensing image is determined according to the water body shadow area and the mountain body shadow area.

[0014] According to a preferred embodiment of the present invention, determining the water body shadow area in the optical remote sensing image according to spectral data of different bands includes:

[0015] Acquire spectral features in the current optical remote sensing image, wherein the spectral data includes: a deep blue band spectrum, a short-wave infrared band spectrum, a near infrared band spectrum and a red band spectrum;

[0016] Determine the dark pixel area in the current optical remote sensing image according to the deep blue band spectrum and the short infrared band spectrum;

[0017] The water body shadow area is determined in the dark pixel area according to the near infrared band spectrum and the red light band spectrum through the spectral difference between the water body and the shadow.

[0018] According to a preferred embodiment of the present invention, replacing the water surface vector of the shadow area by replacing the water surface vector comprises:

[0019] When the water surface areas of the adjacent river sections upstream and downstream are the same, the water surface vector in the shadow area is replaced by the water surface vector in the historical optical remote sensing image.

[0020] According to a preferred embodiment of the present invention, the determining of the water body shadow area in the dark pixel area by the spectral difference between the water body and the shadow according to the near-infrared band spectrum and the red band spectrum includes:

[0021] Calculating a second relative deviation between the near-infrared band spectrum and the infrared band spectrum;

[0022] According to the matching result of the value of the second relative deviation and the second preset deviation interval, the water body and the shadow in the dark pixel area are determined to obtain the water body shadow area.

[0023] According to a preferred embodiment of the present invention, determining the mountain shadow area in the current optical remote sensing image according to the solar altitude angle and terrain data in the preset mountain river area includes:

[0024] Determine the slope and slope direction of the preset mountain river area according to the terrain data;

[0025] For each pixel in the current optical remote sensing image, determining whether the pixel will be blocked at the solar altitude angle according to the slope and the slope direction;

[0026] The hill shadow area is generated by counting the blocked pixels.

[0027] According to a preferred embodiment of the present invention, the relative deviation between the current water surface area and each of the historical water surface areas is calculated based on the basic principle of hydrology, and when the relative deviation meets the preset deviation, the corresponding historical optical remote sensing image is used as a matching optical remote sensing image, including:

[0028] Calculating a first relative deviation between the current water surface area upstream of the shadow area and each historical water surface area, and calculating a second relative deviation between the current water surface area downstream of the shadow area and each historical water surface area; generating a comprehensive relative deviation based on the first relative deviation and the second relative deviation;

[0029] Each of the comprehensive relative deviations is compared with a preset deviation, and when the comprehensive relative deviation is smaller than the preset deviation, the historical optical remote sensing image of the historical water surface area corresponding to the comprehensive relative deviation is used as a matching optical remote sensing image.

[0030] In order to solve the above technical problems, the second aspect of the present invention provides a mountain river water surface vector extraction system, the extraction system comprising:

[0031] A data acquisition module, used to acquire current optical remote sensing images and historical optical remote sensing images of a preset mountain river area; the river water surface in the historical optical remote sensing images has no shadows;

[0032] A shadow area determination module, used to determine the shadow area in the current optical remote sensing image;

[0033] A water surface area determination module, used to determine the current water surface area and the historical water surface area of ​​a river section of a preset length at the same position upstream and downstream of the shadow area in the current optical remote sensing image and each historical optical remote sensing image; wherein the water surface of the river section has no shadow;

[0034] A data comparison module, for calculating the relative deviation between the current water surface area and each of the historical water surface areas based on the basic principles of hydrology, and when the relative deviation meets the preset deviation, using the corresponding historical optical remote sensing image as a matching optical remote sensing image;

[0035] The image processing module is used to extract a replacement water surface vector adapted to the position information of the shadow area in the current optical remote sensing image from the matching optical remote sensing image, and to construct a replacement water surface vector library based on the replacement water surface vector; and to replace the water surface vector of the shadow area with the replacement water surface vector to generate a river water surface vector of the preset mountain river area.

[0036] In order to solve the above technical problem, the third aspect of the present invention provides an electronic device, comprising:

[0037] Processor; and

[0038] A memory storing computer executable instructions, wherein when the computer executable instructions are executed, the processor executes the method described in any one of the above embodiments.

[0039] In order to solve the above technical problems, the fourth aspect of the present invention proposes a computer storage medium, wherein the computer storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method described in any one of the above embodiments is implemented.

[0040] Compared with the prior art, the present disclosure has the following advantages: the present disclosure obtains the current optical remote sensing image and the historical remote sensing image, and determines the shadow area in the current optical remote sensing image, obtains the same upstream and downstream positions of the shadow area in the remote sensing image to determine the water surface area of ​​the river of a preset length, determines whether the relative deviation between the current water surface area and the historical water surface area meets the preset deviation, and uses the historical optical remote sensing image corresponding to the historical water surface area that meets the preset deviation as the matching optical remote sensing image, extracts the replacement image corresponding to the position information in the matching optical remote sensing image according to the position information of the shadow area, replaces the water surface vector of the shadow area by replacing the water surface vector, and generates a shadow-free river water surface vector. This scheme realizes the replacement of the shadow area in the current optical remote sensing image with the historical optical remote sensing image by analyzing the optical remote sensing image of the water body in the mountain area, which can effectively solve the interference of the shadow on the water body extraction and realize the complete, fast and accurate extraction of the water surface information of the mountain river.

[0041] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or be understood by implementing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0043] Figure 1 A first flow chart of a method for extracting water surface vectors of a mountain river according to an embodiment of the present disclosure is shown;

[0044] Figure 2 A second flow chart of a method for extracting water surface vectors of a mountain river according to an embodiment of the present disclosure is shown;

[0045] Figure 3 A schematic flow chart of a method for determining a water body shadow area in an optical remote sensing image based on spectral data of different wavebands according to an embodiment of the present disclosure is shown;

[0046] Figure 4 A schematic diagram of a method flow for determining a mountain shadow area in a current optical remote sensing image according to a preset solar altitude angle and terrain data in a mountain river area according to an embodiment of the present disclosure is shown;

[0047] Figure 5 A block diagram of a mountain river water surface vector extraction system according to an embodiment of the present disclosure is shown;

[0048] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0050] The same reference numerals in the drawings represent the same or similar elements, components or parts, and thus the repeated description of the same or similar elements, components or parts may be omitted below. It should also be understood that although the first, second, third and other attributives representing the numbers may be used herein to describe various devices, elements, components or parts, these devices, elements, components or parts should not be limited by these attributives. In other words, these attributives are only used to distinguish one from another. For example, the first device may also be called the second device, but it does not deviate from the essential technical solution of the present invention. In addition, the terms "and / or" and "and / or" refer to all combinations including any one or more of the listed items.

[0051] See also Figure 1 , Figure 1 This is a flow chart of a method for extracting water surface vectors of mountain rivers provided by the present invention. Figure 1 As shown, the method includes:

[0052] S11, obtaining a current optical remote sensing image and a historical optical remote sensing image of a preset mountain river area, and determining a shadow area in the current optical remote sensing image; there is no shadow on the surface of the river water body in the historical optical remote sensing image.

[0053] In this embodiment, the optical remote sensing image is an image of the earth's surface captured from space or high altitude by optical sensors. These sensors are usually installed on satellites or aircraft and can receive reflected or radiated electromagnetic waves in the visible light and near-infrared bands from the earth's surface.

[0054] In this embodiment, the spectral data describes the reflection, absorption and emission characteristics of the ground object in different bands, which are determined by the physical and chemical properties of the ground object. In remote sensing image analysis, spectral data is used to distinguish different types of ground objects, such as vegetation, water, soil, buildings, etc.

[0055] In this embodiment, shadows usually show lower brightness in optical remote sensing images. Therefore, brightness can be used as a feature to detect shadows.

[0056] In this embodiment, the historical optical remote sensing images can be realized by acquiring optical remote sensing images at different times, for example, optical remote sensing images at noon. Due to direct sunlight, there will be no shadows on the surface of most river water bodies in the optical remote sensing images at this time.

[0057] In this embodiment, for the historical optical remote sensing images, the shadows in the historical optical remote sensing images can also be removed or replaced to generate the shadow-free historical optical remote sensing images in this solution.

[0058] In this embodiment, for remote sensing images of rivers with shadows, remote sensing images of the same range in different periods are obtained and preprocessed. Remote sensing image data related to the target river section is collected to ensure that the historical image and the current image cover the same river section and that the resolution of the two images is consistent. Conventional processing such as geometric correction and radiation correction is performed on the two images to ensure that the historical image and the current image are completely aligned in space.

[0059] S12. In the current optical remote sensing image and each historical optical remote sensing image, determine the current water surface area and the historical water surface area of ​​a river section of a preset length at the same position upstream and downstream of the shadow area; wherein the water surface of the river section has no shadow.

[0060] In this embodiment, the shadow-free area in the optical remote sensing image can be determined according to the spectral data of different bands. After the shadow-free area in the current optical remote sensing image is determined, a river section of a preset length is determined upstream and downstream of the shadow area of ​​the current optical remote sensing image, and the river section is located in the shadow-free area. For example, an upstream river section of a first preset length is selected at a first position of the shadow-free area upstream of the shadow area in the current optical remote sensing image, and an upstream river section of a second preset length is selected at a second position of the shadow-free area upstream of the shadow area in the current optical remote sensing image; similarly, an upstream river section of a first preset length is also selected at the first position in the historical optical remote sensing image, and a downstream river section of a second preset length is also selected at the second position in the historical optical remote sensing image.

[0061] In this embodiment, in the optical remote sensing image, the water surface area of ​​the river section can be determined by selecting a projection coordinate system: in the vectorized water body layer, select a suitable projection coordinate system to ensure the accuracy of the area calculation. Computational geometry: In the remote sensing image processing software, use the "Computational Geometry" function to calculate the water surface areas A1 and A2 of the upstream and downstream river sections. This usually involves creating a new double-precision field in the layer attribute table and specifying the unit and formula for area calculation. Result verification: Verify the calculation results to ensure the accuracy and rationality of the area. The accuracy of the calculation results can be verified by comparing with field measurement data or other reliable data.

[0062] In this embodiment, the above water surface area calculation process is performed for the current optical remote sensing image and the historical optical remote sensing image, thereby obtaining the current water surface area and the historical water surface area of ​​the river section of the current optical remote sensing image and the historical optical remote sensing image; wherein, the current water surface area may be the sum of the water surface areas of the upstream and downstream river sections of the current optical remote sensing image, and the historical water surface area may be the sum of the water surface areas of the upstream and downstream river sections of the historical optical remote sensing image. The current water surface area may also be the water surface area of ​​the upstream river section and the water surface area of ​​the downstream river section of the current optical remote sensing image, and the historical water surface area may also be the water surface area of ​​the upstream river section and the water surface area of ​​the downstream river section of the historical optical remote sensing image.

[0063] S13. Based on the basic principles of hydrology, the relative deviation between the current water surface area and each of the historical water surface areas is calculated. When the relative deviation meets the preset deviation, the corresponding historical optical remote sensing image is used as the matching optical remote sensing image.

[0064] In this embodiment, the relative deviation between the current water surface area and each historical water surface area is calculated. The relative deviation can be calculated based on the sum of the water surface areas of the upstream and downstream river sections of the current optical remote sensing image and the sum of the water surface areas of the upstream and downstream river sections of the historical optical remote sensing images. When the relative deviation meets the preset deviation, it is considered that the river channels in the historical optical remote sensing image and the current optical remote sensing image are similar, and the corresponding historical optical remote sensing image is used as the matching optical remote sensing image.

[0065] In this embodiment, the first relative deviation can also be calculated based on the water surface area of ​​the upstream river section of the current optical remote sensing image and the water surface area of ​​the upstream river section of the historical optical remote sensing image. Similarly, the second relative deviation of the water surface area of ​​the downstream river section is calculated. The comprehensive relative deviation is calculated by the first relative deviation and the second relative deviation as the relative deviation in this step, and the total relative deviation that meets the preset deviation is determined. Specifically, for example, the relative deviation can be 5%. When the first relative deviation is less than 5%, it is considered that the relative deviation meets the preset deviation.

[0066] In this embodiment, step S12 can also obtain the current water surface contour and the historical water surface contour of the river section of the preset length at the same position upstream and downstream of the shadow area. In this step, the degree of overlap between the current water surface contour and the historical water surface contour is taken as the relative deviation. When the degree of overlap meets the preset deviation, the corresponding historical optical remote sensing image is taken as the matching optical remote sensing image. Specifically, for example, the preset deviation may be 95%. When the degree of overlap is greater than 95%, it is considered that the degree of overlap meets the preset deviation.

[0067] S14. Based on the position information of the shadow area in the current optical remote sensing image, extract a replacement water surface vector that matches the position information from the matching optical remote sensing image, and construct a replacement water surface vector library based on the replacement water surface vector.

[0068] In this embodiment, after the matching optical remote sensing image is screened out, the corresponding replacement water surface vector is extracted from the matching optical remote sensing image according to the position information of the shadow area in the current optical remote sensing image.

[0069] In this embodiment, water surface vector data is one of the basic data types in the geographic information system (GIS), which represents geographic features (such as water surfaces such as rivers, lakes, and oceans) in the form of points, lines, and surfaces. River water surface vector data can be derived from a variety of sources, including but not limited to: Remote sensing image extraction: Using remote sensing images taken by satellites or drones, the boundaries and features of the river surface are extracted through image processing technology. GIS database: The geographic information system (GIS) database usually contains rich geospatial data, including river water surface vector data. Field measurement: Obtain the precise location and attribute information of the river surface through field surveys and hydrological measurements.

[0070] In this embodiment, when there are multiple matching optical remote sensing images, the matching optical remote sensing image with the best relative deviation is selected to extract the replacement image. The matching optical remote sensing images can also be averaged to generate an average matching optical remote sensing image, and the corresponding replacement image is extracted through the average matching optical remote sensing image.

[0071] In this embodiment, each replacement image can also be stored in a replacement image library. On the one hand, it can be convenient for users to determine the final replacement image. On the other hand, the data can be centrally managed for easy management and access. If the same demand arises at the same location in the future, the replacement image can be quickly determined without having to re-perform the historical data acquisition, processing, and comparison process, thereby improving data processing efficiency.

[0072] S15. Replace the water surface vector of the shadow area by replacing the water surface vector to generate a river water surface vector of a preset mountain river area.

[0073] In this embodiment, the shadow area is replaced in the current optical remote sensing image by a replacement image adapted to the shadow area, so as to generate a shadow-free current optical remote sensing image and obtain the river surface vector in this solution.

[0074] In this embodiment, the present disclosure obtains the current optical remote sensing image and the historical remote sensing image, and determines the shadow area in the current optical remote sensing image, obtains the same upstream and downstream positions of the shadow area in the remote sensing image to determine the water surface area of ​​the river of a preset length, determines whether the relative deviation between the current water surface area and the historical water surface area meets the preset deviation, and uses the historical optical remote sensing image corresponding to the historical water surface area that meets the preset deviation as the matching optical remote sensing image, extracts the replacement image corresponding to the position information in the matching optical remote sensing image according to the position information of the shadow area, replaces the water surface vector of the shadow area by replacing the water surface vector, and generates a shadow-free river water surface vector. This scheme can effectively improve the interference of shadows on water body extraction by analyzing the optical remote sensing image of mountain water bodies, and realizes the complete, rapid and accurate extraction of mountain river water surface information. Based on the basic principles of hydrology, the water surface areas of the upstream and downstream adjacent river sections are consistent, and the water surface vectors in the shadow area are replaced by the water surface vectors in the historical images. After splicing, a complete river water surface vector file is formed, thereby providing support for remote sensing-based monitoring of river runoff.

[0075] Specifically, we are based on hydrological principles: the length of the mountain shadow in the river channel is generally within 10km. The continuity of the river flow determines that when the water surface areas of the upstream and downstream adjacent river sections in the two remote sensing images are consistent, the water surface areas of the middle river sections are also consistent.

[0076] See also Figure 2 , Figure 2 The second flow chart of the method for extracting water surface vectors of mountain rivers provided by the present invention is as follows: Figure 2 As shown, after S11, the following steps are also included:

[0077] S21. Determine the water shadow area in the current optical remote sensing image according to the spectral data of different bands, and determine the mountain shadow area in the current optical remote sensing image according to the solar altitude angle and terrain data in the preset mountain river area.

[0078] In this embodiment, by combining the blue and dark appearance of the shadows, and the reflective properties of the vegetation and water bodies, a conversion model can be constructed to suppress features such as vegetation and water bodies while enhancing the shadows. Then, the shadow representation is converted into a color space, and candidate shadows are generated using the primary color components. The optical remote sensing image can also be converted into an HSV color space. The HSV model is a hexagonal pyramid color space based on hue (H), saturation (S), and brightness (V). Among them, H represents color information, S represents the purity of the color, and V represents the brightness of the color. In the HSV model, the shadow area usually has a larger hue value H and a lower brightness V. Therefore, the color RGB image can be converted into an HSV image, and the shadow area can be preliminarily segmented based on these characteristics.

[0079] In this embodiment, the solar altitude angle data is obtained: the solar altitude angle refers to the angle between the sun's rays and the earth's surface, which can usually be obtained from meteorological data or remote sensing data. The solar altitude angle can also be calculated according to the date, time and geographical location using the sun position calculation formula. Obtain terrain data: terrain data is usually provided in the form of a digital elevation model (DEM), which contains the elevation information of each point on the surface. The DEM data of the required area can be obtained through GIS software or related data sources. Determine the solar azimuth: the solar azimuth refers to the angle between the projection of the sun's rays on the horizontal plane and the south direction. Together with the solar altitude angle, the solar azimuth is a key factor in determining the direction of the mountain shadow. Calculate the shadow area using GIS software or programming language: the mountain shadow function in the GIS software can be used to calculate the shadow area based on the DEM data and the solar altitude angle and the solar azimuth. The library (such as GDAL) in the programming language (such as Python) can also be used for calculation. Set the shadow judgment standard: usually, a threshold can be set to determine which areas are mountain shadow areas based on the comparison results of the calculated shadow area and the DEM data. For example, you can set that when the calculated shadow area value is less than a certain value (such as 120), the area is considered to be a mountain shadow area. Verify the accuracy of the shadow area: The accuracy of the shadow area can be verified by superimposing and comparing the calculated shadow area with the remote sensing image. If it is found that the shadow area is inconsistent with the shadow area in the remote sensing image, the calculation parameters or methods can be adjusted to improve the accuracy. Optimize the shadow edge effect: There may be a transition area on the shadow edge, resulting in an unsmooth edge effect. Image processing technology (such as smoothing) can be used to optimize the shadow edge effect to ensure the integrity of the image.

[0080] S22. Determine the shadow area in the current optical remote sensing image according to the water body shadow area and the mountain body shadow area.

[0081] In this embodiment, this solution integrates the water body shadow area and the mountain body shadow area, thereby ensuring that the complete shadow area in the current optical remote sensing image can be determined, so as to ensure that all the shadow areas in the current optical remote sensing image can be replaced.

[0082] Specifically, Figure 3 As shown, Figure 3 A method for determining a water body shadow area in an optical remote sensing image based on spectral data of different bands is provided. Step S21 includes the following steps:

[0083] S31. Acquire spectral features in the current optical remote sensing image, where the spectral data include: a deep blue band spectrum, a short-wave infrared band spectrum, a near infrared band spectrum, and a red light band spectrum.

[0084] In this embodiment, when sunlight cannot directly reach certain areas on the ground (such as cloud shadows, building shadows), these areas mainly receive scattered light from the sky. The intensity of this scattered light is relatively weak, causing these areas on the image to appear darker. By analyzing this part of the scattered light, the position of the shadow area can be estimated.

[0085] S32. Determine a dark pixel area in the current optical remote sensing image according to the deep blue band spectrum and the short infrared band spectrum.

[0086] In this embodiment, the deep blue band (Blue) of the remote sensing image scatters more strongly than the blue light wavelength. In theory, the deep blue band (Blue) in the shadow area is higher than the short-wave infrared band (SWIR). When these two bands are used for shadow detection, the features are more obvious.

[0087] In this embodiment, the dark pixel area including shadows and water bodies can be determined through the spectrum of the deep blue band and the short infrared band.

[0088] Specifically, the first relative deviation between the deep blue band spectrum and the short infrared band spectrum is calculated; and the dark pixel area in the optical remote sensing image is determined according to the magnitude of the first relative deviation and the first preset deviation. The first relative deviation can be a normalized dark pixel index:

[0089]

[0090] NDPI is the normalized dark pixel index, Blue is the dark blue band spectrum, and SWIR is the shortwave infrared band spectrum.

[0091] S33. According to the near-infrared band spectrum and the red light band spectrum, the water body shadow area is determined in the dark pixel area through the spectral difference between the water body and the shadow.

[0092] Specifically, the second relative deviation between the near-infrared band spectrum and the infrared band spectrum is calculated; based on the matching result of the value of the second relative deviation and the second preset deviation interval, the water body and shadow in the dark pixel area are determined to obtain the water body shadow area. The second relative deviation can be the normalized vegetation index. The normalized vegetation index (NDVI) is an index for evaluating vegetation coverage and health status by measuring the reflectivity difference between the near-infrared (NIR) and red (R) bands. The calculation formula is NDVI = (NIR-Red) / (NIR+Red), where NIR and Red represent the reflectivity of the near-infrared and red bands, respectively. The value range of NDVI is usually between -1 and 1, where positive values ​​indicate vegetation coverage, negative values ​​indicate water bodies or snow, etc., and values ​​close to 0 indicate rocks or bare soil, etc.

[0093] Furthermore, the above-mentioned normalized dark pixel index and normalized vegetation index can be combined to construct a ratio shadow index (RSI), which can amplify the difference between water bodies and shadows and make it easier to distinguish between shadows and water bodies.

[0094]

[0095] RSI is the ratio shadow index, NDPI is the normalized dark pixel index, and NDVI is the normalized vegetation index.

[0096] Specifically, Figure 4 As shown, Figure 4 A method for determining the mountain shadow area in the current optical remote sensing image according to the solar altitude angle and terrain data in the preset mountain river area is provided. Step S21 includes the following steps:

[0097] S41. Determine the slope and slope direction of a preset mountain river area according to terrain data.

[0098] S42. For each pixel in the current optical remote sensing image, determine whether the pixel will be blocked at the solar altitude angle according to the slope and the slope direction.

[0099] For each pixel, the slope and aspect are used to calculate whether the point will be blocked under the current sun angle conditions. The following formula is used to determine whether the point will be blocked under the current sun angle conditions:

[0100]

[0101] Among them, θ s is the solar altitude angle; S is the slope; A is the aspect; θ i is the angle between the sun's rays and the ground's surface; is the angle between the line connecting the pixel point and the mountain and the ground surface. i <0, the point will be blocked and judged as a mountain-blocked shadow area.

[0102] S43, counting the blocked pixels to generate a mountain shadow area.

[0103] In this embodiment, for each pixel, it is determined whether the pixel is blocked by the mountain, and finally the mountain shadow area blocked by the mountain is statistically determined.

[0104] See also Figure 5 , Figure 5 The present invention provides a mountain river water surface vector extraction system, which comprises: a data acquisition module 11, a shadow area determination module 12, a water surface area determination module 13, a data comparison module 14 and an image processing module 15.

[0105] In this embodiment, the data acquisition module 11 is used to acquire the current optical remote sensing image and the historical optical remote sensing image of the preset mountain river area; the river water surface in the historical optical remote sensing image has no shadow.

[0106] In this embodiment, the shadow area determination module 12 is used to determine the shadow area in the current optical remote sensing image.

[0107] In this embodiment, the water surface area determination module 13 is used to determine the current water surface area and historical water surface area of ​​a river section of a preset length at the same position upstream and downstream of the shadow area in the current optical remote sensing image and each historical optical remote sensing image; wherein there are no shadows on the water surface of the river section.

[0108] In this embodiment, the data comparison module 14 is used to calculate the relative deviation between the current water surface area and each of the historical water surface areas based on the basic principles of hydrology. When the relative deviation meets the preset deviation, the corresponding historical optical remote sensing image is used as the matching optical remote sensing image.

[0109] In this embodiment, the image processing module 15 is used to extract a replacement water surface vector that matches the position information of the shadow area in the current optical remote sensing image from the matching optical remote sensing image based on the position information of the shadow area in the current optical remote sensing image; and to generate a river water surface vector of a preset mountain river area by replacing the water surface vector of the shadow area.

[0110] In this embodiment, the shadow area determination module 12 is specifically used to determine the water shadow area in the current optical remote sensing image based on spectral data of different bands, and determine the mountain shadow area in the current optical remote sensing image based on the solar altitude angle and terrain data in the preset mountain river area; determine the shadow area in the current optical remote sensing image based on the water shadow area and the mountain shadow area.

[0111] In this embodiment, the shadow area determination module 12 is specifically used to obtain spectral characteristics in the current optical remote sensing image, and the spectral data includes: a deep blue band spectrum, a short-wave infrared band spectrum, a near-infrared band spectrum and a red band spectrum; determine the dark pixel area in the current optical remote sensing image according to the deep blue band spectrum and the short infrared band spectrum; determine the water body shadow area in the dark pixel area through the spectral difference between the water body and the shadow according to the near-infrared band spectrum and the red band spectrum.

[0112] In this embodiment, the shadow area determination module 12 is specifically used to calculate the first relative deviation between the deep blue band spectrum and the short infrared band spectrum; and determine the dark pixel area in the current optical remote sensing image according to the magnitude of the first relative deviation and the first preset deviation.

[0113] In this embodiment, the shadow area determination module 12 is specifically used to calculate the second relative deviation between the near-infrared band spectrum and the infrared band spectrum; based on the matching result of the value of the second relative deviation and the second preset deviation interval, the water body and shadow in the dark pixel area are determined to obtain the water body shadow area.

[0114] In this embodiment, the shadow area determination module 12 is specifically used to determine the slope and slope direction of a preset mountain river area based on terrain data; for each pixel in the current optical remote sensing image, determine whether the pixel will be blocked at the solar altitude angle based on the slope and slope direction; and generate a mountain shadow area by counting the blocked pixels.

[0115] In this embodiment, the data comparison module 14 is specifically used to calculate the first relative deviation between the current water surface area upstream of the shadow area and each historical water surface area, and calculate the second relative deviation between the current water surface area downstream of the shadow area and each historical water surface area; generate a comprehensive relative deviation based on the first relative deviation and the second relative deviation; compare each comprehensive relative deviation with a preset deviation, and when the comprehensive relative deviation is less than the preset deviation, use the historical optical remote sensing image of the historical water surface area corresponding to the comprehensive relative deviation as a matching optical remote sensing image.

[0116] like Figure 6 As shown, an embodiment of the present invention provides an electronic device, including a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 communicate with each other through the communication bus 1140;

[0117] Memory 1130, used for storing computer programs;

[0118] The processor 1110 is used to implement any of the above extraction methods when executing the program stored in the memory 1130.

[0119] In the electronic device provided by the embodiment of the present invention, the processor 1110 obtains the current optical remote sensing image and the historical optical remote sensing image of the preset mountain river area by executing the program stored in the memory 1130, and determines the shadow area in the current optical remote sensing image; the surface of the river water body in the historical optical remote sensing image is free of shadow; in the current optical remote sensing image and each historical optical remote sensing image, the current water surface area and the historical water surface area of ​​the river section with a preset length at the same position upstream and downstream of the shadow area are determined; wherein the water surface of the river section is free of shadow; based on the basic principle of hydrology, the relative deviation between the current water surface area and each of the historical water surface areas is calculated, and when the relative deviation meets the preset deviation, the corresponding historical optical remote sensing image is used as the matching optical remote sensing image; based on the position information of the shadow area in the current optical remote sensing image, a replacement water surface vector adapted to the position information is extracted from the matching optical remote sensing image; the water surface vector of the preset mountain river area is replaced by the replacement water surface vector to generate the river water surface vector of the preset mountain river area.

[0120] The communication bus 1140 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0121] The communication interface 1120 is used for communication between the above electronic device and other devices.

[0122] The memory 1130 may include a random access memory 1130 (RAM), or may include a non-volatile memory 1130 (non-volatile memory), such as at least one disk memory 1130. Optionally, the memory 1130 may also be at least one storage device located away from the processor 1110.

[0123] The above-mentioned processor 1110 can be a general-purpose processor 1110, including a central processing unit 1110 (CPU), a network processor 1110 (NP), etc.; it can also be a digital signal processor 1110 (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0124] An embodiment of the present invention provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors 1110 to implement the extraction method of any of the above embodiments.

[0125] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidStateDisk (SSD)), etc.

[0126] Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. A method for extracting water surface vectors of mountain rivers, characterized in that: The extraction method comprises: Acquire a current optical remote sensing image and a historical optical remote sensing image of a preset mountain river area, and determine a shadow area in the current optical remote sensing image; the surface of the river water body in the historical optical remote sensing image has no shadow; In the current optical remote sensing image and each historical optical remote sensing image, determine the current water surface area and the historical water surface area of ​​a river section of a preset length at the same position upstream and downstream of the shadow area; wherein the water surface of the river section has no shadow; Based on the basic principles of hydrology, the relative deviation between the current water surface area and each of the historical water surface areas is calculated, and when the relative deviation meets the preset deviation, the corresponding historical optical remote sensing image is used as a matching optical remote sensing image; Based on the position information of the shadow area in the current optical remote sensing image, extracting a replacement water surface vector adapted to the position information from the matching optical remote sensing image, and constructing a replacement water surface vector library based on the replacement water surface vector; The water surface vector of the shadow area is replaced by the replacement water surface vector to generate the river water surface vector of the preset mountain river area.

2. The extraction method according to claim 1, characterized in that The determining of the shadow area in the current optical remote sensing image comprises: Determine the water shadow area in the current optical remote sensing image according to the spectral data of different bands, and determine the mountain shadow area in the current optical remote sensing image according to the solar altitude angle and terrain data in the preset mountain river area; The shadow area in the current optical remote sensing image is determined according to the water body shadow area and the mountain body shadow area.

3. The extraction method according to claim 2, characterized in that The determining of the water body shadow area in the optical remote sensing image according to the spectral data of different bands includes: Acquire spectral features in the current optical remote sensing image, wherein the spectral data includes: a deep blue band spectrum, a short-wave infrared band spectrum, a near infrared band spectrum and a red band spectrum; Determine the dark pixel area in the current optical remote sensing image according to the deep blue band spectrum and the short infrared band spectrum; The water body shadow area is determined in the dark pixel area according to the near infrared band spectrum and the red light band spectrum through the spectral difference between the water body and the shadow.

4. The extraction method according to claim 3, characterized in that Replacing the water surface vector of the shadow area by the replacement water surface vector comprises: When the water surface areas of the adjacent river sections upstream and downstream are the same, the water surface vector in the shadow area is replaced by the water surface vector in the historical optical remote sensing image.

5. The extraction method according to claim 3, characterized in that The determining of the water body shadow area in the dark pixel area by the spectral difference between the water body and the shadow according to the near infrared band spectrum and the red band spectrum includes: Calculating a second relative deviation between the near-infrared band spectrum and the infrared band spectrum; According to the matching result of the value of the second relative deviation and the second preset deviation interval, the water body and the shadow in the dark pixel area are determined to obtain the water body shadow area.

6. The extraction method according to claim 2, characterized in that The determining of the mountain shadow area in the current optical remote sensing image according to the solar altitude angle and terrain data in the preset mountain river area includes: Determine the slope and slope direction of the preset mountain river area according to the terrain data; For each pixel in the current optical remote sensing image, determining whether the pixel will be blocked at the solar altitude angle according to the slope and the slope direction; The hill shadow area is generated by counting the blocked pixels.

7. The extraction method according to any one of claims 1 to 6, characterized in that: The method of calculating the relative deviation between the current water surface area and each of the historical water surface areas based on the basic principle of hydrology, and using the corresponding historical optical remote sensing image as a matching optical remote sensing image when the relative deviation meets the preset deviation, includes: Calculating a first relative deviation between the current water surface area upstream of the shadow area and each historical water surface area, and calculating a second relative deviation between the current water surface area downstream of the shadow area and each historical water surface area; generating a comprehensive relative deviation based on the first relative deviation and the second relative deviation; Each of the comprehensive relative deviations is compared with a preset deviation, and when the comprehensive relative deviation is smaller than the preset deviation, the historical optical remote sensing image of the historical water surface area corresponding to the comprehensive relative deviation is used as a matching optical remote sensing image.

8. A mountain river water surface vector extraction system, characterized in that: The extraction system comprises: A data acquisition module, used to acquire current optical remote sensing images and historical optical remote sensing images of a preset mountain river area; the river water surface in the historical optical remote sensing images has no shadows; A shadow area determination module, used to determine the shadow area in the current optical remote sensing image; A water surface area determination module, used to determine the current water surface area and the historical water surface area of ​​a river section of a preset length at the same position upstream and downstream of the shadow area in the current optical remote sensing image and each historical optical remote sensing image; wherein the water surface of the river section has no shadow; A data comparison module, for calculating the relative deviation between the current water surface area and each of the historical water surface areas based on the basic principles of hydrology, and when the relative deviation meets the preset deviation, using the corresponding historical optical remote sensing image as a matching optical remote sensing image; The image processing module is used to extract a replacement water surface vector adapted to the position information of the shadow area in the current optical remote sensing image from the matching optical remote sensing image, and to construct a replacement water surface vector library based on the replacement water surface vector; and to replace the water surface vector of the shadow area with the replacement water surface vector to generate a river water surface vector of the preset mountain river area.

9. An electronic device, characterized in that: include: processor; as well as A memory storing computer executable instructions which, when executed, cause the processor to perform the method according to any one of claims 1-7.

10. A computer storage medium, characterized in that: in, The computer storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method of any one of claims 1 to 7 is implemented.