A Method and Device for Measuring the Sludge Volume Index for Sewage Treatment

By image processing and segmenting the image video data of sludge settlement during sewage treatment, the sludge sediment area is automatically determined and the sludge settlement ratio is calculated, which solves the problem that sludge settlement ratio measurement relies on manual and low accuracy in the existing technology, and achieves efficient, accurate and automated sludge settlement ratio measurement.

CN119477827BActive Publication Date: 2025-07-01BEIJING JINDAYU ENVIRONMENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411501844.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-07-01
Estimated Expiration
2044-10-25

AI Technical Summary

Technical Problem

The existing sludge settlement ratio measurement methods rely on manual operations and have low accuracy, making it difficult to meet the needs of modern sewage treatment plants for efficient, accurate and automated measurements.

Method used

By obtaining the sludge settlement image video data during sewage treatment, performing image processing and segmentation, determining the sludge settlement ratio, calculating the sludge settlement ratio, and realizing automated measurements.

Benefits of technology

It reduces human intervention, avoids artificial operation errors, improves the accuracy and reliability of sludge settlement ratio measurement, and enhances the intelligence level of the measurement process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477827B_ABST
    Figure CN119477827B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of sewage treatment, and discloses a method and device for measuring the sludge sedimentation ratio for sewage treatment. The method includes: performing image processing on sludge sedimentation image video data to obtain observation bottle pattern data containing the observed water sample; dividing the bottle body area in the observation bottle pattern data containing the observed water sample to obtain multiple bottle body segmented areas; obtaining the pixel brightness of the multiple bottle body segmented areas, performing clustering segmentation on the pixel brightness of the multiple bottle body segmented areas to determine the water body segmented areas; obtaining the pixel brightness of the water body segmented areas, performing clustering analysis on the pixel brightness of the water body segmented areas to determine the sludge sediment area; and determining the sludge sedimentation ratio measurement result based on the multiple bottle body segmented areas, the water body segmented areas, and the sludge sediment area. The present invention reduces human intervention, improves the intelligent level of the sludge sedimentation ratio measurement process, and improves the measurement accuracy and reliability of the sludge sedimentation ratio.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sewage treatment, and particularly relates to a method and device for measuring the sludge settling ratio for sewage treatment. Background Art

[0002] With the acceleration of urbanization and the development of industrialization, the sewage discharge has increased significantly, and the water pollution problem has become increasingly serious. In order to effectively treat sewage and ensure that the discharged water quality meets the environmental protection standards, various sewage treatment technologies have emerged. In sewage treatment technologies, the measurement of the sludge settling ratio (Sludge Settling Ratio, abbreviated as SSR) is one of the key steps, which is of great significance for the optimization and control of the entire sewage treatment process. The sludge settling ratio refers to the settling rate and settling effect of sludge in the sedimentation tank within a certain period of time.

[0003] By measuring the sludge settling ratio, the settling performance of sludge can be evaluated, and then the relevant parameters in the sewage treatment process can be adjusted to improve the treatment efficiency and the quality of the effluent. However, the relevant sludge settling ratio measurement methods mainly rely on manual operations, such as using instruments like graduated cylinders for manual measurement, which is not only time-consuming and laborious, but also has low precision and is greatly affected by subjective factors, making it difficult to meet the requirements of modern sewage treatment plants for efficient, accurate, and automated measurement. Summary of the Invention

[0004] In view of this, the present invention provides a method and device for measuring the sludge settling ratio for sewage treatment to solve the problems that the sludge settling ratio measurement method relies on manual operation and the measurement precision of the sludge settling ratio is low.

[0005] In a first aspect, the present invention provides a method for measuring the sludge settling ratio for sewage treatment, and the method includes:

[0006] Obtain the sludge settling image and video data during the sewage treatment process, perform image processing on the sludge settling image and video data to obtain the observation bottle pattern data containing the observed water sample;

[0007] Divide the bottle body area in the observation bottle pattern data containing the observed water sample to obtain multiple bottle body segmented areas;

[0008] Obtain the pixel brightness of the multiple bottle body segmented areas, perform clustering segmentation on the pixel brightness of the multiple bottle body segmented areas to determine the water body segmented areas;

[0009] Obtain the pixel brightness of the water body segmented areas, perform clustering analysis on the pixel brightness of the water body segmented areas to determine the sludge sediment area;

[0010] Determine the sludge settling ratio measurement result based on the multiple bottle body segmented areas, the water body segmented areas, and the sludge sediment area.

[0011] A method for measuring sludge sedimentation ratio for sewage treatment provided in this embodiment realizes the motion tracking of sludge sediment between consecutive frame images by obtaining sludge sedimentation image video data during the sewage treatment process, dividing the bottle body area in the pattern data of the observation bottle containing the observed water sample, then performing clustering segmentation on the pixel brightness of the divided multi-segment bottle body segmented areas to determine the water body segmented areas, and performing clustering analysis on the pixel brightness of the water body segmented areas to determine the sludge sediment areas. Finally, based on the multi-segment bottle body segmented areas, the water body segmented areas and the sludge sediment areas, the measurement result of the sludge sedimentation ratio is determined, reducing human intervention, avoiding human operation errors, improving the intelligent level of the sludge sedimentation ratio measurement process, as well as improving the measurement accuracy and reliability of the sludge sedimentation ratio.

[0012] In an alternative embodiment, image processing is performed on the sludge sedimentation image video data to obtain the pattern data of the observation bottle containing the observed water sample, including:

[0013] Performing grayscale processing on the sludge sedimentation image video data to obtain grayscale image data;

[0014] Performing semantic segmentation on the grayscale image data to obtain the pattern data of the observation bottle containing the observed water sample.

[0015] A method for measuring sludge sedimentation ratio for sewage treatment provided in this embodiment realizes the separation of the observation bottle from the background through grayscale processing and semantic segmentation of the sludge sedimentation image video data. Moreover, by using image segmentation to obtain the pattern data of the observation bottle containing the observed water sample, the effective segmentation of the grayscale image data is realized, and to a certain extent, the measurement accuracy of the sludge sedimentation ratio is improved.

[0016] In an alternative embodiment, clustering segmentation is performed on the pixel brightness of the multi-segment bottle body segmented areas to determine the water body segmented areas, including:

[0017] Based on the pixel brightness of the multi-segment bottle body segmented areas, calculate the average brightness values of the multi-segment bottle body segmented areas respectively;

[0018] Based on the average brightness values of the multi-segment bottle body segmented areas, calculate the average brightness difference between the bottle top area and the other bottle body segmented areas respectively; wherein, the other bottle body segmented areas are the remaining bottle body segmented areas except the bottle top area;

[0019] Compare the average brightness difference between the bottle top area and the other bottle body segmented areas with the first threshold, and based on the comparison result, divide the multi-segment bottle body segmented areas to obtain the water body segmented areas.

[0020] A method for measuring the sludge sedimentation ratio for sewage treatment provided in this embodiment calculates the average brightness difference between the top region of the bottle and other segmented regions of the bottle body, compares the average brightness difference between the top region of the bottle and other segmented regions of the bottle body with a first threshold, and then determines the water body segmented regions. Utilizing the characteristic that the average brightness difference increases when transitioning from a non-water body to a water body, it realizes the effective segmentation of the non-water body region and the water body region in the segmented regions of the bottle body, improving the accuracy and intelligence of sludge sedimentation ratio measurement.

[0021] In an alternative embodiment, performing clustering analysis on the pixel brightness of the water body segmented regions to determine the sludge sediment region includes:

[0022] Calculating the average brightness difference between each water body segmented region based on the pixel brightness of the water body segmented regions;

[0023] Comparing the average brightness difference between each water body segmented region with a second threshold, and based on the comparison result, segmenting the water body segmented regions to obtain the sludge sediment region.

[0024] A method for measuring the sludge sedimentation ratio for sewage treatment provided in this embodiment compares the average brightness difference between each water body segmented region with a second threshold, segments the water body segmented regions based on the comparison result to obtain the sludge sediment region, realizes the precise segmentation of the supernatant region and the sludge sediment region, reduces manual intervention, and improves the intelligent level of the sludge sedimentation ratio measurement process.

[0025] In an alternative embodiment, determining the sludge sedimentation ratio measurement result based on multiple segmented regions of the bottle body, the water body segmented regions, and the sludge sediment region includes:

[0026] Calculating the sludge sedimentation ratio based on the row value of the bottom region of the bottle in the multiple segmented regions of the bottle body, the upper interface row value of the water body segmented region, and the upper interface row value of the sludge sediment region. The calculation formula for the sludge sedimentation ratio is as follows:

[0027]

[0028] where SV(t) represents the sludge sedimentation ratio, R s represents the upper interface row value of the sludge sediment region, R w represents the upper interface row value of the water body segmented region, R b represents the row value of the bottom region of the bottle.

[0029] In an alternative embodiment, it further includes:

[0030] Obtain the sludge sedimentation ratio corresponding to each frame of image data in the observation bottle pattern data containing the observed water sample. If the sludge sedimentation ratio corresponding to the image data of the preset number of frames does not change, then determine the summary analysis result of the sludge sedimentation ratio based on the sludge sedimentation ratio corresponding to each frame of image data.

[0031] A method for measuring the sludge sedimentation ratio for sewage treatment provided in this embodiment realizes the motion tracking of sludge precipitates between consecutive frames of images, can accurately measure the sludge sedimentation ratio in each frame of image, provides detailed real-time data on the sedimentation process, and helps users timely understand the dynamic changes in the sewage treatment process.

[0032] In a second aspect, the present invention provides a device for measuring the sludge sedimentation ratio for sewage treatment, and the device includes:

[0033] An image processing module, configured to obtain video data of sludge sedimentation images during the sewage treatment process, perform image processing on the video data of sludge sedimentation images, and obtain observation bottle pattern data containing the observed water sample;

[0034] A division module, configured to divide the bottle body area in the observation bottle pattern data containing the observed water sample to obtain multiple bottle body segmented areas;

[0035] A first determination module, configured to obtain the pixel brightness of the multiple bottle body segmented areas, perform clustering segmentation on the pixel brightness of the multiple bottle body segmented areas, and determine the water body segmented area;

[0036] A second determination module, configured to obtain the pixel brightness of the water body segmented area, perform clustering analysis on the pixel brightness of the water body segmented area, and determine the sludge precipitate area;

[0037] A third determination module, configured to determine the sludge sedimentation ratio measurement result based on the multiple bottle body segmented areas, the water body segmented area, and the sludge precipitate area.

[0038] In a third aspect, the present invention provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the method for measuring the sludge sedimentation ratio for sewage treatment according to the first aspect or any corresponding embodiment thereof.

[0039] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the method for measuring the sludge sedimentation ratio for sewage treatment according to the first aspect or any corresponding embodiment thereof.

[0040] Fifth aspect, the present invention provides a computer program product, including computer instructions for causing a computer to execute the sludge sedimentation ratio measurement method for sewage treatment according to the first aspect or any corresponding embodiment thereof as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0042] Figure 1 is a schematic flowchart of a sludge sedimentation ratio measurement method for sewage treatment according to an embodiment of the present invention;

[0043] Figure 2 is a schematic structural diagram of a sewage video image acquisition model according to an embodiment of the present invention;

[0044] Figure 3 is a schematic diagram of bottle body segmentation and layering interface according to an embodiment of the present invention;

[0045] Figure 4 is a schematic flowchart of another sludge sedimentation ratio measurement method for sewage treatment according to an embodiment of the present invention;

[0046] Figure 5 is a schematic flowchart of yet another sludge sedimentation ratio measurement method for sewage treatment according to an embodiment of the present invention;

[0047] Figure 6 is a schematic flowchart of a sludge sedimentation ratio visual measurement method for sewage treatment according to an embodiment of the present invention;

[0048] Figure 7 is a schematic block diagram of a sludge sedimentation ratio measurement device for sewage treatment according to an embodiment of the present invention;

[0049] Figure 8 is a schematic hardware structure diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0051] With the rapid development of computer technology and image processing technology, measurement methods based on computer vision have gradually gained attention and application. Computer vision technology acquires image data through a camera or other imaging devices, and uses image processing algorithms to analyze and process the images to extract useful information. This technology has the advantages of high automation, high measurement accuracy, and good real-time performance, and is suitable for measuring the sludge sedimentation ratio in the sewage treatment process.

[0052] The measurement method of sludge sedimentation ratio based on computer vision mainly includes the following steps: First, obtain an image sequence during the sludge sedimentation process through a camera; second, preprocess the images using image processing algorithms, such as denoising and enhancing contrast; then, use the extracted heights of the sludge and the clear liquid; finally, obtain the sedimentation velocity and sedimentation ratio of the sludge.

[0053] However, there are still some problems in the actual application of the above sludge sedimentation ratio measurement method. For example, the physical and chemical properties of different sludges may affect the image processing effect, such as color, transparency, particle size, etc., and the system needs to have strong adaptability to handle different types of sludges; in addition, the sedimentation characteristics of different sludges are different, and it is difficult for related algorithms to adapt to the detection of sludge sedimentation ratios with different sedimentation characteristics.

[0054] The embodiments of the present invention provide a measurement method for sludge sedimentation ratio for sewage treatment. It should be noted that for the measurement method for sludge sedimentation ratio for sewage treatment provided by the embodiments of the present invention, the execution subject can be a device for measuring the sludge sedimentation ratio for sewage treatment. The device for measuring the sludge sedimentation ratio for sewage treatment can be implemented as part or all of an electronic device through software, hardware, or a combination of software and hardware. Among them, the electronic device can be a server or a terminal. Among them, the server in the embodiments of the present application can be a single server or a server cluster composed of multiple servers. The terminal in the embodiments of the present application can be other intelligent hardware devices such as a smart phone, a personal computer, a tablet computer, and a smart robot. In the following method embodiments, the execution subject is taken as an electronic device for illustration.

[0055] According to an embodiment of the present invention, an embodiment of a method for measuring the sludge sedimentation ratio for sewage treatment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0056] In this embodiment, a method for measuring the sludge sedimentation ratio for sewage treatment is provided, which can be used for the above-mentioned electronic device. Figure 1 It is a flowchart of a method for measuring the sludge sedimentation ratio for sewage treatment according to an embodiment of the present invention, as Figure 1 shown, the process includes the following steps:

[0057] Step S101, obtain the sludge sedimentation image video data during the sewage treatment process, perform image processing on the sludge sedimentation image video data, and obtain the observation bottle pattern data including the observed water sample.

[0058] Specifically, as Figure 2 shown, the sewage video image acquisition model includes an LED strong focusing light source, a high-resolution camera, an observation bottle, a pumping valve, and a sedimentation tank. Among them, to avoid the valve of the pumping valve blocking the line of sight, the LED strong focusing light source and the high-resolution camera are arranged on one side of the observation bottle, the pumping valve is arranged on the other side of the observation bottle, and the LED strong focusing light source is arranged at a position about 45 degrees above one side of the observation bottle to ensure that the light emitted by the LED strong focusing light source can cover the entire observation bottle, and then continuously shoot the observation bottle during the sewage treatment process by using the LED strong focusing light source and the high-resolution camera to obtain the sludge sedimentation image video data.

[0059] Furthermore, the high-resolution camera uses a camera with a resolution of 1080p or higher to ensure clear image details; uses an LED strong focusing light source to ensure that the light is concentrated and evenly irradiated on the observation bottle to avoid shadows and reflections; selects a transparent observation bottle made of glass or high-transparency plastic with a uniform bottle wall thickness to ensure that the light can pass through without obvious refraction.

[0060] Furthermore, adjust the focal length, aperture, and shutter speed of the high-resolution camera to ensure clear images and proper exposure, and set the continuous shooting mode of the high-resolution camera. According to the time length of the sewage sedimentation process, set an appropriate shooting frequency (such as 30 frames per second) and total shooting time (such as continuous shooting for 1 hour).

[0061] Step S102, divide the bottle body area in the observation bottle pattern data including the observed water sample to obtain multiple segmented bottle body areas.

[0062] Specifically, as Figure 3As shown in the figure, a series of small grids of k rows and l columns of pixels are divided from the top to the bottom of the bottle according to the height of the bottle body. It is observed that the bottle is divided into n bottle body segmented areas, and the n bottle body segmented areas are numbered 0, 1, 2 ---- n-1 in the order from the top to the bottom of the bottle.

[0063] Furthermore, obtain the total number of rows and columns of the observed bottle, and record the row number where the bottom of the bottle is located as R b .

[0064] Step S103: Obtain the pixel brightness of multiple bottle body segmented areas, perform clustering segmentation on the pixel brightness of multiple bottle body segmented areas, and determine the water body segmented area.

[0065] Specifically, using the brightness clustering segmentation method, the bottle body segmented area is divided into two areas: the area without water and the water body segmented area.

[0066] Step S104: Obtain the pixel brightness of the water body segmented area, perform clustering analysis on the pixel brightness of the water body segmented area, and determine the sludge sediment area.

[0067] Specifically, using the brightness clustering segmentation method, the water body segmented area is divided into two areas: the supernatant area and the sludge sediment area.

[0068] Step S105: Determine the sludge sedimentation ratio measurement result based on multiple bottle body segmented areas, water body segmented areas, and sludge sediment areas.

[0069] Specifically, track the movement of the sludge sediment between consecutive frames in the observed bottle pattern data containing the observed water sample, calculate the heights of the supernatant and the sludge sediment in the observed bottle, and realize the measurement of the sewage sedimentation ratio for each frame of image; and repeat the above steps S103 - S105 until the heights of the supernatant and the sludge sediment tracked in the observed bottle no longer change, complete the measurement of the sludge sedimentation ratio over time during the sewage sampling observation, and obtain the sludge sedimentation ratio measurement result.

[0070] Furthermore, obtain the sludge sedimentation ratio corresponding to each frame of image data in the observed bottle pattern data containing the observed water sample. If the sludge sedimentation ratios corresponding to the image data of the preset number of frames do not change, then determine the sludge sedimentation ratio summary analysis result based on the sludge sedimentation ratio corresponding to each frame of image data.

[0071] Further, observe and compare the sludge settling ratios corresponding to the image data of each frame, and determine whether there is a change in the height of the sludge sediment (i.e., the numerical value of the upper interface row of the sludge sediment area). If the height of the sludge sediment is still changing, repeat the above steps S103 - S105. When the sludge settling ratios recorded continuously for t + x (x = 10) times no longer change, where t represents the current recording times, it is considered that the settling process is stable. According to the data analysis results, summarize the recorded data to obtain the measurement results of the sludge settling ratio at the key time points.

[0072] A method for measuring the sludge settling ratio for sewage treatment provided in this embodiment obtains the sludge settling image and video data during the sewage treatment process, divides the bottle body area in the observed bottle pattern data including the observed water sample, then performs clustering segmentation on the pixel brightness of the divided multiple bottle body segmented areas, determines the water body segmented areas, and performs clustering analysis on the pixel brightness of the water body segmented areas to determine the sludge sediment area. Finally, based on the multiple bottle body segmented areas, the water body segmented areas, and the sludge sediment area, the measurement results of the sludge settling ratio are determined, realizing the movement tracking of the sludge sediment between consecutive frame images, reducing human intervention, avoiding human operation errors, improving the intelligent level of the sludge settling ratio measurement process, and improving the measurement accuracy and reliability of the sludge settling ratio.

[0073] In this embodiment, a method for measuring the sludge settling ratio for sewage treatment is provided, which can be used in the above-mentioned electronic device. Figure 4 It is a flowchart of a method for measuring the sludge settling ratio for sewage treatment according to an embodiment of the present invention, as Figure 4 shown, and this process includes the following steps:

[0074] Step S401, obtain the sludge settling image and video data during the sewage treatment process, and perform image processing on the sludge settling image and video data to obtain the observed bottle pattern data including the observed water sample.

[0075] Step S4011, perform grayscale processing on the sludge settling image and video data to obtain grayscale image data.

[0076] Specifically, before performing grayscale processing, first perform preprocessing operations such as denoising and contrast enhancement on the sludge settling image and video data to improve the image quality and ensure the accuracy of subsequent processing.

[0077] Further, the sludge settling image and video data is a color image, and the color image consists of three channels of red, green, and blue (RGB), while the grayscale image has only one channel representing brightness. Therefore, by calculating the weighted sum of the RGB channel values, the color image is converted into a grayscale image. The specific steps include: assuming I grayRepresents the luminance value of each pixel in a grayscale image. R, G, and B are the color values of each pixel in the three channels of a color image. The grayscale processing can be expressed as;

[0078] I gray = 0.299 * R + 0.587 * G + 0.114 * B (1)

[0079] Step S4012: Perform semantic segmentation on the grayscale image data to obtain the observation bottle pattern data containing the observed water sample.

[0080] Specifically, semantic segmentation is to divide the grayscale image data into different regions and label the category to which each pixel belongs. After segmentation, two types of segmentation results for the observation bottle and the water body inside the bottle are obtained.

[0081] Furthermore, collect a series of (not less than 100) image data containing the observation bottle and the water body inside the bottle, and use a semi-automatic annotation tool or a manual annotation tool (such as Labelbox, LabelMe, etc.) to annotate the two types of targets at the pixel level for the images, generating a corresponding training dataset for the segmentation masks of the observation bottle and the water body inside the bottle. This training dataset is used to evaluate and adjust the effect of the segmentation model.

[0082] Furthermore, install and configure the Segment Anything Model (SAM), load the above-mentioned training dataset for the segmentation masks of the observation bottle and the water body inside the bottle, calculate the average luminance value of the masks of the observed bottle and the water body inside the bottle labeled in this training set as features to help distinguish the observation bottle and the water body inside the bottle. Use SAM and the average luminance value of the two types of segmentation target pixel masks to perform inference segmentation on the grayscale image data to obtain two types of segmentation results for the observation bottle and the water body inside the bottle, and obtain the observation bottle pattern data containing the observed water sample.

[0083] Furthermore, any two points on the observation bottle with and without water can be selected and set as the key points of the observation bottle and the key points of the water body. Input the selected key points and the collected images into a pre-trained segmentation model for inference to obtain the pixel coordinate masks corresponding to the observation bottle and the water body in the image. Extract the original pixels corresponding to the observation bottle and the water body in the image from the image, and intercept the region of interest to obtain the observation bottle pattern data containing the observed water sample.

[0084] Step S402: Divide the bottle body area in the observation bottle pattern data containing the observed water sample to obtain multiple segmented bottle body regions. For details, please refer to Figure 1 Step S102 of the illustrated embodiment, which will not be elaborated here.

[0085] Step S403: Obtain the pixel brightness of multiple segmented regions of the bottle body, perform clustering segmentation on the pixel brightness of the multiple segmented regions of the bottle body, and determine the water body segmented region. For details, please refer to Figure 1 Step S103 of the embodiment shown, which will not be elaborated here.

[0086] Step S404: Obtain the pixel brightness of the water body segmented region, perform clustering analysis on the pixel brightness of the water body segmented region, and determine the sludge sediment region. For details, please refer to Figure 1 Step S104 of the embodiment shown, which will not be elaborated here.

[0087] Step S405: Determine the sludge sedimentation ratio measurement result based on the multiple segmented regions of the bottle body, the water body segmented region, and the sludge sediment region. For details, please refer to Figure 1 Step S105 of the embodiment shown, which will not be elaborated here.

[0088] A method for measuring sludge sedimentation ratio for sewage treatment provided in this embodiment realizes the separation of the observation bottle and the background through grayscale processing and semantic segmentation of the sludge sedimentation image video data. Moreover, by using image segmentation to obtain the observation bottle pattern data containing the observed water sample, the effective segmentation of the grayscale image data is realized, and to a certain extent, the measurement accuracy of the sludge sedimentation ratio is improved.

[0089] In this embodiment, a method for measuring sludge sedimentation ratio for sewage treatment is provided, which can be used in the above-mentioned electronic device. Figure 5 It is a flowchart of a method for measuring sludge sedimentation ratio for sewage treatment according to an embodiment of the present invention. As Figure 5 shown, this process includes the following steps:

[0090] Step S501: Obtain the sludge sedimentation image video data during the sewage treatment process, perform image processing on the sludge sedimentation image video data, and obtain the observation bottle pattern data containing the observed water sample. For details, please refer to Figure 4 Step S401 of the embodiment shown, which will not be elaborated here.

[0091] Step S502: Divide the bottle body region in the observation bottle pattern data containing the observed water sample to obtain multiple segmented regions of the bottle body. For details, please refer to Figure 4 Step S402 of the embodiment shown, which will not be elaborated here.

[0092] Step S503: Obtain the pixel brightness of the multiple segmented regions of the bottle body, perform clustering segmentation on the pixel brightness of the multiple segmented regions of the bottle body, and determine the water body segmented region.

[0093] Specifically, the above-mentioned Step S503 includes:

[0094] Step S5031: Calculate the average brightness values of multiple segmented regions of the bottle body respectively based on the pixel brightness of the multiple segmented regions of the bottle body.

[0095] Specifically, since each segmented region of the bottle body contains k×l pixels, assume the brightness of each pixel is I ab , then the average brightness value of each segmented region of the bottle body is:

[0096]

[0097] Among them, represents the average brightness value of the i-th segmented region of the bottle body.

[0098] Furthermore, create an index table with n rows and 2 columns, and write the numbers and average brightness values of the segmented regions of the bottle body into the index table; among them, the number of rows of the index table is the same as the number of segmented regions of the bottle body.

[0099] Step S5032: Calculate the average brightness differences between the bottle top region and other segmented regions of the bottle body respectively based on the average brightness values of the multiple segmented regions of the bottle body; among them, the other segmented regions of the bottle body are the remaining segmented regions of the bottle body except the bottle top region.

[0100] Step S5033: Compare the average brightness difference between the bottle top region and other segmented regions of the bottle body with the first threshold, and segment the multiple segmented regions of the bottle body based on the comparison result to obtain the water body segmented region.

[0101] Specifically, since the average brightness value of the grid in the transparent observation bottle without water body is large, the average brightness value of the grid in the observation bottle with water body is small, and the upper boundary of the water body is lower than the bottle top, assume the first threshold is th1, the average brightness value of the bottle top region is the average brightness value of the i-th segmented region of the bottle body is i ∈ [1,..., n - 1], and then judge in the following way successively from the bottle top region to the bottle bottom region:

[0102]

[0103] Among them, take the first segmented region of the bottle body that satisfies the above formula (3) as the segmented region where the upper interface of the water body is located, and extract the row value R w of the upper interface of the water body segmented region, and determine the water body segmented region based on the number greater than the segmented region where the upper interface of the water body is located.

[0104] Step S504: Obtain the pixel brightness of the water body segmented region, and perform clustering analysis on the pixel brightness of the water body segmented region to determine the sludge sediment region.

[0105] Specifically, the above step S504 includes:

[0106] Step S5041: Calculate the average brightness difference between each water body segmented area based on the pixel brightness of the water body segmented area.

[0107] Step S5042: Compare the average brightness difference between each water body segmented area with a second threshold, and segment the water body segmented area based on the comparison result to obtain the sludge sediment area.

[0108] Specifically, since the average brightness value of the water body segmented area without sludge sediment is large, the average brightness value of the water body segmented area with sludge sediment is small, and the serial number value of the sludge sediment area is greater than the serial number of the segmented area where the upper interface of the water body segmented area is located. Therefore, assume that the serial number of the segmented area where the upper interface of the water body segmented area is located is i, the second threshold is th2, and the average brightness value of the (i + 1)-th water body segmented area is The average brightness value of the j-th water body segmented area from the (i + 1)-th water body segmented area to the bottom area of the bottle is j ∈ [i + 2,..., n - 1], and the judgment is made in the following way successively:

[0109]

[0110] Among them, the water body segmented area that satisfies the above formula (4) is used as the sludge sediment area, the other areas in the water body segmented area are used as the supernatant area, and the smallest serial number corresponding to the sludge sediment area is used as the segmented area where the upper interface of the sludge sediment is located, and the row value R of the upper interface of the sludge sediment area is extracted s .

[0111] Step S505: Determine the sludge sedimentation ratio measurement result based on the multi-segment bottle body segmented area, water body segmented area, and sludge sediment area.

[0112] Specifically, obtain the total number of rows and total number of columns of the observation bottle, and record the row value R of the bottom area of the bottle b ; furthermore, calculate the sludge sedimentation ratio based on the row value of the bottom area of the bottle, the row value of the upper interface of the water body segmented area, and the row value of the upper interface of the sludge sediment area in the multi-segment bottle body segmented area. The calculation formula of the sludge sedimentation ratio is as follows:

[0113]

[0114] Among them, SV(t) represents the sludge sedimentation ratio, R s represents the row value of the upper interface of the sludge sediment area, R w represents the row value of the upper interface of the water body segmented area, R b represents the row value of the bottom area of the bottle.

[0115] A method for measuring the sludge sedimentation ratio for sewage treatment provided in this embodiment calculates the average brightness difference between the top region of the bottle and other segmented regions of the bottle body, and compares the average brightness difference between the top region of the bottle and other segmented regions of the bottle body with a first threshold, thereby determining the water body segmented regions. Utilizing the characteristic that the average brightness difference increases when transitioning from a non-water body to a water body, it realizes the effective segmentation of the non-water body region and the water body region in the segmented regions of the bottle body. Moreover, by comparing the average brightness difference between each water body segmented region with a second threshold and segmenting the water body segmented regions based on the comparison results to obtain the sludge sediment region, it realizes the precise segmentation of the supernatant region and the sludge sediment region, reduces human intervention, and improves the intelligent level of the sludge sedimentation ratio measurement process.

[0116] The following uses a specific embodiment to illustrate the specific steps of a method for measuring the sludge sedimentation ratio for sewage treatment.

[0117] Embodiment 1:

[0118] As Figure 6 shown, a visual measurement method for the sludge sedimentation ratio for sewage treatment includes the following steps:

[0119] S1. Continuously photograph the observation bottle for extracting sewage treatment using a high-resolution camera and a strong focusing light source to obtain sludge sedimentation image video data during the sewage treatment process;

[0120] S2. Convert the image video into a grayscale image, and perform semantic segmentation on the obtained observation bottle and the sewage extraction process image to obtain two types of segmentation results for the observation bottle and the water body inside the bottle;

[0121] S3. Divide the bottle body into n segments evenly according to the height, number each segment from the top to the bottom of the bottle in sequence as 0, 1, 2 ---- n - 1, and calculate the average brightness value of each segmented region of the bottle body;

[0122] S4. Write the number and average brightness value of the segmented regions of the bottle body into an index table to determine the segmented regions with water bodies inside the bottle body, that is, the water body segmented regions;

[0123] S5. Use the average brightness sorting value of the water body segmented regions to find the water body segmented regions where the supernatant and sludge sediment are located, perform clustering analysis on the brightness of all pixels in this water body segmented region, and use the clustering brightness results to segment the supernatant and sludge sediment in this segmented region of the water body;

[0124] S6. Track the movement of the sludge sediment between consecutive frames, calculate the heights of the supernatant and sludge sediment in the observation bottle, and realize the measurement of the sludge sedimentation ratio corresponding to each frame of the image;

[0125] S7. Repeat the process of S5 - S6 until the heights of the supernatant and sludge precipitate being tracked in the observation bottle no longer change, completing the measurement of the sedimentation ratio over time during the sewage sampling observation.

[0126] Through the above steps S1 - S7, the visual measurement of the sludge sedimentation ratio for sewage treatment can be achieved. When applied to industrial water treatment in coal chemical enterprises, through water sampling, the visual - based sludge sedimentation ratio detection results are as shown in Table 1 below.

[0127] Table 1:

[0128]

[0129] In the above - mentioned Example 1, by using a high - resolution camera and a strong focusing light source, clear and detailed images of the sludge sedimentation process can be obtained, improving the accuracy and reliability of the sludge sedimentation ratio measurement; combined with image - processing technology, the separation of the observation bottle from the background is achieved, ensuring the accuracy of data processing; by using the method of sorting the average brightness of segmented regions of the bottle body, the number of segmented regions of the bottle body can be effectively determined, and through the pixel brightness clustering segmentation method, the supernatant and sludge precipitate regions can be accurately segmented, reducing human intervention and improving the intelligent level of the measurement process. The movement tracking of the sludge precipitate between consecutive frames is realized, and the sedimentation ratio of the sewage in each frame image can be accurately measured, providing detailed real - time data on the sedimentation process, helping users to timely understand the dynamic changes in the sewage treatment process; the above - mentioned method is applicable to various types of sewage, avoiding human operation errors, having a wide application prospect, and being able to provide an effective measurement means for different types of sewage treatment.

[0130] In this embodiment, a device for measuring the sludge sedimentation ratio for sewage treatment is also provided. This device is used to implement the above - mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0131] This embodiment provides a device for measuring the sludge sedimentation ratio for sewage treatment, as Figure 7 shown, including:

[0132] An image - processing module 701, configured to obtain video data of sludge sedimentation images during the sewage treatment process, perform image processing on the video data of sludge sedimentation images, and obtain observation bottle pattern data containing the observed water sample;

[0133] A division module 702, configured to divide the bottle body region in the observation bottle pattern data containing the observed water sample to obtain multiple segmented bottle body regions;

[0134] The first determination module 703 is configured to obtain the pixel brightness of multiple segmented regions of the bottle body, perform clustering segmentation on the pixel brightness of the multiple segmented regions of the bottle body, and determine the water body segmented region;

[0135] The second determination module 704 is configured to obtain the pixel brightness of the water body segmented region, perform clustering analysis on the pixel brightness of the water body segmented region, and determine the sludge sediment region;

[0136] The third determination module 705 is configured to determine the sludge sedimentation ratio measurement result based on the multiple segmented regions of the bottle body, the water body segmented region, and the sludge sediment region.

[0137] In some alternative embodiments, the image processing module 701 includes:

[0138] The grayscale processing unit is configured to perform grayscale processing on the sludge sedimentation image video data to obtain grayscale image data;

[0139] The semantic segmentation unit is configured to perform semantic segmentation on the grayscale image data to obtain the observation bottle pattern data including the observed water sample.

[0140] In some alternative embodiments, the first determination module 703 includes:

[0141] The first calculation unit is configured to calculate the average brightness value of the multiple segmented regions of the bottle body respectively based on the pixel brightness of the multiple segmented regions of the bottle body;

[0142] The second calculation unit is configured to calculate the average brightness difference between the bottle top region and other bottle body segmented regions respectively based on the average brightness value of the multiple segmented regions of the bottle body; wherein, the other bottle body segmented regions are the remaining bottle body segmented regions except the bottle top region;

[0143] The first segmentation unit is configured to compare the average brightness difference between the bottle top region and other bottle body segmented regions with a first threshold, and segment the multiple segmented regions of the bottle body based on the comparison result to obtain the water body segmented region.

[0144] In some alternative embodiments, the second determination module 704 includes:

[0145] The third calculation unit is configured to calculate the average brightness difference between each water body segmented region based on the pixel brightness of the water body segmented region;

[0146] The second segmentation unit is configured to compare the average brightness difference between each water body segmented region with a second threshold, and segment the water body segmented region based on the comparison result to obtain the sludge sediment region.

[0147] In some alternative embodiments, the third determination module 705 is specifically configured to calculate the sludge sedimentation ratio based on the row value of the bottom region of the bottle body in the multi-segment bottle body segmentation region, the upper interface row value of the water body segmentation region, and the upper interface row value of the sludge sediment region. The calculation formula of the sludge sedimentation ratio is as follows:

[0148]

[0149] where SV(t) represents the sludge sedimentation ratio, R s represents the upper interface row value of the sludge sediment region, R w represents the upper interface row value of the water body segmentation region, R b represents the row value of the bottom region of the bottle.

[0150] In some alternative embodiments, it further includes:

[0151] A summary analysis module, configured to obtain the sludge sedimentation ratio corresponding to each frame of image data in the observation bottle pattern data including the observed water sample. If the sludge sedimentation ratio corresponding to the image data of the preset number of frames does not change, then determine the sludge sedimentation ratio summary analysis result based on the sludge sedimentation ratio corresponding to each frame of image data.

[0152] The further function descriptions of the above-mentioned various modules and units are the same as those in the corresponding embodiments above, and will not be repeated here.

[0153] A sludge sedimentation ratio measuring device for sewage treatment in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0154] The embodiment of the present invention also provides a computer device having the above-mentioned Figure 7 sludge sedimentation ratio measuring device for sewage treatment shown.

[0155] Please refer to Figure 8 , Figure 8 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present invention. As shown in Figure 8As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Figure 8 In Figure 8 , a processor 10 is taken as an example.

[0156] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above-mentioned programmable logic device can be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.

[0157] Among them, the memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.

[0158] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0159] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 can also include a combination of the above types of memories.

[0160] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 can be connected through a bus or other means.Figure 8 Take the bus connection as an example.

[0161] The input device 30 can receive input digital or character information and generate key signal inputs related to the user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED), and a haptic feedback device (e.g., a vibration motor), etc. The above display device includes, but is not limited to, a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device may be a touch screen.

[0162] The embodiments of the present invention also provide a computer-readable storage medium. The method according to the embodiments of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processes on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.

[0163] A part of the present invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can call or provide the methods and / or technical solutions according to the present invention through the operation of the computer. Those skilled in the art should be able to understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0164] Although embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims

1. A method for measuring sludge settling ratio for sewage treatment, characterized in that: The method comprises: Acquire sludge settling image video data in the sewage treatment process, perform image processing on the sludge settling image video data, and obtain observation bottle pattern data containing the observed water sample; Dividing the bottle body area in the observation bottle pattern data containing the observed water sample to obtain a plurality of bottle body segmented areas; Acquire the pixel brightness of the multiple bottle body segmented areas, perform clustering segmentation on the pixel brightness of the multiple bottle body segmented areas, and determine the water body segmented areas; Acquiring pixel brightness of the water body segmented area, performing cluster analysis on the pixel brightness of the water body segmented area, and determining the sludge sediment area; Determine a sludge settling ratio measurement result based on the multiple bottle body segmented areas, the water body segmented areas and the sludge sediment area; Clustering and segmenting the pixel brightness of the multiple bottle body segmented areas to determine the water body segmented areas includes: Based on the pixel brightness of the multiple bottle body segmented areas, respectively calculate the average brightness values ​​of the multiple bottle body segmented areas; Based on the average brightness values ​​of the multiple bottle body segmented areas, respectively calculating the average brightness difference between the bottle top area and other bottle body segmented areas; wherein the other bottle body segmented areas are the remaining bottle body segmented areas except the bottle top area; Compare the average brightness difference between the bottle top area and other bottle body segment areas with a first threshold, and segment the multiple bottle body segment areas based on the comparison result to obtain the water body segment area; Cluster analysis is performed on the pixel brightness of the water body segmented area to determine the sludge sediment area, including: Calculate the average brightness difference between each water body segment area based on the pixel brightness of the water body segment area; The average brightness difference between the water body segmented areas is compared with a second threshold value, and the water body segmented areas are segmented based on the comparison result to obtain the sludge sediment area.

2. The method according to claim 1, characterized in that The sludge settling image video data is subjected to image processing to obtain observation bottle pattern data containing the observed water sample, including: Grayscale processing is performed on the sludge settling image video data to obtain grayscale image data; The grayscale image data is semantically segmented to obtain the observation bottle pattern data containing the observed water sample.

3. The method according to claim 1, characterized in that Determining a sludge settling ratio measurement result based on the multiple bottle body segmented areas, the water body segmented areas, and the sludge sediment area includes: The sludge settling ratio is calculated based on the row values ​​of the bottle bottom area in the multi-segmented bottle body segmented areas, the row values ​​of the upper interface of the water body segmented area, and the row values ​​of the upper interface of the sludge sediment area. The calculation formula of the sludge settling ratio is as follows: Among them, SV(t) represents the sludge settling ratio, R s Represents the upper interface value of the sludge sedimentation area, R w Represents the upper interface value of the water segment area, R b Indicates the row value of the bottle bottom area.

4. The method according to claim 1, characterized in that: Also includes: The sludge settling ratio corresponding to each frame of image data in the observation bottle pattern data containing the observed water sample is obtained. If the sludge settling ratio corresponding to the image data of a preset number of frames does not change, the sludge settling ratio summary analysis result is determined based on the sludge settling ratio corresponding to each frame of image data.

5. A sludge settling ratio measuring device for sewage treatment, characterized in that: The device comprises: An image processing module is used to obtain sludge settling image video data in the sewage treatment process, and perform image processing on the sludge settling image video data to obtain observation bottle pattern data containing the observed water sample; A division module, used for dividing the bottle body area in the observation bottle pattern data containing the observation water sample to obtain a plurality of bottle body segmented areas; A first determination module is used to obtain the pixel brightness of the multiple bottle body segmented areas, perform clustering segmentation on the pixel brightness of the multiple bottle body segmented areas, and determine the water body segmented areas; A second determination module is used to obtain the pixel brightness of the water body segmented area, perform cluster analysis on the pixel brightness of the water body segmented area, and determine the sludge sediment area; A third determination module is used to determine the sludge settling ratio measurement result based on the multiple bottle body segmented areas, the water body segmented areas and the sludge sediment area; The first determination module includes: A first calculation unit, configured to calculate average brightness values ​​of the plurality of bottle body segmented regions respectively based on pixel brightness of the plurality of bottle body segmented regions; A second calculation unit is used to calculate the average brightness difference between the bottle top area and other bottle body segment areas based on the average brightness value of the multiple bottle body segment areas; wherein the other bottle body segment areas are the remaining bottle body segment areas except the bottle top area; A first segmentation unit is used to compare the average brightness difference between the bottle top area and other bottle body segment areas with a first threshold value, and segment the multiple bottle body segment areas based on the comparison result to obtain the water body segment area; The second determination module includes: A third calculation unit is used to calculate the average brightness difference between each water body segment area based on the pixel brightness of the water body segment area; The second segmentation unit is used to compare the average brightness difference between each water body segment area with the second threshold value, and segment the water body segment area based on the comparison result to obtain the sludge sediment area.

6. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the sludge settling ratio measurement method for sewage treatment according to any one of claims 1 to 4 by executing the computer instructions.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the sludge settling ratio measurement method for sewage treatment according to any one of claims 1 to 4.

8. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the sludge settling ratio measurement method for sewage treatment according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Sludge settling ratio detection method and device and online detection system

    CN115526879A

  • Sewage treatment sludge settleability detection device and method thereof

    CN117571711A