CN113610882A - Surface water body drawing method and device, electronic equipment and storage medium - Google Patents

Surface water body drawing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113610882A
CN113610882A CN202110445678.0A CN202110445678A CN113610882A CN 113610882 A CN113610882 A CN 113610882A CN 202110445678 A CN202110445678 A CN 202110445678A CN 113610882 A CN113610882 A CN 113610882A
Authority
CN
China
Prior art keywords
water body
mndwi
osm
image data
characteristic set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110445678.0A
Other languages
Chinese (zh)
Inventor
张志强
刘静
曹连海
王晓霞
王桂华
宫续丰
孔晓
张修宇
孙莉
梁斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
North China University of Water Resources and Electric Power
Original Assignee
North China University of Water Resources and Electric Power
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by North China University of Water Resources and Electric Power filed Critical North China University of Water Resources and Electric Power
Priority to CN202110445678.0A priority Critical patent/CN113610882A/en
Publication of CN113610882A publication Critical patent/CN113610882A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10032Satellite or aerial image; Remote sensing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30181Earth observation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a method and a device for mapping a surface water body, electronic equipment and a storage medium, comprising the following steps: acquiring crowd-sourced map OSM data and normalized difference water body index MNDWI image data; fusing OSM data and MNDWI image data to construct a first MNDWI characteristic set and a second MNDWI characteristic set; removing false water body pixels in the first MNDWI characteristic set to obtain a candidate water body pixel set, and removing false non-water body pixels in the second MNDWI characteristic set to obtain a candidate non-water body pixel set; training a preset random forest decision tree based on the candidate water body pixel set and the candidate non-water body pixel set to obtain a random forest classification model; and classifying the pre-collected surface water body classification characteristic set of the research area to obtain a surface water body map of the research area. The application can realize OSM data cleaning and improve the extraction precision and speed of the water body sample and the non-water body sample.

Description

Surface water body drawing method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of computers, in particular to a method and a device for mapping a surface water body, electronic equipment and a storage medium.
Background
With the influence of climate change and human activities, the spatial distribution and physicochemical composition of surface water bodies are changing greatly. The method has important significance for research and planning related to water such as water resource management, water damage prevention and control, water environment protection and the like, and monitoring the surface water dynamic state in time. The surface water body mapping is an important means for monitoring the dynamic change of the surface water body.
In the related art, surface water body mapping mainly comprises a water body index method and a supervision classification method. The water body index method needs to determine a segmentation threshold, and when the method is applied to large-scale surface water mapping, a global optimal threshold is difficult to determine, so that the mapping result is not accurate enough. The supervised classification method needs to manually select training samples, which can cause the cost of manpower and material resources to be increased under the condition of selecting a large number of training samples, and can influence the accuracy of drawing results under the condition of selecting a small number of training samples.
Disclosure of Invention
An embodiment of the application aims to provide a surface water body mapping method, a surface water body mapping device, electronic equipment and a storage medium, and aims to solve the problem that the accuracy of mapping results is low in a target surface water body mapping method.
In a first aspect, an embodiment of the present application provides a method for mapping a surface water body, including:
acquiring crowd-sourced map OSM data and normalized difference water body index MNDWI image data;
the OSM data and the MNDWI image data are fused to construct a first MNDWI characteristic set and a second MNDWI characteristic set, the first MNDWI characteristic set is used for marking water body pixels, and the second MNDWI characteristic set is used for marking non-water body pixels;
removing false water body pixels in the first MNDWI characteristic set to obtain a candidate water body pixel set, and removing false non-water body pixels in the second MNDWI characteristic set to obtain a candidate non-water body pixel set;
training a preset random forest decision tree based on the candidate water body pixel set and the candidate non-water body pixel set until the random forest decision tree reaches a preset convergence condition, and obtaining a random forest classification model;
and classifying the pre-collected surface water body classification characteristic set of the research area based on a random forest classification model to obtain a surface water body map of the research area.
In the embodiment, the first MNDWI characteristic set and the second MNDWI characteristic set are constructed by acquiring crowd-sourced map OSM data and normalized difference water body index MNDWI image data and fusing the OSM data and the MNDWI image data, so that the geographic information of the MNDWI image data is enriched; then eliminating false water body pixels in the first MNDWI characteristic set to obtain a candidate water body pixel set, and eliminating false non-water body pixels in the second MNDWI characteristic set to obtain a candidate non-water body pixel set, so that OSM data cleaning is realized, and the extraction precision and speed of the water body sample and the non-water body sample are improved; then training a preset random forest decision tree based on the candidate water body pixel set and the candidate non-water body pixel set until the random forest decision tree reaches a preset convergence condition to obtain a random forest classification model so as to realize that the intelligent model reduces errors caused by artificial classification; based on a random forest classification model, classifying the pre-collected surface water body classification characteristic set of the research area to obtain a surface water body map of the research area, and realizing accurate and rapid extraction of large-scale surface water bodies.
In an embodiment, the OSM data and the MNDWI image data are fused to construct a first MNDWI feature set and a second MNDWI feature set, including:
classifying the OSM data based on the layer element attribute of the OSM data to obtain an OSM water body layer and an OSM non-water body layer;
uploading the OSM water body layer and the OSM non-water body layer to a Google Earth engine GEE platform;
based on the GEE platform, the OSM water body layer is superposed to MNDWI image data to obtain a first MNDWI characteristic set, and the OSM non-water body layer is superposed to MNDWI image data to obtain a second MNDWI characteristic set.
In the embodiment, the OSM data is combined with the GEE platform, so that accurate and rapid extraction of large-scale surface water is achieved, the OSM data is combined with the MNDWI image data, and an effective solution is provided for cooperative application of grid data and vector data.
In an embodiment, classifying OSM data based on layer element attributes of the OSM data to obtain an OSM water body layer and an OSM non-water body layer includes:
classifying the OSM data into OSM water body surface elements, OSM water body line elements and OSM non-water body elements based on the layer element attributes of the OSM data;
synthesizing all OSM water body surface elements into an OSM water body surface layer, synthesizing all OSM water body line elements into an OSM water body line layer, and synthesizing OSM non-water body elements into an OSM non-water body layer;
establishing an OSM water body surface layer buffer area based on the OSM water body surface layer, so that the area of the OSM water body surface layer buffer area is approximately equal to that of the OSM water body surface layer;
and laminating the OSM water body surface layer buffer area, the OSM water body surface layer and the OSM water body line graph into the OSM water body layer.
In the embodiment, the OSM data is classified, so that the OSM data is cleaned, error information in the OSM data is reduced, and the accuracy of the OSM data is improved.
In an embodiment, rejecting false water body pixels in a first MNDWI feature set to obtain a candidate water body pixel set, rejecting false non-water body pixels in a second MNDWI feature set to obtain a candidate non-water body pixel set, includes:
calling a preset maximum inter-class variance OSTU algorithm based on the first MNDWI feature set, and determining a water body filtering threshold of OSM data;
if the MNDWI value of the first pixel in the first MNDWI characteristic set is smaller than the water body filtering threshold value, the first pixel in the first MNDWI characteristic set is removed, and a candidate water body image element set is obtained;
and if the MNDWI value of the second pixel in the second MNDWI characteristic set is not smaller than the water body filtering threshold value, the second pixel in the second MNDWI characteristic set is removed, and a candidate non-water body pixel set is obtained.
In the embodiment, the water body filtering threshold value is automatically determined through an OSTU algorithm, and based on the water body filtering threshold value, elimination of false pixels is realized, so that the accuracy of training samples is improved, and the identification precision of the model is further improved.
In one embodiment, acquiring the MNDWI image data of the normalized difference water body index includes:
acquiring earth surface reflectivity image data;
calling a preset function, and calculating the earth surface reflectivity image data to obtain MNDWI image data, wherein the calculation formula of the preset function is as follows:
Figure BDA0003035334890000041
SRGreensurface reflectance image data, SR, representing the green bandMIRAnd (3) representing surface reflectance image data of the mid-infrared band.
In an embodiment, based on the random forest classification model, classifying a pre-collected surface water classification feature set of a research area, and before obtaining a surface water mapping of the research area, the method further includes:
acquiring earth surface reflectivity image data, and extracting normalized vegetation index NDVI characteristics and second MNDWI image data based on the earth surface reflectivity image data;
constructing a gray level co-occurrence matrix based on the surface reflectivity image data, and extracting texture features of the surface reflectivity image data;
loading a preset digital elevation model of a research area, and determining the gradient characteristics of the research area;
and constructing a surface water body classification characteristic set of the research area based on the surface reflectivity image data, the second MNDWI image data, the NDVI characteristics, the texture characteristics and the gradient characteristics.
In this embodiment, the input features of the model are rich by extracting the second MNDWI image data, the NDVI features, the texture features and the gradient features and constructing the surface water body classification feature set of the research area, so that the model can effectively identify the surface feature type corresponding to the pixel.
In one embodiment, classifying a pre-collected surface water body classification characteristic set of a research area based on a random forest classification model to obtain a surface water body map of the research area, includes:
predicting the classification characteristic set of the surface water body in the research area based on a random forest classification model, determining the final classification result of each pixel in the classification characteristic set of the surface water body in the research area, and obtaining a surface water body map of the research area, wherein the calculation formula of the final classification result is as follows:
Figure BDA0003035334890000051
h (x) represents the final classification result, hi(x) And (3) representing a single decision tree prediction result of a single pixel, Y representing a preset output variable, and I (·) representing an illustrative function.
In this embodiment, the final classification result of each pixel is determined by a majority voting method, so as to further improve the accuracy of the pixel corresponding to the types of the surface features, where the types of the surface features include water types and non-water types, and the types of the water include various water types such as rivers and lakes.
In a second aspect, an embodiment of the present application provides a surface water body mapping apparatus, including:
the acquisition module is used for acquiring crowdsourcing map OSM data and normalized difference water body index MNDWI image data;
the fusion module is used for fusing the OSM data and the MNDWI image data to construct a first MNDWI characteristic set and a second MNDWI characteristic set, wherein the first MNDWI characteristic set is used for marking water pixels, and the second MNDWI characteristic set is used for marking non-water pixels;
the elimination module is used for eliminating false water body pixels in the first MNDWI characteristic set to obtain a candidate water body pixel set, and eliminating false non-water body pixels in the second MNDWI characteristic set to obtain a candidate non-water body pixel set;
the training module is used for training a preset random forest decision tree based on the candidate water body pixel set and the candidate non-water body pixel set until the random forest decision tree reaches a preset convergence condition to obtain a random forest classification model;
and the classification module is used for classifying the pre-collected surface water body classification characteristic set of the research area based on the random forest classification model to obtain a surface water body map of the research area.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to make the electronic device execute the method for mapping a surface water body according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the method for mapping a surface water body according to the first aspect.
It should be noted that, for the beneficial effects of the second aspect to the fourth aspect, reference may be made to the description of the first aspect, and details are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flow chart of a surface water body mapping method provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a surface water body mapping apparatus provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
As described in the related background art, the current surface water body mapping mainly includes a water body index method and a supervised classification method. The water body index method needs to determine a segmentation threshold, and when the method is applied to large-scale surface water mapping, a global optimal threshold is difficult to determine, so that the mapping result is not accurate enough. The supervised classification method needs to manually select training samples, which can cause the cost of manpower and material resources to be increased under the condition of selecting a large number of training samples, and can influence the accuracy of drawing results under the condition of selecting a small number of training samples.
Aiming at the problems in the prior art, the application provides a method for mapping a surface water body, which comprises the steps of obtaining crowd-sourced map OSM data and normalized difference water body index MNDWI image data, and fusing the OSM data and the MNDWI image data to construct a first MNDWI characteristic set and a second MNDWI characteristic set; then eliminating false water body pixels in the first MNDWI characteristic set to obtain a candidate water body pixel set, and eliminating false non-water body pixels in the second MNDWI characteristic set to obtain a candidate non-water body pixel set, so that OSM data cleaning is realized, and the extraction precision and speed of the water body sample and the non-water body sample are improved; then training a preset random forest decision tree based on the candidate water body pixel set and the candidate non-water body pixel set until the random forest decision tree reaches a preset convergence condition to obtain a random forest classification model so as to realize that the intelligent model reduces errors caused by artificial classification; based on a random forest classification model, classifying the pre-collected surface water body classification characteristic set of the research area to obtain a surface water body map of the research area, and realizing accurate and rapid extraction of large-scale surface water bodies.
Referring to fig. 1, fig. 1 shows a flowchart of an implementation of a method for a ground water body map provided by an embodiment of the present application. The surface water body mapping method described in the embodiments of the present application can be applied to electronic devices, including but not limited to computer devices such as smart phones, tablet computers, desktop computers, supercomputers, personal digital assistants, physical servers, and cloud servers. The surface water body mapping method in the embodiment of the application comprises the following steps of S101 to S105:
step S101, crowdsourcing map OSM data and normalized difference water body index MNDWI image data are obtained.
In the present embodiment, the crowd-sourced map (OSM) data is a user-generated street map, which contains abundant geographic information, such as water, buildings, and the like. The normalized Difference Water Index (MNDWI) image data is data obtained by performing normalized Difference processing on a specific band of a remote sensing image to highlight Water information in the image.
In one embodiment, acquiring the MNDWI image data of the normalized difference water body index includes: acquiring earth surface reflectivity image data; calling a preset function, and calculating the earth surface reflectivity image data to obtain MNDWI image data, wherein the calculation formula of the preset function is as follows:
Figure BDA0003035334890000081
SRGreensurface reflectance image data, SR, representing the green bandMIRAnd (3) representing surface reflectance image data of the mid-infrared band.
In this embodiment, the ground surface reflectance image data synthesized by the minimum cloud cover in the research period may be synthesized by using a simplecomite () algorithm built in the GEE.
And S102, fusing the OSM data and the MNDWI image data to construct a first MNDWI characteristic set and a second MNDWI characteristic set, wherein the first MNDWI characteristic set is used for marking water body pixels, and the second MNDWI characteristic set is used for marking non-water body pixels.
In this embodiment, the pixels are pixels or pels in the image data. Optionally, a water body layer and a non-water body layer in the OSM data are classified, the water body layer and the MNDWI image data are combined to obtain a first MNDWI feature set, and the non-water body layer and the MNDWI image data are combined to obtain a second MNDWI feature set.
Optionally, the OSM data and the MNDWI image data are fused, and the fused image is classified to obtain a first MNDWI feature set and a second MNDWI feature set.
In an embodiment, the OSM data and the MNDWI image data are fused to construct a first MNDWI feature set and a second MNDWI feature set, including: classifying the OSM data based on the layer element attribute of the OSM data to obtain an OSM water body layer and an OSM non-water body layer; uploading the OSM water body layer and the OSM non-water body layer to a Google Earth engine GEE platform; based on the GEE platform, the OSM water body layer is superposed to MNDWI image data to obtain a first MNDWI characteristic set, and the OSM non-water body layer is superposed to MNDWI image data to obtain a second MNDWI characteristic set.
In this embodiment, the Google Earth Engine (GEE) is a platform provided by Google for performing online visual computational analysis processing on a large amount of global-scale geoscience data (such as satellite data), and integrates a large amount of satellite remote sensing images, such as Landsat series satellites, MODIS satellites, sentinel second satellite remote sensing images, and the like.
Optionally, OSM data of the research area is obtained, and the OSM data is classified into OSM water surface elements, OSM water body line elements and OSM non-water body elements according to the OSM data image layer element attributes. The OSM water surface elements include, but are not limited to, reservoir (reservoir) elements in a landump layer, water (water) elements in a natural layer, and river bank (riverbank) elements. OSM water line elements include, but are not limited to, river (canal) elements, river (river) elements, and stream (stream) elements in the water layer. Other surface elements and line elements are OSM non-water body elements.
In an embodiment, classifying OSM data based on layer element attributes of the OSM data to obtain an OSM water body layer and an OSM non-water body layer includes: classifying the OSM data into OSM water body surface elements, OSM water body line elements and OSM non-water body elements based on the layer element attributes of the OSM data; synthesizing all OSM water body surface elements into an OSM water body surface layer, synthesizing all OSM water body line elements into an OSM water body line layer, and synthesizing OSM non-water body elements into an OSM non-water body layer; establishing an OSM water body surface layer buffer area based on the OSM water body surface layer; and laminating the OSM water body surface layer buffer area, the OSM water body surface layer and the OSM water body line graph into the OSM water body layer.
In this embodiment, all the OSM water surface elements are combined to generate an OSM water surface layer, all the OSM water body line elements are combined to generate an OSM water body line layer, and all the OSM non-water body elements are combined to generate an OSM non-water body layer.
Illustratively, an OSM water surface map layer buffer is established: and determining the optimal buffer area radius (R) by adopting an iterative trial calculation mode by taking 0.5 meter as a step length and taking the absolute value of the difference value between the buffer area and the OSM water body surface layer area as a target function, and establishing the OSM water body surface layer buffer area. Calculating the formula: min D ═ SB-SPolygon|;B={x|d(x,boundary)≤R};
Wherein D represents the buffer area (S)B) And the water surface layer area (S) of the OSMPolygon) The absolute value of the difference; and B represents a buffer area of an OSM water body surface layer with the radius of the buffer area being R, namely a set of points with the distance to the boundary of the surface element being less than or equal to R.
And S103, eliminating false water body pixels in the first MNDWI characteristic set to obtain a candidate water body pixel set, and eliminating false non-water body pixels in the second MNDWI characteristic set to obtain a candidate non-water body pixel set.
In this embodiment, the false water body pixels are pixel points marked as water body pixels but not actually belonging to the water body pixels, and the false non-water body pixels are pixel points marked as non-water body pixels but not actually belonging to the non-water body pixels. The embodiment can identify the false water body pixels and the false non-water body pixels by determining the water body filtering threshold value and based on the water body filtering threshold value.
In an embodiment, rejecting false water body pixels in a first MNDWI feature set to obtain a candidate water body pixel set, rejecting false non-water body pixels in a second MNDWI feature set to obtain a candidate non-water body pixel set, includes: calling a preset maximum inter-class variance OSTU algorithm based on the first MNDWI feature set, and determining a water body filtering threshold of OSM data; if the MNDWI value of the first pixel in the first MNDWI characteristic set is smaller than the water body filtering threshold value, the first pixel in the first MNDWI characteristic set is removed, and a candidate water body image element set is obtained; and if the MNDWI value of the second pixel in the second MNDWI characteristic set is not smaller than the water body filtering threshold value, the second pixel in the second MNDWI characteristic set is removed, and a candidate non-water body pixel set is obtained.
In the embodiment, the OSM water body filtering threshold (Ts) is determined by using a first MNDWI characteristic set for marking water body pixels as data and adopting an OSTU algorithm. Illustratively, false marked water body pixels are removed to obtain a candidate water body pixel set, and a formula is calculated: VWMNDWI<TS
Wherein, VWMNDWIAnd (3) expressing the MNDWI value of the marked water body pixels, namely when the MNDWI value of the marked water body pixels is smaller than an OSM water body filtering threshold value (Ts), considering the pixels as false marked water body pixels, removing the pixels from the marked water body pixel set, and forming a candidate water body pixel set by the residual marked water body pixels.
Eliminating false marked non-water body pixels to obtain a candidate non-water body pixel set, and calculating a formula: VNWMNDWI≥TS
Wherein VNWMNDWIRepresenting MNDWI values for marking non-water body picture elements, i.e.And when the MNDWI value of the marked non-water body pixels is not less than the OSM water body filtering threshold value (Ts), the pixels are considered as false marked non-water body pixels, the pixels are removed from the marked non-water body pixel set, and the rest marked non-water body pixels form a candidate non-water body pixel set.
And step S104, training a preset random forest decision tree based on the candidate water body pixel set and the candidate non-water body pixel set until the random forest decision tree reaches a preset convergence condition, and obtaining a random forest classification model.
In this embodiment, optionally, 20% of the candidate water body pixel sets are randomly selected as the water body training samples, and 20% of the candidate non-water body pixel sets are randomly selected as the non-water body training samples. And extracting the classification characteristics of the water body training sample and the non-water body training sample, and constructing a water body training characteristic set and a non-water body training characteristic set. The number of the random forest decision trees is set to be 200, the number of the splitting node features is set to be 4, a random forest classification model frame is constructed, and the water body training feature set and the non-water body training feature set are substituted into the random forest classification model frame to carry out model training, so that a random forest classification model is obtained.
In the embodiment, the marked candidate water body pixel set and the candidate non-water body pixel set are used for training the random forest decision tree model until the model reaches the preset convergence condition. The preset convergence condition is a condition indicating that the model training is completed, for example, if a loss value obtained by the loss function is smaller than a preset loss threshold, convergence is indicated. It can be understood in a colloquial way that a smaller loss value indicates that the extracted feature vector of the model is more accurate, so that the image element closest to the sample can be restored according to the extracted feature vector. Exemplarily, inputting the candidate water body pixel set and the candidate non-water body pixel set into a random forest decision tree model for processing to obtain pixel types corresponding to the candidate water body pixel set or the candidate non-water body pixel; calculating a loss value between the input pixel type and the candidate water body pixel set or the candidate non-water body pixel, adjusting model parameters in the seq2seq model when the loss value is greater than or equal to a preset loss threshold value, and returning to point to input the sample text into the random forest decision tree model for processing to obtain a pixel type corresponding to the candidate water body pixel set or the candidate non-water body pixel; and when the loss value is smaller than a preset loss threshold value, the training of the random forest decision tree model is finished, and a trained random forest classification model is obtained.
And S105, classifying the pre-collected surface water body classification characteristic set of the research area based on the random forest classification model to obtain a surface water body map of the research area.
In this embodiment, the surface water body classification feature set of the research area is input to the random forest classification model for operation, the model classifies each pixel in the surface water body classification feature set, and a surface water body map can be obtained according to the classification results of all the pixels.
In one embodiment, classifying a pre-collected surface water body classification characteristic set of a research area based on a random forest classification model to obtain a surface water body map of the research area, includes: predicting the classification characteristic set of the surface water body in the research area based on a random forest classification model, determining the final classification result of each pixel in the classification characteristic set of the surface water body in the research area, and obtaining a surface water body map of the research area, wherein the calculation formula of the final classification result is as follows:
Figure BDA0003035334890000121
h (x) represents the final classification result, hi(x) And (3) representing a single decision tree prediction result of a single pixel, Y representing a preset output variable, and I (·) representing an illustrative function.
In the embodiment, the final classification result of each pixel is determined by a majority voting method, so that the accuracy of the type of the ground object corresponding to the pixel is further improved.
In an embodiment, based on the random forest classification model, classifying a pre-collected surface water classification feature set of a research area, and before obtaining a surface water mapping of the research area, the method further includes: acquiring earth surface reflectivity image data, and extracting normalized vegetation index NDVI characteristics and second MNDWI image data based on the earth surface reflectivity image data; constructing a gray level co-occurrence matrix based on the surface reflectivity image data, and extracting texture features of the surface reflectivity image data; loading a preset digital elevation model of a research area, and determining the gradient characteristics of the research area; and constructing a surface water body classification characteristic set of the research area based on the surface reflectivity image data, the second MNDWI image data, the NDVI characteristics, the texture characteristics and the gradient characteristics.
In the embodiment, the spectral index features, the texture features and the gradient can be calculated by relying on the GEE cloud platform to construct the surface water body classification feature set. Illustratively, first, normalized vegetation index (NDVI) features are extracted based on the surface reflectance image data. Then, a Gray-level co-occurrence matrix (GLCM) is constructed based on the surface reflectivity image data to extract texture features of the remote sensing image, including but not limited to Entropy (Entropy), second-order distance (ASM), Homogeneity (Homogeneity) and variance (disparity). Next, a Digital Elevation Model (DEM) of the study area is loaded, and a slope feature (slope) is calculated. And finally, combining the spectral band, MNDWI, NDVI, textural features and gradient features of the earth surface reflectivity image data to construct an earth surface water body classification feature set of the research area.
In order to implement the method corresponding to the above-mentioned method embodiment to achieve the corresponding functions and technical effects, a surface water body mapping device is provided below. Referring to fig. 2, fig. 2 is a block diagram of a structure of a surface water body mapping apparatus according to an embodiment of the present application. The modules included in the apparatus in this embodiment are used to execute the steps in the embodiment corresponding to fig. 1, and refer to fig. 1 and the related description in the embodiment corresponding to fig. 1 specifically. For convenience of explanation, only the parts related to the present embodiment are shown, and the surface water body mapping apparatus provided in the embodiments of the present application includes:
the acquiring module 201 is configured to acquire crowd-sourced map OSM data and normalized difference water body index MNDWI image data;
the fusion module 202 is configured to fuse the OSM data and the MNDWI image data to construct a first MNDWI feature set and a second MNDWI feature set, where the first MNDWI feature set is used to mark a water body pixel, and the second MNDWI feature set is used to mark a non-water body pixel;
the removing module 203 is used for removing false water body pixels in the first MNDWI characteristic set to obtain a candidate water body pixel set, and removing false non-water body pixels in the second MNDWI characteristic set to obtain a candidate non-water body pixel set;
the training module 204 is configured to train a preset random forest decision tree based on the candidate water body pixel set and the candidate non-water body pixel set until the random forest decision tree reaches a preset convergence condition, so as to obtain a random forest classification model;
the classification module 205 is configured to classify the pre-collected surface water classification feature set of the research area based on the random forest classification model, so as to obtain a surface water map of the research area.
In one embodiment, the fusion module 202 includes:
the classification unit is used for classifying the OSM data based on the layer element attribute of the OSM data to obtain an OSM water body layer and an OSM non-water body layer;
the uploading unit is used for uploading the OSM water body layer and the OSM non-water body layer to a Google Earth engine GEE platform;
and the superposition unit is used for superposing the OSM water body layer to MNDWI image data based on the GEE platform to obtain a first MNDWI characteristic set, and superposing the OSM non-water body layer to MNDWI image data to obtain a second MNDWI characteristic set.
In an embodiment, the classification unit includes:
the classification subunit is used for classifying the OSM data into OSM water body surface elements, OSM water body line elements and OSM non-water body elements based on the layer element attributes of the OSM data;
the first synthesis subunit is used for synthesizing all OSM water body surface elements into an OSM water body surface layer, synthesizing all OSM water body line elements into an OSM water body line layer, and synthesizing OSM non-water body elements into an OSM non-water body layer;
the establishing unit is used for establishing an OSM water body surface layer buffer area based on the OSM water body surface layer;
and the second synthesis subunit is used for laminating the OSM water body surface layer buffer area, the OSM water body surface layer and the OSM water body line graph into the OSM water body layer.
In one embodiment, the culling module 203 comprises:
the determining unit is used for calling a preset maximum inter-class variance OSTU algorithm based on the first MNDWI characteristic set and determining a water body filtering threshold of OSM data;
the first eliminating unit is used for eliminating the first pixel in the first MNDWI characteristic set to obtain a candidate water body pixel set if the MNDWI value of the first pixel in the first MNDWI characteristic set is smaller than the water body filtering threshold value;
and the second eliminating unit is used for eliminating the second pixel in the second MNDWI characteristic set to obtain a candidate non-water body pixel set if the MNDWI value of the second pixel in the second MNDWI characteristic set is not smaller than the water body filtering threshold value.
In one embodiment, the obtaining module 201 includes:
the acquisition unit is used for acquiring earth surface reflectivity image data;
the operation unit is used for calling a preset function, and operating the earth surface reflectivity image data to obtain MNDWI image data, wherein the calculation formula of the preset function is as follows:
Figure BDA0003035334890000151
SRGreensurface reflectance image data, SR, representing the green bandMIRAnd (3) representing surface reflectance image data of the mid-infrared band.
In an embodiment, the apparatus further includes:
the calculation module is used for acquiring the earth surface reflectivity image data and calculating the normalized vegetation index NDVI characteristic and the second MNDWI image data based on the earth surface reflectivity image data;
the extraction module is used for constructing a gray level co-occurrence matrix based on the earth surface reflectivity image data and extracting the texture features of the earth surface reflectivity image data;
the loading module is used for loading a preset digital elevation model of a research area and determining the gradient characteristic of the research area;
and the construction module is used for constructing a surface water body classification characteristic set of the research area based on the surface reflectivity image data, the second MNDWI image data, the NDVI characteristics, the texture characteristics and the gradient characteristics.
In one embodiment, the classification module 205 includes:
the prediction unit is used for predicting the surface water body classification characteristic set of the research area based on the random forest classification model, determining the final classification result of each pixel in the surface water body classification characteristic set of the research area, and obtaining a surface water body map of the research area, wherein the final classification result is a calculation formula:
Figure BDA0003035334890000152
h (x) represents the final classification result, hi(x) And (3) representing a single decision tree prediction result of a single pixel, Y representing a preset output variable, and I (·) representing an illustrative function.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 3, the electronic apparatus 3 of this embodiment includes: at least one processor 30 (only one shown in fig. 3), a memory 31, and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, the processor 30 implementing the steps of any of the above-described method embodiments when executing the computer program 32.
The electronic device 3 may be a computing device such as a smart phone, a tablet computer, a desktop computer, a supercomputer, a personal digital assistant, a physical server, and a cloud server. The electronic device may include, but is not limited to, a processor 30, a memory 31. Those skilled in the art will appreciate that fig. 3 is only an example of the electronic device 3, and does not constitute a limitation to the electronic device 3, and may include more or less components than those shown, or combine some components, or different components, such as an input-output device, a network access device, and the like.
The Processor 30 may be a Central Processing Unit (CPU), and the Processor 30 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 31 may in some embodiments be an internal storage unit of the electronic device 3, such as a hard disk or a memory of the electronic device 3. The memory 31 may also be an external storage device of the electronic device 3 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the electronic device 3. The memory 31 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 31 may also be used to temporarily store data that has been output or is to be output.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in any of the method embodiments described above.
The embodiments of the present application provide a computer program product, which when running on an electronic device, enables the electronic device to implement the steps in the above method embodiments when executed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method of surface water mapping, comprising:
acquiring crowd-sourced map OSM data and normalized difference water body index MNDWI image data;
fusing the OSM data and the MNDWI image data to construct a first MNDWI characteristic set and a second MNDWI characteristic set, wherein the first MNDWI characteristic set is used for marking water body pixels, and the second MNDWI characteristic set is used for marking non-water body pixels;
removing false water body pixels in the first MNDWI characteristic set to obtain a candidate water body pixel set, and removing false non-water body pixels in the second MNDWI characteristic set to obtain a candidate non-water body pixel set;
training a preset random forest decision tree based on the candidate water body pixel set and the candidate non-water body pixel set until the random forest decision tree reaches a preset convergence condition to obtain a random forest classification model;
and classifying the pre-collected surface water body classification characteristic set of the research area based on the random forest classification model to obtain a surface water body map of the research area.
2. The method for mapping surface water body according to claim 1, wherein the fusing the OSM data and the MNDWI image data to construct a first MNDWI feature set and a second MNDWI feature set comprises:
classifying the OSM data based on the layer element attribute of the OSM data to obtain an OSM water body layer and an OSM non-water body layer;
uploading the OSM water body layer and the OSM non-water body layer to a Google Earth engine GEE platform;
and based on the GEE platform, the OSM water body layer is superposed to the MNDWI image data to obtain the first MNDWI characteristic set, and the OSM non-water body layer is superposed to the MNDWI image data to obtain the second MNDWI characteristic set.
3. The method for mapping a surface water body according to claim 2, wherein the step of classifying the OSM data based on the layer element attributes of the OSM data to obtain an OSM water body layer and an OSM non-water body layer comprises:
classifying the OSM data into OSM water body surface elements, OSM water body line elements and OSM non-water body elements based on the layer element attributes of the OSM data;
synthesizing all the OSM water body surface elements into an OSM water body surface layer, synthesizing all the OSM water body line elements into an OSM water body line layer, and synthesizing the OSM non-water body elements into the OSM non-water body layer;
establishing an OSM water body surface layer buffer area based on the OSM water body surface layer;
and laminating the OSM water body surface layer buffer area, the OSM water body surface layer and the OSM water body line graph into the OSM water body layer.
4. The method for mapping the surface water body according to claim 1, wherein the removing false water body pixels in the first MNDWI feature set to obtain a candidate water body pixel set, and removing false non-water body pixels in the second MNDWI feature set to obtain a candidate non-water body pixel set comprises:
calling a preset maximum inter-class variance OSTU algorithm based on the first MNDWI feature set, and determining a water body filtering threshold of OSM data;
if the MNDWI value of a first pixel in the first MNDWI characteristic set is smaller than the water body filtering threshold value, the first pixel in the first MNDWI characteristic set is removed, and the candidate water body pixel set is obtained;
and if the MNDWI value of the second pixel in the second MNDWI characteristic set is not smaller than the water body filtering threshold value, the second pixel in the second MNDWI characteristic set is removed, and the candidate non-water body pixel set is obtained.
5. The method for mapping a surface water body according to claim 1, wherein acquiring the MNDWI image data of the normalized difference water body index comprises:
acquiring earth surface reflectivity image data;
calling a preset function, and calculating the earth surface reflectivity image data to obtain the MNDWI image data, wherein the preset function has a calculation formula:
Figure FDA0003035334880000031
SRGreenthe surface reflectance image data, SR, representing the green bandMIRImage data representing the surface reflectance in the mid-infrared band.
6. The method for surface water body mapping according to claim 1, wherein before the step of classifying the pre-collected surface water body classification feature set of the research area based on the random forest classification model to obtain the surface water body mapping of the research area, the method further comprises:
acquiring earth surface reflectivity image data, and extracting normalized vegetation index NDVI characteristics and second MNDWI image data based on the earth surface reflectivity image data;
constructing a gray level co-occurrence matrix based on the earth surface reflectivity image data, and extracting texture features of the earth surface reflectivity image data;
loading a preset digital elevation model of the research area, and determining the gradient characteristics of the research area;
and constructing a surface water body classification feature set of the research area based on the surface reflectivity image data, the second MNDWI image data, the NDVI features, the texture features and the gradient features.
7. The method for drawing the surface water body according to claim 1, wherein the step of classifying the pre-collected surface water body classification characteristic set of the research area based on the random forest classification model to obtain the surface water body drawing of the research area comprises the following steps:
predicting the surface water body classification characteristic set of the research area based on a random forest classification model, and determining the final classification result of each pixel in the surface water body classification characteristic set of the research area to obtain a surface water body map of the research area.
8. A surface water system map apparatus, comprising:
the acquisition module is used for acquiring crowdsourcing map OSM data and normalized difference water body index MNDWI image data;
the fusion module is used for fusing the OSM data and the MNDWI image data to construct a first MNDWI characteristic set and a second MNDWI characteristic set, wherein the first MNDWI characteristic set is used for marking water body pixels, and the second MNDWI characteristic set is used for marking non-water body pixels;
the elimination module is used for eliminating false water body pixels in the first MNDWI characteristic set to obtain a candidate water body pixel set, and eliminating false non-water body pixels in the second MNDWI characteristic set to obtain a candidate non-water body pixel set;
the training module is used for training a preset random forest decision tree based on the candidate water body pixel set and the candidate non-water body pixel set until the random forest decision tree reaches a preset convergence condition to obtain a random forest classification model;
and the classification module is used for classifying the pre-collected surface water body classification characteristic set of the research area based on the random forest classification model to obtain a surface water body map of the research area.
9. An electronic device, comprising a memory for storing a computer program and a processor for executing the computer program to cause the electronic device to perform the method of mapping a body of surface water according to any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements a method for mapping a body of surface water according to any one of claims 1 to 7.
CN202110445678.0A 2021-04-23 2021-04-23 Surface water body drawing method and device, electronic equipment and storage medium Pending CN113610882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110445678.0A CN113610882A (en) 2021-04-23 2021-04-23 Surface water body drawing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110445678.0A CN113610882A (en) 2021-04-23 2021-04-23 Surface water body drawing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113610882A true CN113610882A (en) 2021-11-05

Family

ID=78303336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110445678.0A Pending CN113610882A (en) 2021-04-23 2021-04-23 Surface water body drawing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113610882A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930772A (en) * 2016-04-13 2016-09-07 武汉大学 City impervious surface extraction method based on fusion of SAR image and optical remote sensing image
CN110517575A (en) * 2019-08-21 2019-11-29 华北水利水电大学 A kind of surface water body drafting method and device
CN111046613A (en) * 2019-02-21 2020-04-21 北京大学 Optimal river channel calculation method based on path tracking and river network extraction method based on multi-temporal remote sensing image
CN111738144A (en) * 2020-06-19 2020-10-02 中国水利水电科学研究院 Surface water product generation method and system based on Google Earth Engine cloud platform
JP2021032898A (en) * 2019-08-22 2021-03-01 ▲広▼州大学 Water area identification method and device based on iterative classification

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930772A (en) * 2016-04-13 2016-09-07 武汉大学 City impervious surface extraction method based on fusion of SAR image and optical remote sensing image
CN111046613A (en) * 2019-02-21 2020-04-21 北京大学 Optimal river channel calculation method based on path tracking and river network extraction method based on multi-temporal remote sensing image
CN110517575A (en) * 2019-08-21 2019-11-29 华北水利水电大学 A kind of surface water body drafting method and device
JP2021032898A (en) * 2019-08-22 2021-03-01 ▲広▼州大学 Water area identification method and device based on iterative classification
CN111738144A (en) * 2020-06-19 2020-10-02 中国水利水电科学研究院 Surface water product generation method and system based on Google Earth Engine cloud platform

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
ZHIQIANG ZHANG ED.: "Automated Surface Water Extraction Combining Sentinel-2 Imagery and OpenStreetMap Using Presence and Background Learning (PBL) Algorithm", 《 IEEE JOURNAL OF SELECTED TOPICS IN APPLIED EARTH OBSERVATIONS AND REMOTE SENSING》, vol. 12, no. 10, pages 3784 - 3798, XP011758341, DOI: 10.1109/JSTARS.2019.2936406 *
戴激光等: "光学遥感影像道路提取的方法综述", 《遥感学报》, pages 804 - 823 *
温国义等: "《集约用海区用海布局优化技术研究及应用》", 31 January 2015, 北京:海洋出版社, pages: 82 *
金飞等: "《遥感影像纹理分析与应用》", 30 November 2018, 北京:测绘出版社, pages: 8 *
韩震等: "《卫星遥感技术在海洋中的应用》", 31 January 2018, 北京:海洋出版社, pages: 18 *

Similar Documents

Publication Publication Date Title
Zhong et al. Landslide mapping with remote sensing: challenges and opportunities
CN110929607B (en) Remote sensing identification method and system for urban building construction progress
CN111723732B (en) Optical remote sensing image change detection method, storage medium and computing equipment
Liu et al. Integration of classification methods for improvement of land-cover map accuracy
Patil et al. Image classification tool for land use/land cover analysis: A comparative study of maximum likelihood and minimum distance method
Pradhan et al. An easy to use ArcMap based texture analysis program for extraction of flooded areas from TerraSAR-X satellite image
Puissant et al. Object-oriented mapping of urban trees using Random Forest classifiers
CN108596108B (en) Aerial remote sensing image change detection method based on triple semantic relation learning
CN110298211B (en) River network extraction method based on deep learning and high-resolution remote sensing image
Chang et al. Multisensor satellite image fusion and networking for all-weather environmental monitoring
CN110781756A (en) Urban road extraction method and device based on remote sensing image
CN113988147B (en) Multi-label classification method and device for remote sensing image scene based on graph network, and multi-label retrieval method and device
Tiwari et al. UAV remote sensing for campus monitoring: a comparative evaluation of nearest neighbor and rule-based classification
CN114742733A (en) Cloud removing method and device, computer equipment and storage medium
CN113343945B (en) Water body identification method and device, electronic equipment and storage medium
CN113704276A (en) Map updating method and device, electronic equipment and computer readable storage medium
CN116309612A (en) Semiconductor silicon wafer detection method, device and medium based on frequency decoupling supervision
Kok et al. Principles of full autonomy in image interpretation. The basic architectural design for a sequential process with image objects
CN113610882A (en) Surface water body drawing method and device, electronic equipment and storage medium
McKay et al. An automated approach to extracting river bank locations from aerial imagery using image texture
Tejaswini et al. Land cover change detection using convolution neural network
CN114332533A (en) Landslide image identification method and system based on DenseNet
Gao et al. Improving Representation of Land‐use Maps Derived from Object‐oriented Image Classification
CN111062957B (en) Non-classical receptive field contour detection method
Ankayarkanni et al. Object based segmentation techniques for classification of satellite image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination