Water body identification method and device
By using a random forest model to determine the importance of water body index characteristics in the water body recognition method, the problem of low adaptability to water body recognition in the prior art is solved, and more efficient and flexible water body recognition is achieved.
Patent Information
- Application Number
- CN202411914099.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The existing water body recognition methods have low adaptability in remote sensing images of different time periods or different water body types, and cannot effectively identify water body areas.
By integrating remote sensing images within the target period, water body pre-recognition is performed, and a training sample set is constructed in the determined sampling area. The importance of water body index characteristics is trained using a random forest model to determine adaptive features to improve water body recognition.
It improves the adaptability and accuracy of water body recognition, and allows more flexibility in identifying water body areas in different stages and types of water body.
Smart Images

Figure CN119888513A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of remote sensing technology, and in particular to a water body identification method and device. Background Art
[0002] With the development of satellite remote sensing technology, more comprehensive detection and analysis can be carried out on geographical areas on the earth's surface. For example, with the help of remote sensing images collected by satellites, river basins can be analyzed, as can changes in the area of lakes, etc. Specifically, water body identification can be carried out on remote sensing images.
[0003] The current water body identification method is based on a fixed water body index, but this fixed water body index is not applicable to all water body identification situations. When performing water body identification on remote sensing images of different time periods or different water body types, the current water body identification method has low adaptability. Summary of the invention
[0004] In view of this, the present disclosure proposes a water body identification method and device to improve the adaptability of water body identification.
[0005] According to one aspect of the present disclosure, a water body identification method is provided, comprising:
[0006] A first integrated image is obtained by integrating a first remote sensing image set collected for a target geographical area during a target period;
[0007] Performing water body pre-identification on the first comprehensive image to obtain a pre-identification result of whether a pixel point in the first comprehensive image belongs to a water body area;
[0008] determining at least one sampling region in the first composite image;
[0009] For any sampling area, the following steps are performed to determine the corresponding candidate sub-features: a training sample set is constructed based on the targeted sampling area; wherein different training samples correspond to different pixels in the targeted sampling area; the sample label of any training sample is used to characterize the pre-recognition result of the corresponding pixel; the sample feature of any training sample includes a number of sample sub-features, and any sample sub-feature is used to characterize the water body index of the pixel corresponding to the sample; based on the constructed training sample set, a random forest model is trained to predict whether the pixel corresponding to the input sample belongs to the water body area; based on the trained random forest model, the feature importance of different sample sub-features is determined; based on the sample sub-feature with the highest feature importance, the candidate sub-feature corresponding to the targeted sampling area is determined;
[0010] Among the candidate sub-features corresponding to different sampling areas, the matching sub-feature is determined based on the candidate sub-features with the largest number of occurrences;
[0011] Based on the adapted water body index represented by the determined adaptor feature, water body identification is performed for the target geographical area within the target time period.
[0012] According to another aspect of the present disclosure, there is provided a water body identification device, comprising:
[0013] A synthesis unit, configured to synthesize a first remote sensing image set collected for a target geographical area within a target period of time to obtain a first synthetic image;
[0014] A pre-identification unit, used to perform water body pre-identification on the first comprehensive image, and obtain a pre-identification result of whether a pixel point in the first comprehensive image belongs to a water body area;
[0015] A sampling unit, configured to determine at least one sampling region in the first integrated image;
[0016] The candidate unit is used to perform the following steps to determine the corresponding candidate sub-features for any sampling area: construct a training sample set based on the targeted sampling area; wherein different training samples correspond to different pixels in the targeted sampling area; the sample label of any training sample is used to characterize the pre-recognition result of the corresponding pixel; the sample feature of any training sample includes a number of sample sub-features, and any sample sub-feature is used to characterize the water body index of the pixel corresponding to the sample; based on the constructed training sample set, train a random forest model for predicting whether the pixel corresponding to the input sample belongs to the water body area; based on the trained random forest model, determine the feature importance of different sample sub-features; based on the sample sub-feature with the highest feature importance, determine the candidate sub-feature corresponding to the targeted sampling area;
[0017] The adapter feature unit is used to determine the adapter feature based on the candidate sub-feature with the largest number of occurrences among the candidate sub-features corresponding to different sampling areas;
[0018] The adaptation identification unit is used to identify the water body for the target geographical area within the target time period based on the adaptation water body index represented by the determined adapter feature.
[0019] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0020] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0021] According to another aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0022] According to the above embodiment, by determining a water body index with relatively high feature importance for a target geographical area within a target period of time and using it for water body identification for the target geographical area within the target period of time, the adaptability of water body identification can be improved.
[0023] According to the following detailed description of exemplary embodiments with reference to the accompanying drawings, other features and aspects of the present disclosure will become clear.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
[0024] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0025] Figure 1 A flow chart showing a method for identifying a water body according to an embodiment of the present disclosure is shown;
[0026] Figure 2 A schematic diagram showing an example of a random forest model according to an embodiment of the present disclosure;
[0027] Figure 3 A schematic diagram showing a process of determining aptamer characteristics according to an embodiment of the present disclosure;
[0028] Figure 4 A flow chart showing another water body identification method according to an embodiment of the present disclosure;
[0029] Figure 5 A flow chart showing another water body identification method according to an embodiment of the present disclosure;
[0030] Figure 6 A schematic diagram showing a pre-experimental area according to an embodiment of the present disclosure;
[0031] Figure 7 A flow chart showing another water body identification method according to an embodiment of the present disclosure;
[0032] Figure 8 A flow chart showing another water body identification method according to an embodiment of the present disclosure;
[0033] Fig. 9 A structural diagram of a water body identification device according to an embodiment of the present disclosure is shown;
[0034] Fig.10 It is a block diagram of a device 1900 for implementing a water body identification method according to an exemplary embodiment. DETAILED DESCRIPTION
[0035] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0036] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0037] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0038] With the development of satellite remote sensing technology, more comprehensive detection and analysis can be carried out on geographical areas on the earth's surface. For example, with the help of remote sensing images collected by satellites, river basins can be analyzed, as can changes in the area of lakes, etc. Specifically, water body identification can be carried out on remote sensing images.
[0039] The current water body identification method is based on a fixed water body index, but this fixed water body index is not applicable to all water body identification situations. When performing water body identification on remote sensing images of different time periods or different water body types, the current water body identification method has low adaptability.
[0040] In order to solve the above technical problems, an embodiment of the present disclosure provides a water body identification method.
[0041] In this method, for the object that needs to be identified currently, that is, for the remote sensing images collected in a specified geographical area within a specified time period, a water body index that is more suitable for the current identification object can be flexibly determined from a variety of different water body indices, so that water body identification can be further performed based on the determined water body index to improve the adaptability and accuracy of water body identification, and also to improve the flexibility of water body identification.
[0042] The specific degree of adaptation between the water body index and the current identification object can be determined based on the classification effects of different water body indices in the current remote sensing image (specifically, the effect of classifying water bodies and non-water bodies, that is, the water body identification effect).
[0043] In this method, water bodies can be roughly pre-identified for the current identification object by pre-identification. The pre-identification result can be used as a reference to conveniently measure the classification effect of the water body index.
[0044] Accordingly, based on the pre-identification result, the water body area and non-water body area in the current identification object can be determined, which can be used as a standard to determine the classification effect in the current identification object for different water body indexes.
[0045] One method may be that, for any water body index, water body identification can be performed for the current identification object based on the water body index to obtain a first identification result, so that the first identification result can be compared with the pre-identification result, and the classification effect can be determined according to the degree of difference. The smaller the difference, the better the classification effect; the larger the difference, the worse the classification effect. For different water body indices, this method can be used to determine the classification effect, so that a water body index with a better classification effect can be selected as the water body index that is more suitable for the current identification object for the final water body identification. Of course, considering the computational cost, a sampling area can be determined in the current identification object, so that the classification effect can be determined in the sampling area according to the above method for different water body indices, thereby reducing the computational cost.
[0046] Another way is to construct a training sample set based on the pre-identification result for training a random forest model, and the classification effect of different water body indexes can be determined by the random forest model. Specific explanations can be found in the following embodiments.
[0047] It can be understood that this method can determine the classification effects of different water body indices on the current identification object through water body pre-identification and random forest models, so that a water body index with better classification effect can be selected, that is, a water body index that is more suitable for the current identification object can be selected for water body identification of the current identification object, thereby improving the adaptability, flexibility and accuracy of the water body identification method.
[0048] In addition, in this method, in addition to being able to select a water body index that is more suitable for the current identification object, since there are currently a variety of remote sensing data sources available, and in the foreseeable future, as the number of satellites increases, more remote sensing information from different sources may be collected for the same geographical area in the same period of time, so that a remote sensing data source that is more suitable for the current identification object can be further selected. The specific method can refer to the above-mentioned water body index selection method, and the remote sensing data source is used as an additional attribute of the water body index, that is, the classification effect is determined for the "remote sensing data source-water body index", so that the "remote sensing data source-water body index" that is more suitable for the current identification object can be determined, and the corresponding remote sensing data source and water body index can be determined for water body identification.
[0049] Among them, for the same water body index, for example, the Normalized DifferenceWater Index (NDWI), "Remote Sensing Data Source 1-NDWI", "Remote Sensing Data Source 2-NDWI" and "Remote Sensing Data Source 3-NDWI" and so on can be determined according to different remote sensing data sources, so as to more accurately determine the "Remote Sensing Data Source-Water Body Index" suitable for the current identification object.
[0050] A water body identification method provided by an embodiment of the present disclosure is explained in detail below.
[0051] The method flow does not limit the execution subject. The method flow can be applied to any electronic device, such as a user terminal, a server, a business middle station, etc., and can also be applied to any computer program product, such as business software. Figure 1 FIG. 5 is a flow chart showing a method for identifying a water body according to an embodiment of the present disclosure. Figure 1 As shown, the method may include the following steps:
[0052] S101: A first remote sensing image set collected for a target geographical area within a target period is synthesized to obtain a first synthesized image.
[0053] S102: Perform water body pre-identification on the first comprehensive image to obtain a pre-identification result of whether a pixel point in the first comprehensive image belongs to a water body area.
[0054] S103: Determine at least one sampling area in the first integrated image.
[0055] S104: For any sampling area, perform the following steps to determine the corresponding candidate sub-features: construct a training sample set based on the targeted sampling area; wherein different training samples correspond to different pixels in the targeted sampling area; the sample label of any training sample is used to characterize the pre-recognition result of the corresponding pixel; the sample feature of any training sample includes a number of sample sub-features, and any sample sub-feature is used to characterize the water body index of the pixel corresponding to the sample; based on the constructed training sample set, train a random forest model for predicting whether the pixel corresponding to the input sample belongs to the water body area; based on the trained random forest model, determine the feature importance of different sample sub-features; based on the sample sub-feature with the highest feature importance, determine the candidate sub-feature corresponding to the targeted sampling area.
[0056] S105: Determine an adaptation sub-feature based on the candidate sub-features with the largest number of occurrences among the candidate sub-features corresponding to different sampling areas.
[0057] S106: Based on the adapted water body index represented by the determined adaptor feature, water body identification is performed for the target geographical area within the target time period.
[0058] In the process of this method, the characteristic importance of different water body indices for the target geographical area within the target period can be determined through water body pre-identification and training of the random forest model, so that the water body index with relatively high characteristic importance can be selected for water body identification in the target geographical area within the target period, thereby improving the adaptability of water body identification.
[0059] In addition, feature importance can characterize the water body identification effect using water body index for water body identification. By identifying water bodies for target geographical areas within a target period based on water body indexes with higher feature importance, the water body identification effect can be improved and the accuracy of water body identification can be improved.
[0060] Furthermore, through the process of the method, it is convenient to adaptively determine the suitable water body index for different identification objects to perform water body identification, which can improve the adaptability and flexibility of water body identification.
[0061] The process of this method is not limited to the target time period, and the target time period can be any time period, for example, from 8 am to 9 am on a certain day of a certain month of a certain year. For the convenience of description, any time period in which water body identification is required in the process of this method is called the target time period.
[0062] The process of this method is not limited to the target geographical area, and the target geographical area can be any geographical area, for example, a surface river, a surface lake, etc. For the convenience of description, any geographical area that needs to be identified as a water body in the process of this method is called the target geographical area. Among them, since the process of this method requires water body identification, the target geographical area can include water bodies, and the target geographical area can be a target water body area or a target water body geographical area. The water body can be a surface water body, such as a stream, a river, a lake, and a river, etc.
[0063] In a specific example, water body identification can be performed for a certain river area within a certain day, so that remote sensing images collected for the certain river area within a certain day can be obtained. Since remote sensing images can be collected for a certain river area every few hours within a day, multiple remote sensing images can be obtained as the first remote sensing image set. The remote sensing images actually collected can be collected for a larger geographical area, and can be further cropped for a certain river area therein to obtain remote sensing images collected for the certain river area.
[0064] The method does not limit the method for determining the target time period and the target geographical area. Optionally, the target time period and the target geographical area can be determined based on information input by the user; or the target time period and the target geographical area for water body identification can be automatically determined based on a pre-set mode.
[0065] In a specific example, the method flow can be executed through a software system, which can obtain the target river basin (shapefile format) and time range (start and end year, month and day) input by the user, so that the target geographical area can be determined based on the target river basin. Specifically, a minimum rectangular area containing the target river basin can be determined as the target geographical area. The time range can be directly used as the target time period. It can also be preset to automatically analyze multiple rivers in the same time period, or automatically analyze the same river in different time periods, so that the target time period and target geographical area can be automatically determined.
[0066] This method flow explains the overall process of water body identification for a target geographical area within a target period. It is understandable that this method flow can be used to identify water bodies for multiple target periods or multiple target geographical areas.
[0067] Regarding the water body pre-identification in S102 and the water body identification in S106, the process of this method does not limit the specific operations of these two water body identifications. The specific operation processes of these two water body identifications can be the same or different. For the convenience of distinction, the water body identification in S102 is called water body pre-identification, which can facilitate the subsequent determination of sample labels and the training of random forest models to determine adapter features that are more suitable for the target geographical area within the target time period. In the water body identification in S106, after determining the adapter features, the water body index represented by the adapter features is used to perform more suitable water body identification.
[0068] The method flow does not limit the specific execution order of each step. Optionally, it can be executed in the order from S101 to S106, or in other orders. When any step requires the results of other steps to be processed, it can wait for the other steps to be completed.
[0069] Optionally, the method flow does not limit the execution order of steps S102 and S103, and they can be executed in parallel or out of order. The sampling area is first determined, and then water body pre-identification is performed. Specifically, water body pre-identification can be performed on the sampling area in the first comprehensive image to obtain a pre-identification result of whether the pixel segment in the sampling area belongs to the water body area.
[0070] Regarding the feature importance in the random forest model, this method process does not limit the specific representation method and specific determination method of feature importance.
[0071] It is understood that in the Random Forest model, Feature Importance measures the contribution of each feature to the model’s predictive power. Feature Importance can be used to understand the usefulness or value of each feature (variable or input) in making predictions.
[0072] Corresponding to the process of this method, the higher the feature importance, the higher the contribution of the corresponding sample sub-feature in predicting whether the sample corresponding pixel point belongs to the water body area. It can be determined that the corresponding sample sub-feature has a better classification effect on whether the sample corresponding pixel point belongs to the water body area, and is more suitable for the current water body identification object (target geographical area within the target time period). Therefore, in S106, the adaptive water body index represented by the adaptive sub-feature with higher feature importance is used to perform water body identification for the current water body identification object, which can improve the effect, accuracy and precision of water body identification, and can also improve the adaptability and flexibility of water body identification.
[0073] The process of this method can be divided into three stages, namely, water body pre-identification, determination of aptamer characteristics, and water body identification based on aptamer characteristics. Among them, water body pre-identification can be a preparation for determining aptamer characteristics.
[0074] The water body pre-identification may specifically be to perform water body identification on an object that needs water body identification (a target geographical area within a target time period), and specifically may be to perform water body identification on the first remote sensing image set.
[0075] Specifically, determining the adaptor features can be to construct a training sample set based on the results of water body pre-identification for training the random forest model, so that the feature importance of the sample features can be determined based on the trained random forest model, and the sample features with higher feature importance can be determined as the adaptor features.
[0076] Water body identification is performed based on adapter features. Specifically, water body identification can be performed based on a water body index represented by the adapter features, targeting a target geographical area within a target period of time. Specifically, water body identification can also be performed through remote sensing images. The following is a detailed explanation of the above three stages.
[0077] 1. Pre-identification of water bodies.
[0078] The process of this method does not limit the specific process of water body pre-identification. Optionally, water body pre-identification can be achieved through the above S101 and S102.
[0079] S101: A first remote sensing image set collected for a target geographical area within a target period is synthesized to obtain a first synthesized image.
[0080] See above for explanations of target time periods and target geographic areas.
[0081] The method flow does not limit the form and content of the first remote sensing image set, as long as the remote sensing images included in the set are collected for the target geographical area within the target time period. Optionally, the first remote sensing image set may include one or more first remote sensing images; each first remote sensing image in the first remote sensing image set may be obtained from the same remote sensing data source or from different remote sensing data sources; each first remote sensing image in the first remote sensing image set may have the same resolution or different resolutions.
[0082] The process of this method does not limit the way of determining the first remote sensing image set. Optionally, for the original remote sensing images collected, the collected range is usually large, so it is necessary to crop the required part from the original remote sensing images. Specifically, based on the target time period and the target geographical area, the first remote sensing image containing the target geographical area is cropped from the original remote sensing images collected within the target time period, and added to the first remote sensing image set. This embodiment does not limit the specific cropping method, and specifically can be to determine the minimum rectangular area containing the target geographical area as the first remote sensing image.
[0083] In addition, optionally, the first remote sensing image in the first remote sensing image set may be pre-processed. The method flow does not limit the pre-processing method, and may specifically include at least one of the following: band normalization, uniform resolution, image quality improvement, cloud removal, and the like.
[0084] The process of this method does not limit the way of synthesizing the first remote sensing image set. Optionally, a first remote sensing image can be selected from the first remote sensing image set and determined as the first comprehensive image, specifically, the first remote sensing image with the highest image quality or the smallest cloud ratio can be selected as the first comprehensive image; it can also be fused for each first remote sensing image in the first remote sensing image set, specifically, it can be weighted fusion, and the weight of each image can be determined based on the image quality, the image quality is positively correlated with the weight, the higher the image quality, the greater the weight; it can also be synthesized for each first remote sensing image in the first remote sensing image set by statistical means, specifically, the median image between each first remote sensing image can be used as the first comprehensive image.
[0085] In an optional embodiment, a first integrated image is obtained by integrating a set of first remote sensing images collected for a target geographical area within a target period of time. Specifically, the following may be performed: declouding is performed on each first remote sensing image in the set of first remote sensing images; a median image is determined for each first remote sensing image after the declouding process; for any pixel position, the value of the pixel position targeted in the determined median image is the median between the values of the first remote sensing images after the declouding process at the targeted pixel position; and the first integrated image is determined based on the determined median image.
[0086] This embodiment can reduce the impact of factors such as clouds on the image, improve the image quality, and facilitate subsequent improvement of the accuracy of water body identification by performing declouding processing on the first remote sensing image and determining a median image based on the declouded image.
[0087] This embodiment does not limit the specific cloud removal processing method. Specifically, cloud removal processing can be performed based on the built-in cloud band. This embodiment does not limit the method for determining the median image. Specifically, the median can be determined pixel by pixel.
[0088] In an optional embodiment, when determining the median image for the first remote sensing image set after declouding, specifically, the resolutions of the first remote sensing images in the first remote sensing image set may be the same, so that for any pixel position, the values of the first remote sensing images at the pixel position may be determined, and then the median may be determined by sorting, and then the determined medians may be combined into the median image according to the corresponding pixel positions. Among them, since declouding is to delete the content identified as the cloud layer, there may be pixel positions without values in the first remote sensing image after declouding, and thus they may not participate in the above-mentioned process of determining the median. Specifically, for any pixel position, the values of the first remote sensing images after declouding at the pixel position may be determined, and then the existing values may be sorted to determine the median.
[0089] This embodiment does not limit the specific method of determining the first comprehensive image based on the median image. Optionally, the median image can be directly determined as the first comprehensive image, or other processing can be performed on the median image to obtain the first comprehensive image. Other processing, for example, improves image quality, supplements missing pixel values, etc.
[0090] Among them, after the cloud removal process, there may be missing pixel values in the determined median image, that is, at this pixel position, there is no value in each of the first remote sensing images after the cloud removal process, that is, each of the first remote sensing images is identified as a cloud layer at this pixel position. Therefore, it is necessary to supplement the missing pixel values for the median image. This embodiment does not limit the specific supplementation method. Optionally, non-cloud layer pixel values collected at the same pixel position can be obtained from other time periods in the remote sensing data source and supplemented into the median image.
[0091] S102: Perform water body pre-identification on the first comprehensive image to obtain a pre-identification result of whether a pixel point in the first comprehensive image belongs to a water body area.
[0092] The process of this method does not limit the specific steps of pre-identifying the water body for the first comprehensive image. Optionally, water body pre-identification can be performed on the first comprehensive image as a whole to obtain a pre-identification result of whether each pixel in the first comprehensive image belongs to the water body area. Water body pre-identification can also be performed on part of the content in the first comprehensive image. Specifically, water body pre-identification can be performed on the sampling area determined in the first comprehensive image in combination with the sampling area determined in S103 to obtain a pre-identification result of whether each pixel in the sampling area belongs to the water body area. Among them, pre-identifying water bodies for sampling areas can improve the efficiency of water body pre-identification and reduce the cost of water body pre-identification.
[0093] The process of this method does not limit the specific water body identification method used in water body pre-identification.
[0094] Optionally, water body identification may be performed on the first comprehensive image using a pre-trained model, or based on a water body index, or in other ways.
[0095] Water index is a commonly used indicator in remote sensing image processing, which is used to highlight water features and suppress other ground features. Through the combination and calculation of specific bands, the water index can effectively enhance the contrast between water and non-water bodies, thereby facilitating water extraction, monitoring and analysis. Water indexes include Normalized Difference Water Index (NDWI), Modified Normalized Difference Water Index (MNDWI), Automated Water Extraction Index (AWEI) and Standardized Water-Level Index (SWI).
[0096] In an optional embodiment, water body pre-identification is performed on the first comprehensive image, specifically, water body identification is performed on the first comprehensive image based on any water body index. In this embodiment, water body identification can be performed by water body index, thereby improving the efficiency of water body pre-identification and reducing the cost of water body pre-identification.
[0097] This embodiment does not limit the specific method of identifying water bodies based on the water body index. Specifically, for each pixel point in the first comprehensive image, the water body index value corresponding to each pixel point is calculated using the band data, for example, the Normalized Difference Water Index (NDWI). The general calculation formula of the Normalized Difference Water Index is: NDWI = ((G-IR) / (IR+G)). Where G is the pixel value from the green band, and IR is the pixel value from the infrared band. Afterwards, it can be determined whether it belongs to the water body area based on whether the water body index is greater than a specified threshold. Of course, the maximum inter-class variance method can also be used to identify water bodies based on the water body index.
[0098] This embodiment is not limited to any water body index, and may be a randomly selected water body index or a user-specified water body index, etc.
[0099] 2. Determine the characteristics of the aptamer.
[0100] The method does not limit the specific process of determining the aptamer characteristics. Optionally, the aptamer characteristics can be determined through the above S103-S105.
[0101] S103: Determine at least one sampling area in the first integrated image.
[0102] The process of this method does not limit the specific way of determining the sampling area. Optionally, multiple sampling areas can be randomly determined from the first comprehensive image, or multiple sampling areas can be determined at fixed positions in the first comprehensive image, and so on. In an optional embodiment, since the sampling area is used for the subsequent construction of a training sample set, the samples in the sampling area can be labeled as balanced as much as possible. Specifically, it can be to maintain a balance as much as possible in the pre-recognition results, so that the ratio between the number of pixels in the sampling area whose pre-recognition results are that they belong to the water body area and the number of pixels whose pre-recognition results are that they do not belong to the water body area is close to 1:1.
[0103] Furthermore, in order to facilitate the control of the number of subsequent training samples and the sampling scale, an upper limit or a lower limit may be set for the sum of the areas of the various sampling regions. Specifically, the sum of the areas of the various sampling regions may have an area ratio in the first comprehensive image that is less than a preset upper area ratio limit and / or greater than a preset lower area ratio limit.
[0104] Therefore, optionally, at least one sampling area is determined in the first comprehensive image, which can be specifically: based on the pre-recognition result, at least one sampling area is determined in the first comprehensive image; wherein the sum of the areas of the determined sampling areas, the area ratio in the first comprehensive image is less than a preset area ratio threshold; in any determined sampling area, the difference between the number of pixel points whose pre-recognition result is that they belong to the water body area and the number of pixel points whose pre-recognition result is that they do not belong to the water body area is less than a preset difference.
[0105] This embodiment can improve the efficiency of determining the characteristics of the adapter by limiting the total area of the sampling area, and can reduce the difference in the number of pixels of different pre-recognition results for the sampling area, thereby facilitating the subsequent improvement of the balance of the constructed training sample set and improving the training effect of the random forest model.
[0106] The method flow does not limit the number of sampling areas determined. Optionally, one or more sampling areas may be determined.
[0107] In an optional embodiment, the number of sampling areas can be determined according to the proportion of pixels in the first comprehensive image whose pre-identification result is a water area. This embodiment does not limit the specific determination method. Optionally, the number of sampling areas can be negatively correlated with the proportion of pixels in the first comprehensive image whose pre-identification result is a water area.
[0108] Of course, the number of sampling areas can also be determined based on other criteria. In a specific example, the water body to be identified can be a river. Based on the area of the water body obtained by pre-identification and the length of the river, the average river width of the target basin can be calculated. Then, twice the river width can be used as the side length of the sampling area. The sampling area can be a square. Let the total area of the sampling area be 1% of the target basin area, and the expected number of sampling areas can be calculated.
[0109] S104: For any sampling area, perform the following steps to determine the corresponding candidate sub-features: construct a training sample set based on the targeted sampling area; wherein different training samples correspond to different pixels in the targeted sampling area; the sample label of any training sample is used to characterize the pre-recognition result of the corresponding pixel; the sample feature of any training sample includes a number of sample sub-features, and any sample sub-feature is used to characterize the water body index of the pixel corresponding to the sample; based on the constructed training sample set, train a random forest model for predicting whether the pixel corresponding to the input sample belongs to the water body area; based on the trained random forest model, determine the feature importance of different sample sub-features; based on the sample sub-feature with the highest feature importance, determine the candidate sub-feature corresponding to the targeted sampling area.
[0110] It can be understood that corresponding candidate sub-features can be determined for each determined sampling area.
[0111] Each step in S104 is explained below.
[0112] 1) Construct a training sample set.
[0113] The method flow does not limit the specific way of constructing the training sample set.
[0114] Optionally, training samples can be constructed for pixels in the sampling area. A single pixel can be used to construct a training sample. Training samples can be constructed for multiple pixels respectively to obtain multiple training samples and add them to the training sample set. Constructing a training sample usually requires sample features and sample labels.
[0115] For the sample label, optionally, the sample label can be determined based on the pre-recognition result of the corresponding pixel point. The sample label of the training sample can be used to characterize the pre-recognition result of the corresponding pixel point. This embodiment does not limit the specific form of the sample label. Specifically, the label value can be 1, indicating that the pre-recognition result belongs to the water body area; the label value can be 0, indicating that the pre-recognition result does not belong to the water body area.
[0116] For sample features, the sample features can be optionally determined based on the water index of the corresponding pixel points. To determine the water index for the pixel points in the remote sensing image, remote sensing information is required. When constructing training samples, the method process does not limit the specific remote sensing information source.
[0117] Optionally, the value of the water index can be determined directly based on the value of the pixel point in the first comprehensive image (remote sensing information) to obtain the sample characteristics. The value of the water index can also be determined based on the remote sensing information of the pixel point in other remote sensing data sources to obtain the sample characteristics. Among them, the pixel point position in the first comprehensive image can be used to characterize a local area in the target geographical area, so that the value of the water index can be determined based on the remote sensing information collected for the same local area in other remote sensing data sources during the same period of time to obtain the sample characteristics.
[0118] Based on different types of water body indices, different sample feature types can be obtained.
[0119] It is understandable that the determined sample feature may further include multiple feature types. For the convenience of description and distinction, the feature types included in the sample feature are referred to as sample sub-features. In other words, the sample feature may include multiple sample sub-features.
[0120] Therefore, optionally, a sample sub-feature can be determined based on any water body index of the pixel point corresponding to the sample, and the determined sample sub-feature can be used to characterize the water body index. Different sample sub-features can be determined based on different water body indices.
[0121] In a specific example, the sample feature may include water body indexes 1-5, and each water body index may be a sample sub-feature.
[0122] As for the source of remote sensing information, optionally, when constructing a single training sample, a single remote sensing information source may be used, or multiple remote sensing information sources may be used. For example, the sample features may include water body indexes 1-10, where water body indexes 1-5 are determined based on remote sensing information in the first integrated image, and water body indexes 6-10 are determined based on remote sensing information in other remote sensing data sources.
[0123] Of course, the remote sensing information source can also be used as an additional attribute of the water body index, so that multiple different sample sub-features can be subdivided based on a single water body index.
[0124] Optionally, the sample sub-feature can be used to characterize: the water body index of the pixel corresponding to the sample, and the remote sensing data source used to determine the water body index value of the pixel corresponding to the sample. This embodiment does not limit the specific form of the sample sub-feature, which can be in the form of "remote sensing data source-water body index". The remote sensing data source is, for example, a Landsat data source and / or a Sentinel2 data source.
[0125] For ease of understanding, two examples of different training samples are given below.
[0126] Sample example 1: The feature is water body index 1-10, and the label represents "belonging to the water body area". Each water body index is a sample sub-feature.
[0127] Sample Example 2: The feature is (remote sensing data source 1-water body index 1; remote sensing data source 1-water body index 2; remote sensing data source 1-water body index 3; remote sensing data source 2-water body index 1; remote sensing data source 2-water body index 2; remote sensing data source 2-water body index 3), and the label represents "not belonging to the water body area". Each "remote sensing data source-water body index" is a sample sub-feature.
[0128] Optionally, for multiple or each pixel point in the sampling area, training samples can be constructed based on the above embodiment and added to the training sample set; or pixels can be selected in the sampling area, and training samples can be constructed based on the above embodiment and added to the training sample set. This embodiment does not limit the way of selecting pixels, and specifically can be to select the same number of pixels with different pre-recognition results, that is, among the selected pixels, the number of pixels whose pre-recognition results are that they belong to the water body area is the same as the number of pixels whose pre-recognition results are that they do not belong to the water body area. Thereby, the balance of samples with different labels in the training sample set can be improved, and the training effect of the subsequent random forest model can be improved.
[0129] 2) Based on the constructed training sample set, a random forest model is trained to predict whether the pixel point corresponding to the input sample belongs to the water area.
[0130] This method does not limit the specific random forest model structure, nor does it limit the training method of the random forest model.
[0131] For ease of understanding, Figure 2 A schematic diagram showing an example of a random forest model according to an embodiment of the present disclosure is shown. Figure 2 As shown in Figure 1, the random forest model can include three decision trees. The non-leaf nodes in each decision tree can divide the input samples into sub-nodes based on the features, and the leaf nodes can determine the corresponding classification results. Figure 2As shown in the figure, an example of division is given. The input sample can be divided into different subnodes according to whether the water index 1 is greater than the threshold a. If the water index is greater than the threshold a, the input sample can be divided into the left node; if the water index is less than or equal to the threshold a, the input sample can be divided into the right node. The division of other non-leaf nodes can refer to this example.
[0132] 3) Based on the trained random forest model, determine the feature importance of different sample sub-features.
[0133] The process of this method does not limit the specific way to determine the importance of features, nor does it limit the specific form of feature importance. In the random forest model, feature importance can be used to measure the contribution of each input feature to the model's prediction ability. In the embodiment of the present disclosure, feature importance can characterize the water body recognition effect of water body recognition using sample sub-features. Accordingly, in the case where the sample sub-features characterize the water body index, feature importance can be used to characterize the water body recognition effect of water body recognition using the water body index.
[0134] Optionally, in the trained random forest model, any non-leaf node may correspond to a sample sub-feature, and any non-leaf node may be used to divide the input sample into corresponding sub-nodes based on the corresponding sample sub-feature. Any non-leaf node may perform sample splitting based on the corresponding sample sub-feature.
[0135] For ease of understanding, in a specific example, any non-leaf node in the trained random forest model can be used to divide the input sample into the corresponding sub-node according to whether the corresponding sample sub-feature value is greater than the threshold. For example, the input sample whose corresponding sample sub-feature value is greater than the threshold can be divided into the left node in the sub-node; the input sample whose corresponding sample sub-feature value is not greater than the threshold can be divided into the right node in the sub-node. Through the decision tree in the random forest model, the input sample can be finally divided into a leaf node. Any leaf node in the trained random forest model can correspond to the corresponding classification category, for example, belonging to the water body area or belonging to the non-water body area, so that the prediction result of the input sample can be determined to belong to the water body area or the non-water body area.
[0136] Accordingly, the feature importance of the corresponding sample sub-feature can be determined based on the Gini impurity of the non-leaf node. This embodiment does not limit the specific manner of determining the feature importance of the corresponding sample sub-feature based on the Gini impurity of the non-leaf node.
[0137] Optionally, since there may be multiple different non-leaf nodes corresponding to the same sample sub-feature in the random forest model, the mean Gini impurity between the non-leaf nodes corresponding to the same sample sub-feature can be determined as the feature importance of the sample sub-feature.
[0138] Optionally, the decision tree dimension in the random forest model can also be considered. Based on the trained random forest model, the feature importance of different sample sub-features is determined, which can be specifically: for any non-leaf node in the trained random forest model, the node importance is determined based on the Gini impurity of the non-leaf node and the Gini impurity of the sub-nodes of the non-leaf node; in any decision tree in the trained random forest model, for any sample sub-feature, the sum of the node importances of different non-leaf nodes corresponding to the sample sub-feature is determined as the tree importance of the sample sub-feature; for any sample sub-feature, the mean of the tree importance is determined based on the tree importance of the sample sub-feature in different decision trees, and the feature importance of the sample sub-feature is determined based on the determined mean of the tree importance.
[0139] This embodiment can determine the feature importance through the Gini impurity of non-leaf nodes and child nodes, measure the feature importance from multiple dimensions, and improve the comprehensiveness and accuracy of the feature importance.
[0140] This embodiment does not limit the specific method of determining the importance of a node. The importance of a node may be the feature importance of a sample sub-feature measured from the dimension of a single node. Specifically, the importance of a node may be obtained by subtracting the Gini impurity of a child node of the non-leaf node from the Gini impurity of the non-leaf node.
[0141] Optionally, for any non-leaf node in the trained random forest model, the node importance is determined based on the Gini impurity of the non-leaf node and the Gini impurity of the child nodes of the non-leaf node. Specifically, the following steps may be performed for any non-leaf node in the trained random forest model: the weighted sum of the Gini impurities of the child nodes is determined between different child nodes of the non-leaf node; the weight corresponding to any child node is: the ratio between the number of samples divided into the child node and the number of samples divided into the non-leaf node; the difference between the Gini impurity of the non-leaf node and the weighted sum of the determined child node Gini impurities is determined; the product of the determined difference and the preset non-leaf node weight is determined as the node importance; the preset non-leaf node weight is: the ratio between the number of samples divided into the non-leaf node and the total number of samples input into the decision tree to which the non-leaf node belongs.
[0142] This embodiment can determine the weight by the proportion of sample quantity, perform weighted calculation on Gini impurity, and improve the comprehensiveness and accuracy of node importance. It is understandable that the above steps can be performed to determine the node importance for each non-leaf node in the random forest model.
[0143] This embodiment does not limit the specific method of determining tree importance. The tree importance can be specifically the feature importance of the sample sub-feature measured from the dimension of a single decision tree. Specifically, for a single sample sub-feature, if there is a corresponding node in the same decision tree, the sum of the node importances of the corresponding nodes can be determined as the tree importance of the sample sub-feature. Of course, the mean, median, mode, etc. between the node importances of the corresponding nodes can also be determined as the tree importance of the sample sub-feature.
[0144] Optionally, in each decision tree in the trained random forest model, for each sample sub-feature, the sum of the node importances of different non-leaf nodes corresponding to the targeted sample sub-feature may be determined as the tree importance of the targeted sample sub-feature.
[0145] This embodiment does not limit the specific method of determining feature importance based on tree importance. Specifically, the determined tree importance mean may be directly determined as the feature importance of the sample sub-feature. Alternatively, the weight may be determined in combination with the classification accuracy of each decision tree, so that the weighted sum of the tree importance of the sample sub-feature in each decision tree may be determined as the feature importance of the sample sub-feature.
[0146] 4) Based on the sample sub-features with the highest feature importance, determine the candidate sub-features corresponding to the sampling area.
[0147] The candidate sub-features may specifically be sample sub-features with higher feature importance determined based on a single sampling area.
[0148] The method flow is not limited to a specific method of determining the candidate sub-features corresponding to the sampling area based on the sample sub-feature with the highest feature importance.
[0149] Optionally, the sample sub-feature with the highest feature importance may be directly determined as the candidate sub-feature corresponding to the targeted sampling area. Alternatively, the sample sub-features may be sorted from high to low according to feature importance, and the first few sample sub-features with the highest feature importance may be determined as the candidate sub-features corresponding to the targeted sampling area. This embodiment does not limit the number of candidate sub-features, which may be one or more.
[0150] S105: Determine an adaptation sub-feature based on the candidate sub-features with the largest number of occurrences among the candidate sub-features corresponding to different sampling areas.
[0151] The adapter sub-feature may specifically be a sample sub-feature adapted to the target geographical area within the target time period, and may specifically be a sample sub-feature with higher feature importance in more sampling areas, thereby determining that the sample sub-feature has a better effect in identifying water bodies in the target geographical area within the target time period.
[0152] This embodiment does not limit the number of aptamer features, which may be one or more.
[0153] The method flow does not limit the specific way of determining the adapter feature. Optionally, the adapter feature can be determined from the candidate sub-features corresponding to all the determined sampling areas, or the adapter feature can be determined from the candidate sub-features corresponding to multiple sampling areas.
[0154] Optionally, the candidate sub-feature with the most occurrences can be directly determined as the adapter sub-feature among the candidate sub-features corresponding to different sampling areas. If there are multiple candidate sub-features with the most occurrences, a selection can be further made based on the corresponding feature importance, and the candidate sub-feature with the most occurrences and the highest feature importance can be determined as the adapter sub-feature. Therefore, the adapter sub-feature can be determined based on the feature importance and the number of occurrences. Of course, it is also possible to directly determine multiple candidate sub-features with the most occurrences as adapter sub-features among the candidate sub-features corresponding to different sampling areas.
[0155] For ease of understanding, Figure 3 A schematic diagram showing a process of determining aptamer characteristics according to an embodiment of the present disclosure is shown. Figure 3 As shown, the first comprehensive image is sampled to obtain four sampling areas, namely sampling areas 1-4. Then, the random forest model can be trained for the sampling areas respectively to determine the candidate sub-features, and then the adapted sub-features can be determined from the candidate sub-features.
[0156] The four determined candidate sub-features are sample sub-feature 1, sample sub-feature 1, sample sub-feature 1, and sample sub-feature 2. Therefore, sample sub-feature 1, which appears the most times, can be determined as the matching sub-feature.
[0157] 3. Water body identification based on adaptor characteristics.
[0158] S106: Based on the adapted water body index represented by the determined adaptor feature, water body identification is performed for the target geographical area within the target time period.
[0159] The process of this method does not limit the specific way of identifying water bodies based on the adaptive water index. Optionally, the maximum inter-class variance method can be used for the adaptive water index to identify water bodies; or based on a preset adaptive water index threshold, the pixel points or areas whose corresponding adaptive water index values are greater than the preset adaptive water index threshold are determined as water areas; the pixel points or areas whose corresponding adaptive water index values are less than or equal to the preset adaptive water index threshold are determined as non-water areas.
[0160] In the case where multiple adapter features are determined, the process of this method does not limit the specific water body identification method. Optionally, one adapter feature can be selected from multiple adapter features for water body identification; water body identification can also be performed for different adapter features respectively, and then the water body identification results can be integrated, specifically taking the intersection of the water body identification results; water body identification can also be performed based on multiple adapter features, and the pixel points or areas that meet the conditions of multiple adapter features are determined as water body areas, etc.
[0161] In an optional embodiment, the specific water body identification requires the remote sensing data source to determine the adaptive water body index value in the target geographical area within the target time period. This embodiment does not limit the specific remote sensing data source.
[0162] Optionally, the remote sensing data source used in S101 can be directly used, that is, the first remote sensing image set can be used to identify water bodies. Specifically, the first comprehensive image can be directly used to identify water bodies based on the adaptive water body index. Other image integration methods can also be used to obtain a new comprehensive image, and water bodies can be identified based on the adaptive water body index.
[0163] Of course, other remote sensing data sources may also be used, and this embodiment does not limit the specific method of determining the remote sensing data source.
[0164] Optionally, when the water body is a river, the remote sensing data source can be determined based on the width of the river. The resolutions of different remote sensing data sources may be different. When the river width is wide, since the water body area accounts for a high proportion, a remote sensing data source with a lower resolution can be used, thereby reducing the amount of calculation and improving the efficiency of water body identification. When the river width is narrow, since the water body area accounts for a low proportion, in order to improve the accuracy of water body identification, a remote sensing data source with a higher resolution can be used.
[0165] Therefore, the remote sensing data source can be determined based on the proportion of water body areas, and the specific proportion of water body areas can be determined based on the pre-recognition results. Optionally, when the proportion of water body areas in the pre-recognition results of the first comprehensive image is greater than a preset water body proportion threshold, a remote sensing data source with a lower resolution can be selected from multiple remote sensing data sources as the remote sensing data source for water body identification in S106; when the proportion of water body areas in the pre-recognition results of the first comprehensive image is less than or equal to the preset water body proportion threshold, a remote sensing data source with a higher resolution can be selected from multiple remote sensing data sources as the remote sensing data source for water body identification in S106.
[0166] In addition, optionally, the above sample sub-features can also characterize the remote sensing data source, which can be in the form of "remote sensing data source-water body index". Therefore, the remote sensing data source for water body identification in S106 can be determined based on the remote sensing data source characterized by the above determined adapter sub-features.
[0167] Optionally, any sample sub-feature can be used to characterize: the water body index of the pixel point corresponding to the sample, and the remote sensing data source used to determine the water body index value of the pixel point corresponding to the sample; based on the adaptive water body index represented by the determined adaptive sub-feature, water body identification is performed for the target geographical area within the target time period. Specifically, it can be: based on the adaptive water body index represented by the determined adaptive sub-feature and the adaptive remote sensing data source, water body identification is performed for the target geographical area within the target time period.
[0168] This embodiment can introduce the information of the remote sensing data source into the sample sub-features, so as to facilitate the determination of the adaptability of the remote sensing data source to the target geographical area within the target time period, and by determining the adaptation sub-features, the adaptability of the remote sensing data source to the target geographical area within the target time period can be improved, the water body identification effect can be improved, and the accuracy of water body identification can be improved. Among them, this embodiment can facilitate the adaptive determination of the adapted remote sensing data source and the adapted water body index for different identification objects to perform water body identification, thereby improving the adaptability and flexibility of water body identification.
[0169] This embodiment does not limit the specific method of performing water body identification based on adapting the remote sensing data source.
[0170] Optionally, based on the adaptive water body index represented by the determined adapter feature and the adaptive remote sensing data source, water body identification is performed for the target geographical area within the target time period. Specifically, the method may include: determining a second remote sensing image set collected for the target geographical area within the target time period from the adaptive remote sensing data source represented by the determined adapter feature; integrating the second remote sensing image set to obtain a second integrated image; and performing water body identification on the second integrated image based on the adaptive water body index represented by the determined adapter feature.
[0171] This embodiment can comprehensively adapt the second remote sensing image set in the remote sensing data source, perform water body identification on the second comprehensive image, and improve the precision and accuracy of water body identification.
[0172] The specific explanation of this embodiment can refer to the relevant explanation of the water body pre-identification stage above. Among them, the explanation of the second comprehensive image can refer to the explanation of the first comprehensive image above.
[0173] For ease of understanding, an optional embodiment is given below, in which a weighted fusion method may be used to obtain the second composite image.
[0174] Optionally, the second remote sensing image set is integrated to obtain a second composite image, which can be specifically as follows: declouding is performed on each second remote sensing image in the second remote sensing image set, and the image quality of each second remote sensing image is determined; the image quality is negatively correlated with the cloud layer ratio; a median image is determined for the second remote sensing image after declouding; for any pixel position, the value of the pixel position targeted in the determined median image is the median between the values of the second remote sensing images at the pixel position targeted after declouding; weighted fusion is performed on each second remote sensing image after declouding to obtain a second composite image; wherein the weight corresponding to any second remote sensing image is positively correlated with the image quality, and negatively correlated with the degree of difference between the second remote sensing image and the median image; in the case where there is a missing pixel value in the obtained second composite image, the missing pixel value in the second composite image is determined based on the value determined at the pixel position outside the target time period in the adapted remote sensing data source.
[0175] This embodiment can integrate more effective information in the second remote sensing image set for water body identification through cloud removal processing and weighted fusion, thereby improving the comprehensiveness and accuracy of water body identification.
[0176] The present embodiment does not limit the specific weighted fusion method. Optionally, weighted fusion may be performed pixel by pixel, and for a single pixel position, the values of each second remote sensing image after cloud removal at the targeted pixel position may be weighted fused according to the above-mentioned corresponding weights. The specific weight may be positively correlated with the image quality, and negatively correlated with the difference between the value of the second remote sensing image after cloud removal at the targeted pixel position and the value of the median image at the targeted pixel position. The present embodiment does not limit the specific weight determination method.
[0177] This embodiment also does not limit the specific object of weighted fusion. Optionally, in addition to each second remote sensing image after cloud removal, weighted fusion can also be performed in combination with the median image, that is, weighted fusion is performed on the median image and each second remote sensing image after cloud removal to obtain a second composite image. This embodiment does not limit the weight corresponding to the median image. The weight corresponding to the median image can be positively correlated with the image quality.
[0178] This embodiment does not limit the supplementation operation performed when the pixel value is missing. The supplementation can be performed based on the value determined at the pixel point position of the missing value outside the target time period in the adaptive remote sensing data source.
[0179] Optionally, it is possible to search from front to back frame by frame after the target period in the adapted remote sensing data source for pixels where values are missing and which do not belong to the cloud area, so that they can be supplemented to the corresponding pixel positions in the second comprehensive image. It is also possible to search from back to front frame by frame before the target period in the adapted remote sensing data source for pixels where values are missing and which do not belong to the cloud area, so that they can be supplemented to the corresponding pixel positions in the second comprehensive image. It is also possible to combine the above two methods and supplement based on the image closest to the target period. By searching frame by frame, it is possible to supplement based on images near the target period as much as possible, thereby improving the accuracy and comprehensiveness of the information in the second comprehensive image and facilitating the improvement of the accuracy of subsequent water body identification.
[0180] The process of this method does not limit the specific water body identification process and the form of the water body identification results.
[0181] In an optional embodiment, the water body identification result can be specifically in the form of a water body mask. Optionally, based on the adapted water body index characterized by the determined adapter feature, water body identification can be performed on the second comprehensive image to obtain a water body index mask. A water body index mask generally refers to a continuous value image obtained by calculating a water body index (such as NDWI, MNDWI, etc.), and the value of each pixel reflects the possibility or intensity of the water body at that location. The water body index mask can also be converted into a binary image to clearly identify water bodies and non-water body areas, and each pixel value in the water body index mask can be used to indicate that the corresponding pixel position is a water body or a non-water body. Specifically, the water body index mask can be used as a water body mask, that is, a water body identification result. The water body mask can also be a binary image or raster data used to clearly identify the water body area in the remote sensing image. Each pixel is marked as a water body (usually represented by 1) or a non-water body (usually represented by 0), which can be used to characterize the corresponding pixel position as a water body or a non-water body.
[0182] Optionally, masks obtained by other methods may be combined to obtain a final water body mask. Specifically, the water body may be identified for the second comprehensive image based on the adapted water body index characterized by the determined adapter feature, and specifically: based on the adapted water body index characterized by the determined adapter feature, water body identification is performed for the second comprehensive image to obtain a water body index mask; for the second comprehensive image, at least one of the following preset masks for water body identification is determined: a dark band mask, a slope mask, and a connected pixel index mask; the water body mask is determined by combining the obtained water body index mask and the determined at least one preset mask.
[0183] This embodiment can improve the comprehensiveness and accuracy of the water body mask by integrating the mask for water body identification obtained in multiple ways.
[0184] This embodiment does not limit the specific form and determination method of the preset mask. Optionally, for the second comprehensive image, a dark band mask for water body identification can be determined based on pixels with a value less than 0.4 in the three infrared bands; for the second comprehensive image, a slope mask for water body identification can be determined based on pixels with a slope less than 10°; for the second comprehensive image, a connected pixel index mask for water body identification can be determined based on pixels with a number of connected pixels greater than 20. Of course, other water body index masks can also be determined as preset masks based on other water body indexes.
[0185] This embodiment does not limit the specific comprehensive method. Optionally, the intersection between the water body index mask and the preset mask can be determined as the water body mask; or the union between the water body index mask and the preset mask can be determined as the water body mask.
[0186] The process of this method does not limit the specific role of the water body identification result. Optionally, the water body area can be analyzed based on the water body identification result.
[0187] Optionally, after water body recognition is performed for the target geographical area within the target period, water body surface information may be extracted for the area recognized as a water body in the target geographical area within the target period based on the result of water body recognition. More specifically, water body surface information may be extracted for the area covered by the water body mask in the target geographical area within the target period based on the water body mask.
[0188] Among them, water surface information refers to various data and parameters that describe the surface characteristics and status of water bodies, and is widely used in water resources management, environmental monitoring, weather forecasting, oceanographic research and other fields. This information can be obtained through remote sensing technology, field measurements and other observation methods, and used to analyze and interpret the physical, chemical and biological characteristics of water bodies. Water surface information, for example, water level, water temperature, color, reflectivity, etc.
[0189] This embodiment can extract water body surface information based on the water body recognition result, and can improve the comprehensiveness and accuracy of the water body surface information with the help of the water body recognition result with higher accuracy.
[0190] The disclosed embodiment also provides a process of another water body identification method.
[0191] The method may include the following steps:
[0192] S201: Pre-identify water bodies in a target geographical area within a target period of time to obtain a pre-identification result of whether a local area in the target geographical area belongs to a water body area.
[0193] S202: Determine at least one sampling area in the target geographical area; any sampling area includes several local areas.
[0194] S203: For any sampling area, perform the following steps to determine the corresponding candidate sub-features: construct a training sample set based on the targeted sampling area; wherein different training samples correspond to different local areas in the targeted sampling area; the sample label of any training sample is used to characterize the pre-identification result of the corresponding local area; the sample feature of any training sample includes a number of sample sub-features, and any sample sub-feature is used to characterize the water body index of the local area corresponding to the sample; based on the constructed training sample set, train a random forest model for predicting whether the local area corresponding to the input sample belongs to the water body area; based on the trained random forest model, determine the feature importance of different sample sub-features; based on the sample sub-feature with the highest feature importance, determine the candidate sub-feature corresponding to the targeted sampling area.
[0195] S204: Determine an adaptation sub-feature based on the candidate sub-features with the largest number of occurrences among the candidate sub-features corresponding to different sampling areas.
[0196] S205: Based on the adapted water body index represented by the determined adaptor feature, water body identification is performed for the target geographical area within the target time period.
[0197] In the process of this method, a local area in the target geographical area can be used as a unit to train a random forest model to determine the adaptor characteristics.
[0198] In the process of this method, the target geographical area may be divided into a plurality of local areas. The process of this method does not limit the form and division method of the local areas.
[0199] In an optional embodiment, the local area can be specifically an area represented by a single pixel in the remote sensing image, and the local area can be represented by the pixel in the remote sensing image. Accordingly, the specific explanation of the process of this method can refer to the above method embodiment. Of course, the local area can also be obtained by dividing the target geographical area according to a preset size.
[0200] The water index of a local area can be determined based on the water index of the corresponding pixel point, or it can be determined directly from the remote sensing data source by obtaining remote sensing information collected for the local area during the target period.
[0201] In addition, it can be understood that, in the case where a local area contains pixels in multiple remote sensing images, the values of the pixels contained can be combined to determine the remote sensing information value of the local area. For example, the mean value of the pixel values contained in the local area (that is, the mean value of the values of each band) can be determined as the remote sensing information value of the local area, which is used for pre-identification of water bodies to obtain pre-identification results of the local area. Accordingly, the water body index of the local area can be determined based on the remote sensing information value. Of course, other comprehensive methods can also be used, and this embodiment is not limited. For example, the median of the pixel values contained in the local area, the mode of the pixel values contained in the local area, or the weighted mean of the pixel values contained in the local area, etc., are determined as the remote sensing information value of the local area.
[0202] Optionally, any sample sub-feature can be used to characterize: the water body index of the local area corresponding to the sample, and the remote sensing data source used to determine the value of the water body index of the local area corresponding to the sample; based on the adaptive water body index represented by the determined adaptive sub-feature, water body identification is performed for the target geographical area within the target time period. Specifically, it can be: based on the adaptive water body index represented by the determined adaptive sub-feature and the adaptive remote sensing data source, water body identification is performed for the target geographical area within the target time period.
[0203] The specific explanation of the process of this method can be found in the above method embodiments.
[0204] For ease of understanding, the present disclosure also provides two application examples.
[0205] Application Example 1.
[0206] River surface information is one of the important characteristics of rivers, and it is of irreplaceable importance in the fields of hydrological research, water resources management, ecological protection, and agricultural development. Specifically, river surface information includes hydrodynamic conditions, riverbed morphology conditions, and river water quality conditions. As a subordinate branch of river hydrodynamic conditions, the extraction method of river surface water body morphology has always attracted much attention. Traditional methods, including the construction of ground observation stations and field investigation teams, require high manpower and economic costs, and are subject to greater environmental constraints, making it difficult to effectively implement in extreme areas. In order to solve the difficulties and challenges faced by traditional methods, methods for extracting water body morphology using high-resolution satellite remote sensing images have emerged. Remote sensing methods enable researchers to obtain multispectral data at all times around the world conveniently and efficiently without being restricted by time and space factors, and have unparalleled advantages over traditional methods. At the same time, remote sensing platforms such as Google Earth Engine (GEE) provide many interfaces for remote sensing image processing, further simplifying the data processing process and improving efficiency and convenience.
[0207] The water extraction technology in remote sensing images is constantly developing, from the early threshold method and multi-band analysis to the current machine learning algorithm, and then to the application of deep learning. Each method has its advantages and limitations under specific conditions. The threshold method is simple and fast, but it is greatly affected by terrain and lighting conditions, and performs poorly in extracting water bodies over a large spatial range and long time scales. Machine learning methods, such as SVM and decision tree methods, improve classification accuracy by analyzing sample features, avoiding the problem that subjectively selected fixed thresholds do not work well in specific scenarios, but the methods have high requirements on sample representativeness and quality, and when the sample data volume is too large, the operability is poor. Deep learning methods are mainly divided into two representative structures: full convolutional networks and encoder-decoders, which can learn and abstract the deep features of remote sensing images. The disadvantage is that a large amount of training data is required and the interpretability is not strong, and its generalization is also restricted by data diversity. In order to take into account the accuracy and efficiency of river surface extraction, this embodiment proposes a one-click river surface water body information extraction method based on the GEE remote sensing platform, which realizes efficient and accurate recognition of river surface information.
[0208] In this embodiment, the remote sensing data source can be selected according to the target time range and the median image can be calculated. The water body index method, such as the modified normalized difference water index (MNDWI), is used to preliminarily identify the water body area and generate a pre-identification result. Subsequently, the river width is calculated based on the pre-identification result, and the area and total number of each pre-experimental area are determined according to the river width and the basin area, and the pre-experimental area is automatically divided based on the pre-identification result. The random forest model is trained in the pre-experimental area, and the water body index and the corresponding remote sensing data source are optimized by the Gini impurity index. Based on the optimization result, the data source is selected, and the cloud mask is obtained by multi-band combination, the differential weighted fusion based on the median image of the remote sensing image and the image quality score, and the image filling method of gradually extending the time range and combining the image quality score is finally obtained. A complete cloudless and target time range regional multi-source fusion image. Based on the optimal water body index, the maximum inter-class variance method Otsu algorithm is used to calculate the optimal segmentation threshold, and a refined water body mask is generated in combination with the dark band index, the slope index and the connected pixel index.
[0209] This embodiment achieves efficient optimization and fusion of remote sensing data, and can provide high-precision river surface information extraction results in complex environments.
[0210] This embodiment provides an adaptive river surface water body information extraction method based on the GEE remote sensing platform. In view of the current limitations of the existing river surface information extraction algorithms, such as cumbersome and difficult, low operating efficiency, high manual participation cost, difficulty in realizing multi-source remote sensing observation, algorithms limited to traditional machine learning, and poor generalizability, the first aspect of this embodiment provides a method for automatically selecting the optimal water body index, remote sensing data source, and segmentation threshold. The second aspect of this embodiment establishes a fully automatic river surface information extraction process without manual intervention.
[0211] The present embodiment relates to a water body extraction and analysis method based on the GEE platform. First, the user inputs the target watershed and time range, and the water body pre-identification module obtains the water body pre-identification result. Then, the remote sensing image preprocessing module selects the Landsat series or Sentinel2 as the satellite data source by calculating the river width, performs band normalization processing, and generates a cloud mask, and then obtains a complete cloudless regional multi-source fusion image by gradually extending the time range. Next, the water body index optimization module adaptively divides the pre-experimental area, establishes a random forest classification model, calculates the Gini impurity coefficient of each water body index, and sorts to obtain the optimal water body index. Finally, the water body extraction module is run, and the water body index threshold is automatically calculated using the Otsu method to obtain the water body index mask and combine the dark band index, slope, and connected pixel index mask to generate a refined water body mask.
[0212] The algorithm provided in this embodiment is divided into 4 parts:
[0213] 1. Water body pre-identification module, quickly generates water body masks for subsequent modules;
[0214] 2. Pre-experimental module, which adaptively determines the number and size of pre-experimental areas and selects pre-experimental areas, and selects the most suitable water index and remote sensing data source by establishing a random forest model and calculating the Gini impurity index;
[0215] 3. Remote sensing image processing module, used to screen and process remote sensing images, and complete cloud removal, synthesis and filling of remote sensing images;
[0216] 4. Water body extraction module, which uses the OTSU method to calculate the given water body index threshold, obtains the water body index mask, and combines other masks to output a refined water body mask;
[0217] The order of use of each part is: water body pre-identification-preliminary experiment-remote sensing image processing-water body extraction.
[0218] Figure 4 A flow chart of another water body identification method according to an embodiment of the present disclosure is shown. Specifically, the following steps may be included:
[0219] Step 1: Data Preparation: This embodiment requires the user to input the boundary of the target watershed (shp format) and the target time range (starting and ending year, month, and day).
[0220] Step 2: Water body pre-classification: Generate a median image of all remote sensing images within a given time and space range, and identify areas with an MNDWI index greater than 0 as water bodies as pre-identification results. Specifically, based on the target time range, select a remote sensing data source, calculate the median image of all remote sensing images within a given time and space range, and identify areas with an MNDWI index greater than 0 as water bodies based on the water body index method, and obtain preliminary river surface information as the pre-identification result. This step 2 may correspond to the water body pre-identification stage of the above-mentioned method flow.
[0221] Step 3: Automatic Water Index Optimization: Based on the river width and the target basin area, determine the area and total number of each pre-experimental area, and automatically divide the pre-experimental area based on the water body pre-identification results. In each pre-experimental area, the water body index is calculated based on the Landsat series and Sentinel series bands, and the random forest classification model is trained based on the median image obtained in step 2. The Gini impurity index is calculated based on the model to measure the importance of each water body index obtained based on the Landsat series and Sentinel2, so as to select the optimal water body index and the corresponding remote sensing data source. This step 3 can correspond to the stage of determining the adapter features in the above method flow.
[0222] Step 4: Image Quality Screening and Weighted Average Fusion: Specifically, a regional multi-source fusion image can be obtained. Select the data source based on the optimization results, obtain the cloud mask by combining multiple bands, perform differential weighted fusion based on the median image of the remote sensing image and the image quality score, gradually extend the time range and combine the image filling method with the image quality score, and finally obtain a complete and cloudless regional multi-source fusion image close to the target time range. Specifically, the remote sensing data source can be selected based on the optimization results, the cloud mask can be obtained by combining the visible light band, infrared band, and temperature band, and the quality of each image can be scored based on the cloud amount. The remote sensing image after cloud removal is differentially weighted fused based on the median image of the remote sensing image and the image quality score. For the missing parts of the fused image, the time range is gradually extended and the images with higher image quality scores are preferentially selected to fill each pixel, and finally a complete and cloudless regional multi-source fusion image close to the target time range is obtained.
[0223] Step 5: Automated Otsu Segmentation and Water Mask Generation: Apply the optimal index-Otsu algorithm to automatically calculate the optimal threshold of the water index, and generate a refined water mask based on the water index, dark band index, slope index, and connected pixel index.
[0224] Among them, step 4 and step 5 may correspond to the stage of water body identification based on adapter features in the above method flow. Step 4 may specifically correspond to the step of obtaining the second comprehensive image by weighted fusion, and step 5 may correspond to the step of determining the water body index mask and the water body mask.
[0225] In step three, the global river network platform data is imported to calculate the total length of rivers in the target basin. Combined with the river surface area obtained based on the water body pre-identification results, the average river width of the target basin is calculated to determine the area of each pre-experimental area, and the total number of pre-experimental areas is determined based on the target basin area. Finally, the pre-experimental areas are automatically divided based on the water body pre-identification results to ensure that the ratio of water bodies and non-water bodies in each area is as close to 1:1 as possible.
[0226] In step 4, based on the differential weighted fusion method of the median image of remote sensing images and the image quality score, the difference between each remote sensing image and the median image is calculated pixel by pixel and a weight is assigned. The image quality is scored according to the cloud cover to update the weight, and finally the remote sensing images are weightedly fused.
[0227] In step 4, the time range is gradually extended on the basis of a given time range and the image quality score is combined to fill the gaps in the remote sensing image. The image quality is scored according to the cloud cover. Each time the time range is extended, high-scoring images are used to fill the missing pixels to obtain a regional multi-source fusion image close to the target time range.
[0228] In step five, a plurality of masks obtained based on different indicators are synthesized to obtain a refined water body mask and thus obtain refined river surface information.
[0229] A more detailed explanation of the steps is provided below.
[0230] In this embodiment, the first task is to select the most suitable water index and the corresponding remote sensing data source through preliminary experiments to ensure that the most effective features are obtained in the river surface information extraction. Secondly, the remote sensing image needs to be declouded, synthesized, and filled. Finally, based on the automatically selected water index and the processed remote sensing image, the appropriate water index threshold is calculated to extract the river surface information of the entire basin.
[0231] Here are the detailed steps to achieve this:
[0232] Figure 5 A flow chart of another water body identification method according to an embodiment of the present disclosure is shown.
[0233] 1. Parameter input: Import the target watershed boundary and enter the extraction time range.
[0234] 2. Water body pre-identification: Perform preliminary identification of water bodies to provide a basis for the selection of pre-experimental areas and the construction of random forest classification models. According to the input time range and target watershed, a set of Sentinel2 images that meet the conditions is screened out. If the image does not exist, a set of Landsat series images that meet the conditions is screened out instead. According to the input time range and target watershed, the images are screened and cropped, and the image bands are normalized and de-clouded based on the built-in cloud band. The median image is then extracted as a remote sensing image for pre-identification applications, which can be the first comprehensive image in the above method embodiment. Based on this image, the MNDWI index is calculated, pixels greater than 0 are identified as water pixels, and the remaining pixels are identified as non-water pixels to obtain pre-identification results.
[0235] 3. Selection of pre-experimental area: The pre-experimental area here can be the sampling area in the above method embodiment. In combination with the actual situation of the target watershed, the pre-experimental area is adaptively delineated. According to the water body area obtained by pre-identification of the water body and the river length obtained by the Hydro30 global river network platform, the average river width of the target watershed is calculated, and twice the river width is used as the side length of the pre-experimental area; the total area of the pre-experimental area is set to 1% of the target watershed area, and the expected number of pre-experimental areas N is calculated (at least 4 and at most 16). Generate a minimum rectangle that completely covers the target watershed, and divide the length and width of the rectangle into M equal parts (M is greater than The target basin is divided into several sub-areas by connecting the corresponding equally divided points. The pixels in each sub-area of the target basin are traversed to obtain the ratio of water body and non-water body pixels when it is used as the center of the pre-experimental area. A pre-experimental area with a water body to non-water body ratio closest to 1:1 is selected for each sub-area.
[0236] The sub-region is the region divided by the lines connecting the corresponding equally divided points, and is used to traverse the pixel points (pixels) inside the sub-region to determine a pre-experimental region (ie, sampling region).
[0237] Figure 6 A schematic diagram of a pre-experimental area according to an embodiment of the present disclosure is shown.
[0238] 4. Automatic optimization of water index: Conduct a preliminary experiment in the selected pre-experimental area to determine the most appropriate water index and the corresponding remote sensing data source. This includes the following steps:
[0239] a. Index calculation: Use the selected index calculation formula to calculate different water body indices such as NDVI and Enhanced Vegetation Index (EVI) based on the bands of Landsat series and Sentinel2 remote sensing data sources.
[0240] b. Random forest model construction: Using the pre-identification results as labels, a random forest classification model is trained in each pre-experimental area based on the previously calculated water body indices.
[0241] c. Calculation of Gini impurity index: For each pre-experimental area, the Gini impurity index of each node of each tree is calculated according to the trained random forest model, and the average value is sorted as the comprehensive ranking of the Gini impurity index of the water body index, that is, the water body index is sorted according to the Gini impurity mean between the nodes corresponding to the same water body index, and the water body index with the lowest Gini impurity index is selected as the optimal water body index of the pre-experimental area, which can be the water body index represented by the candidate sub-feature in the above method embodiment. The optimal water body index with the highest frequency of occurrence in all pre-experimental areas is counted (if the number of times is the same, the average values of all Gini impurity indices corresponding to the water body index are compared), which is used as the optimal water body index used for water body identification, and the corresponding remote sensing data source is used as the data source for subsequent remote sensing image processing, which can be the adapted water body index and the adapted remote sensing data source represented by the adapted sub-feature in the above method embodiment.
[0242] 5. De-clouding and synthesis of remote sensing images: Through de-clouding and synthesis of remote sensing images, multi-source fusion remote sensing images required for water body identification are obtained. The following steps are included:
[0243] a. Image preprocessing: After determining the remote sensing data source, the images are screened and cropped according to the input time range and target watershed, and the bands are normalized. Then, the cloud mask is obtained by combining the visible light band, infrared band, and temperature band. Each image in the screened remote sensing image set is declouded, and the cloud cover ratio is used as the quality score C of each image.
[0244] b. Image weighted fusion: Then perform weighted fusion of images. After calculating the median image, calculate the difference ε between each image and the median image pixel by pixel and band by band, and combine the image quality score C to get the weight Based on the weight, the images are weightedly fused to obtain a preliminary multi-source fused remote sensing image, which may be the second comprehensive image obtained by weighted fusion in the above method embodiment.
[0245] c. Image filling: For pixels that are missing or covered by cloud masks in the multi-source fusion remote sensing image, the time range is gradually extended, and cloud-free pixels in remote sensing images with a low cloud cover ratio are preferentially selected to replace them, thereby obtaining a cloud-free remote sensing image, which can be the second comprehensive image after the missing pixel values are supplemented in the above method embodiment.
[0246] 6. Calculation of water body mask: Based on the cloud-free remote sensing image obtained in step 5 and the water body index selected in step 3, the Otsu method is used to calculate the water body index threshold to obtain the water body index mask. Calculate the pixels with a value less than 0.4 in the three infrared bands to obtain the dark band mask; import the Shuttle Radar Topography Mission (SRTM) elevation dataset, calculate the pixels with a slope less than 10° to obtain the slope mask; calculate the number of connected pixels greater than 20 to obtain the connected pixel index mask. Take the intersection of the water body index mask, dark band mask, slope mask, and connected pixel index mask to obtain the final water body mask, which can be the water body recognition result in the above method embodiment.
[0247] The specific method of selecting the optimal index based on the random forest model is explained below.
[0248] For a single decision tree:
[0249] The calling method calculates the node importance based on the Gini impurity index and sample ratio. The specific formula is as follows:
[0250] I=w(G b -G a )
[0251]
[0252] Among them, I is the node importance, w is the sample weight of the current node, G b is the Gini impurity index of the node before splitting, G a is the weighted sum of the Gini impurity of the two child nodes after the split, G a1 ,G a2 are the Gini impurity indexes of the two child nodes after splitting, N is the total number of samples, and N b is the number of samples before the current node splits, N a1 and N a2 are the number of samples of the two child nodes after splitting.
[0253] Gini Impurity Index Calculation p 1 ,p 2 is the ratio of water to non-water. The smaller the ratio, the purer the sample. The above G can be calculated by this formula. b , G a and G a1,G a2 .
[0254] For the random forest model of a region, the importance of each decision tree in the forest for each water index is averaged to obtain the importance index, which is then sorted by importance index to determine the optimal water index.
[0255] Application Example 2.
[0256] The background of this embodiment can refer to the background of the above-mentioned application embodiment 1, and the corresponding explanation can refer to the above-mentioned application embodiment 1.
[0257] The present embodiment relates to an adaptive river surface information extraction method based on the GEE remote sensing platform. First, the boundary of the target basin and the time range of the proposed target are input, and preliminary river surface information is obtained based on the water body index method. Based on the river surface area obtained from the pre-identification result, combined with the river length obtained from the Hydro30 global river network platform, the river section width is automatically calculated to select a satellite data source with matching resolution. In terms of image declouding and synthesis, on the basis of the target time series, the time range is gradually extended, registered, and fused to fill the part of the image covered by clouds, and a multi-source fused image of the area closest to the target period is obtained; based on the river surface pre-identification results, the pre-experimental area is automatically delineated to determine the optimal water body index; finally, based on the optimal index-Otsu algorithm, dark band index, slope index, and connected pixel index, detailed river surface information is obtained.
[0258] The method provided in this embodiment is divided into 4 parts:
[0259] 1. Water body pre-identification module, quickly generates water body masks for subsequent modules;
[0260] 2. Remote sensing image processing module, used to screen and process remote sensing images, and complete cloud removal, filling and synthesis of remote sensing images;
[0261] 3. A water body index optimization module adaptively selects a pre-experimental area based on a given target watershed area, and optimizes the most suitable water body index by establishing a random forest model and calculating the Gini coefficient; the Gini coefficient here can be the Gini impurity in the above method embodiment.
[0262] 4. Water body extraction module, which uses the OTSU method to calculate the given water body index threshold, obtains the water body index mask, and combines other masks to output a refined water body mask;
[0263] The order of use of each part is: water body pre-identification-remote sensing image processing-water body index optimization-water body extraction.
[0264] A water body extraction and analysis method based on the Google Earth Engine (GEE) platform. In this embodiment, the user first inputs the target watershed, time range, applied water body index and related parameters, and the water body pre-identification module obtains the water body pre-identification result. Subsequently, the remote sensing image preprocessing module selects Landsat or Sentinel2 as the satellite data source by calculating the river width, performs band normalization processing, and generates a cloud mask, and then obtains a complete cloudless regional multi-source fusion image by gradually extending the time range. Next, the water body index optimization module adaptively divides the pre-experimental area, establishes a random forest classification model, calculates the Gini impurity coefficient of each water body index, and sorts to obtain the optimal water body index. Finally, the water body extraction module is run, the Otsu method is used to automatically calculate the water body index threshold and combine the dark band index, slope, and Unicom pixel index mask to generate a refined water body mask.
[0265] An adaptive river surface information extraction method based on the GEE remote sensing platform first inputs the boundary of the target basin and the time range of the target, and obtains preliminary river surface information based on the water body index method. Based on the river surface area obtained from the pre-experimental results and the river length obtained from the Tsinghua University Hydro30 global river network platform, the river section width is automatically calculated to select a satellite data source with matching resolution. Based on the target time series, the time range is gradually extended, registered, and fused to fill the part of the image covered by clouds, and the multi-source fusion image of the area closest to the target period is obtained; and the pre-experimental area is adaptively delineated based on the pre-identification results, and the Gini coefficient is automatically calculated through the pre-experiment to determine the optimal water body index. Finally, the optimal index-Otsu algorithm, dark band index, slope index, and connected pixel index are combined to obtain detailed river surface information as the identification result.
[0266] Figure 7 A flow chart of another water body identification method according to an embodiment of the present disclosure is shown. Specifically, the following steps may be included:
[0267] Step 1: Data Preparation: This embodiment requires the user to input the target watershed (shp format), time range (start and end year, month and day), and river width threshold using Sentinel2 as the satellite data source.
[0268] Step 2: Water body pre-classification: Generate the median image of all remote sensing images within a given time and space range, and identify the areas with MNDWI index greater than 0 as water bodies as the pre-identification result. Specifically, the median image of all remote sensing images within a given time and space range can be calculated, and based on the water body index method, the areas with MNDWI index greater than 0 can be identified as water bodies, and the preliminary river surface information obtained can be used as the pre-identification result.
[0269] Step 3: Remote sensing image data source selection, image quality screening and differential weighted fusion (Image Quality Screening and Weighted Average Fusion): The algorithm calculates the average river width based on the water body area in the pre-identification results and the river length in the free-flowing river dataset. If the average river width is lower than the threshold entered by the user and the start time of the time range is after July 1, 2015, the Sentinel2 image is selected as the remote sensing image data source, otherwise the Landsat image is selected as the data source. The images within the given time and space range are normalized, clouded, and differentially weighted to obtain a multi-source fusion image of the cloud-free area. The vacant areas of the image are filled by gradually extending the time range algorithm, and finally a high-quality multi-source fusion image of the cloud-free area is generated. Users can adjust the relevant parameters according to actual needs to further improve the clarity and accuracy of the image. Specifically, it can be to obtain regional multi-source fusion images, select data sources based on pre-identification results, obtain cloud masks through multi-band combination, perform differential weighted fusion based on the median image of remote sensing images, gradually extend the time range to fill in the images, and finally obtain a complete cloudless regional multi-source fusion image that is closest to the target period.
[0270] Step 4: Automatic Water Index Optimization: Automatically divide the pre-experimental area based on the water body pre-identification results, and generate a random forest classification model based on the regional multi-source fusion image obtained in step 3. Based on the model, the Gini impurity index is calculated to measure the importance of each water body index, and the most important one is selected as the optimal water body index. Specifically, in the target watershed, the algorithm first determines the geometric center of the target watershed, and obtains the shortest distance from the geometric center to the boundary by the distance gradient method, and 1 / 5 of the distance is used as the side length of the square pre-experimental area (not less than 300m when Landsat is used as the data source, and not less than 100m when Sentinel2 is used as the data source). Then, four square pre-experimental areas are automatically selected and demarcated according to the results of water body pre-identification, so that the area ratio of water body to non-water body area in each area is as close to 1:1 as possible. In the pre-experimental area, the Gini impurity index is calculated using the random forest algorithm, and the most important water body index is selected after sorting as the basis for water body classification.
[0271] Step 5: Automated Otsu Segmentation and Water Mask Generation: Apply the optimal index-Otsu algorithm to automatically calculate the optimal threshold of the water index, and generate a refined water mask based on the water index, dark band index, slope index, and connected pixel index.
[0272] In step three, the global river network platform data is imported to calculate the total length of rivers in the target basin. The average river width of the target basin is calculated based on the river surface area obtained based on the water body pre-identification results, and Landsat (low resolution) or Sentinel2 (high resolution) is selected as the satellite data source based on the average river width.
[0273] In step three, the remote sensing image is searched by gradually extending the time range based on the given time range, filling the part of the remote sensing image covered by clouds, and obtaining the regional multi-source fusion image closest to the intended target time range.
[0274] In step 4, the size of the pre-experimental area is adaptively determined according to the target watershed, and four pre-experimental areas are automatically divided based on the water body pre-identification results to ensure that the ratio of water bodies to non-water bodies is closest to 1:1.
[0275] In step five, a plurality of masks obtained based on different indicators are synthesized to obtain a refined water body mask and thus obtain refined river surface information.
[0276] Given a date range, remote sensing images within that date range can be generated for each year at once.
[0277] In this embodiment, the first task is to select an appropriate water index to ensure that the most effective features are obtained in the river surface information extraction. Secondly, it is necessary to select an appropriate satellite data source and perform cloud removal and synthesis processing. Finally, based on the automatically selected water index and the processed remote sensing image, the appropriate water index threshold is calculated to extract the river surface information of the entire basin.
[0278] Here are the detailed steps to achieve this:
[0279] Figure 8 A flow chart of another water body identification method according to an embodiment of the present disclosure is shown.
[0280] 1. Parameter input: Import the target watershed boundary, input the extraction time range and the river width threshold using Sentinel2 imagery as the satellite data source.
[0281] 2. Water body pre-identification: According to the input time range and target watershed, select the Landsat image set that meets the conditions, normalize the bands, remove the clouds, and extract the median image as the remote sensing image for pre-identification application. Based on this image, calculate the MNDWI index, and identify the pixels greater than 0 as water pixels, and the rest as non-water pixels.
[0282] 3. Select satellite data source: Import the free-flowing river dataset and calculate the total length of rivers in the target basin; based on the pre-identification results, calculate the total area of rivers in the target basin. Then get the average river width. If the average river width is lower than the threshold entered by the user and the extraction time range is a period after July 1, 2015, select Sentinel2 images as the remote sensing image data source, otherwise select Landsat images as the data source.
[0283] 4. Declouding and synthesis of remote sensing images: Decloud each image in the screened remote sensing image set according to the band and temperature, and then perform weighted synthesis of the images based on the median image. For pixels covered by cloud masks in the synthetic image, gradually extend the time range and select cloud-free pixels to replace them, thus obtaining a cloud-free remote sensing image.
[0284] 5. Pre-experimental area selection: Adaptively select 4 square pre-experimental areas. First, determine the geometric center of the target basin according to the boundary of the target basin, and use the distance gradient method to obtain the shortest distance from the geometric center to the boundary. Use 1 / 5 of this distance as the side length of the pre-experimental area (not less than 300m when Landsat is used as the data source, and not less than 100m when Sentinel2 is used as the data source), and generate a minimum rectangle to completely cover the target basin. Connect the midpoints of the opposite sides of the rectangle to divide the target basin into four sub-areas. Traverse the pixels in each target basin to obtain the proportion of water and non-water pixels when it is the center of the pre-experimental area. Select a pre-experimental area with a water-to-non-water ratio closest to 1:1 for each target basin.
[0285] 6. Automatic optimization of water index: Conduct a preliminary experiment in the selected pre-experimental area to determine the most appropriate water index. This includes the following steps:
[0286] a. Index calculation: Use the selected index calculation formula to calculate different water body indices such as NDVI and EVI.
[0287] b. Random forest model construction: Based on the pre-identification results, data points are randomly selected in the pre-experimental area to train the random forest classification model.
[0288] c. Calculation of Gini coefficient: Based on the trained random forest model, the Gini coefficient of each node of each tree is calculated. The Gini coefficient here can be the Gini impurity in the above method embodiment, so as to obtain a comprehensive ranking of the Gini coefficients of the water body index, and select the water body index with the highest Gini coefficient as the water body index for calculating the water body mask.
[0289] 7. Water body mask calculation: Based on the cloud-free remote sensing image obtained in step 4 and the water body index selected in step 6, the Otsu method is used to calculate the water body index threshold to obtain the water body index mask. Then, the dark band mask, slope mask, and connected pixel mask are combined to obtain the final water body mask.
[0290] The embodiments of the present disclosure also provide corresponding device embodiments.
[0291] Fig. 9 A structural diagram of a water body identification device according to an embodiment of the present disclosure is shown.
[0292] The apparatus may include the following units.
[0293] The integration unit 301 is used to integrate a first remote sensing image set collected for a target geographical area within a target period of time to obtain a first integrated image.
[0294] The pre-identification unit 302 is used to perform water body pre-identification on the first comprehensive image to obtain a pre-identification result of whether a pixel point in the first comprehensive image belongs to a water body area.
[0295] The sampling unit 303 is configured to determine at least one sampling area in the first integrated image.
[0296] The candidate unit 304 is used to perform the following steps to determine the corresponding candidate sub-features for any sampling area: construct a training sample set based on the targeted sampling area; wherein different training samples correspond to different pixels in the targeted sampling area; the sample label of any training sample is used to characterize the pre-recognition result of the corresponding pixel; the sample feature of any training sample includes a number of sample sub-features, and any sample sub-feature is used to characterize the water body index of the pixel corresponding to the sample; based on the constructed training sample set, train a random forest model for predicting whether the pixel corresponding to the input sample belongs to the water body area; based on the trained random forest model, determine the feature importance of different sample sub-features; based on the sample sub-feature with the highest feature importance, determine the candidate sub-feature corresponding to the targeted sampling area.
[0297] The matching sub-feature unit 305 is used to determine the matching sub-feature based on the candidate sub-feature with the largest number of occurrences among the candidate sub-features corresponding to different sampling areas.
[0298] The adaptation identification unit 306 is used to identify water bodies in a target geographical area within a target time period based on the adaptation water body index represented by the determined adaptation sub-features.
[0299] Optionally, any sample sub-feature is used to characterize: the water body index of the pixel point corresponding to the sample, and the remote sensing data source used to determine the water body index value of the pixel point corresponding to the sample; the adaptation identification unit 306 is specifically used to: identify the water body for the target geographical area within the target time period based on the adaptation water body index and the adaptation remote sensing data source represented by the determined adaptation sub-feature.
[0300] Optionally, the adaptation identification unit 306 can be specifically used to: determine a second remote sensing image set collected for the target geographical area during the target time period from the adapted remote sensing data source represented by the determined adaptation sub-feature; integrate the second remote sensing image set to obtain a second integrated image; and perform water body identification on the second integrated image based on the adapted water body index represented by the determined adaptation sub-feature.
[0301] Optionally, the adaptation identification unit 306 can be specifically used to: perform cloud removal processing on each second remote sensing image in the second remote sensing image set, and determine the image quality of each second remote sensing image; the image quality is negatively correlated with the cloud layer ratio; determine a median image for the second remote sensing image after cloud removal processing; for any pixel position, the value of the pixel position targeted in the determined median image is the median between the values of the second remote sensing images at the pixel position targeted after cloud removal processing; perform weighted fusion on each second remote sensing image after cloud removal processing to obtain a second composite image; wherein the weight corresponding to any second remote sensing image is positively correlated with the image quality, and negatively correlated with the degree of difference between the second remote sensing image and the median image; in the case where there is a missing pixel value in the obtained second composite image, the missing pixel value in the second composite image is determined based on the value determined at the pixel position outside the target time period in the adapted remote sensing data source.
[0302] Optionally, the adaptation identification unit 306 can be specifically used to: perform water body identification on the second comprehensive image based on the adaptation water body index represented by the determined adapter feature to obtain a water body index mask; determine at least one of the following preset masks for water body identification for the second comprehensive image: a dark band mask, a slope mask, and a connected pixel index mask; and determine a water body mask by combining the obtained water body index mask and the determined at least one preset mask.
[0303] Optionally, the sampling unit 303 can be specifically used to: determine at least one sampling area in the first comprehensive image based on the pre-recognition result; wherein the sum of the areas of the determined sampling areas, the area ratio in the first comprehensive image is less than a preset area ratio threshold; in any determined sampling area, the difference between the number of pixel points whose pre-recognition result is that they belong to the water body area and the number of pixel points whose pre-recognition result is that they do not belong to the water body area is less than a preset difference.
[0304] Optionally, the adaptation identification unit 306 may also be used to: after performing water body identification on the target geographical area within the target time period, based on the result of the water body identification, extract water body surface information for the area identified as water body in the target geographical area within the target time period.
[0305] The specific explanation of the embodiment of the present device can be found in the above method embodiment.
[0306] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0307] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.
[0308] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0309] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0310] Fig.10 1 is a block diagram of a device 1900 for implementing a water body identification method according to an exemplary embodiment. For example, the device 1900 may be provided as a server or a terminal device. Fig.10 , the apparatus 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0311] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output interface 1958 (I / O interface). The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2000. TM , MacOS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.
[0312] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the device 1900 to perform the above method.
[0313] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0314] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0315] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0316] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0317] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0318] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0319] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0320] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0321] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A water body identification method, characterized in that: include: A first integrated image is obtained by integrating a first remote sensing image set collected for a target geographical area during a target period; Performing water body pre-identification on the first comprehensive image to obtain a pre-identification result of whether a pixel point in the first comprehensive image belongs to a water body area; determining at least one sampling region in the first composite image; For any sampling area, the following steps are performed to determine the corresponding candidate sub-features: a training sample set is constructed based on the targeted sampling area; wherein different training samples correspond to different pixels in the targeted sampling area; the sample label of any training sample is used to characterize the pre-recognition result of the corresponding pixel; the sample feature of any training sample includes a number of sample sub-features, and any sample sub-feature is used to characterize the water body index of the pixel corresponding to the sample; based on the constructed training sample set, a random forest model is trained to predict whether the pixel corresponding to the input sample belongs to the water body area; based on the trained random forest model, the feature importance of different sample sub-features is determined; based on the sample sub-feature with the highest feature importance, the candidate sub-feature corresponding to the targeted sampling area is determined; Among the candidate sub-features corresponding to different sampling areas, the matching sub-feature is determined based on the candidate sub-features with the largest number of occurrences; Based on the adapted water body index represented by the determined adaptor feature, water body identification is performed for the target geographical area within the target time period.
2. The method according to claim 1, characterized in that: Any sample sub-feature is used to characterize: the water index of the pixel point corresponding to the sample, and the remote sensing data source used to determine the water index value of the pixel point corresponding to the sample; The method of identifying a water body in the target geographical area within the target time period based on the adapted water body index represented by the determined adaptor feature includes: Based on the adapted water body index represented by the determined adaptor feature and the adapted remote sensing data source, water body identification is performed for the target geographical area within the target time period.
3. The method according to claim 2, characterized in that: The method of identifying water bodies in the target geographical area within the target time period based on the adapted water body index represented by the determined adaptor characteristics and the adapted remote sensing data source includes: Determine, from the determined adapted remote sensing data source represented by the adapted sub-features, a second remote sensing image set collected for the target geographical area during the target period; synthesizing the second remote sensing image set to obtain a second synthesized image; Based on the determined adapted water body index represented by the adaptor feature, water body recognition is performed on the second integrated image.
4. The method according to claim 3, characterized in that: The step of synthesizing the second remote sensing image set to obtain a second synthesized image includes: Performing cloud removal processing on each second remote sensing image in the second remote sensing image set, and determining the image quality of each second remote sensing image; the image quality is negatively correlated with the cloud layer ratio; A median image is determined for the second remote sensing image after cloud removal; for any pixel position, the value of the pixel position in the determined median image is the median of the values of the second remote sensing images after cloud removal at the pixel position; Performing weighted fusion on each of the second remote sensing images after cloud removal to obtain a second composite image; wherein the weight corresponding to any second remote sensing image is positively correlated with the image quality and negatively correlated with the degree of difference between the second remote sensing image and the median image; In the case where there is a missing value of any pixel point in the obtained second comprehensive image, the value of the missing pixel point in the second comprehensive image is determined based on the value determined at the pixel point position outside the target time period in the adapted remote sensing data source.
5. The method according to claim 3 or 4, characterized in that: The method of identifying a water body based on the determined adapted water body index represented by the adapted sub-features and targeting the second integrated image comprises: Based on the adapted water body index represented by the determined adaptor feature, water body identification is performed on the second integrated image to obtain a water body index mask; For the second integrated image, determining at least one of the following preset masks for water body identification: a dark band mask, a slope mask, and a connected pixel index mask; The obtained water body index mask and the determined at least one preset mask are combined to determine a water body mask.
6. The method according to claim 1, characterized in that: The first remote sensing image set collected for the target geographical area during the comprehensive target period to obtain a first comprehensive image includes: Performing cloud removal processing on each first remote sensing image in the first remote sensing image set; For each first remote sensing image after cloud removal, a median image is determined; for any pixel position, the value of the pixel position in the determined median image is the median of the values of each first remote sensing image after cloud removal at the pixel position; determining a first composite image based on the determined median image; The pre-identification of water bodies for the first comprehensive image includes: based on any water body index, identifying water bodies for the first comprehensive image.
7. The method according to claim 1, characterized in that: The step of determining at least one sampling area in the first integrated image comprises: Based on the pre-identification result, determining at least one sampling area in the first integrated image; The sum of the areas of the determined sampling regions accounts for an area ratio in the first comprehensive image that is less than a preset area ratio threshold; In any determined sampling area, the difference between the number of pixel points whose pre-identification results are that they belong to the water body area and the number of pixel points whose pre-identification results are that they do not belong to the water body area is less than a preset difference.
8. The method according to claim 1, characterized in that: In the trained random forest model, any non-leaf node corresponds to a sample sub-feature, and any non-leaf node is used to divide the input sample into corresponding sub-nodes based on the corresponding sample sub-feature; The feature importance of different sample sub-features is determined based on the trained random forest model, including: For any non-leaf node in the trained random forest model, determine the node importance based on the Gini impurity of the non-leaf node and the Gini impurity of the child nodes of the non-leaf node; In any decision tree in the trained random forest model, for any sample sub-feature, the sum of the node importances of different non-leaf nodes corresponding to the sample sub-feature is determined as the tree importance of the sample sub-feature; For any sample sub-feature, based on the tree importance of the sample sub-feature in different decision trees, the mean of the tree importance is determined, and based on the determined mean of the tree importance, the feature importance of the sample sub-feature is determined.
9. The method according to claim 8, characterized in that: The step of determining the node importance for any non-leaf node in the trained random forest model based on the Gini impurity of the non-leaf node and the Gini impurity of the child nodes of the non-leaf node includes: For any non-leaf node in the trained random forest model, perform the following steps: The weighted sum of the Gini impurities of the child nodes is determined between different child nodes of the targeted non-leaf node; the weight corresponding to any child node is: the ratio between the number of samples divided into the child node and the number of samples divided into the targeted non-leaf node; Determine the difference between the Gini impurity of the non-leaf node and the weighted sum of the Gini impurities of the determined child nodes; The node importance is determined by multiplying the determined difference by a preset non-leaf node weight; the preset non-leaf node weight is: the ratio between the number of samples divided into the targeted non-leaf node and the total number of samples input into the decision tree to which the targeted non-leaf node belongs.
10. The method according to claim 1, characterized in that: After identifying a water body in the target geographical area within the target time period, the method further includes: Based on the result of water body identification, water body surface information is extracted for the area identified as a water body in the target geographical area within the target time period.
11. A water body identification method, characterized in that: include: Perform water body pre-identification for the target geographical area within the target period, and obtain a pre-identification result of whether a local area in the target geographical area belongs to a water body area; Determine at least one sampling area in the target geographical area; any sampling area includes several local areas; For any sampling area, the following steps are performed to determine the corresponding candidate sub-features: a training sample set is constructed based on the targeted sampling area; wherein different training samples correspond to different local areas in the targeted sampling area; the sample label of any training sample is used to characterize the pre-identification result of the corresponding local area; the sample feature of any training sample includes a number of sample sub-features, and any sample sub-feature is used to characterize the water body index of the local area corresponding to the sample; based on the constructed training sample set, a random forest model is trained to predict whether the local area corresponding to the input sample belongs to the water body area; based on the trained random forest model, the feature importance of different sample sub-features is determined; based on the sample sub-feature with the highest feature importance, the candidate sub-feature corresponding to the targeted sampling area is determined; Among the candidate sub-features corresponding to different sampling areas, the matching sub-feature is determined based on the candidate sub-features with the largest number of occurrences; Based on the adapted water body index represented by the determined adaptor feature, water body identification is performed for the target geographical area within the target time period.
12. A water body identification device, characterized in that: include: A synthesis unit, configured to synthesize a first remote sensing image set collected for a target geographical area within a target period of time to obtain a first synthetic image; A pre-identification unit, used to perform water body pre-identification on the first comprehensive image, and obtain a pre-identification result of whether a pixel point in the first comprehensive image belongs to a water body area; A sampling unit, configured to determine at least one sampling region in the first integrated image; The candidate unit is used to perform the following steps to determine the corresponding candidate sub-features for any sampling area: construct a training sample set based on the targeted sampling area; wherein different training samples correspond to different pixels in the targeted sampling area; the sample label of any training sample is used to characterize the pre-recognition result of the corresponding pixel; the sample feature of any training sample includes a number of sample sub-features, and any sample sub-feature is used to characterize the water body index of the pixel corresponding to the sample; based on the constructed training sample set, train a random forest model for predicting whether the pixel corresponding to the input sample belongs to the water body area; based on the trained random forest model, determine the feature importance of different sample sub-features; based on the sample sub-feature with the highest feature importance, determine the candidate sub-feature corresponding to the targeted sampling area; The adapter feature unit is used to determine the adapter feature based on the candidate sub-feature with the largest number of occurrences among the candidate sub-features corresponding to different sampling areas; The adaptation identification unit is used to identify the water body for the target geographical area within the target time period based on the adaptation water body index represented by the determined adapter feature.
13. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method described in any one of claims 1 to 11 when executing the instructions stored in the memory.
14. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.
15. A computer program product, comprising a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is executed in a processor of an electronic device, the processor in the electronic device executes the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Remote sensing image water body identification and extraction method
CN108564056A
Coastline extraction method based on remote sensing cloud platform
CN111597930A
Water body information extraction method and device based on remote sensing data, equipment and medium
CN117197174A
Multi-source remote sensing image accurate water body extraction method and system based on space-time constraint
CN117315496A
Water body extraction method and device, electronic equipment and storage medium
CN119091320A
Cited By
High-generalization water body extraction method and system based on remote sensing image
CN120612606A