Water color on-site automatic detection method and system based on gray level fusion of three characteristic wave bands
By using a three-feature band grayscale fusion method, combined with the ETA evolution model and external environmental parameters, the shortcomings of water color remote sensing technology in high-precision detection and complex water body identification are solved, and accurate judgment and boundary output of water pollution are achieved.
Patent Information
- Application Number
- CN202610015029.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-07
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2046-01-07
AI Technical Summary
Existing water color remote sensing technologies have shortcomings in high-precision detection and identification of complex water bodies. They are difficult to accurately obtain water color information, and the boundaries of pollutants are difficult to predict. Existing methods require a large number of samples and are not accurate enough.
A three-feature band grayscale fusion method is adopted. By training the ETA evolution model and combining external environmental and hydrodynamic parameters, the spatiotemporal diffusion paths of algae, sediment, and CDOM, as well as their contribution and probability, are obtained. The grayscale distribution field of the water sample is corrected and converted into an RGB distribution field to determine water pollution and output the pollution boundary.
It achieves high-precision water pollution detection, accurately determines pollution boundaries, reduces sample collection volume, and improves detection accuracy and efficiency.
Smart Images

Figure CN121476087A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of water pollution detection, and particularly to a three-feature-band gray fusion water color on-site automatic detection method and system. BACKGROUND
[0002] Water color, as a direct representation of the optical properties of water bodies, is mainly formed by the combined effects of the absorption and scattering of incident light by dissolved organic matter and particulate matter. Therefore, it not only reflects the optical properties of water bodies, but also reveals their material composition characteristics to some extent. This index has important reference value in water quality monitoring and the flow path of pollutants after formation, as well as in pollution boundary monitoring.
[0003] In the prior art, it is difficult to accurately obtain water color, and methods such as the Secci disc visual colorimetric method, the water color meter, and water color remote sensing technology are generally used for pollution detection. These methods generally obtain the color information reflected by the water body, and then compare it with standard color levels or detect the spectral information to obtain the water color. The essence of these existing water color remote sensing images is multispectral data, and the "color" presented is often a pseudo-color synthesis based on spectral inversion or feature enhancement. When the color difference of the water body is close to the human eye color discrimination threshold (such as a mixture of blue algae and green algae), color restoration errors may cause classification errors. As can be seen, although water color remote sensing has irreplaceable advantages in macro monitoring, it still has significant shortcomings in high-precision, atmospheric correction, and complex water body recognition.
[0004] In addition, due to the complexity of pollutants, their flow path, diffusion direction, sinking speed, and other environmental factors are related, making it difficult to predict the boundary of pollutants. In order to detect the boundary of pollutants, a large number of samples need to be collected on the water body to obtain its boundary, and there are problems such as insufficient accuracy in the distribution map obtained by a small number of sample collections and fitting algorithms.
[0005] To solve the above problems in the prior art, a three-feature-band gray fusion water color on-site automatic detection method and system are designed. SUMMARY
[0006] To solve the above problems in the prior art, the present application provides a three-feature-band gray fusion water color on-site automatic detection method and system, which can effectively solve at least one of the above problems in the prior art.
[0007] The technical solution of the present application is as follows: A three-feature-band gray fusion water color on-site automatic detection method, comprising the following steps: S1, setting discrete and dot array sampling points in the water area to be measured, collecting historical external environment and hydrodynamic condition parameter sets and algae, sediment and CDOM state data at each sampling point, training an ETA evolution model to obtain the spatio-temporal diffusion path of algae, sediment and CDOM state data, the contribution degree of each external environment and hydrodynamic condition parameter to each spatio-temporal diffusion path, and the occurrence probability of each spatio-temporal diffusion path; S2, setting discrete and dot array sampling points in the water area to be measured, collecting the water sample gray value under each wave band at each sampling point through the filter with central wavelengths of 440nm, 550nm and 680nm to generate the initial water sample gray value distribution field corresponding to 440nm, 550nm and 680nm; collecting the external environment and hydrodynamic condition parameter set of each sampling point to generate the external environment and hydrodynamic condition parameter distribution field of each sampling point; S3, based on each of the external environment and hydrodynamic condition parameter distribution field, combining the spatio-temporal diffusion path, the contribution degree and the occurrence probability, respectively guiding the initial water sample gray value distribution field to obtain the corrected water sample gray value distribution field corresponding to 440nm, 550nm and 680nm. S4, combining the corrected water sample gray value distribution field corresponding to 440nm, 550nm and 680nm into a water sample RGB distribution field to judge water pollution through the water sample RGB distribution field and output the pollution boundary.
[0008] Further, the external environment and hydrodynamic condition parameter set includes air temperature, water temperature, light intensity, wind speed, flow rate, flow direction and turbulence intensity.
[0009] Further, in step S1, training the ETA evolution model includes: The ETA evolution model takes historical external environment and hydrodynamic condition parameters as input features, learns the corresponding relationship between the changes of historical external environment and hydrodynamic condition parameters and the changes of algae, sediment and CDOM state data, and establishes the environmental-driven spatio-temporal diffusion mapping relationship of algae, sediment and CDOM. The role of each external environment and hydrodynamic condition parameter in the diffusion prediction process is quantified through the ETA evolution model, so as to obtain the influence weight of different external environment and hydrodynamic condition parameters on the diffusion behavior of algae, sediment and CDOM, and the contribution degree is obtained after normalization.
[0010] Further, S3, based on each of the external environment and hydrodynamic condition parameter distribution field, combining the spatio-temporal diffusion path, the contribution degree and the occurrence probability, respectively guiding the initial water sample gray value distribution field to obtain the corrected water sample gray value distribution field corresponding to 440nm, 550nm and 680nm. S3.1, the occurrence probability includes an enhancement probability, a weakening probability, and a stable probability related to diffusion, and a gray correction direction is determined according to a dominant probability in the occurrence probability for the initial water sample gray value distribution field; S3.2, the initial water sample gray value distribution field is adjusted as a parameter according to the contribution degree as a weight to obtain a weight correction gray distribution field; S3.3, in the weight correction gray distribution field, a neighbor point is selected according to the space-time diffusion path direction, and a gray of the neighbor point is adjusted according to a distance attenuation weight to obtain a corrected water sample gray value distribution field.
[0011] Further, step S3.2, adjusting the initial water sample gray value distribution field as a parameter according to the contribution degree as a weight includes: defining a correction coefficient , wherein i represents the number of correction coefficients, is adjusted according to the following formula, , wherein, represents a gray value of a certain point in the initial water sample gray value distribution field, represents a gray value of a certain point in the adjusted initial water sample gray value distribution field, represents a contribution degree corresponding to the external environment and the water power condition parameter, if the dominant probability is the enhancement probability, then is positive, if the dominant probability is the weakening probability, then is negative, if the dominant probability is the stable probability, then is 0, is a fixed numerical value.
[0012] Further, S3.3, in the weight correction gray distribution field, a neighbor point is selected according to the space-time diffusion path direction, and a gray of the neighbor point is adjusted according to a distance attenuation weight to obtain a corrected water sample gray value distribution field. extracting points within a radius r centered on each point on the space-time diffusion path; establishing an attenuation function , d represents the distance between the point and the space-time diffusion path direction, and is adjusted according to the following formula, , wherein, represents an attenuation coefficient, is the corrected water sample gray value.
[0013] Further, S4, combining the corrected water sample gray value distribution fields corresponding to 440 nm, 550 nm, and 680 nm into a water sample RGB distribution field to judge water pollution through the water sample RGB distribution field and output a pollution boundary includes: S4.1, combine the corrected water sample gray value distribution field corresponding to 440nm, 550nm, 680nm into a water sample RGB distribution field by the following formula, , , wherein, , , are the corrected water sample gray values corresponding to 440nm, 550nm, 680nm respectively, are the color matching function values corresponding to the wavelengths respectively, respectively represent the corresponding intermediate parameters, respectively represent the corresponding RGB values; S4.2, obtain a water sample chrominance distribution field by inverting the water sample RGB distribution field and the corrected water sample gray value distribution field, extract a region greater than a preset threshold in the water sample chrominance distribution field as a pollution region, and extract the boundary of the pollution region to obtain the pollution boundary.
[0014] Further, obtaining a water sample chrominance distribution field by inverting the water sample RGB distribution field and the corrected water sample gray value distribution field comprises: using the standard gray values and the standard RGB values corresponding to 440nm, 550nm, 680nm as inputs, using the standard chrominance values as outputs, using the partial least squares regression algorithm to extract the latent variables of the inputs and the outputs, and establishing a linear mapping relationship: , wherein, C represents the standard chrominance value, respectively represent the standard gray values corresponding to 440nm, 550nm, 680nm, respectively represent the standard RGB values, respectively represent the corresponding model coefficients.
[0015] Further provided is a water color field automatic detection system based on three characteristic waveband gray value fusion, comprising the following modules: An ETA evolution model generation module is configured to set discrete and dot array sampling points in a water area to be measured, collect historical external environment and water dynamic condition parameter sets and algae, sediment, and CDOM state data of each sampling point, train an ETA evolution model, obtain a spatiotemporal diffusion path of the algae, sediment, and CDOM state data, a contribution degree of each external environment and water dynamic condition parameter to each spatiotemporal diffusion path, and an occurrence probability of each spatiotemporal diffusion path; The distribution field generation module is configured to set discrete and dot array sampling points in the water area to be measured, collect water sample gray value under each wave band at each sampling point through a filter with a central wavelength of 440 nm, 550 nm or 680 nm, and fit to generate an initial water sample gray value distribution field corresponding to 440 nm, 550 nm or 680 nm; and collect external environment and hydrodynamic condition parameter sets of each sampling point, and fit to generate each external environment and hydrodynamic condition parameter distribution field. The guidance correction module is configured to guide the initial water sample gray value distribution field based on each external environment and hydrodynamic condition parameter distribution field, in combination with the spatio-temporal diffusion path, the contribution degree and the occurrence probability, to obtain a corrected water sample gray value distribution field corresponding to 440 nm, 550 nm or 680 nm. The judgment module is configured to convert the corrected water sample gray value distribution field corresponding to 440 nm, 550 nm or 680 nm into a water sample RGB distribution field, and judge water pollution through the water sample RGB distribution field and output a pollution boundary.
[0016] Therefore, the present application provides the following effects and / or advantages: The present application obtains the spatio-temporal diffusion path of algae, sediment and CDOM state data, the contribution degree of each external environment and hydrodynamic condition parameter to each spatio-temporal diffusion path, and the occurrence probability of each spatio-temporal diffusion path by training an ETA evolution model, and then corrects the preliminary initial water sample gray value distribution field according to these information, so as to obtain a more accurate corrected water sample gray value distribution field corresponding to 440 nm, 550 nm or 680 nm, and then calculates the corresponding water pollution condition in combination with the corrected water sample gray value distribution field corresponding to 440 nm, 550 nm or 680 nm.
[0017] The present application learns the corresponding relationship between the change of historical external environment and hydrodynamic condition parameter and the change of algae, sediment and CDOM state data through the ETA model, so as to obtain the influence and contribution degree of each external environment and hydrodynamic condition parameter on the diffusion of algae, sediment and CDOM, thereby for accurately correcting the preliminary gray distribution field.
[0018] The present application realizes step-by-step guidance of the initial water sample gray value distribution field in combination with the specific mode of the spatio-temporal diffusion path, the contribution degree and the occurrence probability, so as to obtain the corrected water sample gray value distribution field, thereby providing a new idea for the correction of the water sample gray value distribution field.
[0019] Additional features and advantages of the present application will be set forth in the description that follows, and in part will be apparent from the description, or can be learned by practice of the application. The objectives and other advantages of the present application will be realized and attained by the structure particularly pointed out in the description and appended drawings.
[0020] It is to be understood that both the foregoing general description of the application and the following detailed description are exemplary and explanatory and are intended to provide further explanation of the application as claimed. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 Flow chart provided for one of the embodiments of the present application. DETAILED DESCRIPTION
[0022] In order to facilitate the understanding of those skilled in the art, the embodiments will be further described in detail: REFERENCE Figure 1 A three-characteristic band gray scale fusion water color field automatic detection method, characterized in that it comprises the following steps: S1, setting discrete and dot array sampling points in the water area to be measured, collecting historical external environment and hydrodynamic condition parameter sets and algae, sediment and CDOM state data of each sampling point, training an ETA evolution model to obtain evolution paths of algae, sediment and CDOM and contribution degrees of each external environment and hydrodynamic condition parameter to each evolution path; In this step, the discrete and dot array sampling points can be in the form of fixed spacing and square matrix, and sampling points are set at each point to obtain dot array sampling results. The algae, sediment and CDOM state data are important underlying reasons for water pollution. The existence of algae, sediment and CDOM can cause water quality to become green, yellow and blurred, etc. Therefore, monitoring these data can obtain the degree of water pollution, so as to judge whether the water quality is polluted.
[0023] External environment and hydrodynamic condition parameters can affect algae, sediment and CDOM. For example, if the external sunlight intensity is high, the algae will grow wildly, or for example, if the water flow velocity is high, the sediment will be easily dispersed and rolled, so that it is close to the water surface and the color is shown.
[0024] Therefore, this step outputs the spatio-temporal diffusion path of the algae, sediment and CDOM state data and the corresponding contribution degree by training the ETA model, can infer the evolution path of the algae, sediment and CDOM state data, and the contribution degree of the specific external environment and hydrodynamic condition parameter in each evolution path to the evolution path, so as to obtain the response law of the spatio-temporal variation behavior of the algae, sediment and CDOM in the water body to the external environment and hydrodynamic condition.
[0025] S2, setting discrete and dot array sampling points in the water area to be measured, collecting water sample gray value in each wave band at each sampling point through filters with central wavelengths of 440 nm, 550 nm and 680 nm, fitting to generate initial water sample gray value distribution fields corresponding to 440 nm, 550 nm and 680 nm; collecting external environment and hydrodynamic condition parameter sets of each sampling point, fitting to generate external environment and hydrodynamic condition parameter distribution fields; In this step, the method of directly obtaining a sampling water quality color image in the prior art is changed, and instead, water sample gray values of the sampling water quality in 440 nm, 550 nm and 680 nm wave bands are obtained. The 440 nm, 550 nm and 680 nm wave bands are wave bands on which absorption / scattering peaks of three types of substances, i.e. algae (chlorophyll), suspended silt and CDOM, in the visible light region fall. Chlorophyll has a significant absorption peak near 680 nm, suspended silt is mainly scattered, and the reflection is most obviously enhanced near 550 nm in the green light region, and CDOM has the strongest absorption characteristics in the blue light region near 440 nm. Therefore, the water sample gray values corresponding to the three wave bands can best reflect the influence of algae, silt and CDOM on water quality.
[0026] Through the fitting algorithm, a rough initial water sample gray value distribution field of each wave band and external environment and hydrodynamic condition parameter distribution fields can be obtained. The external environment and hydrodynamic condition parameter distribution fields can be, for example, water temperature distribution fields and water flow velocity distribution fields.
[0027] S3, based on each of the external environment and hydrodynamic condition parameter distribution fields, combining the evolution path and the contribution degree, respectively correcting each of the initial water sample gray value distribution fields to obtain corrected water sample gray value distribution fields corresponding to 440 nm, 550 nm and 680 nm; In step S2, the external environment and hydrodynamic condition parameter distribution fields are obtained. Through the parameter distribution in each of the external environment and hydrodynamic condition parameter distribution fields and the spatiotemporal diffusion path and contribution degree of the algae, silt and CDOM state data obtained in step S1, the generation path and generation probability of the algae, silt and CDOM at each position in the water area to be measured can be obtained, and a probability distribution map that can be used to guide the generation of the algae, silt and CDOM pollution boundary is obtained. Then, in combination with the initial water sample gray value distribution field, a more accurate corrected water sample gray value distribution field can be obtained.
[0028] S4, combining the corrected water sample gray value distribution fields corresponding to 440 nm, 550 nm and 680 nm into a water sample RGB distribution field, judging water pollution through the water sample RGB distribution field and outputting a pollution boundary.
[0029] In this step, the grayscale value of the water sample is converted into RGB color, and then the RGB color is used to determine whether the water body is polluted and output the boundary.
[0030] Furthermore, the set of external environmental and hydrodynamic condition parameters includes air temperature, water temperature, light intensity, wind speed, flow velocity, flow direction, and turbulence intensity.
[0031] Furthermore, algae, sediment, and CDOM state data are highly sensitive to external environmental and hydrodynamic parameters. Specifically, in water flows with directional and wind-driven conditions, algae tend to shift along the mainstream or wind direction. The greater the water flow velocity and the greater the angle of the flow turn, the more easily algae are dispersed, resulting in a decrease in concentration. Algae also grow vigorously in environments with ample sunlight and warm temperatures, and in turbulent flows, they tend to tumble and accumulate on the surface. Sediment does not exhibit the same growth characteristics as algae, therefore it has a low correlation with light intensity. When flow velocity or shear force exceeds a threshold, bottom sediment is rapidly stirred up, causing the water to become cloudy. Sediment concentration changes relatively synchronously with flow velocity and turbulence; for example, an increase in flow velocity immediately raises sediment concentration. Sediment typically forms a large-scale continuous distribution, making isolated extreme points less likely. Additionally, in warmer air and water temperatures, sediment is more easily dispersed. CDOM state data tends to accumulate in the water body over time, and changes in wind, waves, and instantaneous flow velocity significantly affect CDOM. The impact is relatively small. CDOM state data is mainly transported via convection-diffusion and lacks the mechanism of algal up-and-down movement. It requires a long time and strong light to show significant changes, thus its correlation with light intensity is low. Therefore, algae, sediment, and CDOM state data respond completely differently to various external environmental and hydrodynamic parameters, and their diffusion mechanisms are also completely different.
[0032] Further, in step S1, training the ETA evolution model includes: The ETA evolution model takes historical external environmental and hydrodynamic condition parameters as input features. By learning the correspondence between changes in historical external environmental and hydrodynamic condition parameters and changes in algae, sediment, and CDOM state data, it establishes an environment-driven spatiotemporal diffusion mapping relationship for algae, sediment, and CDOM. The ETA evolution model is used to quantify the role of various external environmental and hydrodynamic parameters in the diffusion prediction process, thereby obtaining the influence weights of different external environmental and hydrodynamic parameters on the diffusion behavior of algae, sediment and CDOM, and the contribution is obtained after normalization.
[0033] In this step, the ETA evolutionary model uses the state change labels of algae, sediment, and CDOM as supervision signals. The model parameters are iteratively optimized by minimizing the prediction error of change probability and the spatial consistency constraint error. To ensure the physical rationality and spatial continuity of the model output, propagation constraints between adjacent sampling points are introduced during training, enabling the model to learn the evolutionary patterns of pollution elements spreading or migrating along the water flow direction. Simultaneously, the roles of various external environmental and hydrodynamic parameters in the model prediction process are quantified through feature importance analysis, sensitivity analysis, or interpretable attribution methods. This yields the influence weights of different environmental parameters on the evolutionary behavior of algae, sediment, and CDOM. These influence weights are then normalized to obtain their contribution values.
[0034] Specifically, the ETA evolution model can ultimately determine the diffusion paths and probabilities of algae, sediment, and CDOM based on actual external environmental and hydrodynamic parameters. For example, under conditions of high water temperature, sufficient light, and stable wind direction and flow regime, the ETA evolution model outputs the diffusion path of algae along the mainstream direction and provides the contribution of water temperature, light, and wind direction as the dominant driving factors, with the corresponding algae enhancement probability reaching over 0.7. Under conditions of significantly increased flow velocity and turbulence intensity, the model outputs a continuous diffusion path of sediment along the river channel, with an enhancement probability exceeding 0.8. In slow-flowing environments, the model outputs a smooth diffusion path of CDOM, with its evolution probability showing a moderate enhancement trend.
[0035] For example, under the current environmental conditions: water flow velocity: 0.45 m / s (significantly increased); turbulence intensity: high; wind speed: 1.2 m / s (minor impact); changes in light and water temperature are not significant. The contribution values output by the ETA evolution model are as follows (parameters not shown indicate a contribution of 0):
[0036] It can be seen that under these external environmental and hydrodynamic conditions, sediment diffusion is almost entirely driven by hydrodynamics. The probability of occurrence of the spatiotemporal diffusion path is as follows: sediment enhancement probability: 0.83, sediment weakening probability: 0.07, and stability probability: 0.10. Ultimately, it is determined that the probability of sediment in the river channel undergoing significant resuspension and diffusing along the main flow direction under the current flow conditions is 83%. The spatiotemporal diffusion path of sediment is along the main flow direction of the river channel, characterized by continuous diffusion, blurred boundaries, and a banded distribution.
[0037] Further, S3, based on the distribution fields of various external environmental and hydrodynamic condition parameters, combined with the spatiotemporal diffusion path, the contribution rate, and the occurrence probability, the initial water sample gray value distribution field is guided to obtain the corrected water sample gray value distribution fields corresponding to 440nm, 550nm, and 680nm, including: S3.1, the occurrence probability includes the probability of enhanced diffusion, the probability of weakened diffusion, and the probability of stable diffusion. The gray value distribution field of the initial water sample is determined according to the dominant probability in the occurrence probability to determine the gray value correction direction. In this step, the occurrence probability of each point output by the ETA evolution model is calculated as follows: for the enhancement probability, the grayscale tends to increase; for the weakening probability, the grayscale tends to decrease; and for the stabilizing probability, the grayscale tends to remain unchanged. This establishes the direction of change for each pixel in the initial water sample grayscale value distribution field. Furthermore, the highest probability among the enhancement, weakening, and stabilizing probabilities can be selected as the dominant probability.
[0038] S3.2, The initial water sample gray value distribution field is adjusted by using the contribution degree as a weight to obtain a weighted corrected gray value distribution field; In step S3.1, the direction of grayscale adjustment for each point was established. This step further confirms the amount of adjustment. Further, step S3.2, adjusting the initial water sample grayscale value distribution field using the contribution degree as a weight, includes defining a correction coefficient. ,in , where i represents the correction factor number. Adjust according to the following formula. ,in, This represents the gray value at a specific point in the initial water sample gray value distribution field. This represents the gray value at a specific point in the initial water sample gray value distribution field after weight adjustment. This represents the contribution of external environmental and hydrodynamic parameters. If the dominant probability is the enhancing probability, then... If the dominant probability is positive, then... If the value is negative, and the dominant probability is a stable probability, then... =0, It is a fixed value.
[0039] Specifically, in this embodiment, It can be obtained empirically, or it can be a value between 0.01 and 0.05, such as a correction factor for light intensity. It can be set to 0.03. For example, the gray value of a certain point in the initial water sample gray value distribution field. In this spatiotemporal diffusion path, temperature and illumination are strongly correlated, with the dominant probability being the enhancement probability, and illumination contributing the most. Temperature contribution Illumination correction factor Temperature correction factor ,but .
[0040] S3.3, in the weighted correction grayscale distribution field, neighborhood points are selected according to the spatiotemporal diffusion path direction, and the grayscale of the neighborhood points is weighted and adjusted according to the distance attenuation weight to obtain the corrected grayscale value distribution field of the water sample.
[0041] Further, S3.3, in the process of selecting neighboring points in the weighted grayscale distribution field according to the spatiotemporal diffusion path direction, and adjusting the grayscale of the neighboring points according to the distance attenuation weight, includes: Extract the points within a radius r centered on each point along the spatiotemporal diffusion path; Establish the decay function d represents the distance between the point and the direction of the spatiotemporal diffusion path, which is adjusted according to the following formula. ,in Indicates the attenuation coefficient. This is the corrected grayscale value of the water sample.
[0042] In this step, by extracting points within a radius *r* centered on each point along the spatiotemporal diffusion path, the expanded region of the path can be obtained. This can be understood as follows: after pollutants are dispersed at the source, their primary propagation path is the spatiotemporal diffusion path, for example, diffusing along the direction of water flow, while also diffusing in the direction perpendicular to the water flow. Furthermore, the closer to the spatiotemporal diffusion path, the higher the concentration of pollutants. Therefore, a system is established... This allows the gray values of the weighted gray distribution field to be smoothly adjusted along the diffusion direction, simulating the physical laws of pollutant diffusion along the path. It can be a value set based on practical experience. The larger the value, the faster the decay rate. The decay function... It can be a linear decay function.
[0043] Further, in step S4, the corrected grayscale value distribution fields of the water sample corresponding to 440nm, 550nm, and 680nm are combined and converted into an RGB distribution field of the water sample. The water pollution is determined and the pollution boundary is output through the RGB distribution field of the water sample, including: S4.1, the corrected grayscale value distribution fields of the water sample corresponding to 440nm, 550nm, and 680nm are combined and converted into the RGB distribution field of the water sample using the following formula. , , in, , , These are the corrected grayscale values of the water samples at 440nm, 550nm, and 680nm, respectively. These are the color matching function values for the corresponding wavelengths. These represent the corresponding intermediate parameters. These represent the corresponding RGB values; S4.2, the water sample chromaticity distribution field is obtained by inverting the RGB distribution field of the water sample with the corrected gray value distribution field of the water sample, and the area in the water sample chromaticity distribution field that is greater than a preset threshold is extracted as the pollution area, and the boundary of the pollution area is extracted to obtain the pollution boundary.
[0044] In this step, the conversion of the water sample grayscale value distribution field in S4.1 into the water sample RGB distribution field is a direct adoption of existing technology, and its specific principles and steps will not be elaborated here. In S4.2, water color (such as CIE chromaticity, Forel-Ule index, platinum-cobalt chromaticity) is a physically standardized optical indicator that can describe the absorption, scattering, and color composition of light by water, directly corresponding to the concentration of algae, CDOM, and sediment in the water. As a detection standard, chromaticity can be directly correlated with the pollutant concentration threshold, making it easy to define the threshold of the "polluted area," therefore water color is used.
[0045] Furthermore, the color distribution field of the water sample is obtained by inverting the RGB distribution field of the water sample with the corrected gray value distribution field, including: Using standard grayscale and standard RGB values corresponding to 440nm, 550nm, and 680nm as inputs, and standard chromaticity values as outputs, a partial least squares regression algorithm is used to extract latent variables between the inputs and outputs, establishing a linear mapping relationship. , Where C represents the standard chromaticity value, These represent the standard grayscale values corresponding to 440nm, 550nm, and 680nm, respectively. These represent standard RGB values. These represent the corresponding model coefficients.
[0046] In this step, a training set is constructed using the "grayscale value - RGB value - standard chromaticity value" of a 22-color meter. A model is then built using the PLSR algorithm to achieve accurate calculation of "water body grayscale value → RGB value → chromaticity value" during real-time monitoring. The training set construction converts FUI to platinum-cobalt chromaticity (Pt-Co). The input features are the standard grayscale and standard RGB values of the 22 color numbers, and the output label is the corresponding standard chromaticity value C. Eighteen color numbers are selected as the training set, and four color numbers as the validation set. The PLSR model training uses a partial least squares regression algorithm implemented using Python's scikit-learn library. The core of this algorithm is to extract the latent variables between the input features and the output labels and establish a linear relationship.
[0047] Furthermore, a three-feature band grayscale fusion automatic water color detection system is provided, comprising the following modules: The ETA evolution model generation module is used to set discrete and lattice-like sampling points in the water area to be tested, collect historical external environmental and hydrodynamic condition parameter sets at each sampling point, as well as algae, sediment, and CDOM state data at each sampling point, train the ETA evolution model, obtain the spatiotemporal diffusion paths of algae, sediment, and CDOM state data, as well as the contribution of each external environmental and hydrodynamic condition parameter to each spatiotemporal diffusion path, and the probability of occurrence of each spatiotemporal diffusion path; The distribution field generation module is used to set discrete and arrayed sampling points in the water area to be tested. At each sampling point, the gray value of the water sample under each wavelength band is collected through filters with center wavelengths of 440nm, 550nm, and 680nm. The module is then fitted to generate the initial gray value distribution field of the water sample corresponding to 440nm, 550nm, and 680nm. The module also collects the set of external environmental and hydrodynamic condition parameters for each sampling point and fits to generate the distribution field of each external environmental and hydrodynamic condition parameter. The guidance and correction module is used to guide the initial water sample gray value distribution field based on the distribution fields of various external environmental and hydrodynamic conditions parameters, combined with the spatiotemporal diffusion path, the contribution degree, and the occurrence probability, to obtain the corrected water sample gray value distribution fields corresponding to 440nm, 550nm, and 680nm. The judgment module is used to combine the corrected gray value distribution fields of the water sample corresponding to 440nm, 550nm, and 680nm and convert them into the RGB distribution field of the water sample. The water sample RGB distribution field is used to judge water pollution and output the pollution boundary.
[0048] The working principle of this embodiment is the same as the method described above.
[0049] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0050] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0051] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0052] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0053] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms should not be construed as necessarily referring to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
Claims
1. A method for automatic on-site detection of water color using three-feature band grayscale fusion, characterized in that: Includes the following steps: S1. Set up discrete and lattice-like sampling points in the water area to be tested. Collect historical external environment and hydrodynamic condition parameter sets at each sampling point, as well as algae, sediment, and CDOM state data at each sampling point. Train the ETA evolution model to obtain the spatiotemporal diffusion paths of algae, sediment, and CDOM state data, the contribution of each external environment and hydrodynamic condition parameter to each spatiotemporal diffusion path, and the probability of occurrence of each spatiotemporal diffusion path. S2. Discrete and arrayed sampling points are set up in the water area to be tested. At each sampling point, the gray value of the water sample under each band is collected through filters with center wavelengths of 440nm, 550nm, and 680nm. The initial gray value distribution field of the water sample corresponding to 440nm, 550nm, and 680nm is fitted to generate the initial gray value distribution field of the water sample at 440nm, 550nm, and 680nm. The set of external environmental and hydrodynamic condition parameters of each sampling point is collected and fitted to generate the distribution field of each external environmental and hydrodynamic condition parameter. S3. Based on the distribution fields of various external environment and hydrodynamic conditions parameters, combined with the spatiotemporal diffusion path, the contribution degree, and the occurrence probability, the initial water sample gray value distribution field is guided to obtain the corrected water sample gray value distribution fields corresponding to 440nm, 550nm, and 680nm. S4, combine the corrected grayscale value distribution fields of the water sample corresponding to 440nm, 550nm, and 680nm to convert them into the RGB distribution field of the water sample, and use the RGB distribution field of the water sample to determine water pollution and output the pollution boundary.
2. The automatic on-site detection method for water color using three-feature band grayscale fusion as described in claim 1, characterized in that: The set of external environmental and hydrodynamic parameters includes air temperature, water temperature, light intensity, wind speed, flow velocity, flow direction, and turbulence intensity.
3. The automatic on-site detection method for water color using three-feature band grayscale fusion as described in claim 1, characterized in that: In step S1, training the ETA evolution model includes: The ETA evolution model takes historical external environmental and hydrodynamic condition parameters as input features. By learning the correspondence between changes in historical external environmental and hydrodynamic condition parameters and changes in algae, sediment, and CDOM state data, it establishes an environment-driven spatiotemporal diffusion mapping relationship for algae, sediment, and CDOM. The ETA evolution model is used to quantify the role of various external environmental and hydrodynamic parameters in the diffusion prediction process, thereby obtaining the influence weights of different external environmental and hydrodynamic parameters on the diffusion behavior of algae, sediment and CDOM, and the contribution is obtained after normalization.
4. The automatic on-site detection method for water color using three-feature band grayscale fusion as described in claim 1, characterized in that: S3, based on the distribution fields of various external environmental and hydrodynamic condition parameters, combined with the spatiotemporal diffusion path, the contribution rate, and the occurrence probability, the initial water sample gray value distribution field is guided to obtain the corrected water sample gray value distribution fields corresponding to 440nm, 550nm, and 680nm, including: S3.1, the occurrence probability includes the probability of enhanced diffusion, the probability of weakened diffusion, and the probability of stable diffusion. The gray value distribution field of the initial water sample is determined according to the dominant probability in the occurrence probability to determine the gray value correction direction. S3.2, The initial water sample gray value distribution field is adjusted by using the contribution degree as a weight to obtain a weighted corrected gray value distribution field; S3.3, in the weighted correction gray distribution field, neighborhood points are selected according to the spatiotemporal diffusion path direction, and the gray values of the neighborhood points are adjusted according to the distance attenuation weight to obtain the corrected gray value distribution field of the water sample.
5. The automatic on-site detection method for water color using three-feature band grayscale fusion as described in claim 4, characterized in that: Step S3.2, adjusting the initial water sample grayscale value distribution field using the contribution degree as a weight, includes defining a correction coefficient. ,in , where i represents the correction factor number. Adjust according to the following formula. ,in, This represents the gray value at a specific point in the initial water sample gray value distribution field. This represents the gray value at a specific point in the adjusted initial water sample gray value distribution field. This represents the contribution of external environmental and hydrodynamic parameters. If the dominant probability is the enhancing probability, then... If the dominant probability is positive, then... If the value is negative, and the dominant probability is a stable probability, then... =0, It is a fixed value.
6. The automatic on-site detection method for water color using three-feature band grayscale fusion as described in claim 5, characterized in that: S3.3, in the weighted correction grayscale distribution field, selecting neighboring points according to the spatiotemporal diffusion path direction, and adjusting the grayscale of the neighboring points according to the distance attenuation weight, includes: Extract the points within a radius r centered on each point along the spatiotemporal diffusion path; Establish the decay function d represents the distance between the point and the direction of the spatiotemporal diffusion path, which is adjusted according to the following formula. ,in Indicates the attenuation coefficient. This is the corrected grayscale value of the water sample.
7. The automatic on-site detection method for water color using three-feature band grayscale fusion as described in claim 1, characterized in that: S4, combine the corrected grayscale value distribution fields of the water sample corresponding to 440nm, 550nm, and 680nm to convert them into an RGB distribution field of the water sample. The water pollution is determined and the pollution boundary is output based on the RGB distribution field of the water sample, including: S4.1, the corrected grayscale value distribution fields of the water sample corresponding to 440nm, 550nm, and 680nm are combined and converted into the RGB distribution field of the water sample using the following formula. , , in, , , These are the corrected grayscale values of the water samples at 440nm, 550nm, and 680nm, respectively. These are the color matching function values for the corresponding wavelengths. These represent the corresponding intermediate parameters. These represent the corresponding RGB values; S4.2, the water sample chromaticity distribution field is obtained by inverting the RGB distribution field of the water sample with the corrected gray value distribution field of the water sample, and the area in the water sample chromaticity distribution field that is greater than a preset threshold is extracted as the pollution area, and the boundary of the pollution area is extracted to obtain the pollution boundary.
8. The automatic on-site detection method for water color using three-feature band grayscale fusion as described in claim 7, characterized in that: The color distribution field of the water sample is obtained by inverting the RGB distribution field of the water sample with the corrected gray value distribution field of the water sample, including: Using standard grayscale and standard RGB values corresponding to 440nm, 550nm, and 680nm as inputs, and standard chromaticity values as outputs, a partial least squares regression algorithm is used to extract latent variables between the inputs and outputs, establishing a linear mapping relationship. , Where C represents the standard chromaticity value, These represent the standard grayscale values corresponding to 440nm, 550nm, and 680nm, respectively. These represent standard RGB values. These represent the corresponding model coefficients.
9. A three-feature band grayscale fusion automatic on-site water color detection system, characterized in that: The automatic on-site detection method for water color using three-feature band grayscale fusion as described in any one of claims 1-8 includes the following modules: The ETA evolution model generation module is used to set discrete and lattice-like sampling points in the water area to be tested, collect historical external environmental and hydrodynamic condition parameter sets at each sampling point, as well as algae, sediment, and CDOM state data at each sampling point, train the ETA evolution model, obtain the spatiotemporal diffusion paths of algae, sediment, and CDOM state data, as well as the contribution of each external environmental and hydrodynamic condition parameter to each spatiotemporal diffusion path, and the probability of occurrence of each spatiotemporal diffusion path; The distribution field generation module is used to set discrete and arrayed sampling points in the water area to be tested. At each sampling point, the gray value of the water sample under each wavelength band is collected through filters with center wavelengths of 440nm, 550nm, and 680nm. The module is then fitted to generate the initial gray value distribution field of the water sample corresponding to 440nm, 550nm, and 680nm. The module also collects the set of external environmental and hydrodynamic condition parameters for each sampling point and fits to generate the distribution field of each external environmental and hydrodynamic condition parameter. The guidance correction module is used to guide the initial water sample gray value distribution field based on the distribution fields of various external environment and hydrodynamic conditions parameters, combined with the spatiotemporal diffusion path, the contribution degree, and the occurrence probability, to obtain the corrected water sample gray value distribution fields corresponding to 440nm, 550nm, and 680nm. The judgment module is used to combine the corrected gray value distribution fields of the water sample corresponding to 440nm, 550nm, and 680nm and convert them into the RGB distribution field of the water sample. The water sample RGB distribution field is used to judge water pollution and output the pollution boundary.
Citation Information
Patent Citations
Sea surface oil spill detection method based on multi-kernel classification model decision fusion
CN113920445A
Animal husbandry water pollution detection method based on machine vision
CN118570242A
Method for monitoring suspended sediment in optical complex water body based on man-machine cooperation
CN120356100A
Intelligent monitoring method for drinking water source based on artificial intelligence
CN120724675A
Data-driven rapid traceability method for air pollutants in small-scale regionals
US20230194755A1