A water quality detection method and system based on texture feature recognition

The water quality detection system uses texture feature recognition to analyze image data from rivers and lakes, segmenting and identifying contours for accurate water quality determination, addressing inaccuracies in existing methods and reducing manual labor.

CN117805109BActive Publication Date: 2024-12-24BEIJING TIANCHENG XINKONG ENVIRONMENTAL PROTECTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311840297.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2024-12-24
Estimated Expiration
2043-12-29

AI Technical Summary

Technical Problem

Existing water quality detection methods for municipal water supplies face inaccuracies due to impurities adhering to detection channel walls, leading to labor-intensive manual testing and incomplete results, while automated systems struggle with maintaining accuracy and efficiency.

Method used

A water quality detection system and method utilizing texture feature recognition, comprising a collection, analysis, and determination layer to analyze image data from rivers and lakes, segmenting and identifying contours, and determining water quality based on texture feature parameters.

Benefits of technology

The system provides accurate, comprehensive, and stable water quality assessments with reduced manual intervention, ensuring results closely reflect actual water quality conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117805109B_ABST
    Figure CN117805109B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of water quality detection, and in particular to a water quality detection method and system based on texture feature recognition, comprising an acquisition layer, an analysis layer and a determination layer; image data of rivers and lakes are collected through the acquisition layer, and after collecting the image data of rivers and lakes, the acquisition layer synchronously determines the boundaries of rivers and lakes, and confirms river and lake detection points based on the determined river and lake boundaries; the analysis layer is based on the location of river and lake detection points in the collected river and lake image data; the present invention designs detection points based on the collected river and lake image data, and finally confirms the detection area with the designed detection points, and then performs image texture feature analysis on the detection area, and finally uses the image texture feature analysis results to represent the water quality health status of rivers and lakes, and less manual participation is required during system operation, the collected data is more comprehensive, and the output results are more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water quality detection, and in particular to a water quality detection method and system based on texture feature recognition. Background Art

[0002] Water is the source of life. Human beings cannot live without water in their daily life and production activities. The quality of drinking water is closely related to human health. With the development of social economy, scientific progress and the improvement of people's living standards, people's requirements for the quality of drinking water are constantly increasing, and the drinking water quality standards are also constantly developing and improving accordingly. Since the formulation of drinking water quality standards is related to many factors such as people's living habits, culture, economic conditions, scientific and technological development level, water resources and the current status of water quality, there are differences in the requirements for drinking water quality not only between countries, but also between different regions in the same country.

[0003] The invention patent with application number 201910704237.0 discloses a water quality detection method, which is characterized in that the water quality detection method is applied to a water quality detection system, and the water quality detection system includes N sets of detection devices, wherein the direction of each set of detection devices is different, and each set of detection devices includes a transmitting plate and a receiving detection plate. During detection, the intensity of the first ultraviolet light emitted by the transmitting plates of each set of the detection devices is the same, and N is equal to 2, and the N sets of detection devices include a first set of detection devices and a second set of detection devices; the water quality detection method includes the following steps: controlling the transmitting plates of each set of detection devices in the N sets of detection devices to respectively emit the first ultraviolet light to the detection cavity; receiving the first ultraviolet light through the receiving detection plates of each set of detection devices; Receive the second ultraviolet light emitted by the transmitting plates of each set of detection devices and passing through the detection cavity; determine the change amount of ultraviolet light in each of N different directions corresponding to the N sets of detection devices according to the intensity of the first ultraviolet light emitted by the transmitting plates of each set of detection devices and the intensity of the second ultraviolet light received by the receiving detection plates of each set of detection devices; determine the impurity concentration in the water of the detection cavity according to the change amount of ultraviolet light in each of the N different directions; the first set of detection devices includes a first transmitting plate and a first receiving detection plate, and the second set of detection devices includes a second transmitting plate and a second receiving detection plate, and the impurity concentration in the water of the detection cavity is determined according to the change amount of ultraviolet light in each of the N different directions.

[0004] The application aims to solve the problem that "impurities in water will adhere to the walls of the water flow pipe, including the light detection channel. When impurities adhere to the walls of the detection channel, these adhered impurities also absorb light in the detection light path. In this way, the original detection of impurities in the water will become inaccurate, and as time goes by, the detection error will become larger and larger."

[0005] As for municipal water supply, its water source is mostly high-quality rivers and lakes as reservoirs. After the water in the rivers and lakes is purified, it is delivered to residents' homes for use. However, the daily water quality testing of these rivers and lakes used as reservoirs often uses manual regular testing to monitor the water quality changes of rivers and lakes. Due to the use of manual testing methods, the monitoring of water quality changes in rivers and lakes consumes certain labor costs and there is a risk of inaccurate and incomplete test results. Summary of the invention

[0006] In view of the above-mentioned shortcomings of the prior art, the present invention provides a water quality detection method and system based on texture feature recognition, which solves the technical problems raised in the above-mentioned background technology.

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0008] In the first aspect, a water quality detection system based on texture feature recognition includes a collection layer, an analysis layer and a determination layer;

[0009] The image data of rivers and lakes are collected through the collection layer. After collecting the image data of rivers and lakes, the collection layer synchronously determines the boundaries of rivers and lakes, and confirms the detection points of rivers and lakes based on the determined boundaries of rivers and lakes. The analysis layer obtains the regional images in the image data of rivers and lakes corresponding to the detection points of rivers and lakes based on the locations of the detection points of rivers and lakes in the collected image data of rivers and lakes, analyzes the texture feature parameters of the regional images in the image data of rivers and lakes, and the determination layer receives the texture feature parameters and uses the texture feature parameters to determine the health status of the water quality of rivers and lakes;

[0010] The analysis layer includes a receiving module, a setting module and an analysis module. The receiving module is used to receive the river and lake image data collected in the collection layer and the river and lake detection points obtained in the river and lake image data. The setting module is used to set the regional image by applying the river and lake detection points in the river and lake image data. The analysis module is used to receive the regional image set in the setting module and analyze the texture feature parameters of the river and lake image data based on the regional image.

[0011] The texture feature parameter analysis logic of the river and lake image data is expressed as:

[0012]

[0013] IDM=sum[(I(x,y)-I(x0,y0))(x-x0)(y-y0)] (2)

[0014]

[0015] Where: CON is the contrast of river and lake images; IDM is the inverse moment of river and lake images; H is the entropy of river and lake images; N is the set of image blocks in river and lake images; is the maximum grayscale of the pixel blocks in the i-th group of image blocks; is the minimum grayscale of the pixel block in the i-th group of image blocks; sum represents the sum of all pixel points in the river and lake image; I(x, y) is the grayscale value of the river and lake image at the pixel point (x, y); I(x0, y0) is the grayscale value of the reference point (x0, y0) in the river and lake image; M is the total number of grayscale levels of the river and lake image; p(x q ) is the probability of occurrence of the gray value of the qth pixel in the river and lake image;

[0016] Among them, the regional image corresponding to each detection point is used to obtain the texture feature parameters of the river and lake image data through the above formula, and the texture feature parameter analysis results of the river and lake image data are expressed in the form of: CON∶IDM∶H.

[0017] Furthermore, the acquisition layer includes an acquisition module, an identification module and a selection module, the acquisition module is used to acquire image data of rivers and lakes, the identification module is used to receive the image data of rivers and lakes acquired by the acquisition module, identify the boundaries of rivers and lakes based on the image data of rivers and lakes, and confirm the contour images of rivers and lakes with the boundaries of rivers and lakes, the selection module is used to receive the contour images of rivers and lakes identified in the identification module, select detection points in the contour images of rivers and lakes, and confirm the corresponding regional images in the image data of rivers and lakes based on the detection points;

[0018] Among them, the acquisition module is composed of a drone, a camera and an air pump. When the acquisition module runs the stage of collecting river and lake image data, the spatial coordinates are manually edited by the system user. The acquisition module confirms the river and lake image data collection area based on the spatial coordinates, and continuously collects river and lake image data in the river and lake image data collection area. During the operation of the acquisition module, the drone carries a camera and an air pump to fly up and down over the rivers and lakes in the collection area. When the drone flies downward, the air pump continues to run, and the output end of the air pump sprays gas to impact the water surface of the rivers and lakes, causing ripples on the water surface. When the drone flies upward, image data of rivers and lakes with ripples is collected.

[0019] Furthermore, during the operation phase of the acquisition module, the number of spatial coordinates manually edited by the system end user is eight groups, and the eight groups of spatial coordinates enclose the acquisition area as a rectangular structure, and when the acquisition module collects river and lake image data, the collected river and lake image data is not less than two groups. When the recognition module is running, after receiving the river and lake image data collected by the acquisition module, the similar area in the river and lake image data is obtained through the following logic, and the logical formula is:

[0020]

[0021] Where: SSIM is the similarity between image x and image y; μ x is the average value of image x; μ y is the average value of image y; C1 and C2 are constants; σ xy is the covariance of image x and image y; is the variance of image x; is the variance of image y;

[0022] Where, C1=(K1·L) 2 、C2=(K2·L) 2 , K1=0.01, K2=0.03, L is the grayscale of the image, and the river and lake image data is segmented into image blocks of equal size when the river and lake boundaries are identified by the recognition module. The segmented image blocks are applied to the similarity calculation of the above formula. After the similarity calculation is performed on each image block, the image blocks with a similarity of not less than 95% are distinguished, so that in the distinction result, the group of image block groups with the largest number of image blocks in each distinguished image block group is determined to be the image block group corresponding to the river and lake area in the river and lake image data.

[0023] Furthermore, when the selection module is running, the recognition module receives the image block group determination result corresponding to the river and lake area of ​​each river and lake image data, and takes the image block group with the largest number of image blocks in the image block group as the application target of the selection module running;

[0024] Among them, after the image block group that is used as the application target is reorganized at the corresponding segmentation positions in the river and lake image data that is the source of the image block segmentation operation, the composed image is the river and lake contour image confirmed after identifying the river and lake boundaries. In the image block segmentation stage of the river and lake image data, the smaller the single image block, the higher the accuracy of the river and lake contour image, and vice versa.

[0025] Furthermore, when the selection module selects detection points in the river and lake contour image, it complies with: the detection points are not less than four groups, and the area enclosed by the four groups of detection points is not less than 3 / 5 of the river and lake contour image.

[0026] Furthermore, after receiving the river and lake image data, the receiving module further obtains the river and lake contour image of the river and lake image data, and when the setting module sets the regional image in the river and lake image data based on the river and lake detection points, the river and lake contour image replaces the river and lake image data to complete the setting of the regional image corresponding to the river and lake detection points;

[0027] Among them, the setting logic of the area image corresponding to the river and lake detection points is: with the detection point as the center and the specified value as the radius, a circular area is obtained in the river and lake contour image, and the obtained circular area is the area image corresponding to the detection point.

[0028] Furthermore, the determination layer includes a storage module and a determination module, the storage module is used to receive the texture feature parameters of the river and lake image data analyzed by the analysis module in the analysis layer, and store the texture feature parameters of the river and lake image data, and the determination module is used to traverse the texture feature parameters of the river and lake image data stored in the storage module, and determine the healthy state of the water quality of the river and lake based on the texture feature parameters of the river and lake image data;

[0029] Among them, the storage module in the determination layer monitors the operating status of the setting module in the analysis layer in real time, and takes the end of each setting module operation as a group of operation cycles. The storage module distinguishes and stores the received river and lake texture feature parameters based on the operation cycle.

[0030] Furthermore, the logic for determining the healthy status of water quality of rivers and lakes in the determination module is:

[0031]

[0032] Where: f is the health status of water quality in rivers and lakes; CON1 is the contrast of the image of the area corresponding to the first group of detection points; IDM1 is the inverse moment of the image of the area corresponding to the first group of detection points; H1 is the entropy of the image of the area corresponding to the first group of detection points;

[0033] Among them, the closer the performance value f of the healthy status of water quality of rivers and lakes is to 1, the better the healthy status of water quality of rivers and lakes is; vice versa, the worse the healthy status of water quality of rivers and lakes is.

[0034] Furthermore, the receiving module is electrically connected to a setting module and an analysis module through a medium, the receiving module is electrically connected to a selection module through a medium, the selection module is electrically connected to an identification module and a collection module through a medium, the analysis module is electrically connected to a storage module through a medium, and the storage module is electrically connected to a determination module through a medium.

[0035] In a second aspect, a water quality detection method based on texture feature recognition comprises the following steps:

[0036] Step 1: Collect river and lake image data, and determine the boundaries of rivers and lakes based on the river and lake image data;

[0037] Step 11: Setting phase of river and lake boundary determination logic;

[0038] Step 2: Apply river and lake boundaries to further confirm the river and lake contour images;

[0039] Step 21: Setting stage of river and lake contour image confirmation logic;

[0040] Step 3: Set detection points for texture feature parameter analysis in the river and lake contour image, and use the detection points to further set the detection area image;

[0041] Step 31: the stage of limiting the number of detection points and setting the detection area image setting logic;

[0042] Step 4: Analyze the texture feature parameters of the river and lake image data based on the detection area image, and use the texture feature parameter analysis results to determine the water quality health status of the rivers and lakes.

[0043] Compared with the known public technology, the technical solution provided by the present invention has the following beneficial effects:

[0044] 1. The present invention provides a water quality detection system based on texture feature recognition. During operation, the system can collect image data of rivers and lakes, and then design detection points based on the collected image data of rivers and lakes, and finally confirm the detection area based on the designed detection points, and then perform image texture feature analysis on the detection area, and finally use the texture feature analysis results of the image to represent the healthy status of the water quality of rivers and lakes. During the operation of the system, there is less need for manual participation, the collected data is more comprehensive, and the output results are more accurate.

[0045] 2. During operation, the system of the present invention can segment the river and lake image data to obtain river and lake image blocks, and then use the similarity comparison of each river and lake image block to provide data support for the confirmation of the river and lake contour images in the river and lake image data, so that the system can complete the determination of the water quality health status one step later with accurate river and lake contour images, thereby ensuring that the system output results are closer to the actual situation of the river and lake water quality.

[0046] 3. The present invention provides a water quality detection method based on texture feature recognition. The execution of the steps in the method can further maintain the stability of the system operation. During the execution of the steps of the method, it can also provide accurate operation logic support for the system, ensuring that the technical solution composed of the system and method can be stably implemented, bringing intelligent water quality health status judgment to rivers and lakes. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0048] Figure 1 It is a structural schematic diagram of a water quality detection system based on texture feature recognition;

[0049] Figure 2 It is a flow chart of a water quality detection method based on texture feature recognition;

[0050] Figure 3 Obtaining a logical schematic diagram for the detection points of the system and the areas corresponding to the detection points in the present invention;

[0051] The numbers in the figure represent: 1. River and lake image data; 2. The area where rivers and lakes are located in the river and lake image data; 3. River and lake contour images; 4. Image of the area corresponding to the detection points; 5. The logic of ripples caused by the operation of the air pump in the acquisition module to impact the liquid surface of rivers and lakes. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] The present invention will be further described below in conjunction with the embodiments.

[0054] Example 1

[0055] A water quality detection system based on texture feature recognition in this embodiment, such as Figure 1 As shown, it includes a collection layer, an analysis layer and a decision layer;

[0056] The image data of rivers and lakes are collected through the collection layer. After collecting the image data of rivers and lakes, the collection layer synchronously determines the boundaries of rivers and lakes, and confirms the detection points of rivers and lakes based on the determined boundaries of rivers and lakes. The analysis layer obtains the regional images in the image data of rivers and lakes corresponding to the detection points of rivers and lakes based on the locations of the detection points of rivers and lakes in the collected image data of rivers and lakes, analyzes the texture feature parameters of the regional images in the image data of rivers and lakes, and the determination layer receives the texture feature parameters and uses the texture feature parameters to determine the health status of the water quality of rivers and lakes;

[0057] The analysis layer includes a receiving module, a setting module and an analysis module. The receiving module is used to receive the river and lake image data collected in the collection layer and the river and lake detection points obtained in the river and lake image data. The setting module is used to set the regional image by applying the river and lake detection points in the river and lake image data. The analysis module is used to receive the regional image set in the setting module and analyze the texture feature parameters of the river and lake image data based on the regional image.

[0058] The texture feature parameter analysis logic of river and lake image data is expressed as:

[0059]

[0060] IDM=sum[(I(x,y)-I(x0,y0))(x-x0)(y-y0)] (2)

[0061]

[0062] Where: CON is the contrast of river and lake images; IDM is the inverse moment of river and lake images; H is the entropy of river and lake images; N is the set of image blocks in river and lake images; is the maximum grayscale of the pixel blocks in the i-th group of image blocks; is the minimum grayscale of the pixel block in the i-th group of image blocks; sum represents the sum of all pixel points in the river and lake image; I(x, y) is the grayscale value of the river and lake image at the pixel point (x, y); I(x0, y0) is the grayscale value of the reference point (x0, y0) in the river and lake image; M is the total number of grayscale levels of the river and lake image; p(x q ) is the probability of occurrence of the gray value of the qth pixel in the river and lake image;

[0063] Among them, the regional image corresponding to each detection point is used to obtain the texture feature parameters of the river and lake image data through the above formula, and the texture feature parameter analysis results of the river and lake image data are expressed in the form of: CON∶IDM∶H;

[0064] The acquisition layer includes an acquisition module, an identification module and a selection module. The acquisition module is used to acquire image data of rivers and lakes. The identification module is used to receive the image data of rivers and lakes acquired by the acquisition module, identify the boundaries of rivers and lakes based on the image data of rivers and lakes, and confirm the contour images of rivers and lakes with the boundaries of rivers and lakes. The selection module is used to receive the contour images of rivers and lakes identified in the identification module, select detection points in the contour images of rivers and lakes, and confirm the corresponding regional images in the image data of rivers and lakes based on the detection points.

[0065] Among them, the collection module is composed of a drone, a camera and an air pump. When the collection module runs the stage of collecting river and lake image data, the spatial coordinates are manually edited by the system end user. The collection module confirms the river and lake image data collection area based on the spatial coordinates, and continuously collects the river and lake image data in the river and lake image data collection area. During the operation of the collection module, the drone carries the camera and the air pump to fly up and down over the rivers and lakes in the collection area. When the drone flies downward, the air pump continues to run, and the output end of the air pump sprays gas to impact the water surface of the river and lake, causing ripples on the water surface. When the drone flies upward, image data of rivers and lakes with ripples is collected;

[0066] The determination layer includes a storage module and a determination module. The storage module is used to receive the texture feature parameters of the river and lake image data analyzed by the analysis module in the analysis layer, and store the texture feature parameters of the river and lake image data. The determination module is used to traverse the texture feature parameters of the river and lake image data stored in the storage module, and determine the healthy state of the water quality of the river and lake based on the texture feature parameters of the river and lake image data.

[0067] The storage module in the determination layer monitors the operating status of the setting module in the analysis layer in real time, and takes the end of each setting module operation as a set of operation cycles. The storage module distinguishes and stores the received river and lake texture feature parameters based on the operation cycles;

[0068] The judgment logic of the healthy status of water quality of rivers and lakes in the judgment module is:

[0069]

[0070] Where: f is the health status of water quality in rivers and lakes; CON1 is the contrast of the image of the area corresponding to the first group of detection points; IDM1 is the inverse moment of the image of the area corresponding to the first group of detection points; H1 is the entropy of the image of the area corresponding to the first group of detection points;

[0071] The closer the health status performance value f of river and lake water quality is to 1, the better the health status of river and lake water quality is; otherwise, the worse the health status of river and lake water quality is.

[0072] The receiving module is electrically connected to the setting module and the analysis module through a medium, the receiving module is electrically connected to the selection module through a medium, the selection module is electrically connected to the identification module and the acquisition module through a medium, the analysis module is electrically connected to the storage module through a medium, and the storage module is electrically connected to the determination module through a medium.

[0073] In this embodiment, the acquisition module runs to collect image data of rivers and lakes, the recognition module synchronously receives the image data of rivers and lakes collected by the acquisition module, identifies the boundaries of rivers and lakes based on the image data of rivers and lakes, and confirms the contour images of rivers and lakes with the boundaries of rivers and lakes. The selection module is post-operated to receive the contour images of rivers and lakes identified in the recognition module, selects detection points in the contour images of rivers and lakes, and confirms the corresponding regional images in the image data of rivers and lakes based on the detection points. The receiving module synchronously receives the image data of rivers and lakes collected in the acquisition layer and the detection points of rivers and lakes obtained in the image data of rivers and lakes. The setting module further applies the detection points of rivers and lakes to set the regional images in the image data of rivers and lakes. The analysis module runs to receive the regional images set in the setting module, analyzes the texture feature parameters of the image data of rivers and lakes based on the regional images, and finally receives the texture feature parameters of the image data of rivers and lakes analyzed by the analysis module in the analysis layer through the storage module, and stores the texture feature parameters of the image data of rivers and lakes. The determination module further traverses the texture feature parameters of the image data of rivers and lakes stored in the storage module, and determines the healthy state of the water quality of rivers and lakes based on the texture feature parameters of the image data of rivers and lakes.

[0074] And through the texture feature parameter analysis logic of the river and lake image data and the river and lake water quality health status judgment logic recorded above, the texture features and water quality health status judgment results output by the system are output in a digital form for easy reading by system end users;

[0075] See also Figure 3 As shown in the figure, the numbers respectively represent river and lake image data 1, the area where rivers and lakes are located in the river and lake image data 2, the river and lake contour image 3, the detection point corresponding area image 4, and the air pump operation in the acquisition module to impact the surface of the river and lake to cause ripples 5. Further according to the arrows in the figure, it further reflects the process of the system based on the analysis of river and lake image data, from the determination of river and lake boundaries to river and lake contour images, from river and lake contour images to detection points, and then from detection points to detection areas.

[0076] Example 2

[0077] In terms of specific implementation, based on Example 1, this example refers to Figure 1 The water quality detection system based on texture feature recognition in Example 1 is further described in detail:

[0078] During the operation phase of the acquisition module, the number of spatial coordinates manually edited by the system end user is eight groups. The eight groups of spatial coordinates enclose the acquisition area in a rectangular structure. When the acquisition module collects river and lake image data, the collected river and lake image data is no less than two groups. When the recognition module is running, after receiving the river and lake image data collected by the acquisition module, the similar area in the river and lake image data is obtained through the following logic. The logical formula is:

[0079]

[0080] Where: SSIM is the similarity between image x and image y; μ x is the average value of image x; μ y is the average value of image y; C1 and C2 are constants; σ xy is the covariance of image x and image y; is the variance of image x; is the variance of image y;

[0081] Where, C1=(K1·L) 2 、C2=(K2·L) 2 , K1=0.01, K2=0.03, L is the grayscale of the image, when the river and lake image data is identified by the recognition module at the stage of identifying the boundaries of rivers and lakes, the river and lake image data is segmented into image blocks of equal size, and the segmented image blocks are applied to the similarity calculation of the above formula, after the similarity calculation is performed on each image block, the image blocks with a similarity of not less than 95% are distinguished, so that in the distinction result, the group of image block groups with the largest number of image blocks in each distinguished image block group is determined to be the image block group corresponding to the area where the rivers and lakes are located in the river and lake image data;

[0082] When the selection module is running, the recognition module receives the image block group determination result corresponding to the river and lake area of ​​each river and lake image data, and takes the image block group with the largest number of image blocks in the image block group as the application target for the selection module to run;

[0083] Among them, after the image block group that is used as the application target is reorganized at the corresponding segmentation positions in the river and lake image data that is the source of the image block segmentation operation, the composed image is the river and lake contour image confirmed after identifying the river and lake boundaries. In the image block segmentation stage of the river and lake image data, the smaller the single image block, the higher the accuracy of the river and lake contour image, and vice versa.

[0084] Through calculation with the above formula, it is possible to provide necessary data support for obtaining similar areas in the river and lake image data based on the ripples generated by the air pump blowing on rivers and lakes in the acquisition module, thereby enabling the system to have a certain ability to determine the river and lake areas in the river and lake image data.

[0085] like Figure 1 As shown, when the selection module selects detection points in the river and lake contour image, it complies with: the detection points are not less than four groups, and the area enclosed by the four groups of detection points is not less than 3 / 5 of the river and lake contour image;

[0086] After receiving the river and lake image data, the receiving module further obtains the river and lake contour image of the river and lake image data. When the setting module sets the regional image in the river and lake image data based on the river and lake detection points, the river and lake contour image replaces the river and lake image data to complete the setting of the regional image corresponding to the river and lake detection points;

[0087] Among them, the setting logic of the regional image corresponding to the river and lake detection points is: with the detection point as the center and the specified value as the radius, a circular area is obtained in the river and lake contour image, and the obtained circular area is the regional image corresponding to the detection point.

[0088] Through the above settings, the logic of selecting detection points in the river and lake contour images is further limited, ensuring that the detection points selected by the selection module can more realistically reflect the water quality health status of rivers and lakes.

[0089] Example 3

[0090] In terms of specific implementation, based on Example 1, this example refers to Figure 2 The water quality detection system based on texture feature recognition in Example 1 is further described in detail:

[0091] A water quality detection method based on texture feature recognition comprises the following steps:

[0092] Step 1: Collect river and lake image data, and determine the boundaries of rivers and lakes based on the river and lake image data;

[0093] Step 11: Setting phase of river and lake boundary determination logic;

[0094] Step 2: Apply river and lake boundaries to further confirm the river and lake contour images;

[0095] Step 21: Setting stage of river and lake contour image confirmation logic;

[0096] Step 3: Set detection points for texture feature parameter analysis in the river and lake contour image, and use the detection points to further set the detection area image;

[0097] Step 31: the stage of limiting the number of detection points and setting the detection area image setting logic;

[0098] Step 4: Analyze the texture feature parameters of the river and lake image data based on the detection area image, and use the texture feature parameter analysis results to determine the water quality health status of the rivers and lakes.

[0099] In summary, in the above-mentioned embodiment, the system can collect image data of rivers and lakes during operation, and then design detection points based on the collected image data of rivers and lakes, and finally confirm the detection area with the designed detection points, and then perform image texture feature analysis on the detection area, and finally use the texture feature analysis results of the image to represent the healthy state of water quality of rivers and lakes, and the system requires less manual participation during operation, the collected data is more comprehensive, and the output results are more accurate; and during operation, the system can obtain image blocks of rivers and lakes by segmenting the image data of rivers and lakes, and then use the similarity comparison of each image block of rivers and lakes to provide data support for the confirmation of the contour images of rivers and lakes in the image data of rivers and lakes, so that the system can complete the determination of the healthy state of water quality with accurate contour images of rivers and lakes, and ensure that the output results of the system are closer to the actual situation of the water quality of rivers and lakes; at the same time, the method in the embodiment can further maintain the stability of the system operation, and in the process of executing the steps of the method, it can also provide accurate operation logic support for the system, ensuring that the technical scheme composed of the system and method can be stably implemented, bringing intelligent water quality health status determination to rivers and lakes.

[0100] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A water quality detection system based on texture feature recognition, characterized in that: It includes collection layer, analysis layer and decision layer; The image data of rivers and lakes are collected through the collection layer. After collecting the image data of rivers and lakes, the collection layer synchronously determines the boundaries of rivers and lakes, and confirms the detection points of rivers and lakes based on the determined boundaries of rivers and lakes. The analysis layer obtains the regional images in the image data of rivers and lakes corresponding to the detection points of rivers and lakes based on the locations of the detection points of rivers and lakes in the collected image data of rivers and lakes, analyzes the texture feature parameters of the regional images in the image data of rivers and lakes, and the determination layer receives the texture feature parameters and uses the texture feature parameters to determine the health status of the water quality of rivers and lakes; The analysis layer includes a receiving module, a setting module and an analysis module. The receiving module is used to receive the river and lake image data collected in the collection layer and the river and lake detection points obtained in the river and lake image data. The setting module is used to set the regional image by applying the river and lake detection points in the river and lake image data. The analysis module is used to receive the regional image set in the setting module and analyze the texture feature parameters of the river and lake image data based on the regional image. The texture feature parameter analysis logic of the river and lake image data is expressed as: IDM=sum[(I(x,y)-I(x0,y0))(x-x0)(y-y0)](2) Where: CON is the contrast of river and lake images; IDM is the inverse moment of river and lake images; H is the entropy of river and lake images; N is the set of image blocks in river and lake images; is the maximum grayscale of the pixel blocks in the i-th group of image blocks; is the minimum grayscale of the pixel block in the i-th group of image blocks; sum represents the sum of all pixel points in the river and lake image; I(x, y) is the grayscale value of the river and lake image at the pixel point (x, y); I(x0, y0) is the grayscale value of the reference point (x0, y0) in the river and lake image; M is the total number of grayscale levels of the river and lake image; p(x q ) is the probability of occurrence of the gray value of the qth pixel in the river and lake image; Among them, the regional image corresponding to each detection point is used to obtain the texture feature parameters of the river and lake image data through the above formula, and the texture feature parameter analysis results of the river and lake image data are expressed in the form of: CON∶IDM∶H; The determination layer includes a storage module and a determination module. The storage module is used to receive the texture feature parameters of the river and lake image data analyzed by the analysis module in the analysis layer, and store the texture feature parameters of the river and lake image data. The determination module is used to traverse the texture feature parameters of the river and lake image data stored in the storage module, and determine the healthy state of the water quality of the river and lake based on the texture feature parameters of the river and lake image data. The storage module in the determination layer monitors the operating status of the setting module in the analysis layer in real time, and takes the end of each setting module operation as a set of operation cycles. The storage module distinguishes and stores the received river and lake texture feature parameters based on the operation cycles; The logic for determining the healthy status of water quality of rivers and lakes in the determination module is: Where: f is the health status of water quality in rivers and lakes; CON1 is the contrast of the image of the area corresponding to the first group of detection points; IDM1 is the inverse moment of the image of the area corresponding to the first group of detection points; H1 is the entropy of the image of the area corresponding to the first group of detection points; Among them, the closer the performance value f of the healthy status of water quality of rivers and lakes is to 1, the better the healthy status of water quality of rivers and lakes is; vice versa, the worse the healthy status of water quality of rivers and lakes is.

2. A water quality detection system based on texture feature recognition according to claim 1, characterized in that: The acquisition layer includes an acquisition module, an identification module and a selection module. The acquisition module is used to acquire image data of rivers and lakes. The identification module is used to receive the image data of rivers and lakes acquired by the acquisition module, identify the boundaries of rivers and lakes based on the image data of rivers and lakes, and confirm the contour images of rivers and lakes with the boundaries of rivers and lakes. The selection module is used to receive the contour images of rivers and lakes identified in the identification module, select detection points in the contour images of rivers and lakes, and confirm the corresponding regional images in the image data of rivers and lakes based on the detection points. Among them, the acquisition module is composed of a drone, a camera and an air pump. When the acquisition module runs the stage of collecting river and lake image data, the spatial coordinates are manually edited by the system user. The acquisition module confirms the river and lake image data collection area based on the spatial coordinates, and continuously collects river and lake image data in the river and lake image data collection area. During the operation of the acquisition module, the drone carries a camera and an air pump to fly up and down over the rivers and lakes in the collection area. When the drone flies downward, the air pump continues to run, and the output end of the air pump sprays gas to impact the water surface of the rivers and lakes, causing ripples on the water surface. When the drone flies upward, image data of rivers and lakes with ripples is collected.

3. A water quality detection system based on texture feature recognition according to claim 2, characterized in that: The number of spatial coordinates manually edited by the system end user during the operation phase of the acquisition module is eight groups, and the eight groups of spatial coordinates enclose the acquisition area in a rectangular structure, and when the acquisition module collects river and lake image data, the collected river and lake image data is not less than two groups. When the recognition module is running, after receiving the river and lake image data collected by the acquisition module, the similar area in the river and lake image data is obtained through the following logic, and the logical formula is: Where: SSIM is the similarity between image x and image y; μ x is the average value of image x; μ y is the average value of image y; C1 and C2 are constants; σ xy is the covariance of image x and image y; is the variance of image x; is the variance of image y; Where, C1=(K1·L) 2 、C2=(K2·L) 2 , K1=0.01, K2=0.03, L is the grayscale of the image, and the river and lake image data is segmented into image blocks of equal size when the river and lake boundaries are identified by the recognition module. The segmented image blocks are applied to the similarity calculation of the above formula. After the similarity calculation is performed on each image block, the image blocks with a similarity of not less than 95% are distinguished, so that in the distinction result, the group of image block groups with the largest number of image blocks in each distinguished image block group is determined to be the image block group corresponding to the river and lake area in the river and lake image data.

4. A water quality detection system based on texture feature recognition according to claim 2, characterized in that: When the selection module is running, it receives the image block group determination result corresponding to the river and lake area of ​​each river and lake image data by the recognition module, and takes the image block group with the largest number of image blocks in the image block group as the application target of the selection module; Among them, after the image block group that is used as the application target is reorganized at the corresponding segmentation positions in the river and lake image data that is the source of the image block segmentation operation, the composed image is the river and lake contour image confirmed after identifying the river and lake boundaries. In the image block segmentation stage of the river and lake image data, the smaller the single image block, the higher the accuracy of the river and lake contour image, and vice versa.

5. A water quality detection system based on texture feature recognition according to claim 2, characterized in that: When the selection module selects detection points in the river and lake contour image, it complies with the following requirements: there are no less than four groups of detection points, and the area enclosed by the four groups of detection points is no less than 3 / 5 of the river and lake contour image.

6. A water quality detection system based on texture feature recognition according to claim 1, characterized in that: After receiving the river and lake image data, the receiving module further obtains the river and lake contour image of the river and lake image data, and when the setting module sets the regional image in the river and lake image data based on the river and lake detection points, the river and lake contour image replaces the river and lake image data to complete the setting of the regional image corresponding to the river and lake detection points; Among them, the setting logic of the area image corresponding to the river and lake detection points is: with the detection point as the center and the specified value as the radius, a circular area is obtained in the river and lake contour image, and the obtained circular area is the area image corresponding to the detection point.

7. A water quality detection system based on texture feature recognition according to claim 2, characterized in that: The receiving module is electrically connected to a setting module and an analyzing module through a medium, the receiving module is electrically connected to a selecting module through a medium, the selecting module is electrically connected to an identifying module and a collecting module through a medium, the analyzing module is electrically connected to a storage module through a medium, and the storage module is electrically connected to a determining module through a medium.

8. A water quality detection method based on texture feature recognition, the method is an implementation method of a water quality detection system based on texture feature recognition as claimed in any one of claims 1 to 7, characterized in that: The following steps are involved: Step 1: Collect river and lake image data, and determine the boundaries of rivers and lakes based on the river and lake image data; Step 11: Setting phase of river and lake boundary determination logic; Step 2: Apply river and lake boundaries to further confirm the river and lake contour images; Step 21: Setting stage of river and lake contour image confirmation logic; Step 3: Set detection points for texture feature parameter analysis in the river and lake contour image, and use the detection points to further set the detection area image; Step 31: the stage of limiting the number of detection points and setting the detection area image setting logic; Step 4: Analyze the texture feature parameters of the river and lake image data based on the detection area image, and use the texture feature parameter analysis results to determine the water quality health status of the rivers and lakes.