Artificial Intelligence-Based Water Quality Monitoring Method and Device
By acquiring and analyzing the images of the water body area and extracting characteristic information related to water quality parameters, a large-scale monitoring of the time and space dimensions of water quality is achieved, and the problem that existing methods cannot meet the time and space dimension monitoring needs are solved.
Patent Information
- Application Number
- CN202210910667.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2042-07-29
AI Technical Summary
The existing water quality monitoring methods are difficult to achieve large-scale water quality monitoring in the time and space dimensions, and cannot meet the monitoring needs in the time and space dimensions.
By acquiring the first photographed image of the first region, the pixel points corresponding to the water body area are identified in the image, and the characteristic information of the pixel points is extracted, wherein the characteristic information includes variables that show a positive correlation with the water quality parameters, and the water quality is monitored based on these variables.
It realizes a large-scale monitoring of water quality in time and space dimensions, and can compare the water quality changes in different time and space regions, breaking the regional and seasonal limitations of traditional methods.
Smart Images

Figure CN115266719B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, specifically to image recognition, video analysis, and remote sensing analysis technologies, and can be applied in scenarios such as smart cities and environmental monitoring. In particular, it relates to a water quality monitoring method and device based on artificial intelligence. Background Art
[0002] Water quality monitoring generally monitors and determines the types of pollutants in water bodies, the concentrations of various pollutants, and their changing trends, and evaluates the water quality status.
[0003] Current water quality monitoring methods include: surface section field sampling and detection methods, quantitative inversion methods based on empirical models, analysis / semi-analysis methods, and other methods.
[0004] However, current water quality monitoring methods are highly regional and seasonal, and cannot meet the needs of large-scale water quality monitoring in terms of time and space dimensions. Summary of the Invention
[0005] The present disclosure provides a water quality monitoring method and device based on artificial intelligence, which can realize large-scale monitoring of water quality changes in terms of time and space dimensions.
[0006] According to a first aspect of the present disclosure, there is provided a water quality monitoring method based on artificial intelligence, the method comprising:
[0007] Obtaining a first captured image of a first region; identifying first pixel points corresponding to a water body region in the first region in the first captured image; extracting feature information of the first pixel points; the feature information of the first pixel points includes a first variable, the first variable has a positive correlation with a first parameter, and the first parameter is a parameter for describing the water quality of the water body region in the first region; and monitoring the water quality of the water body region in the first region according to the feature information of the first pixel points.
[0008] According to a second aspect of the present disclosure, there is provided a water quality monitoring device based on artificial intelligence, the device comprising:
[0009] An obtaining unit for obtaining a first captured image of a first region; an identifying unit for identifying first pixel points corresponding to a water body region in the first region in the first captured image; an extracting unit for extracting feature information of the first pixel points; the feature information of the first pixel points includes a first variable, the first variable has a positive correlation with a first parameter, and the first parameter is a parameter for describing the water quality of the water body region in the first region; and a monitoring unit for monitoring the water quality of the water body region in the first region according to the feature information of the first pixel points.
[0010] According to a third aspect of the present disclosure, there is provided an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method as described in the first aspect.
[0011] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method as described in the first aspect.
[0012] According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method as described in the first aspect.
[0013] According to a sixth aspect of the present disclosure, there is provided an artificial intelligence-based water quality monitoring device comprising the electronic device as described in the third aspect.
[0014] The present disclosure qualitatively characterizes or describes the water quality of the water body area in the first region by acquiring a first captured image of the first region, identifying first pixel points corresponding to the water body area in the first captured image, and extracting, for the first pixel points, a first variable that has a positive correlation with the parameter for describing the water quality of the water body area in the first region, and monitors the water quality of the water body area in the first region according to the first variable, thereby enabling large-scale water quality monitoring of the first region in both the time dimension and the space dimension.
[0015] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0017] Figure 1 is a schematic flowchart of an artificial intelligence-based water quality monitoring method provided by an embodiment of the present disclosure;
[0018] Figure 2 is another schematic flowchart of an artificial intelligence-based water quality monitoring method provided by an embodiment of the present disclosure;
[0019] Figure 3 is provided by an embodiment of the present disclosure Figure 1 a schematic flowchart of an implementation of S102 in
[0020] Figure 4Schematic diagram of the composition of the water quality monitoring device based on artificial intelligence provided by the embodiments of the present disclosure;
[0021] Figure 5 Another schematic diagram of the composition of the water quality monitoring device based on artificial intelligence provided by the embodiments of the present disclosure;
[0022] Figure 6 Another schematic diagram of the composition of the water quality monitoring device based on artificial intelligence provided by the embodiments of the present disclosure;
[0023] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement the embodiments of the present disclosure is shown. Detailed implementation manners
[0024] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist in understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0025] It should be understood that in the embodiments of the present disclosure, the character " / " generally represents an "or" relationship between the associated objects before and after. Terms such as "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features.
[0026] Water quality monitoring generally monitors and measures the types of pollutants in water bodies, the concentrations of various pollutants and their changing trends, and evaluates the water quality status.
[0027] Current water quality monitoring methods include: surface section field sampling and detection method, quantitative inversion method based on empirical models, analysis / semi-analysis method, and other methods.
[0028] However, the current water quality monitoring methods are strongly regional and seasonal, and none of them can achieve large-scale water quality monitoring in the time dimension and the space dimension.
[0029] For example, in the prior art, the concentration of chlorophyll a is usually accurately calculated, but the method of using the accurate concentration of chlorophyll a for water quality monitoring cannot be uniformly applied to different seasons and different regions, and has limitations.
[0030] The present disclosure provides a water quality monitoring method based on artificial intelligence, which can achieve large-scale monitoring of water quality changes in the time and space dimensions.
[0031] The execution subject of this method can be a computer or a server, or it can also be other devices with data processing capabilities. For example, the execution subject can be a dedicated water quality monitoring device (or an artificial intelligence-based water quality monitoring device). There is no limitation on the execution subject of this method here.
[0032] In some embodiments, the server can be a single server, or it can also be a server cluster composed of multiple servers. In some implementation manners, the server cluster can also be a distributed cluster. The present disclosure also does not limit the specific implementation manner of the server.
[0033] The artificial intelligence-based water quality monitoring method will be described exemplarily below.
[0034] Figure 1 It is a schematic flowchart of the artificial intelligence-based water quality monitoring method provided by the embodiments of the present disclosure. As Figure 1 shown, this method can include:
[0035] S101. Obtain the first captured image of the first area.
[0036] Exemplarily, the first area can be any geographical area, such as a certain city, a certain township, or a certain province, etc. There is no limitation on the size of the first area here.
[0037] The first captured image can be an image of the first area captured by a satellite or a capturing device (remote sensing multispectral image). For example, the first captured image can be obtained by capturing with the "Sentinel-2" satellite.
[0038] Optionally, in the embodiments of the present disclosure, the first captured image can be L2-level data (L2 level represents the capturing level), and the revisit period of the satellite can be 10 days.
[0039] S102. Identify the first pixel points corresponding to the water body area in the first area in the first captured image.
[0040] For example, image analysis technology can be used to analyze the first captured image to identify the first pixel points corresponding to the water body area in the first area in the first captured image. That is, the first area can include a water body area, such as the area where a lake, a river, etc. are located. By identifying the first captured image, it can be obtained which pixel points in the first captured image are the pixel points corresponding to the water body area in the first area. These pixel points can be called the first pixel points.
[0041] S103. Extract the feature information of the first pixel points; the feature information of the first pixel points includes a first variable, and the first variable has a positive correlation with a first parameter, and the first parameter is a parameter for describing the water quality of the water body area in the first area.
[0042] In S103, when extracting the feature information of the first pixel point, a first variable that has a positive correlation with the first parameter can be extracted as the feature information of the first pixel point. The first parameter refers to a parameter that describes the water quality of the water area in the first region, and the first parameter can also be referred to as a water quality factor.
[0043] That is to say, the embodiment of the present disclosure can qualitatively characterize or describe the water quality of the water area in the first region through the first variable that has a positive correlation with the first parameter, rather than quantitatively characterizing or describing the water quality of the water area in the first region by using the first parameter.
[0044] It can be understood that the first variable having a positive correlation with the first parameter means that: the larger the first parameter, the larger the first variable; conversely, the smaller the first parameter, the smaller the first variable.
[0045] S104. Monitor the water quality of the water area in the first region according to the feature information of the first pixel point.
[0046] Since the feature information of the first pixel point includes the first variable, and the first variable can qualitatively characterize or describe the water quality of the water area in the first region. Therefore, in S104, monitoring the water quality of the water area in the first region according to the feature information of the first pixel point means monitoring the water quality of the water area in the first region by monitoring the first variable. When using the first variable to monitor the water quality of the water area in the first region, the barriers in the time dimension and the space dimension can be broken, and large-scale water quality monitoring can be carried out in the time dimension and the space dimension to compare the water quality changes in the first region at different times and the water quality changes in the first region and other regions (such as the second region) in different spaces.
[0047] In summary, the embodiment of the present disclosure obtains the first captured image of the first region, identifies the first pixel point corresponding to the water area in the first region in the first captured image, extracts, for the first pixel point, a first variable that has a positive correlation with the parameter used to describe the water quality of the water area in the first region to qualitatively characterize or describe the water quality of the water area in the first region, and monitors the water quality of the water area in the first region according to the first variable, so as to realize large-scale water quality monitoring of the first region in the time dimension and the space dimension.
[0048] In some embodiments, the first parameter includes the concentration of chlorophyll a; the first variable includes the first ratio of the reflection value in the near-infrared band to the reflection value in the red light band; the first ratio has a positive correlation with the concentration of chlorophyll a.
[0049] Generally, during water quality monitoring, the concentration of chlorophyll a is quantitatively described. In the embodiments of the present disclosure, the concentration of chlorophyll a is qualitatively described by using the first ratio of the reflection value in the near-infrared band and the reflection value in the red band, which has a positive correlation with the concentration of chlorophyll a.
[0050] In some other embodiments, the first parameter further includes the concentration of soluble colored organic matter; the first variable further includes the second ratio of the reflection value in the blue band and the reflection value in the green band; the second ratio has a positive correlation with the concentration of soluble colored organic matter.
[0051] Similarly, in the embodiments of the present disclosure, the concentration of soluble colored organic matter is qualitatively described by using the second ratio of the reflection value in the blue band and the reflection value in the green band, which has a positive correlation with the concentration of soluble colored organic matter.
[0052] In still some other embodiments, the first parameter further includes the concentration of suspended solids; the first variable further includes the third ratio of the reflection value in the red band and the reflection value in the green band; the third ratio has a positive correlation with the concentration of suspended solids.
[0053] Similarly, in the embodiments of the present disclosure, the concentration of suspended solids is qualitatively described by using the third ratio of the reflection value in the red band and the reflection value in the green band, which has a positive correlation with the concentration of suspended solids.
[0054] The water quality monitoring of the first region in the time dimension and the space dimension in the embodiments of the present disclosure will be described below respectively.
[0055] For the time dimension, in the embodiments of the present disclosure, images of the same area (such as the first region) can be regularly downloaded, and the characteristic information of different time periods can be extracted according to the Figure 1 shown process for comparison to determine the water quality change of the water body area in the first region.
[0056] For example, taking the first captured image of the first region in the first time period and the first captured image of the first region in the second time period as an example, according to the Figure 1 shown process, the characteristic information of the first pixel point that can be extracted includes: the first characteristic information extracted in the first time period (i.e., extracted from the first captured image of the first region in the first time period), and the second characteristic information extracted in the second time period (i.e., extracted from the first captured image of the first region in the second time period). Figure 1 S104 in can include: monitoring the change of the water quality of the water body area in the first region in the time dimension according to the first characteristic information and the second characteristic information.
[0057] For example, the first time period can be between the second time periods. By comparing the change of the second feature information with respect to the first feature information, it is possible to determine the change in the water quality of the water body area in the first region from the first time period to the second time period (i.e., in the time dimension).
[0058] For the spatial dimension, in the embodiments of the present disclosure, for the same time period or similar time periods (such as time periods with a time difference less than a preset duration, and the preset duration can be 1 day, 1 week, etc., without limitation), images of different regions (such as the first region and the second region) can be downloaded, and the feature information of the pixel points of the water body area can be extracted and compared to determine the change in the water body area in different regions in the spatial dimension.
[0059] Taking the comparison between the first region and the second region as an example: Figure 2 Another flowchart of the water quality monitoring method based on artificial intelligence provided by the embodiments of the present disclosure. As Figure 2 shown, the method may include:
[0060] S201. Obtain the first captured image of the first region and the second captured image of the second region.
[0061] The process of obtaining the first captured image of the first region in S201 can refer to that described in S101, and the process of obtaining the second captured image of the second region can refer to the process of obtaining the first captured image of the first region, and will not be described in detail again.
[0062] S202. Identify the first pixel points corresponding to the water body area in the first region in the first captured image and the second pixel points corresponding to the water body area in the second region in the second captured image.
[0063] The process of identifying the first pixel points corresponding to the water body area in the first region in the first captured image in S202 can refer to that described in S102, and the process of identifying the second pixel points corresponding to the water body area in the second region in the second captured image can refer to the process of identifying the first pixel points corresponding to the water body area in the first region in the first captured image, and will not be described in detail again.
[0064] S203. Extract the feature information of the first pixel points and the feature information of the second pixel points; the feature information of the first pixel points includes a first variable, and the first variable has a positive correlation with a first parameter, where the first parameter is a parameter for describing the water quality of the water body area in the first region; the feature information of the second pixel points includes a second variable, and the second variable has a positive correlation with a second parameter, where the second parameter is a parameter for describing the water quality of the water body area in the second region.
[0065] The process of extracting the feature information of the first pixel point in S203 can be referred to as that described in S103. The process of extracting the feature information of the second pixel point can be referred to as the process of extracting the feature information of the first pixel point, and will not be elaborated here.
[0066] S204. Normalize the feature information of the first pixel point and the feature information of the second pixel point.
[0067] It can be understood that normalizing the feature information of the first pixel point and the feature information of the second pixel point means: normalizing the feature information of the first pixel point and the feature information of the second pixel point to the same measurement dimension for subsequent comparison. For example, it can be normalized to between 0 and 1.
[0068] S205. Monitor the change of the water quality in the water area of the first region in the spatial dimension according to the normalized feature information of the first pixel point and the normalized feature information of the second pixel point.
[0069] For example, the change of the normalized feature information of the second pixel point compared with the normalized feature information of the first pixel point can be compared, so as to determine the change of the water quality in the water area of the second region compared with the water quality in the water area of the first region (i.e., in the spatial dimension).
[0070] In other words, the above Figure 1 The shown embodiment further includes the following steps: obtaining a second captured image of the second region. Identifying the second pixel points corresponding to the water area in the second region in the second captured image. Extracting the feature information of the second pixel points; the feature information of the second pixel points includes a second variable, and the second variable has a positive correlation with a second parameter, and the second parameter is a parameter for describing the water quality of the water area in the second region. S104 may specifically include the above S204 and S205.
[0071] Exemplarily, Figure 2 Although the second region is taken as an example for illustration, it should be understood that there may be multiple second regions, such as there may be a plurality of second regions. According to the Figure 2 shown method, images of a large range (such as the whole country) at the same time phase / adjacent time phases can be compared to determine the change of the water quality in different water areas in the spatial dimension.
[0072] Exemplarily, the normalized feature information of the pixel points can be divided into three intervals: poor (>0.8), medium (0.2 - 0.8), and good (<0.2), and the water quality of the water area corresponding to each pixel point can be evaluated, and the evaluation method is not limited here.
[0073] Figure 3 For the embodiments provided by the present disclosure Figure 1A schematic diagram of an implementation process of S102 in [Chinese]. As Figure 3 shown, in some embodiments, S102 may include:
[0074] S301. Select the RGB three channels from the first captured image to generate a true color image.
[0075] For example, the RGB three channels of the first captured image can be selected to generate an RGB image, and this RGB image is the true color image. The selection method of the RGB three channels is not limited herein.
[0076] S302. Extract the spectral band features and spatial image features of the seed region in the true color image; the seed region includes the marked pixel points representing the water body region manually marked in the true color image.
[0077] Exemplarily, in the embodiments of the present disclosure, the water body region in the true color image can be marked by manual marking. For example, the pixel points corresponding to the water body region can be manually marked (referred to as marked pixel points), and the region composed of the marked pixel points is the seed region.
[0078] Optionally, when manually marking, several pixel points can be selected in the middle of the water body region as the seed region, which is not limited herein.
[0079] It can be understood that since the seed region includes the marked pixel points representing the water body region manually marked in the true color image, the seed region has the same or similar characteristics as the water body region.
[0080] In some implementation manners, the spectral band features include at least one of the following: normalized difference water index (NDWI), normalized difference vegetation index (NDVI), automated water extraction index (AWEI), modified NDWI (MNDWI), and index for removing non-water pixels in the urban background (AWEI_NSH).
[0081] In some implementation manners, the spatial image features include at least one of the following: scale-invariant feature transform (SIFT) shape feature, local binary patterns (LBP) feature, gray level co-occurrence matrix feature, and edge feature.
[0082] Exemplarily, the edge feature may be a Canny edge feature extracted by using the Canny algorithm.
[0083] The embodiments of the present disclosure do not limit the specific types and extraction methods of the spectral band features and the spatial image features.
[0084] S303. For each pixel point in the true color image, determine an identification window corresponding to the pixel point with the pixel point as the center; the identification window corresponding to the pixel point has the same size as the seed region.
[0085] For example, if the size of the seed region is 5*5 (i.e., 5 pixel points multiplied by 5 pixel points), the identification window is also 5*5.
[0086] The embodiments of the present disclosure do not limit the size of the seed region. For example, the size of the seed region may also be 3*3, 8*8, etc.
[0087] S304. Extract the spectral band features and the spatial image features of the identification window corresponding to each pixel point in the true color image.
[0088] The method for extracting the spectral band features and the spatial image features of the identification window corresponding to each pixel point in the true color image is the same as or similar to the method for extracting the spectral band features and the spatial image features of the seed region in the true color image, and will not be elaborated here. The spectral band features and the spatial image features of the identification window may also refer to the spectral band features and the spatial image features of the seed region.
[0089] S305. Among all the pixel points in the true color image, use the pixel points whose similarity between the spectral band features and the spatial image features of the corresponding identification window and the spectral band features and the spatial image features of the seed region is greater than a preset similarity threshold as the first pixel points.
[0090] For example, after obtaining the spectral band features and the spatial image features of the identification window corresponding to each pixel point in the true color image in S304, S305 may first calculate the similarity between the spectral band features and the spatial image features of the identification window corresponding to each pixel point and the spectral band features and the spatial image features of the seed region; then, the pixel points with the corresponding similarity greater than the preset similarity threshold may be selected from all the pixel points in the true color image as the first pixel points. For example, the similarity threshold may be 90%, 95%, etc., and the size of the similarity threshold is not limited here.
[0091] Optionally, in the embodiments of the present disclosure, the similarity between the two may be measured by calculating the cosine distance or the Euclidean distance between the spectral band features and the spatial image features of the identification window corresponding to each pixel point and the spectral band features and the spatial image features of the seed region.
[0092] Exemplarily, in S305, for the spectral band features and spatial image features of the recognition window corresponding to each pixel point, the spectral band features and spatial image features of the recognition window corresponding to the pixel point can be combined into a one-dimensional feature vector corresponding to the pixel point; for the spectral band features and spatial image features of the seed region, the spectral band features and spatial image features of the seed region can also be combined into a one-dimensional feature vector corresponding to the seed region. Then, the cosine distance between the one-dimensional feature vector corresponding to each pixel point and the one-dimensional feature vector corresponding to the seed region can be calculated to determine the similarity between the two.
[0093] It can be understood that the process of identifying water bodies in an image is the process of annotating the pixel points of the water bodies. Generally speaking, due to reasons such as the spectral band setting and the coarse spatial resolution of remote sensing multispectral images, the visibility is relatively poor, resulting in a very high annotation difficulty. Especially for image segmentation tasks that require pixel-level annotation, the annotation cost is very high and the efficiency is very low.
[0094] In the embodiments of the present disclosure, by selecting the RGB three channels in the first captured image to generate a true color image, the spectral band features and spatial image features of the seed region in the true color image are extracted; the seed region includes the marked pixel points representing the water body region manually marked in the true color image; for each pixel point in the true color image, a recognition window corresponding to the pixel point is determined with the pixel point as the center; the recognition window corresponding to the pixel point has the same size as the seed region; the spectral band features and spatial image features of the recognition window corresponding to each pixel point in the true color image are extracted; and among all the pixel points in the true color image, the pixel points whose spectral band features and spatial image features of the corresponding recognition window have a similarity greater than a preset similarity threshold with the spectral band features and spatial image features of the seed region are used as the first pixel points. Considering the spatial connectivity and spectral similarity of the water body, the annotation efficiency of the water body can be greatly improved, that is, the recognition efficiency of the water body is improved.
[0095] In some embodiments, before S302, the method further includes: segmenting the true color image into segmented images of a preset size. S302 may include: extracting the spectral band features and spatial image features of the seed region in each segmented image.
[0096] S305 may include: for each segmented image, among all the pixel points in the segmented image, the pixel points whose spectral band features and spatial image features of the corresponding recognition window have a similarity greater than a preset similarity threshold with the spectral band features and spatial image features of the seed region in the segmented image are used as the first pixel points.
[0097] That is to say, in this embodiment, the true color image can be first segmented into segmented images of a preset size, and then subsequent processing can be performed at the level of the smaller-sized segmented images.
[0098] Exemplarily, the preset size can be 512*512, and the size of the preset size is not limited herein.
[0099] In this embodiment, by dividing the true color image into segmented images of a preset size and then performing subsequent processing at the level of the smaller-sized segmented images, the accuracy of water body recognition and the accuracy of water quality monitoring can be improved.
[0100] In some embodiments, each segmented image may include at least two seed regions. For example, manual marking can be used to mark and select at least two seed regions from the connected water area. The step of using, as the first pixel points, the pixel points in the segmented image whose similarity between the spectral band features and spatial image features of the corresponding recognition window and the spectral band features and spatial image features of the seed regions in the segmented image is greater than a preset similarity threshold may include: obtaining the mean values of the spectral band features and spatial image features of at least two seed regions in the segmented image. Using, as the first pixel points, the pixel points in the segmented image whose similarity between the spectral band features and spatial image features of the corresponding recognition window and the mean values of the spectral band features and spatial image features of at least two seed regions in the segmented image is greater than a preset similarity threshold.
[0101] That is, in this embodiment, the segmented image may include at least two seed regions. When recognizing the water body region, the mean values of the spectral band features and spatial image features of at least two seed regions can be calculated first, and then the spectral band features and spatial image features of the recognition window corresponding to each pixel point in the segmented image can be compared with the mean values of the spectral band features and spatial image features to determine their similarity.
[0102] In this embodiment, the segmented image includes at least two seed regions, and by comparing the spectral band features and spatial image features of the recognition window corresponding to each pixel point in the segmented image with the mean values of the spectral band features and spatial image features of at least two seed regions to determine the similarity, the accuracy of recognizing the water body region can be further improved.
[0103] Similar to the embodiment of calculating the mean values of the spectral band features and spatial image features of at least two seed regions, in some other embodiments, each seed region may include multiple marked pixel points. For each seed region, the spectral band feature of the seed region is the mean value of the spectral band features of all the marked pixel points included in the seed region; the spatial image feature of the seed region is the mean value of the spatial image features of all the marked pixel points included in the seed region.
[0104] In this embodiment, the mean value of the spectral band features and the mean value of the spatial image features of the seed region can better represent the spectral band features and the spatial image features of the seed region, and can also further improve the accuracy of subsequent identification of water regions.
[0105] Optionally, after the above S305, the method further includes: performing dilation and erosion processing on the true color image according to the first pixel point.
[0106] Exemplarily, when performing dilation and erosion processing on the true color image, the kernel size can be set to 3*3, which is not limited herein.
[0107] After identifying the water body and marking the first pixel point in S305, there may be some cases where some pixel points are mislabeled. For example: there are pixel points marked as non-water bodies in a certain water region, or there are pixel points marked as water bodies in a certain non-water region. Such pixel points can be called "holes". In this embodiment, performing dilation and erosion processing on the true color image according to the first pixel point can eliminate such "holes", that is, eliminate some misjudgment points (mislabeled points). Performing dilation and erosion processing on the true color image according to the first pixel point, that is, superimposing image morphological post-processing, can effectively remove false detections of water bodies.
[0108] Optionally, before the above S102, the method further includes: performing cloud masking processing on the first captured image.
[0109] Performing cloud masking processing on the first captured image refers to marking the pixel points in the cloud-covered area of the first captured image. By performing cloud masking processing on the first captured image, when identifying the first pixel points corresponding to the water regions in the first area in S102, the cloud masking area (i.e., the cloud-covered area) will not be used as input, which improves the speed and accuracy of water body identification in S102.
[0110] Exemplarily, in the embodiments of the present disclosure, an improved Fmask algorithm or s2cloudless open-sourced by SENTINEL Hub can be used to calculate the cloud mask and remove the cloud-covered area. The cloud mask algorithm is not limited herein.
[0111] Optionally, in the embodiments of the present disclosure, S102 can be implemented based on a convolutional neural network algorithm. The convolutional neural network can adopt the deeplabv3+ semantic segmentation algorithm, which is not limited herein either.
[0112] In an exemplary embodiment, the embodiments of the present disclosure further provide a water quality monitoring device based on artificial intelligence, which can be used to implement the water quality monitoring method based on artificial intelligence as described in the foregoing embodiments. Figure 4 It is a schematic diagram of the composition of the water quality monitoring device based on artificial intelligence provided by the embodiments of the present disclosure. AsFigure 4 As shown, the device may include: an acquisition unit 401, an identification unit 402, an extraction unit 403, and a monitoring unit 404.
[0113] The acquisition unit 401 is configured to acquire a first captured image of a first area.
[0114] The identification unit 402 is configured to identify first pixel points corresponding to a water body area in the first area in the first captured image.
[0115] The extraction unit 403 is configured to extract feature information of the first pixel points; the feature information of the first pixel points includes a first variable, and the first variable has a positive correlation with a first parameter, where the first parameter is a parameter for describing the water quality of the water body area in the first area.
[0116] The monitoring unit 404 is configured to monitor the water quality of the water body area in the first area according to the feature information of the first pixel points.
[0117] Optionally, the first parameter includes the concentration of chlorophyll a; the first variable includes a first ratio of the reflection value in the near-infrared band to the reflection value in the red band; the first ratio has a positive correlation with the concentration of chlorophyll a.
[0118] Optionally, the first parameter further includes the concentration of soluble colored organic matter; the first variable further includes a second ratio of the reflection value in the blue band to the reflection value in the green band; the second ratio has a positive correlation with the concentration of soluble colored organic matter.
[0119] Optionally, the first parameter further includes the concentration of suspended solids; the first variable further includes a third ratio of the reflection value in the red band to the reflection value in the green band; the third ratio has a positive correlation with the concentration of suspended solids.
[0120] Optionally, the feature information of the first pixel points includes: first feature information extracted in a first time period and second feature information extracted in a second time period.
[0121] The monitoring unit 404 is specifically configured to monitor the change in the water quality of the water body area in the first area in the time dimension according to the first feature information and the second feature information.
[0122] Optionally, the acquisition unit 401 is further configured to acquire a second captured image of a second area.
[0123] The identification unit 402 is further configured to identify second pixel points corresponding to a water body area in the second area in the second captured image.
[0124] The extraction unit 403 is further configured to extract the feature information of the second pixel point; the feature information of the second pixel point includes a second variable, and the second variable has a positive correlation with a second parameter, where the second parameter is a parameter used to describe the water quality of the water body area in the second region.
[0125] The monitoring unit 404 is specifically configured to normalize the feature information of the first pixel point and the feature information of the second pixel point; and monitor the change of the water quality of the water body area in the first region in the spatial dimension according to the normalized feature information of the first pixel point and the normalized feature information of the second pixel point.
[0126] Optionally, the recognition unit 402 is specifically configured to select the RGB three channels in the first captured image to generate a true-color image; extract the spectral band features and spatial image features of the seed region in the true-color image; the seed region includes the marked pixel points representing the water body area manually marked in the true-color image; for each pixel point in the true-color image, determine the recognition window corresponding to the pixel point with the pixel point as the center; the recognition window corresponding to the pixel point has the same size as the seed region; extract the spectral band features and spatial image features of the recognition window corresponding to each pixel point in the true-color image; and use the pixel points in all the pixel points in the true-color image, whose similarity between the spectral band features and spatial image features of the corresponding recognition window and the spectral band features and spatial image features of the seed region is greater than a preset similarity threshold, as the first pixel points.
[0127] Optionally, the recognition unit 402 is further configured to segment the true-color image into segmented images of a preset size before extracting the spectral band features and spatial image features of the seed region in the true-color image. The recognition unit 402 is specifically configured to extract the spectral band features and spatial image features of the seed region in each segmented image; for each segmented image, use the pixel points in all the pixel points in the segmented image, whose similarity between the spectral band features and spatial image features of the corresponding recognition window and the spectral band features and spatial image features of the seed region in the segmented image is greater than a preset similarity threshold, as the first pixel points.
[0128] Optionally, each segmented image includes at least two seed regions. The recognition unit 402 is specifically configured to obtain the mean values of the spectral band features and spatial image features of at least two seed regions in the segmented image; and use the pixel points in all the pixel points in the segmented image, whose similarity between the spectral band features and spatial image features of the corresponding recognition window and the mean values of the spectral band features and spatial image features of at least two seed regions in the segmented image is greater than a preset similarity threshold, as the first pixel points.
[0129] Optionally, the spectral band feature of the seed region is the mean of the spectral band features of all the marked pixel points included in the seed region; the spatial image feature of the seed region is the mean of the spatial image features of all the marked pixel points included in the seed region.
[0130] Figure 5 Another schematic diagram of the artificial intelligence-based water quality monitoring device provided by the embodiments of the present disclosure. As Figure 5 shown, the device may further include: a post-processing unit 501.
[0131] The post-processing unit 501 is configured to, after the identification unit 402 uses, as the first pixel points, the pixel points in all the pixel points of the true color image whose similarity between the spectral band feature and the spatial image feature of the corresponding recognition window and the spectral band feature and the spatial image feature of the seed region is greater than a preset similarity threshold, perform dilation and erosion processing on the true color image according to the first pixel points.
[0132] Optionally, the spectral band feature includes at least one of the following: Normalized Difference Water Index, Normalized Difference Vegetation Index, Automated Water Extraction Index, Modified Normalized Difference Water Index, Index for Removing Non-Water Pixels in Urban Background.
[0133] Optionally, the spatial image feature includes at least one of the following: Scale-Invariant Feature Transform shape feature, Linear Back-Projection feature, Gray-Level Co-Occurrence Matrix feature, Edge feature.
[0134] Figure 6 Another schematic diagram of the artificial intelligence-based water quality monitoring device provided by the embodiments of the present disclosure. As Figure 6 shown, the device may further include: a cloud masking unit 601.
[0135] The cloud masking unit 601 is configured to perform cloud masking processing on the first captured image before the identification unit 402 identifies the first pixel points corresponding to the water body region in the first region in the first captured image.
[0136] In the technical solution of the present disclosure, the acquisition, storage, and application of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0137] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, a computer program product, and an artificial intelligence-based water quality monitoring device.
[0138] In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions, when executed by the at least one processor, enable the at least one processor to execute the method as described in the above embodiments. The electronic device may be the above-mentioned computer or server.
[0139] In an exemplary embodiment, the non-transitory computer-readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method as described in the above embodiments.
[0140] In an exemplary embodiment, a computer program product includes a computer program which, when executed by a processor, implements the method as described in the above embodiments.
[0141] In an exemplary embodiment, the water quality monitoring device based on artificial intelligence includes the electronic device as described in the embodiments of the present disclosure.
[0142] Figure 7 FIG. shows a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0143] As Figure 7 shown, the electronic device 700 includes a computing unit 701 which may execute various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0144] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disc, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0145] The computing unit 701 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 executes the various methods and processes described above, such as the artificial intelligence-based water quality monitoring method. For example, in some embodiments, the artificial intelligence-based water quality monitoring method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the artificial intelligence-based water quality monitoring method described above can be executed. Alternatively, in other embodiments, the computing unit 701 can be configured to execute the artificial intelligence-based water quality monitoring method in any other suitable manner (e.g., by means of firmware).
[0146] The various embodiments of the systems and techniques described above in this article can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0147] The program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program codes cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0148] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0149] In order to provide interaction with a user, the systems and techniques described herein may be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, speech input, or tactile input).
[0150] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0151] A computer system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, can also be a server of a distributed system, or a server incorporating a blockchain.
[0152] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitations are imposed herein.
[0153] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.
Claims
1. An artificial intelligence-based water quality monitoring method, the method comprising: Obtain the first captured image of the first area; Identify the first pixel points corresponding to the water body area in the first area in the first captured image; The identifying the first pixel points corresponding to the water body area in the first area in the first captured image includes: generating a true color image by selecting the RGB three channels in the first captured image; extracting the spectral band features and spatial image features of the seed area in the true color image; the seed area includes the marked pixel points manually marked in the true color image to represent the water body area; for each pixel point in the true color image, determining the recognition window corresponding to the pixel point with the pixel point as the center; the recognition window corresponding to the pixel point is the same size as the seed area; extracting the spectral band features and spatial image features of the recognition window corresponding to each pixel point in the true color image; taking the pixel points in all the pixel points in the true color image whose similarity between the spectral band features and spatial image features of the corresponding recognition window and the spectral band features and spatial image features of the seed area is greater than the preset similarity threshold as the first pixel points; Extract the feature information of the first pixel points; the feature information of the first pixel points includes a first variable, and the first variable has a positive correlation with a first parameter, and the first parameter is a parameter for describing the water quality of the water body area in the first area; Monitor the water quality of the water body area in the first area according to the feature information of the first pixel points.
2. The method according to claim 1, wherein the first parameter includes the concentration of chlorophyll a; The first variable includes a first ratio of the reflectance value in the near-infrared band to the reflectance value in the red band; the first ratio has a positive correlation with the concentration of chlorophyll a.
3. The method according to claim 2, wherein the first parameter further includes the concentration of soluble colored organic matter; The first variable further includes a second ratio of the reflectance value in the blue band to the reflectance value in the green band; the second ratio has a positive correlation with the concentration of soluble colored organic matter.
4. The method according to any one of claims 1-3, wherein the first parameter further includes the concentration of suspended solids; The first variable further includes a third ratio of the reflectance value in the red band to the reflectance value in the green band; the third ratio has a positive correlation with the concentration of suspended solids.
5. The method according to any one of claims 1-3, wherein the characteristic information of the first pixel point includes: The first feature information extracted in the first time period and the second feature information extracted in the second time period; The monitoring the water quality of the water body area in the first area according to the feature information of the first pixel points includes: Monitoring the change of the water quality of the water body area in the first area in the time dimension according to the first feature information and the second feature information.
6. The method according to any one of claims 1-3, the method further comprising: Obtain the second captured image of the second area; Identify the second pixel points corresponding to the water body area in the second area in the second captured image; Extract the feature information of the second pixel points; the feature information of the second pixel points includes a second variable, and the second variable has a positive correlation with a second parameter, and the second parameter is a parameter for describing the water quality of the water body area in the second area; The monitoring the water quality of the water body area in the first area according to the feature information of the first pixel points includes: Normalize the feature information of the first pixel points and the feature information of the second pixel points; Monitor the change of the water quality of the water body area in the first area in the spatial dimension according to the normalized feature information of the first pixel points and the normalized feature information of the second pixel points.
7. The method according to claim 1, before extracting the spectral band characteristics and spatial image characteristics of the seed region in the true color image, the method further comprising: Segment the true color image into segmented images of a preset size; The extracting the spectral band features and spatial image features of the seed area in the true color image includes: Extracting the spectral band features and spatial image features of the seed area in each of the segmented images; Among all the pixel points in the true color image, the pixel points whose similarity between the spectral band features and spatial image features of the corresponding recognition window and the spectral band features and spatial image features of the seed region is greater than a preset similarity threshold are used as the first pixel points, and it includes: For each of the segmented images, among all the pixel points in the segmented image, the pixel points whose similarity between the spectral band features and spatial image features of the corresponding recognition window and the spectral band features and spatial image features of the seed region in the segmented image is greater than a preset similarity threshold are used as the first pixel points.
8. The method according to claim 7, wherein each of the segmented images includes at least two of the seed regions; The step of using, as the first pixel points, the pixel points in all the pixel points of the segmented image, for which the similarity between the spectral band features and the spatial image features of the corresponding recognition window and the spectral band features and the spatial image features of the seed regions in the segmented image is greater than a preset similarity threshold, includes: Obtain the mean values of the spectral band features and spatial image features of at least two of the seed regions in the segmented image; Among all the pixel points in the segmented image, the pixel points whose similarity between the spectral band features and spatial image features of the corresponding recognition window and the mean values of the spectral band features and spatial image features of at least two of the seed regions in the segmented image is greater than a preset similarity threshold are used as the first pixel points.
9. The method according to any one of claims 1, 7 - 8, wherein the spectral band feature of the seed region is the mean value of the spectral band features of all the marked pixel points included in the seed region; The spatial image feature of the seed region is the mean value of the spatial image features of all the marked pixel points included in the seed region.
10. The method according to any one of claims 1, 7 - 8, after using, as the first pixel points, the pixel points in all the pixel points of the true - color image, for which the similarity between the spectral band features and the spatial image features of the corresponding recognition window and the spectral band features and the spatial image features of the seed regions is greater than a preset similarity threshold, the method further includes: Perform dilation and erosion processing on the true color image according to the first pixel points.
11. The method according to any one of claims 1, 7 - 8, wherein the spectral band feature includes at least one of the following: Normalized Difference Water Index, Normalized Difference Vegetation Index, Automated Water Extraction Index, Modified Normalized Difference Water Index, Index for Removing Non - water Pixels in Urban Background.
12. The method according to any one of claims 1, 7 - 8, wherein the spatial image feature includes at least one of the following: Scale - Invariant Feature Transform Shape Feature, Linear Back - Projection Feature, Gray - Level Co - Occurrence Matrix Feature, Edge Feature.
13. The method according to any one of claims 1 - 3, before identifying, in the first captured image, the first pixel points corresponding to the water body region in the first area, the method further includes: Perform cloud masking processing on the first captured image.
14. A water quality monitoring device based on artificial intelligence, the device includes: An acquisition unit, configured to acquire a first captured image of a first area; An identification unit, configured to identify the first pixel points corresponding to the water body area in the first area in the first captured image; the identification unit is further configured to generate a true color image by selecting the RGB three channels in the first captured image; extract the spectral band features and spatial image features of the seed region in the true color image; the seed region includes marked pixel points manually marked in the true color image to represent the water body area; for each pixel point in the true color image, determine the recognition window corresponding to the pixel point with the pixel point as the center; the recognition window corresponding to the pixel point has the same size as the seed region; extract the spectral band features and spatial image features of the recognition window corresponding to each pixel point in the true color image; among all the pixel points in the true color image, the pixel points whose similarity between the spectral band features and spatial image features of the corresponding recognition window and the spectral band features and spatial image features of the seed region is greater than a preset similarity threshold are used as the first pixel points; An extraction unit, configured to extract the feature information of the first pixel points; the feature information of the first pixel points includes a first variable, and the first variable has a positive correlation with a first parameter, and the first parameter is a parameter used to describe the water quality of the water body area in the first area; A monitoring unit, configured to monitor the water quality of the water body area in the first area according to the feature information of the first pixel points.
15. An electronic device, includes: At least one processor; And a memory communicatively connected to the at least one processor; Wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-13.
16. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method according to any one of claims 1-13.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-13.
18. An artificial intelligence-based water quality monitoring device comprising the electronic device according to claim 15.
Citation Information
Patent Citations
Water quality monitoring method and water quality monitoring device based on adaptive model
CN106525762A
Satellite Remote Sensing Image Recognition of Water Body
CN109086649A
Water body identification method and device, water body change detection method and device, equipment and medium
CN112102288A