Water body extraction method and device for remote sensing image, and electronic equipment

By extracting LBP texture features and grayscale features from remote sensing images, and combining water body pre-extraction model and MRF optimization model, the problem of difficult extraction of complex water body boundaries and fine water bodies in high-resolution remote sensing images is solved, and a high accuracy and robust water body extraction effect is achieved.

CN119810685AActive Publication Date: 2025-04-11NORTHWEST ENGINEERING CORPORATION LIMITED

Patent Information

Application Number
CN202510302417.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-04-11
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

When processing high-resolution remote sensing images, it is difficult to effectively extract complex water boundaries and small water bodies, resulting in poor accuracy and robustness of water extraction results and low boundary clarity.

Method used

The local binary mode LBP texture feature and grayscale feature extraction are adopted, combined with the pre-trained water body pre-extraction model and the water body extraction optimization model of Markov random field MRF, and the target energy function is iteratively optimized, and the pixel classification label is updated until the convergence conditions are met, and the water body extraction image is obtained.

Benefits of technology

Effectively extracting complex water boundaries and small water bodies in remote sensing images improves the accuracy and robustness of water body extraction results, ensures the clarity of water boundaries, and maintains high stability under environmental interference such as light changes and cloud occlusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810685A_ABST
    Figure CN119810685A_ABST
Patent Text Reader

Abstract

The invention provides a water body extraction method and device for a remote sensing image and electronic equipment, and relates to the technical field of remote sensing image data processing. The method comprises the following steps: performing LBP texture feature and gray feature extraction on a collected remote sensing image to obtain a pixel texture feature vector; inputting the remote sensing image into a water body pre-extraction model to obtain a preliminary water body extraction result, and constructing a water body extraction optimization model based on LBP-MRF according to the preliminary water body extraction result and the pixel texture feature vector; performing iterative optimization on a target energy function of the water body extraction optimization model, and updating a pixel classification label in the initial water body extraction result until the change of the target energy function meets a preset convergence condition; and determining a water body extraction image according to the updated initial water body extraction result. According to the technical scheme provided by the embodiment of the invention, information extraction of small water bodies and water bodies with complex edges in the remote sensing image can be better realized, and the accuracy and robustness of a water body extraction result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the field of remote sensing image analysis, the extraction of water body information is an important direction of research and application. As a key element for the sustainable development of the economy and society, the rapid and accurate acquisition of the spatial distribution and dynamic changes of water resources is of great significance to water ecological protection and water environment monitoring. With the continuous advancement of remote sensing technology, high-resolution and multispectral remote sensing data have been widely used in water body information extraction.

[0003] At present, the application of machine learning and deep learning technology in remote sensing image analysis has achieved rapid development. However, machine learning and deep learning technology are highly dependent on feature expression. The feature extraction of existing models is mostly limited to a single scale or a single feature dimension, and it is difficult to fully utilize the spatial and texture features in the image at the same time. In addition, when processing complex water body boundaries in high-resolution images, the downsampling process of traditional deep learning models may lead to the loss of spatial features, and it is impossible to effectively extract complex water body boundaries and small water bodies in remote sensing images, resulting in poor accuracy and robustness of water body extraction results, and poor boundary clarity.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the embodiments of the present disclosure is to provide a water body extraction method for remote sensing images, a water body extraction device for remote sensing images, an electronic device and a computer-readable storage medium, which can effectively extract complex water body boundaries and small water bodies in remote sensing images, improve the accuracy and robustness of water body extraction results, and ensure the clarity of the extracted water body boundaries.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to a first aspect of an embodiment of the present disclosure, a method for extracting water from a remote sensing image is provided, comprising: acquiring a collected remote sensing image, and performing local binary pattern (LBP) texture feature and grayscale feature extraction on the remote sensing image to obtain a pixel texture feature vector; inputting the remote sensing image into a pre-trained water pre-extraction model to obtain a preliminary water extraction result; constructing a water extraction optimization model based on a Markov random field (MRF) based on the pixel texture feature vector and the preliminary water extraction result; iteratively optimizing a target energy function of the water extraction optimization model, and updating pixel classification labels in the preliminary water extraction result until a change in the target energy function satisfies a preset convergence condition; and determining a water extraction image based on the updated preliminary water extraction result, the water extraction image comprising a water area and a non-water area in the remote sensing image.

[0008] In some example embodiments of the present disclosure, based on the aforementioned scheme, the water body extraction optimization model based on Markov random field MRF is constructed based on the pixel texture feature vector and the preliminary water body extraction result, including: constructing a domain energy function according to the pixel texture feature vector and the preliminary water body extraction result; constructing an image feature field energy function according to the preliminary water body extraction result and the pixel texture feature vector; and constructing a water body extraction optimization model corresponding to the remote sensing image based on a target energy function composed of the domain energy function and the image feature field energy function.

[0009] In some example embodiments of the present disclosure, based on the aforementioned scheme, constructing a domain energy function according to the pixel texture feature vector and the preliminary water body extraction result includes: determining a penalty factor according to a local image texture feature vector in the pixel texture feature vector; constructing a domain energy function through the classification result of each pixel point in the preliminary water body extraction result and the penalty factor; the penalty factor is constructed by the following relationship: ; ; in, represents the penalty factor obtained based on the feature local entropy method; Represents the pixel point in the remote sensing image Domain system; Represents pixel Neighborhood system middle percentage, Represents pixel In the domain system, the pixel The pixel texture feature vector is the same as the pixel point The percentage of Indicates an adjustable preset constant used to control scope; Indicates a preset constant, used to avoid the denominator being 0; Expressed as a natural constant An exponential function with base ; The domain energy function is constructed by the following relationship: ; ; ; in, represents the field energy function, Represents the pixel point in the preliminary water extraction result The classification results, Represents the pixel point in the preliminary water extraction result The classification results, represents the potential function, represents the potential energy weight of the potential function, Represents the Kronecker function, which is used to represent the consistency of the classification results of pixels in the neighborhood system. If The value is 1, otherwise it is 0.

[0010] In some example embodiments of the present disclosure, based on the aforementioned scheme, constructing an image feature field energy function according to the preliminary water body extraction result and the pixel texture feature vector includes: determining the statistical data of the classification result of each pixel point according to the preliminary water body extraction result; constructing an image feature field energy function through the pixel texture feature vector and the statistical data; the statistical data includes the mean and variance of each pixel point belonging to different classification categories, and the mean and the variance are constructed by the following relationship: ; ; in, It represents the mean value of each pixel in the preliminary water body extraction result belonging to different classification categories, Indicates the variance of each pixel point in the preliminary water body extraction result belonging to different classification categories, Indicates the two classification categories of water body area and non-water body area marked in the preliminary water body extraction result, =1,2, Indicates that the classification category in the preliminary water extraction result belongs to The total number of pixels, Represents the pixel point in the remote sensing image The pixel texture feature vector of Represents the pixel point in the preliminary water extraction result The classification results; The image feature field energy function is constructed by the following relationship: ; in, represents the image feature field energy function corresponding to the remote sensing image, Represents a set of all pixels in the remote sensing image.

[0011] In some example embodiments of the present disclosure, based on the aforementioned scheme, the target energy function of the water body extraction optimization model is iteratively optimized, and the pixel classification labels in the preliminary water body extraction result are updated until the change of the target energy function meets the preset convergence condition, including: determining the first energy value corresponding to the target energy function according to the latest pixel classification label at the current moment; updating the pixel classification label in the preliminary water body extraction result, and determining the second energy value corresponding to the target energy function through the updated pixel classification label; determining the energy change value of the target energy function through the first energy value and the second energy value; if the energy change value is greater than or equal to a preset energy change threshold, the above steps are executed repeatedly until the energy change value is less than the energy change threshold, and the latest pixel classification label is used as the updated preliminary water body extraction result; The objective energy function of the water extraction optimization model is expressed by the following relationship: ; in, represents the target energy function, represents the domain energy function corresponding to the remote sensing image, Representing the image feature field energy function corresponding to the remote sensing image; The iterative optimization process of the target energy function is expressed by the following relationship: ; ; in, represents the latest updated pixel classification label, represents the number of iterative optimizations of the target energy function, Indicates the latest updated pixel classification label The second energy value corresponding to the lower target energy function, represents the first energy value corresponding to the target energy function under the pixel classification label before updating, Represents the energy change value of the target energy function. If , then continue to perform the above iterative optimization process until , indicating that the target energy function tends to be stable, and the above iterative optimization process is terminated. Indicates the preset energy change threshold.

[0012] In some example embodiments of the present disclosure, based on the aforementioned scheme, the local binary pattern LBP texture feature and grayscale feature extraction of the remote sensing image to obtain a pixel texture feature vector includes: performing grayscale feature extraction on the remote sensing image to obtain a grayscale feature vector of each pixel; performing local image texture extraction on the remote sensing image to obtain a local image texture feature vector of each pixel; and fusing the grayscale feature vector of each pixel with the local image texture feature vector to obtain the pixel texture feature vector.

[0013] In some example embodiments of the present disclosure, based on the aforementioned scheme, the local image texture extraction of the remote sensing image to obtain the local image texture feature vector of each pixel includes: taking any pixel point in the remote sensing image as the central pixel point, and comparing the grayscale values ​​of the central pixel point with other adjacent pixels in a preset window to determine the local binary result of each central pixel point; determining the local texture statistical histogram of the local binary result of each pixel point, and using the local texture statistical histogram as the local image texture feature vector; the local binary result is calculated by the following relationship: ; ; in represents the local binary result of the central pixel, represents the coordinates of the central pixel point, Indicates the first pixel in the preset window except the central pixel. adjacent pixel points, the preset window is a 3×3 window, =1,2,…,8, Indicates The grayscale values ​​of adjacent pixels are represents the gray value of the central pixel, Represents a comparison function.

[0014] In some example embodiments of the present disclosure, based on the aforementioned scheme, before the remote sensing image is input into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result, the method further includes: obtaining a pre-constructed sample remote sensing image, and pre-processing the sample remote sensing image to obtain a pre-processed sample remote sensing image, wherein the pre-processing includes at least one of radiation calibration, atmospheric correction, orthorectification and band combination; determining a water body extraction label map corresponding to the sample remote sensing image, and constructing a sample training data set and a sample verification data set based on the sample remote sensing image and the water body extraction label map; performing model training and verification on the pre-constructed water body pre-extraction model through the sample training data set and the sample verification data set to obtain a trained water body pre-extraction model.

[0015] According to a second aspect of an embodiment of the present disclosure, a water body extraction device for remote sensing images is provided, comprising: a pixel texture extraction module, used to obtain a collected remote sensing image, and perform local binary pattern (LBP) texture feature and grayscale feature extraction on the remote sensing image to obtain a pixel texture feature vector; a preliminary classification result acquisition module, used to input the remote sensing image into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result; a water body extraction optimization model construction module, used to construct a water body extraction optimization model based on Markov random field (MRF) based on the pixel texture feature vector and the preliminary water body extraction result; a classification result optimization module, used to iteratively optimize the target energy function of the water body extraction optimization model, and update the pixel classification labels in the preliminary water body extraction result until the change of the target energy function meets the preset convergence condition; an update result output module, used to determine a water body extraction image according to the updated preliminary water body extraction result, wherein the water body extraction image includes the water body area and the non-water body area in the remote sensing image.

[0016] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method for extracting water from remote sensing images in the first aspect is implemented.

[0017] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for extracting water from remote sensing images in the first aspect is implemented.

[0018] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects: The water body extraction method of the remote sensing image in the example embodiment of the present disclosure performs local binary pattern (LBP) texture feature and grayscale feature extraction on the collected remote sensing image to obtain a pixel texture feature vector; inputs the remote sensing image into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result; constructs a water body extraction optimization model based on Markov random field (MRF) based on the pixel texture feature vector and the preliminary water body extraction result; iteratively optimizes the target energy function of the water body extraction optimization model, and updates the pixel classification labels in the preliminary water body extraction result until the change in the target energy function meets the preset convergence condition; and determines the water body extraction image according to the updated preliminary water body extraction result. On the one hand, the water body extraction optimization model constructed by the extracted pixel texture feature vector and the preliminary water body extraction result output by the water body pre-extraction model can combine the pixel texture feature vector to perform local and global consistency optimization on the basis of the preliminary water body extraction result. At the same time, through the iterative optimization of the target energy function, it can ensure the global optimal classification label allocation, avoid classification errors or inconsistencies caused by local extreme value problems, thereby effectively extracting complex water body boundaries and small water bodies in remote sensing images, and improve the accuracy and robustness of water body extraction results; on the other hand, compared with the prior art of directly inputting remote sensing images into the deep learning model to obtain water body extraction results , the pixel texture feature vector is also considered in constructing the water body extraction optimization model, which effectively captures the detailed information of local and global areas in the image, especially the difference in texture between the water body and the background area, so that the distinction between the water body and the non-water body area in the image is more accurate, especially in the case of overlapping spectral features or complex backgrounds of remote sensing images, which can effectively extract the complex water body boundaries and small water bodies in the remote sensing images, and improve the accuracy and stability of the water body extraction results. The extraction of pixel texture feature vectors enables the water body extraction results to maintain high robustness under environmental interference such as lighting changes and cloud occlusion, and combined with the preliminary water body extraction results, it can effectively ensure the clarity of the water body boundary.

[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0021] Figure 1 A schematic diagram of a system architecture of an exemplary application environment of a method and device for extracting water from a remote sensing image in accordance with an embodiment of the present disclosure is shown.

[0022] Figure 2 A flowchart of a method for extracting water from a remote sensing image according to some embodiments of the present disclosure is schematically shown.

[0023] Figure 3 The following is a schematic diagram of a process for extracting a pixel texture feature vector corresponding to a remote sensing image according to some embodiments of the present disclosure.

[0024] Figure 4 A schematic diagram schematically illustrates the calculation principle of extracting a local image texture feature vector corresponding to a remote sensing image according to some embodiments of the present disclosure.

[0025] Figure 5 A flowchart schematically illustrates a pre-training process of a water body pre-extraction model according to some embodiments of the present disclosure.

[0026] Figure 6 The schematic diagram of water body extraction results extracted under different water body extraction optimization algorithms according to some embodiments of the present disclosure is schematically shown. Among them, 601 is a remote sensing image, 602 is a water body extraction label image, 603 is a preliminary water body extraction result map obtained by extracting based on a water body pre-extraction model, 604 is a water body extraction result map obtained based on a traditional Markov random field model (MRF), 605 is a water body extraction result map obtained based on a binary image intersection optimization method, 606 is a water body extraction result map obtained by an iterative optimization water body extraction method based on Fisher transform and Markov random field (Fisher-MRF), 607 is a water body extraction result map obtained by a water body optimization method based on an improved conditional random field (ICRF), 608 is a water body extraction result map obtained by a water body extraction method combining residual U-Net and conditional random field (UNet-CRF), and 609 is a water body extraction result map obtained by using a water body extraction optimization model based on LBP-MRF in an embodiment of the present disclosure.

[0027] Figure 7 The flowchart of iterative optimization of the water body extraction optimization model according to some embodiments of the present disclosure is schematically shown.

[0028] Figure 8 A schematic diagram of a process for implementing water body extraction from remote sensing images according to some embodiments of the present disclosure is schematically shown.

[0029] Fig. 9 A schematic diagram of a water extraction device for remote sensing images according to some embodiments of the present disclosure is schematically shown.

[0030] Fig.10 A schematic diagram of the structure of a computer system of an electronic device according to some embodiments of the present disclosure is schematically shown.

[0031] Fig.11 A schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure is schematically shown.

[0032] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0033] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.

[0034] Furthermore, the drawings are only schematic illustrations and are not necessarily drawn to scale. The block diagrams shown in the drawings are only functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0035] Figure 1 A schematic diagram of a system architecture of an exemplary application environment of a method and device for extracting water from a remote sensing image in accordance with an embodiment of the present disclosure is shown.

[0036] like Figure 1 As shown, the system architecture 100 may include one or more of terminal device 1 101, terminal device 2 102, terminal device 3 103, network 104 and server 105. Network 104 is used to provide a medium for communication links between terminal device 1 101, terminal device 2 102, terminal device 3 103 and server 105. Network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. Terminal device 1 101, terminal device 2 102, terminal device 3 103 may be various electronic devices with artificial intelligence (AI) computing capabilities, including but not limited to desktop computers, portable computers, smart phones and tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.

[0037] The water body extraction method of the remote sensing image provided in the embodiment of the present disclosure is generally executed by the terminal device 1 101, the terminal device 2 102, and the terminal device 3 103, and accordingly, the water body extraction device of the remote sensing image is generally set in the terminal device 1 101, the terminal device 2 102, and the terminal device 3 103. However, it is easy for those skilled in the art to understand that the water body extraction method of the remote sensing image provided in the embodiment of the present disclosure can also be executed by the server 105, and accordingly, the water body extraction device of the remote sensing image can also be set in the server 105, which is not particularly limited in this exemplary embodiment.

[0038] In this example embodiment, a method for extracting water from a remote sensing image is first provided. The method for extracting water from a remote sensing image can be applied to a terminal device or a server. This embodiment is not limited thereto, and the following description will be made using an example of the method being executed by a server. Figure 2 The flowchart of the water body extraction method of the remote sensing image according to some embodiments of the present disclosure is schematically shown. Figure 2 As shown, the water body extraction method of the remote sensing image may include the following steps: Step S210, acquiring a collected remote sensing image, and extracting local binary pattern (LBP) texture features and grayscale features from the remote sensing image to obtain a pixel texture feature vector; Step S220, inputting the remote sensing image into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result; Step S230, constructing a water body extraction optimization model based on Markov random field MRF based on the pixel texture feature vector and the preliminary water body extraction result; Step S240, iteratively optimizing the target energy function of the water body extraction optimization model, and updating the pixel classification labels in the preliminary water body extraction result, until the change of the target energy function meets the preset convergence condition; Step S250, determining a water body extraction image according to the updated preliminary water body extraction result, wherein the water body extraction image includes a water body area and a non-water body area in the remote sensing image.

[0039] According to the water body extraction method of the remote sensing image in this example embodiment, on the one hand, the water body extraction optimization model constructed by the preliminary water body extraction result output by the extracted pixel texture feature vector and the water body pre-extraction model can be combined with the pixel texture feature vector to perform local and global consistency optimization on the basis of the preliminary water body extraction result. At the same time, through the iterative optimization of the target energy function, the global optimal classification label allocation can be guaranteed, and the classification error or inconsistency caused by the local extreme value problem can be avoided, thereby realizing the effective extraction of complex water body boundaries and small water bodies in the remote sensing image, and improving the accuracy and robustness of the water body extraction result; on the other hand, compared with the prior art of directly inputting the remote sensing image into the deep learning The water body extraction result is obtained by learning the model. The pixel texture feature vector is also considered when constructing the water body extraction optimization model to effectively capture the detailed information of local and global areas in the image, especially the difference in texture between the water body and the background area, so that the distinction between water body and non-water body area in the image is more accurate, especially in the case of overlapping spectral features or complex backgrounds of remote sensing images. It can effectively extract complex water body boundaries and small water bodies in remote sensing images, improve the accuracy and stability of water body extraction results, and the extraction of pixel texture feature vectors enables the water body extraction results to maintain high robustness under environmental interference such as lighting changes and cloud occlusion, and combined with the preliminary water body extraction results, it can effectively ensure the clarity of the water body boundary.

[0040] Next, the water body extraction method of the remote sensing image in this exemplary embodiment will be further described.

[0041] In step S210, a collected remote sensing image is acquired, and local binary pattern (LBP) texture features and grayscale features are extracted from the remote sensing image to obtain a pixel texture feature vector.

[0042] In an example embodiment of the present disclosure, a remote sensing image refers to an image that records the size of electromagnetic waves of various ground objects. For example, the remote sensing image can be an aerial remote sensing image or a satellite remote sensing image. This embodiment uses a satellite remote sensing image taken by a satellite as an example for subsequent explanation.

[0043] Pixel texture extraction refers to the process of extracting pixel features that represent image texture in a remote sensing image. For example, pixel texture extraction can be a process of extracting grayscale values ​​of pixels in a remote sensing image to obtain grayscale features, or it can be a process of extracting local image textures in a remote sensing image through a local feature operator to obtain LBP (Local Binary Patterns) texture features. Of course, pixel texture extraction can also be a combination of multiple image texture extraction processes, and this example embodiment is not limited to this. A pixel texture feature vector refers to a feature vector extracted from a remote sensing image through a pixel texture extraction process to represent the image texture of the remote sensing image.

[0044] Optionally, you can Figure 3 The steps in the above are used to extract the local binary pattern LBP texture features and grayscale features of the remote sensing image, and obtain the pixel texture feature vector. Figure 3 As shown, it may specifically include: Step S310, performing grayscale feature extraction on the remote sensing image to obtain a grayscale feature vector of each pixel; Step S320, extracting local image texture from the remote sensing image to obtain a local image texture feature vector of each pixel; Step S330: Fusing the grayscale feature vector of each pixel with the local image texture feature vector to obtain the pixel texture feature vector.

[0045] Among them, grayscale feature extraction refers to the process of extracting the grayscale value corresponding to each pixel from the remote sensing image. The grayscale values ​​corresponding to each pixel in different bands in the remote sensing image constitute the grayscale feature vector of each pixel. For example, the grayscale feature vector can be simply constructed based on the grayscale level of the remote sensing image (or the spectral information of a single band). For a grayscale image, the grayscale value of each pixel can be directly used as the feature of the pixel. For example, the grayscale value of each pixel can be determined by the following relationship: ; in, It can represent the gray value of each pixel. and and The pixel values ​​of the red, green, and blue channels at each pixel point can be represented respectively.

[0046] It can be understood that satellite remote sensing images generally contain multiple spectral bands. At this time, the grayscale feature vector may include spectral grayscale information of different bands. Assuming that the satellite remote sensing image is a remote sensing image containing three bands of red, green, and blue (RGB), the RGB value of each pixel can be used as the grayscale feature vector. For example, the grayscale feature vector of each pixel can be determined by the following relationship: ; in, Can represent pixels The grayscale feature vector of Can represent pixels separately The grayscale value of the red, green, and blue bands at the location.

[0047] It is understandable that in addition to the RGB band, satellite remote sensing images often use data from near-infrared, short-wave infrared and other bands to extract features. The data of these bands can also be represented by synthetic grayscale feature vectors. For example, the grayscale feature vector of each pixel can also be determined by the following relationship: ; in, It can represent the gray value of the near infrared band. The gray feature vector of each pixel can be calculated from the above relationship.

[0048] Optionally, local image texture extraction of the remote sensing image can be implemented by the following steps to obtain the local image texture feature vector of each pixel, which can specifically include: Any pixel in the remote sensing image can be used as the central pixel, and the grayscale values ​​of the central pixel of the preset window are compared with those of other adjacent pixels to determine the local binary results of each central pixel; then the local texture statistical histogram of the local binary results of each pixel can be determined, and the local texture statistical histogram can be used as the local image texture feature vector. Among them, the local binary result refers to the result obtained by extracting the image texture in the remote sensing image through the LBP (Local Binary Patterns) operator.

[0049] For example, the calculation principle of local binary results can be referred to Figure 4 As shown, specifically, the local binary result can be calculated by the following relationship: ; ; in, It can represent the local binary result of the central pixel. It can represent the coordinates of the center pixel. It can represent the first pixel other than the central pixel in the preset window. adjacent pixels, optionally, the preset window can be selected as a 3×3 window, =1,2,…,8, Can indicate the The grayscale values ​​of adjacent pixels are It can represent the gray value of the central pixel. Can represent comparison functions.

[0050] When all the pixels in the preset 3×3 window are marked, the adjacent pixels in the preset 3×3 window except the central pixel are arranged in order to obtain a binary number. The local binary result corresponding to the central pixel, i.e., the LBP value, is the value after the binary number is converted to a decimal number.

[0051] When using LBP values ​​to represent texture features in remote sensing images, the LBP code of the pixel point is not used directly. Instead, the statistical histogram of the LBP feature spectrum is used to represent the LBP texture features. This can not only improve the discrimination and stability of local image texture features and enhance the global expression ability of local image texture features, but also effectively reduce the impact of image noise and enhance the discrimination ability of subsequent water body extraction optimization models for water body classification categories.

[0052] In step S220, the remote sensing image is input into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result.

[0053] In an example embodiment of the present disclosure, a water body pre-extraction model refers to a pre-trained artificial intelligence model for classifying water body areas and non-water body areas in remote sensing images. For example, the water body pre-extraction model can be a machine learning model based on a support vector machine (SVM) or a deep learning model based on a convolutional neural network (CNN). This example embodiment does not specifically limit the model structure of the water body pre-extraction model.

[0054] Optionally, before inputting the remote sensing image into the pre-trained water body pre-extraction model to obtain the preliminary water body extraction result, the water body pre-extraction model can be trained through a model pre-training process, for example, Figure 5 The steps in the model training of the water body pre-extraction model are implemented, refer to Figure 5 As shown, it may specifically include: Step S510, acquiring a pre-constructed sample remote sensing image, and pre-processing the sample remote sensing image to obtain a pre-processed sample remote sensing image, wherein the pre-processing includes at least one of radiation calibration, atmospheric correction, orthorectification, and band combination; Step S520, determining a water body extraction label map corresponding to the sample remote sensing image, and constructing a sample training data set and a sample verification data set according to the sample remote sensing image and the water body extraction label map; Step S530 , performing model training and verification on the pre-constructed water body pre-extraction model using the sample training data set and the sample verification data set to obtain a trained water body pre-extraction model.

[0055] Among them, the sample remote sensing image refers to a remote sensing image pre-constructed for model training. For example, the sample remote sensing image can be constructed based on the GF-1 remote sensing dataset. The GF-1 remote sensing dataset is satellite remote sensing data collected by the GF-1 satellite, and most of the images contained therein are natural images. Of course, the sample remote sensing image can also be a dataset composed of collected historical remote sensing images. This embodiment does not specifically limit the source of the sample remote sensing image.

[0056] Radiometric calibration refers to the correction process of converting the brightness grayscale value of an image into absolute radiometric brightness when calculating the spectral reflectance or spectral radiometric brightness of a ground object, or when images acquired at different times and by different sensors need to be compared. Atmospheric correction refers to the fact that the total radiometric brightness of a ground target measured by the sensor is not a reflection of the true reflectivity of the ground surface, and includes radiation errors caused by atmospheric absorption, especially scattering. Atmospheric correction is the process of eliminating these radiation errors caused by atmospheric influences and inverting the true surface reflectivity of the ground object. Orthorectification refers to the process of selecting some ground control points on a remote sensing image and using the digital elevation model (DEM) data that has been acquired within the range of the remote sensing image to simultaneously perform tilt correction and projection error correction on the remote sensing image, and resample the remote sensing image into an orthophoto. Band combination refers to an important image processing method in remote sensing technology. By combining remote sensing data of different bands, the information expression capability of the image can be enhanced, thereby better identifying and analyzing surface features. It is understandable that the collected remote sensing images may also be preprocessed using the above processing means before being input into the pre-trained water body pre-extraction model, and this embodiment will not be described in detail here.

[0057] The sample remote sensing images can be annotated using the water body annotation method of the GA-IOtsu algorithm to obtain the corresponding water body extraction label map, and a sample training data set and a sample verification data set can be constructed based on the sample remote sensing images and the water body extraction label map. Then, the pre-constructed water body pre-extraction model can be trained using the sample training data set, and after each stage of training is completed, the water body pre-extraction model after the preliminary training is verified in the sample verification data set. This process is repeated until the verification accuracy of the water body pre-extraction model obtained through the latest training is greater than or equal to the preset accuracy threshold, confirming that the model training process of the water body pre-extraction model is completed, and a trained water body pre-extraction model is obtained.

[0058] In an optional embodiment, the water body pre-extraction model can adopt the encoder and decoder structure of the UNet model, which can enable the water body pre-extraction model network to better fit and perform feature extraction; and use the ResNet-50 network integrated with the Res2Net module as the encoder structure. The residual structure contained in ResNet-50 can effectively avoid the occurrence of overfitting, and the Res2Net module facilitates multi-scale feature extraction and more fine-grained feature expression; integrate the mixed domain attention mechanism module into the encoder to better mine the spatial features and channel information in the shaking image, and construct a water body pre-extraction model based on Res2Net-Unet.

[0059] In step S230, a water body extraction optimization model based on Markov random field (MRF) is constructed based on the pixel texture feature vector and the preliminary water body extraction result.

[0060] In an example embodiment of the present disclosure, the extraction result of the water body pre-extraction model can be used as the initial water body extraction result to construct a prior probability model of the Markov Random Field (MRF) model; secondly, LBP texture feature extraction is performed on the remote sensing image, and the obtained LBP feature vector, that is, the local image texture feature vector, is combined with the grayscale feature vector to construct a feature field of the Markov random field MRF, and a water body extraction optimization model based on LBP-MRF is obtained.

[0061] Optionally, in this embodiment, a domain energy function can be constructed based on the pixel texture feature vector and the preliminary water body extraction result; an image feature field energy function can be constructed based on the preliminary water body extraction result and the pixel texture feature vector; and a water body extraction optimization model corresponding to the remote sensing image is constructed based on the target energy function composed of the domain energy function and the image feature field energy function.

[0062] The penalty factor can be determined according to the local image texture feature vector in the pixel texture feature vector, and the domain energy function can be constructed through the classification results of each pixel point in the preliminary water body extraction result and the penalty factor.

[0063] For example, the penalty factor can be constructed by the following relationship: ; ; in, represents the penalty factor obtained based on the feature local entropy method; Can represent the pixel points in remote sensing images Domain system; Can represent pixels Neighborhood system middle percentage, Can represent pixels In the domain system, the pixel The pixel texture feature vector is the same as the pixel point The percentage of Can represent adjustable preset constants for controlling scope; It can represent a preset constant to avoid the denominator being 0; Can be expressed as a natural constant An exponential function with base .

[0064] The domain energy function can be constructed by the following relationship: ; ; ; in, It can represent the domain energy function, Can represent the pixel points in the preliminary water extraction results The classification results, Can represent the pixel points in the preliminary water extraction results The classification results, It can be expressed as the potential function, It can represent the potential energy weight of the potential function, Can represent the Kronecker function, which can be used to represent the consistency of the classification results of pixels in the neighborhood system. The value is 1, otherwise it is 0.

[0065] Furthermore, the statistical data of the classification results of each pixel point can be determined according to the preliminary water body extraction results; and the image feature field energy function can be constructed through the pixel texture feature vector and the statistical data.

[0066] Among them, the statistical data can include the mean and variance of each pixel belonging to different classification categories. The mean and variance can be constructed by the following relationship: ; ; in, It can represent the mean value of each pixel belonging to different classification categories in the preliminary water body extraction results. It can represent the variance of each pixel belonging to different classification categories in the preliminary water body extraction results. The two classification categories that can represent the water area and non-water area marked in the preliminary water extraction results are: =1,2, It can indicate that the classification category in the preliminary water body extraction result belongs to The total number of pixels, Can represent the pixel points in remote sensing images The pixel texture feature vector of Can represent the pixel points in the preliminary water extraction results The classification results.

[0067] The image feature field energy function can be constructed by the following relationship: ; in, It can represent the image feature field energy function corresponding to the remote sensing image. It can represent the set of all pixels in the remote sensing image.

[0068] Since the traditional ICM algorithm has a penalty factor Using a fixed value can easily cause the model to fall into a local optimum. Therefore, the ICM algorithm is improved and a conditional iteration algorithm based on the local entropy of image features is proposed. The Markov random field model can be adaptively adjusted according to the pixel texture feature vector and iteratively optimized to obtain the final water body extraction result.

[0069] refer to Figure 6 As shown, based on Figure 6 It can be seen that for small water bodies in cities in remote sensing images, the edges of water bodies are difficult to accurately identify. The extraction results of MRF and binary image intersection method do not significantly improve the edges. ICRF and UNet-CRF have a small improvement on the edges of water bodies, but there is still a relatively obvious under-extraction phenomenon for some small water bodies. The LBP-MRF provided in the embodiment of the present disclosure can utilize the texture features and grayscale features in the remote sensing image, and has a more obvious improvement in the extraction of water body edges, and can better extract water body edges and small water bodies.

[0070] In step S240, the target energy function of the water body extraction optimization model is iteratively optimized, and the pixel classification labels in the preliminary water body extraction result are updated until the change of the target energy function meets the preset convergence condition.

[0071] In an exemplary embodiment of the present disclosure, Figure 7 Steps to achieve iterative optimization of the target energy function of the water extraction optimization model, refer to Figure 7 As shown, it may specifically include: Step S710, determining a first energy value corresponding to the target energy function according to the latest pixel classification label at the current moment; Step S720, updating the pixel classification labels in the preliminary water body extraction result, and determining the second energy value corresponding to the target energy function through the updated pixel classification labels; Step S730, determining an energy change value of the target energy function by using the first energy value and the second energy value; Step S740, if the energy change value is greater than or equal to the preset energy change threshold, the above steps are executed repeatedly until the energy change value is less than the energy change threshold, and the latest pixel classification label is used as the updated preliminary water body extraction result.

[0072] The first energy value refers to the energy value calculated by combining the pixel classification label before updating with the target energy function, and the second energy value refers to the energy value calculated by combining the pixel classification label after updating with the target energy function.

[0073] Optionally, the objective energy function of the water extraction optimization model can be expressed by the following relationship: ; in, It can represent the target energy function, It can represent the domain energy function corresponding to the remote sensing image. It can represent the image feature field energy function corresponding to the remote sensing image.

[0074] The iterative optimization process of the target energy function can be expressed by the following relationship: ; ; in, It can represent the latest updated pixel classification label. It can represent the number of iterative optimizations of the target energy function. Can represent the latest updated pixel classification label The second energy value corresponding to the lower target energy function, It can represent the first energy value corresponding to the target energy function under the pixel classification label before updating, It can represent the energy change value of the target energy function. If , then continue to perform the above iterative optimization process until , indicating that the target energy function tends to be stable, and the above iterative optimization process is terminated. A preset energy change threshold may be indicated.

[0075] In step S250, a water body extraction image is determined according to the updated preliminary water body extraction result, wherein the water body extraction image includes a water body area and a non-water body area in the remote sensing image.

[0076] In an example embodiment of the present disclosure, the updated preliminary water body extraction result includes the latest pixel classification label of each pixel point, and the pixel classification label represents whether the current pixel point is in the water body area. Then, each pixel point in the remote sensing image can be classified in combination with the updated preliminary water body extraction result to obtain a water body extraction image including the water body area and the non-water body area in the remote sensing image.

[0077] refer to Figure 8 As shown, the general process of the water body extraction method of the remote sensing image in the embodiment of the present disclosure can be briefly described as follows: LBP feature extraction is performed on the collected remote sensing image to obtain a pixel texture feature vector containing the LBP feature vector, and the remote sensing image is input into a pre-trained water body pre-extraction model to obtain an initial water body extraction result. A Markov random field model can be constructed in combination with the pixel texture feature vector containing the LBP feature vector and the initial water body extraction result, and the target energy function of the Markov random field model is iteratively optimized through the conditional iterative algorithm based on local entropy of image features proposed in the embodiment until the number of iterative optimization times is reached to obtain the final water body extraction result map.

[0078] Through the water body extraction method of remote sensing images in the embodiment of the present invention, local binary pattern LBP texture features and grayscale features are extracted from the collected remote sensing images to obtain pixel texture feature vectors; the remote sensing images are input into a pre-trained water body pre-extraction model to obtain preliminary water body extraction results; a water body extraction optimization model based on Markov random field MRF is constructed based on the pixel texture feature vectors and the preliminary water body extraction results; the target energy function of the water body extraction optimization model is iteratively optimized, and the pixel classification labels in the preliminary water body extraction results are updated until the change of the target energy function meets the preset convergence conditions; and the water body extraction image is determined according to the updated preliminary water body extraction results. On the one hand, the water body extraction optimization model constructed by the extracted pixel texture feature vector and the preliminary water body extraction result output by the water body pre-extraction model can combine the pixel texture feature vector to perform local and global consistency optimization on the basis of the preliminary water body extraction result. At the same time, through the iterative optimization of the target energy function, it can ensure the global optimal classification label allocation, avoid classification errors or inconsistencies caused by local extreme value problems, thereby effectively extracting complex water body boundaries and small water bodies in remote sensing images, and improve the accuracy and robustness of water body extraction results; on the other hand, compared with the prior art of directly inputting remote sensing images into the deep learning model to obtain water body extraction results , the pixel texture feature vector is also considered in constructing the water body extraction optimization model, which effectively captures the detailed information of local and global areas in the image, especially the difference in texture between the water body and the background area, so that the distinction between the water body and the non-water body area in the image is more accurate, especially in the case of overlapping spectral features or complex backgrounds of remote sensing images, which can effectively extract the complex water body boundaries and small water bodies in the remote sensing images, and improve the accuracy and stability of the water body extraction results. The extraction of pixel texture feature vectors enables the water body extraction results to maintain high robustness under environmental interference such as lighting changes and cloud occlusion, and combined with the preliminary water body extraction results, it can effectively ensure the clarity of the water body boundary.

[0079] It should be noted that, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0080] In addition, in this exemplary embodiment, a water body extraction device for remote sensing images is also provided. Fig. 9 As shown, the water body extraction device 900 of the remote sensing image includes: a pixel texture extraction module 910, a preliminary classification result acquisition module 920, a water body extraction optimization model construction module 930, a classification result optimization module 940 and an update result output module 950. Among them: The pixel texture extraction module 910 is used to obtain the collected remote sensing image, and extract the local binary pattern LBP texture feature and grayscale feature of the remote sensing image to obtain a pixel texture feature vector; A preliminary classification result acquisition module 920 is used to input the remote sensing image into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result; A water body extraction optimization model construction module 930 is used to construct a water body extraction optimization model based on Markov random field MRF based on the pixel texture feature vector and the preliminary water body extraction result; The classification result optimization module 940 is used to iteratively optimize the target energy function of the water body extraction optimization model and update the pixel classification labels in the preliminary water body extraction result until the change of the target energy function meets the preset convergence condition; The update result output module 950 is used to determine a water body extraction image according to the updated preliminary water body extraction result, wherein the water body extraction image includes a water body area and a non-water body area in the remote sensing image.

[0081] In some example embodiments of the present disclosure, based on the aforementioned scheme, the water body extraction optimization model construction module 930 is configured to: construct a domain energy function according to the pixel texture feature vector and the preliminary water body extraction result; construct an image feature field energy function according to the preliminary water body extraction result and the pixel texture feature vector; and construct a water body extraction optimization model corresponding to the remote sensing image based on the target energy function composed of the domain energy function and the image feature field energy function.

[0082] In some example embodiments of the present disclosure, based on the aforementioned scheme, the water body extraction optimization model construction module 930 is configured to: determine a penalty factor according to the local image texture feature vector in the pixel texture feature vector; construct a domain energy function through the classification results of each pixel point in the preliminary water body extraction result and the penalty factor; the penalty factor is constructed by the following relationship: ; ; in, represents the penalty factor obtained based on the feature local entropy method; Represents the pixel point in the remote sensing image Domain system; Represents pixel Neighborhood system middle percentage, Represents pixel In the domain system, the pixel The pixel texture feature vector is the same as the pixel point The percentage of Indicates an adjustable preset constant used to control scope; Indicates a preset constant, used to avoid the denominator being 0; Expressed as a natural constant An exponential function with base ; The domain energy function is constructed by the following relationship: ; ; ; in, represents the field energy function, Represents the pixel point in the preliminary water extraction result The classification results, Represents the pixel point in the preliminary water extraction result The classification results, represents the potential function, represents the potential energy weight of the potential function, Represents the Kronecker function, which is used to represent the consistency of the classification results of pixels in the neighborhood system. If The value is 1, otherwise it is 0.

[0083] In some example embodiments of the present disclosure, based on the aforementioned scheme, the water body extraction optimization model construction module 930 is configured to: determine the statistical data of the classification results of each pixel point according to the preliminary water body extraction result; construct an image feature field energy function through the pixel texture feature vector and the statistical data; the statistical data includes the mean and variance of each pixel point belonging to different classification categories, and the mean and the variance are constructed by the following relationship: ; ; in, It represents the mean value of each pixel in the preliminary water body extraction result belonging to different classification categories, Indicates the variance of each pixel point in the preliminary water body extraction result belonging to different classification categories, Indicates the two classification categories of water body area and non-water body area marked in the preliminary water body extraction result, =1,2, Indicates that the classification category in the preliminary water extraction result belongs to The total number of pixels, Represents the pixel point in the remote sensing image The pixel texture feature vector of Represents the pixel point in the preliminary water extraction result The classification results; The image feature field energy function is constructed by the following relationship: ; in, represents the image feature field energy function corresponding to the remote sensing image, Represents a set of all pixels in the remote sensing image.

[0084] In some example embodiments of the present disclosure, based on the aforementioned scheme, the classification result optimization module 940 is configured to: determine the first energy value corresponding to the target energy function according to the latest pixel classification label at the current moment; update the pixel classification label in the preliminary water body extraction result, and determine the second energy value corresponding to the target energy function through the updated pixel classification label; determine the energy change value of the target energy function through the first energy value and the second energy value; if the energy change value is greater than or equal to a preset energy change threshold, then loop through the above steps until the energy change value is less than the energy change threshold, and use the latest pixel classification label as the updated preliminary water body extraction result; The objective energy function of the water extraction optimization model is expressed by the following relationship: ; in, represents the target energy function, represents the domain energy function corresponding to the remote sensing image, Representing the image feature field energy function corresponding to the remote sensing image; The iterative optimization process of the target energy function is expressed by the following relationship: ; ; in, represents the latest updated pixel classification label, represents the number of iterative optimizations of the target energy function, Indicates the latest updated pixel classification label The second energy value corresponding to the lower target energy function, represents the first energy value corresponding to the target energy function under the pixel classification label before updating, Represents the energy change value of the target energy function. If , then continue to perform the above iterative optimization process until , indicating that the target energy function tends to be stable, and the above iterative optimization process is terminated. Indicates the preset energy change threshold.

[0085] In some example embodiments of the present disclosure, based on the aforementioned scheme, the pixel texture extraction module 910 is configured to: perform grayscale feature extraction on the remote sensing image to obtain a grayscale feature vector for each pixel; perform local image texture extraction on the remote sensing image to obtain a local image texture feature vector for each pixel; and fuse the grayscale feature vector of each pixel with the local image texture feature vector to obtain the pixel texture feature vector.

[0086] In some example embodiments of the present disclosure, based on the aforementioned scheme, the pixel texture extraction module 910 is configured to: take any pixel point in the remote sensing image as the central pixel point, and compare the grayscale values ​​of the central pixel point with other adjacent pixels in the preset window to determine the local binary result of each central pixel point; determine the local texture statistical histogram of the local binary result of each pixel point, and use the local texture statistical histogram as the local image texture feature vector; the local binary result is calculated by the following relationship: ; ; in represents the local binary result of the central pixel, represents the coordinates of the central pixel point, Indicates the first pixel in the preset window except the central pixel. adjacent pixel points, the preset window is a 3×3 window, =1,2,…,8, Indicates The grayscale values ​​of adjacent pixels are represents the gray value of the central pixel, Represents a comparison function.

[0087] In some example embodiments of the present disclosure, based on the aforementioned scheme, the water body extraction device 900 of the remote sensing image also includes a water body pre-extraction model training module, which is configured to: obtain a pre-constructed sample remote sensing image, and pre-process the sample remote sensing image to obtain a pre-processed sample remote sensing image, wherein the pre-processing includes at least one of radiation calibration, atmospheric correction, orthorectification and band combination; determine a water body extraction label map corresponding to the sample remote sensing image, and construct a sample training data set and a sample verification data set based on the sample remote sensing image and the water body extraction label map; perform model training and verification on the pre-constructed water body pre-extraction model through the sample training data set and the sample verification data set to obtain a trained water body pre-extraction model.

[0088] The specific details of each module of the water body extraction device for remote sensing images have been described in detail in the corresponding water body extraction method for remote sensing images, so they will not be repeated here.

[0089] It should be noted that, although several modules or units of the water body extraction device of remote sensing image are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0090] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-mentioned water body extraction method of remote sensing images is also provided.

[0091] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0092] Refer to the following Fig.10 hereinafter describes the electronic device 1000 according to such an embodiment of the present disclosure. Fig.10 The electronic device 1000 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0093] like Fig.10As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include but are not limited to: the at least one processing unit 1010, the at least one storage unit 1020, a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010), and a display unit 1040.

[0094] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 1010 can perform the following steps: Figure 2 In step S210 shown in the figure, a collected remote sensing image is acquired, and local binary pattern LBP texture features and grayscale features are extracted from the remote sensing image to obtain a pixel texture feature vector; in step S220, the remote sensing image is input into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result; in step S230, a water body extraction optimization model based on Markov random field MRF is constructed based on the pixel texture feature vector and the preliminary water body extraction result; in step S240, a target energy function of the water body extraction optimization model is iteratively optimized, and the pixel classification labels in the preliminary water body extraction result are updated until the change of the target energy function meets the preset convergence condition; in step S250, a water body extraction image is determined according to the updated preliminary water body extraction result, and the water body extraction image includes the water body area and the non-water body area in the remote sensing image.

[0095] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1021 and / or a cache memory unit 1022 , and may further include a read-only memory unit (ROM) 1023 .

[0096] The storage unit 1020 may also include a program / utility 1024 having a set (at least one) of program modules 1025, such program modules 1025 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0097] Bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0098] The electronic device 1000 may also communicate with one or more external devices 1070 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or may communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1050. In addition, the electronic device 1000 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0099] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0100] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0101] refer to Fig.11 As shown, a program product 1100 for implementing the water extraction method of the remote sensing image according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, apparatus, or device.

[0102] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0103] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0104] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0105] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0106] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0107] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0108] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0109] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for extracting water from remote sensing images, characterized in that: include: Acquire a collected remote sensing image, and extract local binary pattern (LBP) texture features and grayscale features of the remote sensing image to obtain a pixel texture feature vector; Inputting the remote sensing image into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result; Constructing a water body extraction optimization model based on Markov random field MRF based on the pixel texture feature vector and the preliminary water body extraction result; Iteratively optimizing the target energy function of the water body extraction optimization model, and updating the pixel classification labels in the preliminary water body extraction results, until the change of the target energy function meets the preset convergence condition; A water body extraction image is determined according to the updated preliminary water body extraction result, wherein the water body extraction image includes a water body area and a non-water body area in the remote sensing image.

2. The method for extracting water from remote sensing images according to claim 1, characterized in that: The step of constructing a water body extraction optimization model based on a Markov random field (MRF) based on the pixel texture feature vector and the preliminary water body extraction result includes: Constructing a domain energy function according to the pixel texture feature vector and the preliminary water body extraction result; Constructing an image feature field energy function according to the preliminary water body extraction result and the pixel texture feature vector; Based on the target energy function composed of the domain energy function and the image feature field energy function, a water body extraction optimization model corresponding to the remote sensing image is constructed.

3. The method for extracting water from remote sensing images according to claim 2, characterized in that: The constructing of a domain energy function according to the pixel texture feature vector and the preliminary water body extraction result comprises: Determining a penalty factor according to a local image texture feature vector in the pixel texture feature vector; Constructing a domain energy function through the classification results of each pixel in the preliminary water body extraction result and the penalty factor; The penalty factor is constructed by the following relationship: ; ; in, represents the penalty factor obtained based on the feature local entropy method; Represents the pixel point in the remote sensing image Domain system; Represents pixel Neighborhood system middle percentage, Represents pixel In the domain system, the pixel The pixel texture feature vector is the same as the pixel point The percentage of Indicates an adjustable preset constant used to control scope; Indicates a preset constant, used to avoid the denominator being 0; Indicated by natural constant An exponential function with base ; The domain energy function is constructed by the following relationship: ; ; ; in, represents the field energy function, Represents the pixel point in the preliminary water extraction result The classification results, Represents the pixel point in the preliminary water extraction result The classification results, represents the potential function, represents the potential energy weight of the potential function, Represents the Kronecker function, which is used to represent the consistency of the classification results of pixels in the neighborhood system. If The value is 1, otherwise it is 0.

4. The method for extracting water from remote sensing images according to claim 2, characterized in that: The constructing of an image feature field energy function according to the preliminary water body extraction result and the pixel texture feature vector comprises: Determine statistical data of classification results of each pixel point according to the preliminary water body extraction result; Constructing an image feature field energy function through the pixel texture feature vector and the statistical data; The statistical data includes the mean and variance of each pixel belonging to different classification categories, and the mean and variance are constructed by the following relationship: ; ; in, It represents the mean value of each pixel point in the preliminary water body extraction result belonging to different classification categories, Indicates the variance of each pixel point in the preliminary water body extraction result belonging to different classification categories, Indicates the two classification categories of water body area and non-water body area marked in the preliminary water body extraction result, =1,2, Indicates that the classification category in the preliminary water body extraction result belongs to The total number of pixels, Represents the pixel point in the remote sensing image The pixel texture feature vector of Represents the pixel point in the preliminary water extraction result The classification results; The image feature field energy function is constructed by the following relationship: ; in, represents the image feature field energy function corresponding to the remote sensing image, Represents a set of all pixels in the remote sensing image.

5. The method for extracting water from remote sensing images according to claim 1, characterized in that: The iterative optimization of the target energy function of the water body extraction optimization model and updating the pixel classification labels in the preliminary water body extraction result until the change of the target energy function meets the preset convergence condition include: Determine a first energy value corresponding to the target energy function according to the latest pixel classification label at the current moment; Updating the pixel classification labels in the preliminary water body extraction result, and determining the second energy value corresponding to the target energy function through the updated pixel classification labels; Determine an energy change value of the target energy function by using the first energy value and the second energy value; If the energy change value is greater than or equal to the preset energy change threshold, the above steps are executed repeatedly until the energy change value is less than the energy change threshold, and the latest pixel classification label is used as the updated preliminary water body extraction result; The objective energy function of the water extraction optimization model is expressed by the following relationship: ; in, represents the target energy function, represents the domain energy function corresponding to the remote sensing image, Representing the image feature field energy function corresponding to the remote sensing image; The iterative optimization process of the target energy function is expressed by the following relationship: ; ; in, represents the latest updated pixel classification label, represents the number of iterative optimizations of the target energy function, Indicates the latest updated pixel classification label The second energy value corresponding to the lower target energy function, represents the first energy value corresponding to the target energy function under the pixel classification label before updating, Represents the energy change value of the target energy function. If , then continue to perform the above iterative optimization process until , indicating that the target energy function tends to be stable, and the above iterative optimization process is terminated. Indicates the preset energy change threshold.

6. The method for extracting water from remote sensing images according to claim 1, characterized in that: The extracting of local binary pattern (LBP) texture features and grayscale features of the remote sensing image to obtain a pixel texture feature vector includes: Extracting grayscale features of the remote sensing image to obtain a grayscale feature vector of each pixel; Performing local image texture extraction on the remote sensing image to obtain a local image texture feature vector of each pixel; The grayscale feature vector of each pixel and the local image texture feature vector are fused to obtain the pixel texture feature vector.

7. The method for extracting water from remote sensing images according to claim 6, characterized in that: The extracting of local image texture from the remote sensing image to obtain a local image texture feature vector of each pixel includes: Taking any pixel point in the remote sensing image as a central pixel point, and comparing the grayscale values ​​of the central pixel point with other adjacent pixels in a preset window to determine a local binary result of each central pixel point; Determine a local texture statistical histogram of the local binary result of each pixel point, and use the local texture statistical histogram as the local image texture feature vector; The local binary result is calculated by the following relationship: ; ; in represents the local binary result of the central pixel, represents the coordinates of the central pixel point, Indicates the first pixel in the preset window except the central pixel. adjacent pixel points, the preset window is a 3×3 window, =1,2,…,8, Indicates The grayscale values ​​of adjacent pixels are represents the gray value of the central pixel, Represents a comparison function.

8. The method for extracting water from remote sensing images according to claim 1, characterized in that: Before inputting the remote sensing image into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result, the method further includes: Acquire a pre-constructed sample remote sensing image, and pre-process the sample remote sensing image to obtain a pre-processed sample remote sensing image, wherein the pre-processing includes at least one of radiation calibration, atmospheric correction, orthorectification, and band combination; Determine a water body extraction label map corresponding to the sample remote sensing image, and construct a sample training data set and a sample verification data set based on the sample remote sensing image and the water body extraction label map; The pre-constructed water body pre-extraction model is trained and verified by using the sample training data set and the sample verification data set to obtain a trained water body pre-extraction model.

9. A water body extraction device for remote sensing images, characterized in that: include: The pixel texture extraction module is used to obtain the collected remote sensing image, and extract the local binary pattern LBP texture feature and grayscale feature of the remote sensing image to obtain a pixel texture feature vector; A preliminary classification result acquisition module is used to input the remote sensing image into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result; A water body extraction optimization model construction module, used to construct a water body extraction optimization model based on Markov random field MRF based on the pixel texture feature vector and the preliminary water body extraction result; A classification result optimization module, used for iteratively optimizing the target energy function of the water body extraction optimization model, and updating the pixel classification labels in the preliminary water body extraction results until the change of the target energy function meets the preset convergence condition; The update result output module is used to determine a water body extraction image according to the updated preliminary water body extraction result, wherein the water body extraction image includes a water body area and a non-water body area in the remote sensing image.

10. An electronic device, characterized in that: include: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the water body extraction method for remote sensing images according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • SAR (synthetic aperture radar) image change detection method based on non-stationary analysis and conditional random field

    CN105160666A

  • Middle-resolution remote sensing image offshore culture area extraction method based on spectrum-space information combination

    CN113837123A

  • ROI region extraction method based on semantic segmentation model and conditional random field

    CN116630610A

  • Method and system of extraction of impervious surface of remote sensing image

    US20200026953A1

Cited By

  • Method and device for identifying construction waste in ecological protection red line based on remote sensing image

    CN120495692A

  • Building waste identification method and device in ecological protection red line based on remote sensing image

    CN120495692B