Model building method, water extraction method and system, electronic device and medium

Through the multi-band water body index algorithm model, the problem of existing water body extraction methods being disturbed by land objects is solved, efficient and accurate water body extraction is achieved, shadow interference is reduced and extraction speed is improved.

CN117935071BActive Publication Date: 2024-11-01SHANGHAI CAS ADVANCED RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311701195.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2024-11-01
Estimated Expiration
2043-12-12

AI Technical Summary

Technical Problem

The existing water body extraction methods are greatly disturbed by land objects and cannot accurately extract water bodies, especially in building areas and mountain areas, which are prone to shadow interference.

Method used

Using the multi-band water body index algorithm model, the original remote sensing images of different local objects are obtained for pre-processing, the reflectivity mean matrix and Euclidean distance of each local object category are calculated, and the band with a long distance is selected as the reference to construct the multi-band water body index algorithm. Model for extracting water bodies.

Benefits of technology

Effectively reduce the interference of building shadows, buildings, vegetation and other places on water extraction, avoid over-extraction of mixed cell areas of water and non-water bodies, and realize rapid water extraction without manual intervention, improve extraction speed and reduce Error caused by uncertain threshold.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117935071B_ABST
    Figure CN117935071B_ABST
Patent Text Reader

Abstract

The present application provides a model construction method, a water body extraction method and system, an electronic device and a medium. The method obtains the surface reflectance image corresponding to each feature category by preprocessing the original remote sensing image samples, and calculates the pixel reflectance matrix of different bands of each feature category; uses Euclidean distance to calculate the distance matrix of all feature categories in different bands, and selects the farthest band as the reference band; and constructs a multi-band water body index algorithm model based on the reference band. The present application can directly complete the extraction of water bodies, effectively reducing the interference of feature categories such as building shadows, buildings, and vegetation on water body extraction, avoiding the problem of over-extraction of water bodies in areas with mixed pixels of water bodies and non-water bodies, and meeting the demand for rapid extraction of water bodies in highly complex mixed feature remote sensing images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of remote sensing image feature extraction, and in particular relates to a model building method, a water body extraction method and system, an electronic device and a medium. Background Art

[0002] Water is the foundation of human survival and one of the important factors in maintaining ecological balance. Therefore, timely grasp of water conditions and comprehensive understanding of water body change characteristics are of great significance to ecological environmental protection and sustainable development of mankind. In recent years, with the launch of various types of satellites, remote sensing data has become increasingly abundant, providing effective support for the continuous dynamic monitoring of water bodies. my country has vast water resources, and the optical images of water resources vary in spectral characteristics, morphological characteristics, and texture characteristics. Based on the differences in the above characteristics of water bodies, different water extraction algorithms have been developed.

[0003] For example, the water extraction algorithm based on deep learning often relies on the number of water samples for its extraction accuracy. Due to the differences in spectral characteristics, morphological characteristics, and texture characteristics of water targets such as lakes, rivers, ditches, and ponds in different regions, the algorithm needs to focus on marking water bodies with different shape characteristics, texture characteristics, and spectral characteristics. Only when the sample size is sufficient can the extraction of water bodies in different images with different resolutions be completed.

[0004] For example, the water extraction method based on pixel features is easily affected by the shooting area of ​​remote sensing images and has high requirements on the composition of objects in the images. In building areas and mountain areas, the extraction results are easily disturbed by building shadows and mountain shadows. Summary of the invention

[0005] The purpose of the present application is to provide a model building method, a water body extraction method and system, an electronic device and a medium, which are used to solve the problem that the existing water body extraction method is greatly interfered by ground objects and cannot be accurately extracted.

[0006] In a first aspect, the present application provides a method for constructing a multi-band water index algorithm model, comprising:

[0007] Obtain original remote sensing images of different types of objects as samples;

[0008] Preprocessing the original remote sensing images of the different land object categories to obtain surface reflectance images corresponding to each land object category;

[0009] Based on the surface reflectance images corresponding to the various feature categories, the pixel reflectance matrices of different bands of various feature categories are obtained. Where i represents the i-th type of ground feature, m represents the m-th band, and n represents the n-th pixel of the surface reflectance image; p m,nIt represents the reflectance value of the nth pixel of the i-th type of ground object in the m-th band;

[0010] Based on the pixel reflectance matrix P of different bands of each feature category i , obtain the reflectivity mean matrix of each object category in the same band Based on the reflectivity mean matrix P of each object category in each band Mean Calculate the Euclidean distance between any two feature categories in the same band, and then obtain the distance matrix of all feature categories in different bands; Mean i,m It represents the mean pixel reflectance of the i-th type of ground object in the m-th band;

[0011] Based on the distance matrix, selecting a band with a long distance as a reference band;

[0012] The algorithm model for constructing a multi-band water index based on the reference band is:

[0013]

[0014] Among them, MMBWI is the multi-band water index, λ represents the wavelength, and ρ(λ) represents the reflectance value of the pixel in the surface reflectance image under the light band with wavelength λ;

[0015] It indicates the reflectance value of pixels in each surface reflectance image in the visible light band range between 630nm and 700nm;

[0016] It indicates the reflectance value of pixels in each surface reflectance image in the visible light band range between 760nm and 900nm;

[0017] It represents the reflectance value of pixels in each surface reflectance image in the visible light band range of 1560nm to 1800nm.

[0018] In an implementation of the first aspect, based on the pixel reflectance matrix P of different bands of each feature category i , obtain the reflectivity mean matrix P of each object category in the same band Mean , and based on the reflectance mean matrix P of each feature category in each band Mean One implementation step for calculating the Euclidean distance between any two object categories in the same band includes:

[0019] Take the row mean of the pixel reflectance matrix of different bands of each feature category to obtain the reflectance mean matrix of the i-th feature category in each band.

[0020] Based on the reflectance mean matrix P of each feature category in each band Mean , obtain the mean reflectivity vector of each object category in the same band;

[0021] According to the reflectivity mean vector of each feature category in the same band, the Euclidean distance between any two feature categories in the same band is calculated.

[0022] In an implementation of the first aspect, a step of preprocessing the original remote sensing images of different land object categories includes:

[0023] The original remote sensing images of the different types of objects are subjected to orthorectification, radiation correction and atmospheric correction.

[0024] In a second aspect, the present application provides a water extraction method, comprising:

[0025] Obtain original remote sensing images of the target area;

[0026] Preprocessing the original remote sensing image to obtain a surface reflectance image of the target area;

[0027] Obtaining a reflectivity feature vector of a target area based on the surface reflectivity image;

[0028] The reflectivity feature vector is processed using the multi-band water body index algorithm model constructed by the multi-band water body index algorithm model construction method described above to obtain the reflectivity feature vector of the water body in the target area, and then obtain the water body image.

[0029] In a third aspect, the present application provides a water extraction system, comprising:

[0030] An acquisition module is used to acquire the original remote sensing image of the target area;

[0031] A processing module, used for preprocessing the original remote sensing image to obtain a surface reflectance image of the target area, and obtaining a reflectance feature vector of the target area based on the surface reflectance image;

[0032] A multi-band water index algorithm model is constructed by the multi-band water index algorithm model construction method described above, and is used to process the reflectivity feature vector to obtain the reflectivity feature vector of the water body in the target area;

[0033] The processing module processes the reflectivity feature vector of the water body to obtain a water body image.

[0034] In a fourth aspect, the present application provides an electronic device, including: a processor and a memory;

[0035] The memory is used to store computer programs;

[0036] The processor is used to execute the computer program stored in the memory so that the electronic device executes any of the multi-band water body index algorithm model construction methods or water body extraction methods described above.

[0037] In a fifth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the multi-band water body index algorithm model construction methods or water body extraction methods described above.

[0038] As described above, the model building method, water extraction method and system, electronic device and medium described in this application have the following beneficial effects:

[0039] (1) It effectively reduces the interference of building shadows, buildings, vegetation and other objects on water extraction, and avoids the problem of over-extraction of water in mixed pixel areas of water and non-water bodies;

[0040] (2) Without manual intervention, water bodies can be directly extracted using the multi-band water index. Non-water areas will be automatically assigned null values, which effectively improves the extraction speed and avoids the errors caused by the uncertainty of thresholds in most water indexes, thus meeting the needs of rapid extraction of water bodies in highly complex mixed ground remote sensing images. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 Shown is a flow chart of a method for constructing a multi-band water index algorithm model in an embodiment of the present application.

[0042] Figure 2 Shown is a graph of the spectral reflectance characteristics of ground objects in one embodiment of the multi-band water index algorithm model construction method described in an embodiment of the present application.

[0043] Figure 3 Shown is a graph of the spectral reflectance characteristics of objects in a highly complex mixed object area in an embodiment of the multi-band water index algorithm model construction method described in an embodiment of the present application.

[0044] Figure 4 Shown is a flow chart of a water extraction method according to an embodiment of the present application.

[0045] Figure 5 Shown is a schematic structural diagram of a water extraction system in one embodiment of the present application.

[0046] Figure 6 Shown is a schematic diagram of the extraction results of water bodies in a large area based on Landsat images in one embodiment of the water body extraction method described in the embodiment of the present application.

[0047] Figure 7 Shown is a schematic diagram of the extraction results of water bodies in the urban core area in one embodiment of the water body extraction method described in an embodiment of the present application.

[0048] Figure 8 Shown is a schematic diagram of the extraction results of suburban area water bodies in one embodiment of the water body extraction method described in an embodiment of the present application.

[0049] Fig. 9 Shown is a schematic diagram of the extraction results of water bodies in other areas of the park in one embodiment of the water body extraction method described in an embodiment of the present application.

[0050] Fig.10 Shown is a schematic structural diagram of an electronic device described in an embodiment of the present application.

[0051] Component number description

[0052] 51 Get Module

[0053] 52 Processing Module

[0054] 53 Multi-band water index algorithm model

[0055] 101 Memory

[0056] 102 Processor DETAILED DESCRIPTION

[0057] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0058] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0059] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0060] The following embodiments of the present application provide a model construction method, a water body extraction method and system, an electronic device and a medium, which can solve the technical problem that the existing water body extraction method is greatly interfered by ground objects and cannot be accurately extracted. The technical scheme in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.

[0061] like Figure 1 As shown, this embodiment provides a method for constructing a multi-band water index algorithm model, including steps S11 to S16.

[0062] Step S11, obtaining original remote sensing images of different types of objects as samples.

[0063] In order to ensure the breadth and diversity of data samples and to apply them more comprehensively to various scenarios, a variety of different ground object categories can be selected.

[0064] In this embodiment, original remote sensing images of ten types of representative land features are selected as samples. Specifically, the ten types of land features include the Yangtze River water body, Qingcaosha Reservoir, extremely high suspended matter water body, river water body, lake water body, ocean water body, farmland, forest, urban buildings and bare land.

[0065] Step S12: pre-processing the original remote sensing images of the different land object categories to obtain the surface reflectance images corresponding to each land object category.

[0066] In one embodiment, a step of implementing preprocessing of the original remote sensing images of different types of land objects includes: performing orthorectification, radiation correction and atmospheric correction processing on the original remote sensing images of different types of land objects.

[0067] Orthorectification is to solve the problem of geometric deformation in images and ensure that the images can accurately reflect the geometric relationship of the actual ground. Different imaging methods, changes in external orientation elements, terrain undulations and other factors will cause the images to have inconsistent scales and changes in azimuth at different locations, affecting the spatial accuracy of the images and the accuracy of geographic information extraction. The purpose of orthorectification is to eliminate these geometric deformations so that the images can have consistent scales and orientation relationships and match the actual ground features.

[0068] Radiometric correction refers to the process of correcting the systematic and random radiation distortion or aberration caused by external factors, data acquisition and transmission systems, and eliminating or correcting the image distortion caused by radiation errors.

[0069] Atmospheric correction means that the total radiation brightness of the ground target finally measured by the sensor is not a reflection of the true reflectivity of the surface, and includes radiation errors caused by atmospheric absorption, especially scattering. Atmospheric correction is the process of eliminating these radiation errors caused by atmospheric influence and inverting the true surface reflectivity of the ground object.

[0070] In this implementation, by preprocessing the original remote sensing image, the pixel brightness value of the original remote sensing image can be converted into the surface reflectivity, so as to better reflect the spectral characteristics of the ground object.

[0071] Step S13: Based on the surface reflectance images corresponding to the various feature categories, obtain the pixel reflectance matrix P of different bands of the various feature categories. i .

[0072] Specifically, the pixel reflectance matrix P of the i-th type of ground object is i It can be expressed as the following formula (1):

[0073]

[0074] In formula (1), i represents the i-th type of ground feature, m represents the m-th band, and n represents the n-th pixel of the surface reflectance image; i, m, and n are all natural numbers greater than or equal to 1, and P m,n It represents the surface reflectance of the nth pixel of the i-th type of ground object in the m-th band.

[0075] Step S14: pixel reflectance matrix P of different bands based on the various object categories i , obtain the reflectivity mean matrix of each object category in the same band Based on the reflectivity mean matrix P of each object category in each band MeanCalculate the Euclidean distance between any two feature categories in the same band, and then obtain the distance matrix of all feature categories in different bands. i,m It represents the mean pixel reflectance of the i-th type of ground objects in the m-th band.

[0076] In one embodiment, based on the pixel reflectance matrix P of different bands of each feature category, i , obtain the reflectivity mean matrix P of each object category in the same band Mean , and based on the reflectance mean matrix P of each feature category in each band Mean One implementation step for calculating the Euclidean distance between any two object categories in the same band includes:

[0077] Step S141: Take the row mean of the pixel reflectance matrices of different bands of each feature category to obtain the reflectance mean matrix of the i-th feature in each band.

[0078] Specifically, Mean i,m It can be expressed as the following formula (2):

[0079]

[0080] In formula (2), the mth band of the i-th type of ground object has n pixels, and the surface reflectances of the n pixels are P m,1 , P m,2 ,……,P m,n By calculating P m,1 , P m,2 ,……,P m,n The mean of i,m .

[0081] Based on formula (2), the mean pixel reflectance of each band of the i-th type of ground object is calculated one by one to obtain the mean reflectance matrix P of the i-th type of ground object in each band i,Mean .P i,Mean It can be expressed as the following formula (3):

[0082]

[0083] Step S142: based on the reflectivity mean matrix P of each object category in each band Mean , obtain the mean reflectivity vector of each object category in the same band.

[0084] Specifically, based on formula (3), the mean reflectivity vector of each feature category in the same band is extracted according to the band. For example, the mean reflectivity vector of each feature category in the mth band can be expressed as:

[0085] Wm =(Mean 1,m , Mean 2,m , …, Mean i,m ) (Formula 4)

[0086] In the embodiment of the present application, the number of the reflectivity mean vectors corresponds to the number of bands. For example, Landsat data includes 7 bands, and the reflectivity mean vectors used for calculation in the present embodiment are 7.

[0087] Step S143: calculate the mean reflectivity vector P of each object category in the same band. Mean , calculate the Euclidean distance between any two ground object categories in the same band.

[0088] For the convenience of calculation, each reflectivity mean vector is placed in arrays x and y respectively, and the following formula (5) is obtained:

[0089]

[0090] Use the following formula (6) to calculate x p and p To assign a value:

[0091]

[0092] Where p,q=1,2,3,…,M, M is the number of bands of remote sensing images, x p and p The value of is the mean reflectivity vector of different ground object categories in the same band.

[0093] Use the following formula (7) to calculate x one by one p and p The Euclidean distance D between

[0094]

[0095] After obtaining the Euclidean distances of different bands, a distance matrix between different bands of all land feature categories is formed.

[0096] Step S15: Based on the distance matrix, select a band with a long distance as a reference band.

[0097] The process of determining the reference band will be described in detail below with reference to a specific embodiment.

[0098] In one embodiment, pure pixels of the Yangtze River water body, Qingcaosha Reservoir, extremely high suspended solids water body, river water body, lake water body, ocean water body, farmland, forest, urban building, bare land and other land object categories are selected respectively, and 100 characteristic land objects are selected for each land object category. According to step S11 to step S14, the reflectivity mean matrix of each land object category in each band is obtained, and the matrix is ​​shown in Table 1.

[0099] Table 1 Distribution of mean reflectivity of 10 types of objects in 7 bands

[0100]

[0101] According to the numerical distribution of the central wavelengths of different bands, it can be determined that Bands 1 to 4 are red bands, Band 5 is the near-infrared band, and Band 6 is the short-wave infrared band.

[0102] According to step S142, the reflectivity mean vector W is extracted from the matrix shown in Table 1. 1 To W 7 , where W 1 To W 7 They correspond to the 7 row vectors (excluding the central wavelength) of the rows where Band1 to Band7 are located.

[0103] According to step S143, the Euclidean distance between any two ground object categories in the same band is calculated, and the following Table 2 is obtained.

[0104] Table 2 Euclidean distance matrix between 7 reflectivity mean vectors

[0105]

[0106] From Table 2, we can find that the bands with longer distances for the 10 types of objects correspond to shortwave infrared bands Band 6 and Band 7, near infrared band Band 5, and red band Band 4. Since the two shortwave infrared bands are similar in band characteristics, in order to avoid redundancy, Band 6 with a longer Euclidean distance is often selected. Therefore, the shortwave infrared, near infrared, and red bands are selected as the reference bands.

[0107] Step S16: constructing a multi-band water index algorithm model based on the reference band:

[0108]

[0109] Among them, MMBWI is the multi-band water index, λ represents the wavelength, and ρ(λ) represents the reflectance value of the pixel in the surface reflectance image under the light band with wavelength λ; It indicates the reflectance value of pixels in each surface reflectance image in the visible light band range between 630nm and 700nm; It indicates the reflectance value of pixels in each surface reflectance image in the visible light band range between 760nm and 900nm; It represents the reflectance value of pixels in each surface reflectance image in the visible light band range of 1560nm to 1800nm.

[0110] like Figure 2 As shown in the figure, in the blue band and red band with central wavelengths of 450nm and 650nm, chlorophyll absorbs a large amount of incident electromagnetic wave energy, resulting in a reflection peak between the two bands; in the near-infrared band, due to the influence of the internal structure of vegetation leaves, the reflectivity of green and healthy vegetation will rise sharply, which is the "red edge effect". The optical reflectivity of soil is affected by the composition of soil. The main imaging factors include soil mineral content, soil water content, soil texture, and soil organic matter content. Therefore, the overall soil spectrum shows the characteristics of spectral reflectivity gradually rising and then falling. Pure water bodies mainly show absorption in the band range of 400nm-2500nm, and its absorption is significantly greater than other types of land objects in nature, such as vegetation, soil and buildings. However, water bodies in natural contact are often not pure. There are various inorganic and organic substances in the water. These substances are suspended in the water and will scatter and absorb part of the incident energy, resulting in significant changes in the transmitted radiation energy passing through the water body.

[0111] like Figure 3 As shown in the figure, the visible light band range of 630-700nm is extremely sensitive to suspended sediment in the water. The reflectivity of water with high suspended matter is much higher than that of pure water. In the image, the higher the suspended matter, the greater the reflectivity of the water. The higher the suspended matter in the water, the closer the image characteristics in this band are to the types of objects such as buildings and bare land. The spectral characteristics of water bodies in 760-900nm show increased absorption and reduced reflection, that is, the reflectivity gradually decreases, but vegetation in this band will rise sharply due to the red edge effect. At 1560-1800nm, pure water should appear as a black body, that is, the reflectivity is almost close to 0, but due to the different substances contained in the water, the reflectivity will be higher than 0; the characteristic in the image is that the reflectivity of water bodies is much lower than other types of objects.

[0112] In this implementation, based on the characteristic values ​​of different bands in the image, the near-infrared band and the short-wave infrared band are mainly used, supplemented by the red band, to construct a mixed multi-band water index model (Mixed MultiBand Water Index, MMBWI) as shown in formula (9).

[0113] This algorithm supports calculations in any band between 630nm-700nm for red band, 760nm-900nm for near infrared band, and 1560nm-1800nm ​​for short-wave infrared band. In actual calculation, it is only necessary to call formula (8) to perform the calculation. Formula (1) to formula (7) are the algorithm model construction process, which does not need to be paid attention to in actual use. The advantage of MMBWI is that it does not require manual intervention. After calling the execution algorithm, the water area in the remote sensing image can be obtained, and the non-water area will be automatically assigned a null value, which effectively improves the extraction speed.

[0114] The present application can realize the rapid extraction of water bodies, which can not only reduce the interference of building shadows, constructions, vegetation and other land objects on water body extraction, but also avoid the over-extraction of water bodies in areas with mixed water and non-water body pixels.

[0115] It should be noted that the protection scope of the multi-band water index algorithm model construction method described in the embodiment of the present application is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.

[0116] like Figure 4 As shown, this embodiment provides a water extraction method, including steps S21 to S24.

[0117] Step S21: Acquire the original remote sensing image of the target area.

[0118] In one embodiment, in order to obtain the original remote sensing image of the target area, the available data sources include Landsat data, Sentinel data and MODIS data.

[0119] The original remote sensing image for water body extraction in this application needs to have a red band, a near-infrared band, and a short-wave infrared band, wherein the band range of the red band is between 630nm and 700nm; the band range of the near-infrared band is between 760nm and 900nm; the band range of the short-wave infrared band is between 1560nm and 1800nm.

[0120] It should be noted that this application supports all remote sensing images within the corresponding bands of the above-mentioned red band, near infrared band and short-wave infrared band. By combining the red band, near infrared band and short-wave infrared band, water body extraction from highly complex mixed ground remote sensing images can be achieved.

[0121] Step S22: pre-process the original remote sensing image to obtain a surface reflectance image of the target area.

[0122] In one embodiment, after the original remote sensing image of the target area is acquired, the original remote sensing data needs to be preprocessed. One implementation step of preprocessing the original remote sensing image includes: performing orthorectification, radiation correction and atmospheric correction on the original remote sensing image.

[0123] In this implementation, by preprocessing the original remote sensing image, the pixel brightness value of the original remote sensing image can be converted into the surface reflectivity, so as to better reflect the spectral characteristics of the ground object.

[0124] Step S23: obtaining a reflectivity feature vector of the target area based on the surface reflectivity image.

[0125] In this embodiment, the DN value (Digital Number, remote sensing image pixel brightness value) of each pixel in the surface reflectance image is the gray value of the recorded object, that is, the surface reflectance of each band. The reflectance feature vector of the target area is the vector composed of the pixel values ​​of each pixel in the target area.

[0126] Step S24, using the multi-band water body index algorithm model constructed by the multi-band water body index algorithm model construction method described above to process the reflectivity feature vector, obtain the reflectivity feature vector of the water body in the target area, and then obtain the water body image.

[0127] The multi-band water index algorithm model constructed in this application is:

[0128]

[0129] Among them, MMBWI is the multi-band water index, λ represents the wavelength, and ρ(λ) represents the reflectance value of the pixel in the surface reflectance image under the light band with wavelength λ; It indicates the reflectance value of pixels in each surface reflectance image in the visible light band range between 630nm and 700nm; It indicates the reflectance value of pixels in each surface reflectance image in the visible light band range between 760nm and 900nm; It represents the reflectance value of pixels in each surface reflectance image in the visible light band range of 1560nm to 1800nm.

[0130] In this implementation, there is no need for manual intervention or threshold calculation. Water body extraction can be completed directly by calling and executing MMBWI. Non-water areas will be automatically assigned null values, which effectively improves the extraction speed and avoids errors in most water body indices caused by uncertain thresholds.

[0131] It should be noted that the protection scope of the water extraction method described in the embodiment of the present application is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.

[0132] like Figure 5 As shown, this embodiment provides a water extraction system, comprising:

[0133] The acquisition module 51 is used to acquire the original remote sensing image of the target area.

[0134] The processing module 52 is used to pre-process the original remote sensing image to obtain a surface reflectance image of the target area, and obtain a reflectance feature vector of the target area based on the surface reflectance image.

[0135] The multi-band water index algorithm model 53 is constructed by any of the multi-band water index algorithm model construction methods described above, and is used to process the reflectivity feature vector to obtain the reflectivity feature vector of the water body in the target area.

[0136] The processing module 52 processes the reflectivity feature vector of the water body to obtain a water body image.

[0137] The water extraction system provided in the embodiment of the present application can implement the water extraction method described in the present application, but the implementation device of the water extraction method described in the present application includes but is not limited to the structure of the water extraction system listed in the present embodiment. All structural deformations and replacements of the prior art made according to the principles of the present application are included in the protection scope of the present application.

[0138] It should be noted that the structures and principles of the acquisition module 51 and the processing module 52 correspond one-to-one to the steps in the above-mentioned water body extraction method, so they are not repeated here.

[0139] Furthermore, the water body extraction result of the multi-band water body index algorithm model can be verified.

[0140] Specifically, verifying the water body extraction result of the multi-band water body index algorithm model includes steps S61 to S63.

[0141] Step S61, using the mature spectral index NDWI and MNDWI to extract water from the original remote sensing image of the same target area. The calculation formulas of NDWI and MNDWI are as follows:

[0142]

[0143]

[0144] In formula (9) Indicates the reflectivity of the green band in the visible light band range between 520nm-600nm. Indicates the reflectivity of the near-red band in the visible light band range of 760nm-900nm. Indicates the reflectivity of the red band in the visible light band range between 1560nm-1800nm.

[0145] Step S62: Compare the water body extraction images of MMBWI, NDWI, and MNDWI.

[0146] Figure 6 It is the extraction result of water bodies in a large area based on Landsat images, where ① is the original grayscale remote sensing image, ② is the NDWI extraction result, ③ is the MNDWI extraction result, and ④ is the MMBWI extraction result. It can be seen from the figure that in the MNDWI extraction result in ③, there is obvious over-extraction, and some bare land is misjudged as water bodies.

[0147] To further verify the extraction effect, a 0.5m long-light high-resolution image was selected to extract all rivers with a width greater than or equal to 30m in the image. The reason for selecting rivers with a width of 30m and above is that the resolution of Landsat images is 30m. If the river width is less than 30m, it will appear as mixed pixels in the Landsat image. Using a 0.5m high-resolution remote sensing image, three areas were selected for verification, namely the core urban area, remote suburbs, and park areas.

[0148] Figure 7 It is the core urban area. The buildings in the urban area are of different shapes. The shadows of the buildings will interfere with the water extraction results. Therefore, this area is selected for verification. Figure 7 Among them, ① is a 0.5m long-light high-resolution image, ② is a 30m Landsat image, ③ is a long-light visual interpretation of a river with a width of more than 30m, ④ is the MMBWI extraction result, ⑤ is the NDWI extraction result, and ⑥ is the MNDWI extraction result. In the core urban area, MNDWI misjudges white buildings as water bodies, and NDWI misjudges building shadows as water bodies. ④ and ③ are the most similar.

[0149] Figure 8 It is a suburban area with many factories and various residential buildings. Farmland and land also coexist in this area. Verification in this area can illustrate the results of water extraction under complex suburban landforms. Figure 8 Among them, ① is the 0.5m long-light high-resolution image, ② is the 30m Landsat image, ③ is the long-light visual interpretation of rivers with a width of more than 30m, ④ is the MMBWI extraction result, ⑤ is the NDWI extraction result, and ⑥ is the MNDWI extraction result. Figure 7In the example, NDWI misidentifies a large factory with a white roof as a water body, and MNDWI has an obvious over-extraction problem in the main river below. MMBWI has the best effect in pixel extraction and has a good effect in suppressing the over-extraction problem of NDWI and MNDWI.

[0150] Fig. 9 The rest of the park contains a large number of irregularly shaped lakes, as well as large areas of forest, bare land, buildings, and roads, with complex landforms. Fig. 9 In the data, MNDWI misclassified large areas of forest as water bodies, and the extraction results of MMBWI and NDWI were relatively similar.

[0151] Step S63: quantitatively verify the extraction results of MMBWI, NDWI, and MNDWI.

[0152] Specifically, indicators such as the kappa coefficient and total accuracy were used to quantitatively verify the three algorithms.

[0153] In the process of accuracy verification, the manual vector extraction results of conventional high-resolution images with a resolution of 0.5 m were selected as reference images, and MMBWI, NDWI, and MNDWI with a resolution of 30 m were selected as images to be verified. The Kappa coefficient and total accuracy were used to quantitatively evaluate the water body extraction effect.

[0154] Based on the long-range visual interpretation of rivers with a width of more than 30m (referred to as high-resolution visual interpretation), MMBWI extraction results, NDWI extraction results, and MNDWI extraction results, the reference image and the image to be verified are overlapped and matched, and the matching types are shown in Table 3. The matching results are divided into two types: "matching success" and "matching failure". "Matching success" includes "TP (True positive)" and "TN (True negative)". "TP" indicates the number of pixels in the reference image and the image to be verified that are both water bodies; "TN" indicates the number of pixels in the reference image and the image to be verified that are not water bodies. "Matching failure" includes "FP (False positive)" and "FN (False negative)". "FP" indicates the number of pixels in the reference image and the image to be verified that are both water bodies; "FN" indicates the number of pixels in the reference image and the image to be verified that are not water bodies.

[0155] Table 3 Matching Types

[0156]

[0157] The total accuracy is the percentage of "successfully matched" pixels in the reference image and the image to be verified to the total pixels. The calculation formula is shown in formula (10):

[0158]

[0159] The Kappa coefficient is a comprehensive evaluation index that combines producer accuracy and user accuracy. The calculation method of the Kappa coefficient is as shown in formula (11):

[0160]

[0161] where p o and p c The calculation method of is as follows:

[0162]

[0163] In formula (12), n represents the total number of pixels in the image, a 0 Indicates the number of non-water pixels in the reference image, a 1 Indicates the number of water pixels, b 0 Indicates the number of non-water pixels in the image to be verified, b 1 Indicates the number of water pixels in the image to be verified. The calculation results of the Kappa coefficient can be divided into five groups, and different groups indicate different consistency between the reference image and the image to be verified:

[0164] When 0≤Kappa≤0.2, the consistency between the reference image and the image to be verified is extremely low;

[0165] When 0.21≤Kappa≤0.4, the consistency between the reference image and the image to be verified is average;

[0166] When 0.41≤Kappa≤0.6, there is moderate consistency between the reference image and the image to be verified;

[0167] When 0.61≤Kappa≤0.8, there is a high degree of consistency between the reference image and the image to be verified;

[0168] When 0.81≤Kappa≤1, the reference image is almost completely consistent with the image to be verified.

[0169] The number of water body pixels and non-water body pixels in the high-resolution visual interpretation, MMDWI, NDWI, and MNDWI images were counted respectively, and the results are shown in Table 4.

[0170] Table 4 Number of water and non-water pixels

[0171]

[0172] Based on Table 3, the MDWI, NDWI, and MNDWI images are matched with the high-resolution visual interpretation results respectively. The matching results are shown in Table 5.

[0173] Table 5 Matching results

[0174]

[0175] Based on the results in Table 4 and Table 5, the total accuracy and kappa coefficient were calculated using formula (10), formula (11), and formula (12), respectively. The results are shown in Table 6. Table 6 shows that the total accuracy and kappa coefficient of MMBWI are better than those of NDWI and MNDWI. The Kappa coefficient reached 0.648, indicating a high degree of consistency between the reference image and the image to be verified. The total accuracy reached 0.987, and the extraction effect was relatively good.

[0176] Table 6 Accuracy verification results

[0177]

[0178]

[0179] In this implementation, it can be determined that MMBWI has a good advantage in water body extraction. It can achieve one-click extraction of water bodies without the need for threshold selection. At the same time, it can complete high-precision extraction of water bodies in highly complex terrain environments.

[0180] like Fig.10 As shown, this embodiment provides an electronic device, including: a memory 101 and a processor 102.

[0181] The memory 101 is used to store computer programs.

[0182] The processor 102 is configured to execute the computer program stored in the memory so that the electronic device executes any one of the above methods.

[0183] In the several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules or units, which can be electrical, mechanical or other forms.

[0184] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0185] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0186] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by the processor, the method described in any of the above items is implemented. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing the processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer 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 digital video disc (digital videodisc, DVD)), or a semiconductor medium (e.g., a solid-state hard disk (solid state disk, SSD)), etc.

[0187] The present application embodiment may also provide a computer program product, the computer program product including one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part. The computer instructions may 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 may be transmitted from a website site, computer or 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 or data center.

[0188] When the computer program product is executed by a computer, the computer executes the method described in the above method embodiment. The computer program product may be a software installation package, and when the above method is required, the computer program product may be downloaded and executed on a computer.

[0189] In summary, the model construction method, water body extraction method and system, electronic equipment and medium of the present application can effectively reduce the interference of building shadows, buildings, vegetation and other ground objects on water body extraction, and avoid the problem of over-extraction of water bodies in areas with mixed pixels of water bodies and non-water bodies; without human intervention, the water body extraction can be directly completed using the multi-band water body index, and the non-water area will be automatically assigned a null value, which effectively improves the extraction speed and avoids the errors caused by uncertain thresholds of most water body indices, meeting the needs of rapid extraction of water bodies in remote sensing images of highly complex mixed ground objects.

[0190] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0191] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A method for constructing a multi-band water index algorithm model, characterized in that: include: Obtain original remote sensing images of different types of objects as samples; Preprocessing the original remote sensing images of the different land object categories to obtain surface reflectance images corresponding to each land object category; Based on the surface reflectance images corresponding to the various feature categories, the pixel reflectance matrices of different bands of various feature categories are obtained. Where i represents the i-th type of ground feature, m represents the m-th band, and n represents the n-th pixel of the surface reflectance image; p m,n It represents the reflectance value of the nth pixel of the i-th type of ground object in the m-th band; Based on the pixel reflectance matrix P of different bands of each feature category i , obtain the reflectivity mean matrix of each object category in the same band Based on the reflectivity mean matrix P of each object category in each band Mean Calculate the Euclidean distance between any two feature categories in the same band to obtain the distance matrix of all feature categories in different bands; Mean i,m It represents the mean pixel reflectance of the i-th type of ground object in the m-th band; Based on the distance matrix, selecting a band with a long distance as a reference band; The algorithm model for constructing a multi-band water index based on the reference band is: Among them, MMBWI is the multi-band water index, λ represents the wavelength, and ρ(λ) represents the reflectance value of the pixel in the surface reflectance image under the light band with wavelength λ; It indicates the reflectance value of pixels in each surface reflectance image in the visible light band range of 630nm to 700nm; It indicates the reflectance value of pixels in each surface reflectance image in the visible light band range between 760nm and 900nm; It indicates the reflectance value of pixels in each surface reflectance image in the visible light band range of 1560nm to 1800nm; Based on the pixel reflectance matrix P of different bands of each feature category i , obtain the reflectivity mean matrix P of each object category in the same band Mean , and based on the reflectance mean matrix P of each feature category in each band Mean One implementation step for calculating the Euclidean distance between any two object categories in the same band includes: Take the row mean of the pixel reflectance matrix of different bands of each feature category to obtain the reflectance mean matrix of the i-th feature category in each band. Based on the reflectance mean matrix P of each feature category in each band Mean , obtain the mean reflectivity vector of each object category in the same band; According to the reflectivity mean vector of each feature category in the same band, the Euclidean distance between any two feature categories in the same band is calculated.

2. The method for constructing a multi-band water index algorithm model according to claim 1, characterized in that: One implementation step of preprocessing the original remote sensing images of different types of objects includes: The original remote sensing images of the different types of objects are subjected to orthorectification, radiation correction and atmospheric correction.

3. A water extraction method, characterized in that: include: Obtain original remote sensing images of the target area; Preprocessing the original remote sensing image to obtain a surface reflectance image of the target area; Obtaining a reflectivity feature vector of a target area based on the surface reflectivity image; The reflectivity feature vector is processed using the multi-band water body index algorithm model constructed by the method described in any one of claims 1 to 2 to obtain the reflectivity feature vector of the water body in the target area, and then obtain the water body image.

4. A water extraction system, characterized in that: include: An acquisition module is used to acquire the original remote sensing image of the target area; A processing module, used for preprocessing the original remote sensing image to obtain a surface reflectance image of the target area, and obtaining a reflectance feature vector of the target area based on the surface reflectance image; A multi-band water index algorithm model, constructed by the method according to any one of claims 1 to 2, for processing the reflectivity feature vector to obtain a reflectivity feature vector of the water body in the target area; The processing module processes the reflectivity feature vector of the water body to obtain a water body image.

5. An electronic device, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory so as to enable the electronic device to perform the method according to any one of claims 1 to 3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.