Method and device for extracting water bodies from remote sensing images, and electronic device
By extracting local binary mode LBP texture features and grayscale features from remote sensing images, and building an optimization model for water extraction based on Markov random airports, the problem of difficulty in extracting complex water boundaries and fine water bodies in high-resolution remote sensing images is solved, and the water body extraction effect with high accuracy and robustness is achieved.
Patent Information
- Application Number
- CN202510302417.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-03-14
AI Technical Summary
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.
By acquiring remote sensing images, the local binary mode LBP texture features and grayscale features are extracted, combined with the pre-trained water body pre-extraction model, a water body extraction optimization model based on Markov random field MRF is constructed, and the target energy function is iteratively optimized, and the pixel classification label is updated until the preset convergence conditions are met.
Effectively extract the boundaries of complex water bodies and small water bodies in remote sensing images, improve the accuracy and robustness of water body extraction results, ensure the clarity of water body boundaries, and perform well in the context of overlapping spectral features or complex backgrounds.
Smart Images

Figure CN119810685B_ABST
Abstract
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 for water ecological protection, water environment monitoring and other work. With the continuous progress of remote sensing technology, high-resolution and multi-spectral remote sensing data have been widely used in the extraction of water body information.
[0003] At present, the application of machine learning and deep learning technologies in remote sensing image analysis has achieved rapid development. However, machine learning and deep learning technologies rely highly on feature expression. The feature extraction of existing models is mostly limited to single-scale or 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 dealing with 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 unable 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 art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0005] The purpose of the embodiments of the present disclosure is to provide a method for extracting water bodies from remote sensing images, a device for extracting water bodies from remote sensing images, an electronic device, and a computer-readable storage medium, so as to 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 through the following detailed description, or be learned in part through the practice of the present disclosure.
[0007] According to the first aspect of the embodiments of the present disclosure, a method for extracting water bodies from remote sensing images is provided, including: acquiring the collected remote sensing images, and extracting local binary pattern (LBP) texture features and grayscale features from the remote sensing images to obtain pixel texture feature vectors; inputting the remote sensing images 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 the Markov random field (MRF) based on the pixel texture feature vectors and the preliminary water body extraction result; iteratively optimizing the objective energy function of the water body extraction optimization model to update the pixel classification labels in the preliminary water body extraction result until the change in the objective energy function meets a preset convergence condition; determining a water body extraction image according to the updated preliminary water body extraction result, where the water body extraction image includes the water body area and the non-water body area in the remote sensing image.
[0008] In some exemplary embodiments of the present disclosure, based on the foregoing solution, constructing a water body extraction optimization model based on the Markov random field (MRF) based on the pixel texture feature vectors and the preliminary water body extraction result includes: constructing a neighborhood energy function according to the pixel texture feature vectors 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 vectors; and constructing the water body extraction optimization model corresponding to the remote sensing image based on the objective energy function composed of the neighborhood energy function and the image feature field energy function.
[0009] In some exemplary embodiments of the present disclosure, based on the foregoing solution, constructing a neighborhood energy function according to the pixel texture feature vectors and the preliminary water body extraction result includes: determining a penalty factor according to the local image texture feature vectors in the pixel texture feature vectors; constructing a neighborhood energy function through the classification results of each pixel point in the preliminary water body extraction result and the penalty factor; and the penalty factor is constructed through the following relational expression:
[0010] ;
[0011] ;
[0012] where represents the penalty factor obtained by the method based on the feature local entropy; represents the neighborhood system of the pixel point in the remote sensing image; represents the pixel point ; in ; represents the pixel point ; in the neighborhood system of the pixel point Percentage occupied; Represents an adjustable preset constant for controlling Range; Represents a preset constant for avoiding a denominator of 0; Represents the natural constant Exponential function with base;
[0013] The domain energy function is constructed through the following relational expression:
[0014] ;
[0015] ;
[0016] ;
[0017] Wherein, Represents the domain energy function, Represents the classification result of the pixel point in the preliminary water body extraction result, Represents the classification result of the pixel point in the preliminary water body extraction result, Represents the potential function, Represents the potential energy weight of the potential function, Represents the Kronecker function, used to represent the consistency of the classification results of pixels in the neighborhood system. If then the value is 1, otherwise it is 0.
[0018] In some exemplary embodiments of the present disclosure, based on the foregoing solution, constructing an image feature field energy function according to the preliminary water body extraction result and the pixel texture feature vector includes: determining statistical data of the 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 point belonging to different classification categories, and the mean and the variance are constructed through the following relational expressions:
[0019] ;
[0020] ;
[0021] Wherein, Represents the mean of each pixel point in the preliminary water body extraction result belonging to different classification categories, Represents the variance of each pixel point in the preliminary water body extraction result belonging to different classification categories, Represents two classification categories of the marked water body area and non-water body area in the preliminary water body extraction result, = 1, 2, represents the total number of pixel points whose classification category in the preliminary water body extraction result belongs to ; represents the pixel texture feature vector in the remote sensing image; represents the classification result of the pixel point in the preliminary water body extraction result;
[0022] The image feature field energy function is constructed through the following relational expression:
[0023] ;
[0024] wherein, represents the image feature field energy function corresponding to the remote sensing image, represents the set of all pixel points in the remote sensing image.
[0025] In some exemplary embodiments of the present disclosure, based on the foregoing solution, the target energy function of the water body extraction optimization model is iteratively optimized to update the pixel classification labels in the preliminary water body extraction result until the change of the target energy function meets a preset convergence condition, including: determining a first energy value corresponding to the target energy function according to the latest pixel classification labels at the current moment; updating the pixel classification labels in the preliminary water body extraction result, and determining a second energy value corresponding to the target energy function through the updated pixel classification labels; determining an 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, loop to execute the above steps until the energy change value is less than the energy change threshold, and use the latest obtained pixel classification labels as the updated preliminary water body extraction result;
[0026] The target energy function of the water body extraction optimization model is represented by the following relational expression:
[0027] ;
[0028] wherein, represents the target energy function, represents the domain energy function corresponding to the remote sensing image, represents the image feature field energy function corresponding to the remote sensing image;
[0029] The iterative optimization process of the target energy function is represented by the following relational expression:
[0030] ;
[0031] ;
[0032] Among them, represents the pixel classification label obtained from the latest update, represents the number of iterative optimizations of the target energy function, represents the pixel classification label obtained from the latest update the second energy value corresponding to the target energy function under represents the first energy value corresponding to the target energy function under the pixel classification label before update, represents the energy change value of the target energy function. If , then continue to execute the above iterative optimization process until , indicating that the target energy function tends to be stable, and terminate the above iterative optimization process, represents a preset energy change threshold.
[0033] In some exemplary embodiments of the present disclosure, based on the foregoing solution, the extraction of local binary pattern (LBP) texture features and gray-scale features from the remote sensing image to obtain a pixel texture feature vector includes: extracting gray-scale features from the remote sensing image to obtain a gray-scale feature vector of each pixel; extracting local image textures from the remote sensing image to obtain a local image texture feature vector of each pixel; and fusing the gray-scale feature vector and the local image texture feature vector of each pixel to obtain the pixel texture feature vector.
[0034] In some exemplary embodiments of the present disclosure, based on the foregoing solution, the extraction of local image textures 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 gray-scale values of the central pixel point and other adjacent pixel points 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 relational expression:
[0035] ;
[0036] ;
[0037] Where represents the local binary result of the central pixel point, represents the coordinates of the central pixel point, represents the th adjacent pixel point in the preset window other than the central pixel point, and the preset window is a 3×3 window, = 1, 2, …, 8, represents the gray value of the th adjacent pixel, represents the gray value of the central pixel, and
[0038]
[0039]
[0040] In some exemplary embodiments of the present disclosure, based on the foregoing solution, 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: obtaining a pre-constructed sample remote sensing image, and performing preprocessing on the sample remote sensing image to obtain a preprocessed sample remote sensing image, where the preprocessing includes at least one of radiometric 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 validation data set according to the sample remote sensing image and the water body extraction label map; training and validating a pre-constructed water body pre-extraction model through the sample training data set and the sample validation data set to obtain a trained water body pre-extraction model.
[0041] According to a second aspect of the embodiments of the present disclosure, there is provided a water body extraction device for a remote sensing image, including: a pixel texture extraction module, configured to obtain a collected remote sensing image, and extract local binary pattern (LBP) texture features and gray features from the remote sensing image to obtain a pixel texture feature vector; a preliminary classification result obtaining module, configured 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, configured to construct a water body extraction optimization model based on the Markov random field (MRF) based on the pixel texture feature vector and the preliminary water body extraction result; a classification result optimization module, configured to iteratively optimize the objective 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 in the objective energy function meets a preset convergence condition; and an updated result output module, configured to determine a water body extraction image according to the updated preliminary water body extraction result, where the water body extraction image includes a water body area and a non-water body area in the remote sensing image.
[0042] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including: a processor; and a memory, where a computer-readable instruction is stored on the memory, and when the computer-readable instruction is executed by the processor, the water body extraction method for a remote sensing image in the first aspect is implemented. According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the water body extraction method for a remote sensing image in the first aspect is implemented.The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
[0043] In the method for extracting water bodies from remote sensing images in the exemplary embodiments of the present disclosure, local binary pattern (LBP) texture features and grayscale features of the collected remote sensing images are extracted to obtain pixel texture feature vectors; the remote sensing images are input into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result; a water body extraction optimization model based on a Markov random field (MRF) is constructed based on the pixel texture feature vectors and the preliminary water body extraction result; the objective energy function of the water body extraction optimization model is iteratively optimized to update the pixel classification labels in the preliminary water body extraction result until the change in the objective energy function meets a preset convergence condition; a water body extraction image is determined according to the updated preliminary water body extraction result. On the one hand, the water body extraction optimization model constructed by combining the extracted pixel texture feature vectors and the preliminary water body extraction result output by the water body pre-extraction model can perform local and global consistency optimization by combining the pixel texture feature vectors on the basis of the preliminary water body extraction result. At the same time, through the iterative optimization of the objective energy function, it can ensure the assignment of globally optimal classification labels, avoiding 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 improving the accuracy and robustness of the water body extraction result. On the other hand, compared with directly inputting remote sensing images into a deep learning model to obtain a water body extraction result in the prior art, the pixel texture feature vectors are also considered when constructing the water body extraction optimization model, effectively capturing the detailed information in the local and global regions of the image, especially the texture differences between the water body and the background region, making the distinction between the water body and non-water body regions in the image more accurate. Especially in the case of overlapping spectral features or complex backgrounds in remote sensing images, it can effectively extract complex water body boundaries and small water bodies in remote sensing images, improving the accuracy and stability of the water body extraction result. Moreover, the extraction of pixel texture feature vectors enables the water body extraction result to remain highly robust under environmental interferences such as illumination changes and cloud cover, and combined with the preliminary water body extraction result, it can effectively ensure the clarity of the water body boundary.
[0044] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0046] Figure 1The figure shows a schematic diagram of a system architecture of an exemplary application environment of a method and apparatus for water body extraction from remote sensing images to which embodiments of the present disclosure can be applied.
[0047] Figure 2 The figure schematically shows a flowchart of a method for water body extraction from remote sensing images according to some embodiments of the present disclosure.
[0048] Figure 3 The figure schematically shows a flowchart of a process for extracting a pixel texture feature vector corresponding to a remote sensing image according to some embodiments of the present disclosure.
[0049] Figure 4 The figure schematically shows a schematic diagram of the calculation principle for extracting a local image texture feature vector corresponding to a remote sensing image according to some embodiments of the present disclosure.
[0050] Figure 5 The figure schematically shows a flowchart of a pre-training process of a water body pre-extraction model according to some embodiments of the present disclosure.
[0051] Figure 6 The figure schematically shows a schematic diagram of water body extraction results obtained under different water body extraction optimization algorithms according to some embodiments of the present disclosure. 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 based on an iterative optimization water body extraction method of Fisher transform and Markov random field (Fisher-MRF), 607 is a water body extraction result map obtained based on a water body optimization method of an improved conditional random field (ICRF), 608 is a water body extraction result map obtained based on a water body extraction method combining a residual U-Net and a 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 the embodiments of the present disclosure.
[0052] Figure 7 The figure schematically shows a flowchart of iterative optimization of a water body extraction optimization model according to some embodiments of the present disclosure.
[0053] Figure 8 The figure schematically shows a flowchart of implementing water body extraction from remote sensing images according to some embodiments of the present disclosure.
[0054] Figure 9 The figure schematically shows a schematic diagram of an apparatus for water body extraction from remote sensing images according to some embodiments of the present disclosure.
[0055] Figure 10 A schematic structural diagram of a computer system of an electronic device according to some embodiments of the present disclosure is shown.
[0056] Figure 11 A schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure is shown.
[0057] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts. Detailed Description of Specific Embodiments
[0058] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the 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 embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. On the contrary, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.
[0059] In addition, the drawings are only schematic diagrams 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 independent entities. That is, these functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0060] Figure 1 A schematic diagram of a system architecture of an exemplary application environment of a method and apparatus for extracting water bodies from remote sensing images to which the embodiments of the present disclosure can be applied is shown.
[0061] As Figure 1 shown, the system architecture 100 may include one or more of a terminal device one 101, a terminal device two 102, and a terminal device three 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the terminal device one 101, the terminal device two 102, the terminal device three 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc. The terminal device one 101, the terminal device two 102, and the terminal device three 103 may be various electronic devices with artificial intelligence (AI) computing capabilities, including but not limited to desktop computers, portable computers, smartphones, and tablet computers, etc. It should be understood, Figure 1The numbers of the terminal devices, networks, and servers in [it] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers. For example, server 105 can be a server cluster composed of multiple servers, etc.
[0062] The method for extracting water bodies from remote sensing images provided by the embodiments of the present disclosure is generally executed by terminal device one 101, terminal device two 102, and terminal device three 103. Correspondingly, the device for extracting water bodies from remote sensing images is generally disposed in terminal device one 101, terminal device two 102, and terminal device three 103. However, those skilled in the art can easily understand that the method for extracting water bodies from remote sensing images provided by the embodiments of the present disclosure can also be executed by server 105. Correspondingly, the device for extracting water bodies from remote sensing images can also be disposed in server 105. No special limitation is made in this exemplary embodiment.
[0063] In this exemplary embodiment, first, a method for extracting water bodies from remote sensing images is provided. The method for extracting water bodies from remote sensing images can be applied to terminal devices or used for servers. This embodiment is not limited thereto. The following will be described by taking the server as an example for executing this method. Figure 2 Schematically shows a flowchart of a method for extracting water bodies from remote sensing images according to some embodiments of the present disclosure. Refer to Figure 2 As shown, the method for extracting water bodies from remote sensing images may include the following steps:
[0064] Step S210: Obtain the 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;
[0065] Step S220: Input the remote sensing image into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result;
[0066] Step S230: Construct a water body extraction optimization model based on the Markov random field (MRF) based on the pixel texture feature vector and the preliminary water body extraction result;
[0067] Step S240: Iteratively optimize the objective 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 objective energy function meets a preset convergence condition;
[0068] Step S250: Determine a water body extraction image according to the updated preliminary water body extraction result. The water body extraction image includes the water body area and the non-water body area in the remote sensing image.
[0069] According to the water body extraction method for remote sensing images in this exemplary embodiment, on the one hand, the water body extraction optimization model constructed by the initially extracted water body extraction result and the pixel texture feature vector output by the water body pre-extraction model can perform local and global consistency optimization by combining the pixel texture feature vector on the basis of the initially extracted 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 assignment, avoiding the problems of 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 improving the accuracy and robustness of the water body extraction result. On the other hand, compared with directly inputting the remote sensing image into the deep learning model to obtain the water body extraction result in the prior art, the pixel texture feature vector is also considered when constructing the water body extraction optimization model, effectively capturing the detailed information in the local and global regions of the image, especially the texture difference between the water body and the background region, making the distinction between the water body and non-water body regions in the image more accurate. Especially in the case of overlapping spectral features or complex backgrounds in 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 the water body extraction result, and the extraction of the pixel texture feature vector enables the water body extraction result to still maintain high robustness under environmental interferences such as illumination changes and cloud cover. In addition, combined with the initially extracted water body extraction result, it can effectively ensure the clarity of the water body boundary.
[0070] Next, the water body extraction method for remote sensing images in this exemplary embodiment will be further described.
[0071] In step S210, the collected remote sensing image is obtained, and the local binary pattern (LBP) texture feature and grayscale feature of the remote sensing image are extracted to obtain a pixel texture feature vector.
[0072] In an exemplary embodiment of the present disclosure, a remote sensing image refers to an image that records the electromagnetic wave magnitudes of various ground objects. For example, the remote sensing image can be an aerial remote sensing image or a satellite remote sensing image. In this embodiment, the remote sensing image is a satellite remote sensing image taken by a satellite, and subsequent descriptions will be made based on this example.
[0073] Pixel texture extraction refers to the processing process of extracting pixel features that represent the image texture of a remote sensing image. For example, pixel texture extraction can be a processing process of extracting the pixel grayscale values in the remote sensing image to obtain grayscale features, or a processing process of extracting the local image texture in the 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 processing processes for extracting image textures. This exemplary embodiment is not limited thereto. A pixel texture feature vector refers to a feature vector extracted from a remote sensing image through the pixel texture extraction processing process and used to represent the image texture of the remote sensing image.
[0074] Optionally, it can be achieved through Figure 3 the steps in to extract the local binary pattern (LBP) texture features and gray-scale features of the remote sensing image, and obtain the pixel texture feature vector. Refer to Figure 3 as shown, it may specifically include:
[0075] Step S310: Extract the gray-scale features of the remote sensing image to obtain the gray-scale feature vector of each pixel;
[0076] Step S320: Extract the local image texture of the remote sensing image to obtain the local image texture feature vector of each pixel;
[0077] Step S330: Fuse the gray-scale feature vector and the local image texture feature vector of each pixel to obtain the pixel texture feature vector.
[0078] Among them, gray-scale feature extraction refers to the process of extracting the gray-scale values corresponding to each pixel point from the remote sensing image. The gray-scale values corresponding to each pixel point in different bands of the remote sensing image constitute the gray-scale feature vector of each pixel. For example, the gray-scale feature vector can be simply constructed based on the gray-scale level of the remote sensing image (or the spectral information of a single band). For a gray-scale image, the gray-scale value of each pixel point can be directly used as the feature of the pixel. For example, the gray-scale value of each pixel can be determined through the following relational expression:
[0079] ;
[0080] Among them, can represent the gray-scale value of each pixel, and and can respectively represent the pixel values of the red, green, and blue channels at each pixel point.
[0081] It can be understood that satellite remote sensing images generally contain multiple spectral bands. At this time, the gray-scale feature vector can include the spectral gray-scale 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 gray-scale feature vector. For example, the gray-scale feature vector of each pixel can be determined through the following relational expression:
[0082] ;
[0083] Among them, can represent the gray-scale feature vector of pixel point , can respectively represent the gray-scale values of the red, green, and blue bands at the position of pixel point .
[0084] It is understandable that in satellite remote sensing images, in addition to the RGB bands, data from bands such as near-infrared and short-wave infrared are often used to extract features. The data of these bands can also be represented by synthesizing grayscale feature vectors. For example, the grayscale feature vectors of each pixel can be determined through the following relational expressions:
[0085] ;
[0086] Among them, can represent the grayscale value of the near-infrared band. The grayscale feature vectors of each pixel can be calculated from the above relational expressions.
[0087] Optionally, the local image texture of the remote sensing image can be extracted through the following steps to obtain the local image texture feature vectors of each pixel, which can specifically include:
[0088] Any pixel point in the remote sensing image can be used as the central pixel point, and the grayscale values of the central pixel point of the preset window and other adjacent pixel points can be compared to determine the local binary results of each central pixel point; furthermore, the local texture statistical histogram of the local binary results of each pixel point can be determined, and the local texture statistical histogram is 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.
[0089] For example, the calculation principle of the local binary result can refer to Figure 4 as shown. Specifically, the local binary result can be calculated through the following relational expressions:
[0090] ;
[0091] ;
[0092] Among them, can represent the local binary result of the central pixel point, can represent the coordinates of the central pixel point, can represent the th adjacent pixel point except the central pixel point in the preset window. Optionally, the preset window can be selected as a 3×3 window, = 1, 2, …, 8, can represent the th adjacent pixel point, can represent the grayscale value of the central pixel point, can represent the comparison function.
[0093] After all the pixel points in the preset 3×3 window are marked, arrange the other adjacent pixel points in the preset 3×3 window except the central pixel point to obtain a binary number. The local binary result corresponding to the central pixel point, that is, the LBP value, is the value after converting this binary number into a decimal number.
[0094] When using the LBP value to represent the texture features in the remote sensing image, instead of directly using the LBP code of the pixel points, 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 the local image texture features, enhance the global expression ability of the local image texture features, but also effectively reduce the influence of image noise and enhance the discrimination ability of the subsequent water body extraction optimization model for water body classification categories.
[0095] In step S220, input the remote sensing image into the pre-trained water body pre-extraction model to obtain a preliminary water body extraction result.
[0096] In an exemplary embodiment of the present disclosure, the water body pre-extraction model refers to an artificial intelligence model that is pre-trained and used to classify the water body area and non-water body area in the remote sensing image. For example, the water body pre-extraction model can be a machine learning model based on Support Vector Machine (SVM), or a deep learning model based on Convolutional Neural Networks (CNN). The model structure of the water body pre-extraction model is not specifically limited in this exemplary embodiment.
[0097] Optionally, before inputting the remote sensing image into the pre-trained water body pre-extraction model to obtain a preliminary water body extraction result, the water body pre-extraction model can be trained through a model pre-training process. For example, it can be achieved through the steps in Figure 5 to train the water body pre-extraction model. As shown in Figure 5 specifically, it may include:
[0098] Step S510, obtain a pre-constructed sample remote sensing image, and perform preprocessing on the sample remote sensing image to obtain a preprocessed sample remote sensing image. The preprocessing includes at least one of radiometric calibration, atmospheric correction, orthorectification, and band combination;
[0099] Step S520, determine the 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 according to the sample remote sensing image and the water body extraction label map;
[0100] Step S530: Train and validate a pre - constructed water body pre - extraction model using the sample training dataset and the sample validation dataset to obtain a trained water body pre - extraction model.
[0101] Among them, a sample remote - sensing image refers to a remote - sensing image pre - constructed for model training. For example, a 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 it contains are natural images. Of course, the sample remote - sensing image can also be a dataset composed of historical remote - sensing images collected. This embodiment does not make special limitations on the source of the sample remote - sensing image.
[0102] Radiometric calibration refers to the calibration process of converting the brightness gray - level value of an image into absolute radiance when calculating the spectral reflectance or spectral radiance of a ground object, or when comparing images obtained at different times and by different sensors. Atmospheric correction means that the total radiance of the ground target finally measured by the sensor does not reflect the true surface reflectance of the ground, and it contains radiation error caused by atmospheric absorption, especially scattering. Atmospheric correction is the process of eliminating these radiation errors caused by the atmosphere and retrieving the true surface reflectance of the ground object. Orthorectification refers to the process of selecting some ground control points on the remote - sensing image and using the digital elevation model (DEM) data within the range of the remote - sensing image that has been obtained previously to correct the tilt and projection error of the remote - sensing image simultaneously, and resampling the remote - sensing image into an ortho - image. Band combination refers to an important image - processing method in remote - sensing technology. By combining remote - sensing data of different bands, the information expression ability of the image can be enhanced, so as to better identify and analyze surface features. It can be understood that before the collected remote - sensing image is input into the pre - trained water body pre - extraction model, the above - mentioned processing methods can also be used for pre - processing, and this embodiment will not elaborate here.
[0103] The sample remote - sensing image can be labeled by the water - body annotation method of the GA - IOtsu algorithm to obtain a corresponding water - body extraction label map. Then, based on the sample remote - sensing image and the water - body extraction label map, a sample training dataset and a sample validation dataset are constructed. Then, the pre - constructed water body pre - extraction model can be trained using the sample training dataset. After each stage of training is completed, the preliminarily trained water body pre - extraction model is validated in the sample validation dataset. Repeat this process until the validation accuracy of the latest trained water body pre - extraction model is greater than or equal to the preset accuracy threshold, and confirm that the model training process of the water body pre - extraction model is completed to obtain a trained water body pre - extraction model.
[0104] In an optional embodiment, the water body pre-extraction model can adopt the encoder and decoder structures of the UNet model, enabling 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 overfitting, and the Res2Net module helps with multi-scale feature extraction and finer-grained feature expression; incorporate a hybrid-domain attention mechanism module into the encoder to better mine the spatial features and channel information in the remote sensing image, and construct a water body pre-extraction model based on Res2Net-Unet.
[0105] In step S230, a water body extraction optimization model based on the Markov Random Field (MRF) is constructed based on the pixel texture feature vector and the preliminary water body extraction result.
[0106] In an exemplary 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, perform Local Binary Pattern (LBP) texture feature extraction on the remote sensing image to obtain the LBP feature vector, that is, the local image texture feature vector, and combine it with the grayscale feature vector to construct the feature field of the Markov Random Field (MRF) to obtain a water body extraction optimization model based on LBP-MRF.
[0107] Optionally, in this embodiment, a neighborhood energy function can be constructed according to the pixel texture feature vector and the preliminary water body extraction result; an image feature field energy function can be constructed according to the preliminary water body extraction result and the pixel texture feature vector; based on the objective energy function composed of the neighborhood energy function and the image feature field energy function, a water body extraction optimization model corresponding to the remote sensing image is constructed.
[0108] The penalty factor can be determined according to the local image texture feature vector in the pixel texture feature vector, and the neighborhood energy function is constructed through the classification results of each pixel point in the preliminary water body extraction result and the penalty factor.
[0109] For example, the penalty factor can be constructed through the following relational expression:
[0110] ;
[0111] ;
[0112] where represents the penalty factor obtained by the method based on the feature local entropy; can represent the neighborhood system of the pixel point in the remote sensing image; can represent a pixel point of the neighborhood system in percentage; can represent a pixel point in the neighborhood system of the pixel point with the same pixel texture feature vector as the pixel point the percentage it occupies; can represent an adjustable preset constant for controlling range; can represent a preset constant for avoiding a denominator of 0; can represent the exponential function with the natural constant as the base.
[0113] The neighborhood energy function can be constructed through the following relational expressions:
[0114] ;
[0115] ;
[0116] ;
[0117] wherein, can represent the neighborhood energy function, can represent the classification result of the pixel point in the preliminary water body extraction result, can represent the classification result of the pixel point in the preliminary water body extraction result, can represent the potential function, 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 the pixels in the neighborhood system. If then the value is 1, otherwise it is 0.
[0118] Furthermore, the statistical data of the classification results of each pixel point can be determined according to the preliminary water body extraction result; the image feature field energy function is constructed through the pixel texture feature vector and the statistical data.
[0119] wherein, the statistical data can include the mean and variance of each pixel point belonging to different classification categories, and the mean and variance can be constructed through the following relational expressions:
[0120] ;
[0121] ;
[0122] wherein, can represent the mean of each pixel belonging to different classification categories in the preliminary water body extraction result, can represent the variance of each pixel belonging to different classification categories in the preliminary water body extraction result, can represent two classification categories of the marked water body area and non-water body area in the preliminary water body extraction result, = 1, 2, can represent that the classification category in the preliminary water body extraction result belongs to the total number of pixel points, can represent the pixel points in the remote sensing image pixel texture feature vector, can represent the pixel points in the preliminary water body extraction result classification result.
[0123] The energy function of the image feature field can be constructed through the following relational expression:
[0124] ;
[0125] wherein, can represent the energy function of the image feature field corresponding to the remote sensing image, can represent the set of all pixel points in the remote sensing image.
[0126] Since the traditional ICM algorithm uses a fixed value for the penalty factor and is prone to making the model fall into a local optimum, the ICM algorithm is improved, and a conditional iteration algorithm based on the local entropy of image features is proposed. The penalty factor can be adaptively adjusted according to the pixel texture feature vector, and the Markov random field model is iteratively optimized to obtain the final water body extraction result.
[0127] Refer to Figure 6 shown. Based on Figure 6 it can be known that for the small water bodies in the city in the remote sensing image, it is difficult to accurately identify the edges of the water bodies. The extraction results of the MRF and binary image intersection methods do not significantly improve the edges. The ICRF and UNet-CRF have a small improvement for the water body edges, but there are still obvious missed extraction phenomena for some small water bodies. However, the LBP-MRF provided in the embodiments of the present disclosure can utilize the texture features and gray features in the remote sensing image, and has a more obvious improvement in the extraction of the water body edges, and can better extract the water body edges and small water bodies.
[0128] In step S240, the target energy function of the water body extraction optimization model is iteratively optimized to 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.
[0129] In an exemplary embodiment of the present disclosure, the iterative optimization of the objective energy function of the water body extraction optimization model can be achieved through Figure 7 steps, as shown in the reference Figure 7 below, and specifically may include:
[0130] Step S710: Determine a first energy value corresponding to the objective energy function according to the latest pixel classification label at the current moment;
[0131] Step S720: Update the pixel classification label in the preliminary water body extraction result, and determine a second energy value corresponding to the objective energy function through the updated pixel classification label;
[0132] Step S730: Determine an energy change value of the objective energy function through the first energy value and the second energy value;
[0133] Step S740: If the energy change value is greater than or equal to a preset energy change threshold, loop and execute the above steps until the energy change value is less than the energy change threshold, and use the latest obtained pixel classification label as the updated preliminary water body extraction result.
[0134] Among them, the first energy value refers to the energy value calculated by combining the pixel classification label before update with the objective energy function, and the second energy value refers to the energy value calculated by combining the pixel classification label after update with the objective energy function.
[0135] Optionally, the objective energy function of the water body extraction optimization model can be represented by the following relational expression:
[0136] ;
[0137] Among them, can represent the objective energy function, can represent the neighborhood energy function corresponding to the remote sensing image, can represent the image feature field energy function corresponding to the remote sensing image.
[0138] The iterative optimization process of the objective energy function can be represented by the following relational expression:
[0139] ;
[0140] ;
[0141] Among them, can represent the latest updated pixel classification label, can represent the number of iterations of the iterative optimization of the objective energy function, can represent the latest updated pixel classification label The second energy value corresponding to the lower target energy function may represent the first energy value corresponding to the target energy function under the pixel classification label before update may represent the energy change value of the target energy function. If , then continue to execute the above iterative optimization process until , indicating that the target energy function tends to be stable, and terminate the above iterative optimization process may represent a preset energy change threshold
[0142] 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
[0143] In an exemplary embodiment of the present disclosure, the updated preliminary water body extraction result contains the latest pixel classification label of each pixel point, and this pixel classification label characterizes whether the current pixel point is related to the water body area. Furthermore, the pixel points 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
[0144] Reference Figure 8 As shown, the general process of the water body extraction method for the remote sensing image in the embodiment of the present disclosure can be briefly described as follows: perform LBP feature extraction on the collected remote sensing image to obtain a pixel texture feature vector containing LBP feature vectors. At the same time, input the remote sensing image 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 by combining the pixel texture feature vector containing LBP feature vectors and the initial water body extraction result, and the target energy function of the Markov random field model is iteratively optimized by the conditional iterative algorithm based on the local entropy of the image features proposed in the embodiment until the number of iterative optimizations is reached to obtain the final water body extraction result map
[0145] Through the water body extraction method of remote sensing images in the embodiments of the present disclosure, local binary pattern (LBP) texture features and gray-scale features of the collected remote sensing images are extracted to obtain pixel texture feature vectors; the remote sensing images are input into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result; 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 result; the objective energy function of the water body extraction optimization model is iteratively optimized to update the pixel classification labels in the preliminary water body extraction result until the change in the objective energy function meets a preset convergence condition; the water body extraction image is determined according to the updated preliminary water body extraction result. On the one hand, the water body extraction optimization model constructed by combining the extracted pixel texture feature vectors and the preliminary water body extraction result output by the water body pre-extraction model can perform local and global consistency optimization by combining the pixel texture feature vectors on the basis of the preliminary water body extraction result. At the same time, through the iterative optimization of the objective energy function, it can ensure the global optimal classification label assignment, avoiding 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 improving the accuracy and robustness of the water body extraction result. On the other hand, compared with directly inputting remote sensing images into a deep learning model to obtain water body extraction results in the prior art, the pixel texture feature vectors are also considered when constructing the water body extraction optimization model, effectively capturing the detailed information in the local and global regions of the image, especially the texture difference between the water body and the background region, making the distinction between the water body and non-water body regions in the image more accurate. Especially in the case of overlapping spectral features or complex backgrounds in 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 the water body extraction result, and the extraction of pixel texture feature vectors enables the water body extraction result to still maintain high robustness under environmental interferences such as light changes and cloud cover. In addition, combined with the preliminary water body extraction result, it can effectively ensure the clarity of the water body boundary.
[0146] 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 these steps must be executed in that specific order, or that all the steps shown must be executed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.
[0147] In addition, in this exemplary embodiment, a water body extraction device for remote sensing images is also provided. Referring to Figure 9 as shown, the water body extraction device 900 for remote sensing images 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 updated result output module 950. Among them:
[0148] A pixel texture extraction module 910, configured to obtain a collected remote sensing image, and extract local binary pattern (LBP) texture features and gray-scale features from the remote sensing image to obtain a pixel texture feature vector.
[0149] A preliminary classification result acquisition module 920, configured to input the remote sensing image into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result.
[0150] A water body extraction optimization model construction module 930, configured to construct a water body extraction optimization model based on the Markov random field (MRF) based on the pixel texture feature vector and the preliminary water body extraction result.
[0151] A classification result optimization module 940, configured to iteratively optimize the objective 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 objective energy function meets a preset convergence condition.
[0152] An updated result output module 950, configured to determine a water body extraction image according to the updated preliminary water body extraction result, where the water body extraction image includes a water body area and a non-water body area in the remote sensing image.
[0153] In some exemplary embodiments of the present disclosure, based on the foregoing solution, the water body extraction optimization model construction module 930 is configured to: construct a neighborhood 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 the water body extraction optimization model corresponding to the remote sensing image based on the objective energy function composed of the neighborhood energy function and the image feature field energy function.
[0154] In some exemplary embodiments of the present disclosure, based on the foregoing solution, 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 neighborhood energy function through the classification results of each pixel point in the preliminary water body extraction result and the penalty factor; and the penalty factor is constructed through the following relational expression:
[0155] ;
[0156] ;
[0157] Where represents a penalty factor obtained by a method based on feature local entropy; represents the neighborhood system of the pixel point in the remote sensing image; Represents a pixel point 's neighborhood system in the percentage of Represents a pixel point in the neighborhood system of, and the pixel points with the same pixel texture feature vector as the pixel point the percentage occupied; Represents an adjustable preset constant for controlling the range of; Represents a preset constant for avoiding a zero denominator; Represents the exponential function with the natural constant as the base;
[0158] The neighborhood energy function is constructed through the following relational expressions:
[0159] ;
[0160] ;
[0161] ;
[0162] wherein, represents the neighborhood energy function, represents the classification result of the pixel point in the preliminary water body extraction result, represents the classification result of the pixel point in the preliminary water body extraction result, represents the potential function, represents the potential energy weight of the potential function, represents the Kronecker function, used to represent the consistency of the classification results of the pixels in the neighborhood system. If then the value is 1, otherwise 0.
[0163] In some exemplary embodiments of the present disclosure, based on the foregoing solution, 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 through the following relational expressions:
[0164] ;
[0165] ;
[0166] wherein, Represents the mean value of each pixel point in the preliminary water body extraction result belonging to different classification categories, Represents the variance of each pixel point in the preliminary water body extraction result belonging to different classification categories, Represents the two classification categories of the marked water body area and non-water body area in the preliminary water body extraction result, = 1, 2, Represents that the classification category in the preliminary water body extraction result belongs to The total number of pixel points, Represents the pixel point in the remote sensing image The pixel texture feature vector, Represents the pixel point in the preliminary water body extraction result The classification result;
[0167] The image feature field energy function is constructed through the following relational expression:
[0168] ;
[0169] Among them, Represents the image feature field energy function corresponding to the remote sensing image, Represents the set of all pixel points in the remote sensing image.
[0170] In some exemplary embodiments of the present disclosure, based on the foregoing solution, 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, loop to execute the above steps until the energy change value is less than the energy change threshold, and use the latest obtained pixel classification label as the updated preliminary water body extraction result;
[0171] The target energy function of the water body extraction optimization model is represented by the following relational expression:
[0172] ;
[0173] Among them, Represents the target energy function, Represents the domain energy function corresponding to the remote sensing image, Represents the image feature field energy function corresponding to the remote sensing image;
[0174] The iterative optimization process of the target energy function is represented by the following relational expression:
[0175] ;
[0176] ;
[0177] wherein, represents the pixel classification label obtained by the latest update, represents the number of iterative optimizations of the target energy function, represents the pixel classification label obtained by the latest update the second energy value corresponding to the target energy function below, represents the first energy value corresponding to the target energy function under the pixel classification label before the update, represents the energy change value of the target energy function. If , then continue to execute the above iterative optimization process until , indicating that the target energy function tends to be stable, and terminate the above iterative optimization process, represents a preset energy change threshold.
[0178] In some exemplary embodiments of the present disclosure, based on the foregoing solution, the pixel texture extraction module 910 is configured to: extract grayscale features from the remote sensing image to obtain grayscale feature vectors of each pixel; extract local image textures from the remote sensing image to obtain local image texture feature vectors of each pixel; fuse the grayscale feature vectors and the local image texture feature vectors of each pixel to obtain the pixel texture feature vector.
[0179] In some exemplary embodiments of the present disclosure, based on the foregoing solution, the pixel texture extraction module 910 is configured to: use any pixel point in the remote sensing image as the central pixel point, and compare the grayscale values of the central pixel point and other adjacent pixel points in a 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 relational expression:
[0180] ;
[0181] ;
[0182] where represents the local binary result of the central pixel point, represents the coordinates of the central pixel point, represents the th adjacent pixel point in the preset window except the central pixel point, and the preset window is a 3×3 window. = 1, 2, …, 8, represents the grayscale value of the th adjacent pixel, represents the grayscale value of the central pixel, represents a comparison function.
[0183] In some exemplary embodiments of the present disclosure, based on the foregoing solution, the water body extraction device 900 for remote sensing images further includes a water body pre - extraction model training module, which is configured to: obtain a pre - constructed sample remote sensing image, and perform pre - processing on the sample remote sensing image to obtain a pre - processed sample remote sensing image, where the pre - processing includes at least one of radiometric 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 validation data set according to the sample remote sensing image and the water body extraction label map; perform model training and validation on a pre - constructed water body pre - extraction model through the sample training data set and the sample validation data set to obtain a trained water body pre - extraction model.
[0184] The specific details of each module of the water body extraction device for remote sensing images described above have been described in detail in the corresponding water body extraction method for remote sensing images, and thus will not be elaborated here.
[0185] It should be noted that although several modules or units of the water body extraction device for remote sensing images 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 and embodied by multiple modules or units.
[0186] In addition, in the exemplary embodiments of the present disclosure, an electronic device capable of implementing the above - described water body extraction method for remote sensing images is also provided.
[0187] Those skilled in the art can understand that various aspects of the present disclosure can be implemented as a system, a method, or a program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which can be collectively referred to as "circuit", "module", or "system" here.
[0188] Next, the electronic device 1000 according to this embodiment of the present disclosure will be described with reference to Figure 10 ... Figure 10The illustrated electronic device 1000 is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0189] As Figure 10 shown, the electronic device 1000 is presented in the form of a general-purpose computing device. The components of the electronic device 1000 may include, but are not limited to: at least one of the above-mentioned processing units 1010, at least one of the above-mentioned storage units 1020, a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010), and a display unit 1040.
[0190] Among them, the storage unit stores program codes, and the program codes can be executed by the processing unit 1010, so that the processing unit 1010 executes 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 may execute steps S210 as Figure 2 shown in, acquire the 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; step S220, input the remote sensing image into a pre-trained water body pre-extraction model to obtain a preliminary water body extraction result; step S230, 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; step S240, iteratively optimize the objective 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 objective energy function meets a preset convergence condition; step S250, determine a water body extraction image 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.
[0191] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 1021 and / or a cache storage unit 1022, and may further include a read-only storage unit (ROM) 1023.
[0192] The storage unit 1020 may further include a program / utility 1024 having a set (at least one) of program modules 1025. Such program modules 1025 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0193] The bus 1030 can represent one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of the various bus structures.
[0194] The electronic device 1000 can also communicate with one or more external devices 1070 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 1050. Moreover, the electronic device 1000 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 1060. As shown in the figure, the network adapter 1060 communicates with other modules of the electronic device 1000 through the bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in combination 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.
[0195] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments 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, including 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 embodiments of the present disclosure.
[0196] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is further provided, on which a program product capable of implementing the above method of this specification is stored. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.
[0197] Reference Figure 11As shown, a program product 1100 for implementing the above-mentioned water body extraction method for remote sensing images according to an embodiment of the present disclosure is described. It can be in the form of a portable compact disc read-only memory (CD-ROM) and includes program code, and can run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited to this. In this document, a readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0198] The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0199] The computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium can also be any readable medium other than the readable storage medium, and this readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0200] The program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination of the above.
[0201] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user's computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or, it can be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).
[0202] In addition, the above-mentioned drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of this disclosure, rather than for limiting purposes. It is easy to understand that the processes shown in the above-mentioned drawings do not indicate or limit the chronological order of these processes. Additionally, it is also easy to understand that these processes can be executed, for example, synchronously or asynchronously in multiple modules.
[0203] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described here can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of this 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, USB flash drive, mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this disclosure.
[0204] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of this disclosure. This application is intended to cover any variations, uses, or adaptations of this disclosure, which follow the general principles of this disclosure and include known common knowledge or conventional technical means in this technical field not disclosed in this disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of this disclosure are pointed out by the claims.
[0205] It should be understood that this disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is only limited 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; 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; Wherein, 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: Determine a penalty factor according to a local image texture feature vector in the pixel texture feature vector, and construct a domain energy function through the classification result of each pixel point in the preliminary water body extraction result and the penalty factor; Determine the statistical data of the classification results of each pixel point according to the preliminary water body extraction result, and construct an image feature field energy function through the pixel texture feature vector and the statistical data, wherein the statistical data includes the mean and variance of each pixel point belonging to different classification categories; 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.
2. The method for extracting water from remote sensing images according to claim 1, characterized in that: 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.
3. The method for extracting water from remote sensing images according to claim 1, characterized in that: The mean and the 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.
4. 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.
5. 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.
6. The method for extracting water from remote sensing images according to claim 5, 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.
7. 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.
8. 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; 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 a water body area and a non-water body area in the remote sensing image; Among them, the water extraction optimization model building module is configured as follows: Determine a penalty factor according to a local image texture feature vector in the pixel texture feature vector, and construct a domain energy function through the classification result of each pixel point in the preliminary water body extraction result and the penalty factor; Determine the statistical data of the classification results of each pixel point according to the preliminary water body extraction result, and construct an image feature field energy function through the pixel texture feature vector and the statistical data, wherein the statistical data includes the mean and variance of each pixel point belonging to different classification categories; 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.
9. 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 method for extracting water from remote sensing images according to any one of claims 1 to 7.
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