Sludge settling ratio detection method, system, device, computer equipment and medium

By improving the brightness image processing and contrast enhancement in the sludge settling ratio detection method, the brightness abrupt change points on the vertical pixel line are screened out, which solves the subjectivity and inaccuracy problems of traditional detection methods and achieves higher detection accuracy.

CN122329935APending Publication Date: 2026-07-03SICHUAN SANLIAN NEW MATERIAL CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN SANLIAN NEW MATERIAL CO LTD
Filing Date
2026-04-17
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Traditional sludge settling ratio testing methods suffer from strong subjectivity and inaccurate results from automated testing, especially when considering uneven settling height, which leads to deviations in the test results.

Method used

By acquiring the brightness image of sludge after settling in a transparent container, contrast enhancement is performed, and pixels with abrupt brightness changes along the vertical pixel line are selected. The height of the sludge layer is determined by combining the Douglas-Puk algorithm, and finally the sludge settling ratio is calculated.

Benefits of technology

It significantly improves the accuracy of sludge settling ratio detection, reduces deviations caused by extrapolation of height data from a single measuring point, and enhances the stability and accuracy of sludge-water interface identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122329935A_ABST
    Figure CN122329935A_ABST
Patent Text Reader

Abstract

The application relates to a sludge sedimentation ratio detection method, system, device, computer equipment and medium. The method comprises the following steps: obtaining a brightness image of an image of sludge in a transparent container after sedimentation in an HSV color space; performing contrast enhancement on the brightness image to obtain an enhanced image; screening out brightness mutation pixel points on each longitudinal pixel line based on the brightness value of each pixel point on the longitudinal pixel line in the enhanced image; each longitudinal pixel line is perpendicular to the horizontal direction of the enhanced image, and the multiple longitudinal pixel lines divide the enhanced image into at least three parts; determining the sludge layer height based on the height information of the brightness mutation pixel points on all the longitudinal pixel lines; and determining the sludge sedimentation ratio based on the sludge layer height and the initial height of the sludge in the transparent container. The method can improve the accuracy of the sludge sedimentation ratio detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of sludge performance testing technology, and in particular to a sludge settling ratio testing method, system, device, computer equipment and medium. Background Technology

[0002] Sludge settling ratio (SV) is a core indicator for evaluating the coagulation and settling performance of activated sludge. Its test results directly guide the adjustment of key parameters such as aeration intensity and sludge return ratio in wastewater treatment processes, and play an irreplaceable role in ensuring the stability of effluent quality.

[0003] Traditional methods for detecting sludge settling ratios mainly fall into two categories: manual and automated detection. Manual detection relies on personnel visually reading the volume of settled sludge and calculating the ratio. This method is highly subjective, and visual inspection is easily affected by human experience and visual errors, ultimately impacting accuracy. Current automated detection methods only estimate the overall sludge layer height based on the height data of a single measuring point, failing to consider the uneven settling height. This leads to deviations in the boundary results, thus affecting the accuracy of settling height calculations.

[0004] Therefore, how to test the sludge settling ratio to improve the accuracy of the test results is a problem that needs to be solved. Summary of the Invention

[0005] Therefore, it is necessary to provide a sludge settling ratio detection method, system, device, computer equipment, and medium to address the aforementioned technical problems and improve the accuracy of the detection results.

[0006] Firstly, this application provides a method for detecting sludge settling ratio, including:

[0007] Obtain the brightness image of the brightness channel in the HSV color space after the sludge has settled in a transparent container;

[0008] The brightness image is contrast-enhanced to obtain the enhanced image;

[0009] Based on the brightness value of each pixel on multiple vertical pixel lines in the enhanced image, pixels with abrupt brightness changes on each vertical pixel line are selected; each vertical pixel line is perpendicular to the horizontal direction of the enhanced image, and multiple vertical pixel lines divide the enhanced image into at least 3 parts;

[0010] The height of the sludge layer is determined based on the height information of the pixels with brightness abrupt changes along all the longitudinal pixel lines.

[0011] The sludge settling ratio is determined based on the sludge layer height and the initial height of the sludge in the transparent container.

[0012] In one embodiment, the step of filtering out pixels with abrupt brightness changes along each of the multiple vertical pixel lines based on the brightness value of each pixel along the enhanced image includes:

[0013] Any one of the multiple vertical pixel lines is determined as the target vertical pixel line;

[0014] Based on the brightness value of each pixel on the target vertical pixel line, a brightness value curve corresponding to the target vertical pixel line is formed.

[0015] Based on the Douglas-Puk algorithm, the pixels in the brightness value curve are filtered to obtain the fitted pixels of the brightness value curve.

[0016] If the brightness value curve includes a fitted pixel, then the fitted pixel is determined as the brightness abrupt change pixel on the target vertical pixel line;

[0017] If the brightness value curve includes multiple fitted pixels, then the fitted pixel closest to the bottom of the enhanced image among the multiple fitted pixels is determined as the brightness abrupt change pixel on the target vertical pixel line.

[0018] In one embodiment, the method further includes:

[0019] If there are no pixels with sudden brightness changes in the target vertical pixel line, then the target vertical pixel line is deleted from the multiple vertical pixel lines to obtain the remaining vertical pixel line;

[0020] The height of the sludge layer is determined based on the height information of the pixels with brightness abrupt changes on all the remaining longitudinal pixel lines.

[0021] In one embodiment, the method further includes:

[0022] Determine N equal division points in the horizontal direction of the enhanced image, where N is greater than or equal to 3;

[0023] In the enhanced image, pixel lines perpendicular to each of the dividing points in the vertical direction are determined to obtain N-1 vertical pixel lines.

[0024] In one embodiment, the step of contrast enhancement of the brightness image to obtain an enhanced image includes:

[0025] The brightness image is divided into multiple sub-image blocks;

[0026] Based on the cumulative distribution function of the gray-level histogram corresponding to each sub-image block and the size of each sub-image block, the local gray-level mapping function of each sub-image block is determined;

[0027] Based on the maximum slope of the local grayscale mapping function of each sub-image block, the grayscale histogram limit height of the corresponding sub-image block is determined;

[0028] Based on the height limit of the grayscale histogram of each sub-image block, contrast-limited adaptive histogram equalization is used to enhance the contrast of the corresponding sub-image block, resulting in the enhanced sub-image block.

[0029] The enhanced sub-image blocks are then fused to obtain the enhanced image.

[0030] In one embodiment, the step of contrast enhancement of the brightness image to obtain an enhanced image includes:

[0031] The brightness image is filtered using a Gaussian filtering algorithm to obtain a filtered image.

[0032] The filtered image is then contrast-enhanced to obtain the enhanced image.

[0033] Secondly, this application also provides a sludge settling ratio detection device, comprising:

[0034] A lighting device used to illuminate transparent containers filled with sludge;

[0035] A temperature control device is used to control the ambient temperature of the transparent container containing the sludge.

[0036] A sludge settling ratio detection device is used to perform the sludge settling ratio detection method in any of the above embodiments to detect the sludge settling ratio in the transparent container containing sludge.

[0037] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the sludge settling ratio detection method in any of the above embodiments.

[0038] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the sludge settling ratio detection method in any of the above embodiments.

[0039] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the sludge settling ratio detection method in any of the above embodiments.

[0040] In the above implementation process, by acquiring and analyzing the brightness image corresponding to the sludge settling in the transparent container, the interference of color information on interface recognition can be effectively eliminated, significantly improving the stability and accuracy of sludge-water interface recognition. Furthermore, contrast enhancement of the brightness image yields an enhanced image, which effectively reduces the problem of blurred turbidity gradient features at the sludge-water interface when the sludge settling area is relatively dark, thus reducing subsequent recognition errors. Further, by filtering the brightness values ​​of each pixel along multiple vertical pixel lines in the enhanced image, pixels with abrupt brightness changes along each vertical pixel line are identified. The sludge layer height is determined based on the height information of all pixels with abrupt brightness changes, effectively reducing the deviation caused by estimating the overall sludge layer height from the height data of a single measuring point, thereby improving the accuracy of sludge layer height determination. Finally, based on the accurate sludge layer height and the initial height of the sludge in the transparent container, the sludge settling ratio is determined, effectively improving the accuracy of the sludge settling ratio detection results. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a schematic diagram of the application environment for a sludge settling ratio detection method provided in an embodiment of this application;

[0043] Figure 2 This is a schematic flowchart of a sludge settling ratio detection method provided in an embodiment of this application;

[0044] Figure 3 This is a schematic diagram of a vertical pixel line distribution provided in an embodiment of this application;

[0045] Figure 4 This is a schematic diagram of the structure of a sludge settling ratio detection system provided in an embodiment of this application;

[0046] Figure 5 This is a schematic diagram of the process of a sludge settling ratio detection system provided in an embodiment of this application for sludge settling ratio detection;

[0047] Figure 6 This is a schematic diagram of the structure of a sludge settling ratio detection device provided in an embodiment of this application;

[0048] Figure 7 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0050] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0051] The sludge settling ratio detection method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, Figure 1 This is a schematic diagram illustrating the application environment of a sludge settling ratio detection method provided in an embodiment of this application, such as... Figure 1 The application environment shown includes: a suction pump, a flushing pump, an air pump, multiple solenoid valves, multiple pressure gauges, a level sensor, an overflow solenoid valve, a drain solenoid valve, a thermostat, a camera, a lighting board, and related electronic control components. Figure 1 (Not shown in the image), the supporting electrical control components may include controllers, relays, power modules, and signal acquisition modules. All components work together through centralized scheduling by the controller, covering the entire process of automatic sludge sample collection, sedimentation under constant temperature conditions, accurate acquisition of sedimentation images, and data transmission, ensuring automated operation and data reliability during the testing process. Specifically, the functions of each hardware component are as follows:

[0052] Water pump: Its core function is to extract sludge samples to be tested. It has a dry-run protection function to ensure that the sludge samples are smoothly extracted into a transparent container, avoiding sample splashing or concentration disturbance.

[0053] Rinsing water pump: Used to draw water from the pipes after testing to rinse and clean the transparent container and pipeline. A corrosion-resistant centrifugal pump is selected, which is compatible with tap water or cleaning fluid media to ensure that there is no sludge residue in the pipeline and avoid cross-contamination.

[0054] Air pump: works with solenoid valves to clean water droplets from the inner wall of transparent containers and assists in the smooth discharge of sludge samples.

[0055] Solenoid valves: corresponding to sludge negative pressure extraction, cleaning water delivery, and gas regulation pipelines respectively, ensuring precise switching of each pipeline and no leakage, and realizing automated control of sampling, cleaning, and sedimentation processes.

[0056] Pressure gauges: Used to monitor the pressure in each pipeline to ensure the flow of air or water.

[0057] Liquid level sensor: Installed inside the transparent container, this photoelectric liquid level sensor is used to detect the liquid level height of the sludge sample inside the transparent container and feeds back the signal to the controller, which can be a PLC controller, to realize the collection of sample volume. After the collection is completed, the overflow solenoid valve is opened to ensure that the sampling volume is consistent each time and to ensure the accuracy of sedimentation ratio detection.

[0058] Overflow solenoid valve: Used to remove excess sludge from transparent containers.

[0059] Solenoid valve for venting: Used to open the discharge channel of a transparent container, facilitating the discharge of sludge, liquid, and gas from the transparent container.

[0060] Thermostatic chamber: Used to provide a stable temperature environment for the sludge settling process, avoiding the impact of temperature fluctuations on the settling effect. It is equipped with an independent sample placement rack for easy image acquisition by camera, and also has an over-temperature alarm function.

[0061] Camera: The core image acquisition component, equipped with autofocus, is installed inside the constant temperature chamber and vertically aligned with the center area of ​​the transparent container. It is used to continuously acquire image data during the sludge settling process and transmit the images to the controller via a USB interface.

[0062] Lighting plate: It adopts a high-brightness LED surface light source and is installed on the opposite side of the camera. It is coaxially distributed with the camera and the detection container to provide a uniform and stable lighting environment for image acquisition, eliminate shadow interference, and improve image clarity.

[0063] Supporting electrical control components: Controller: Programmable logic controller, which receives signals from components such as level sensors and cameras, and drives actuators such as solenoid valves and pumps; Relay: Used to amplify the controller output signal and control the start and stop of high-power equipment (pumps, thermostats); Power supply module: Provides power to low-voltage components such as controllers, sensors, and cameras, and has overvoltage and overcurrent protection functions; Signal acquisition module: Converts the analog signal from the level sensor into a digital signal and transmits it to the controller.

[0064] In one exemplary embodiment, Figure 2 This is a flowchart illustrating a sludge settling ratio detection method provided in an embodiment of this application, applied to... Figure 1 Let's take the controller in the example as an example. Figure 2 As shown, the method may include the following steps:

[0065] Step 201: Obtain the brightness image of the brightness channel in the HSV color space after the sludge has settled in the transparent container.

[0066] For example, from Figure 1 Images of sludge settling in a transparent container are captured using a camera. Specifically, a cylindrical glass tube without graduations can be used as the container for the sludge-water mixture. This transparent container avoids interference from graduation lines on image feature extraction, and the cylindrical structure ensures consistent settling at different angles. The glass tube is fixed in the core area of ​​the camera's field of view. As an example, the cylindrical glass tube can be positioned symmetrically in the center between the camera and the lighting panel, ensuring that the shooting angle is perpendicular to the axis of the glass tube. Simultaneously, the shooting angle and shooting distance are fixed by the camera's mechanical positioning structure, and a constant temperature and constant light environment is created in the acquisition area to avoid temperature fluctuations affecting the sludge settling rate. A uniform surface light source is used for illumination to eliminate shadows and reflections.

[0067] Furthermore, the original image captured by the camera is cropped to retain only the effective detection area where the glass tube is located, while irrelevant pixels such as background and container edges are removed to reduce redundant interference. At the same time, a mapping relationship between "physical height and pixel height" is established by using a reference object of known height (such as a glass tube with scale). The physical height H of the reference object corresponds to the pixel height h in the image, and the scale is obtained as scale = H / h. The pixel coordinates of the top of the glass tube (top_y, physical height 0), the bottom of the glass tube (bottom_y), and the initial pixel height of the sludge interface (relative to the top) are recorded: pixel_height = interface_y - top_y. Then, the initial height of the sludge interface is: H_total = pixel_height * scale.

[0068] Furthermore, after converting the cropped image to the HSV color space, the brightness channel of the HSV color space is extracted separately to obtain the brightness image corresponding to the sludge settling in the transparent container.

[0069] By extracting the brightness image corresponding to the sludge after settling in a transparent container, we can not only effectively remove the interference of color information on interface recognition, but also facilitate subsequent targeted analysis of the brightness characteristics of the sludge after settling, significantly improving the stability and accuracy of mud-water interface recognition.

[0070] Step 202: Enhance the contrast of the brightness image to obtain the enhanced image.

[0071] The image after illumination compensation suffers from an overly concentrated grayscale distribution, which not only makes it difficult to effectively extract and analyze key features of sludge settling, but also causes blurred turbidity gradient features at the mud-water interface when the sludge settling area is relatively dark, thus significantly increasing the error of subsequent interface recognition algorithms. To solve this problem, contrast enhancement can be performed on the brightness image.

[0072] As an example, the histogram equalization (CLAHE) algorithm can be used to enhance the contrast of a luminance image, resulting in an enhanced image.

[0073] Step 203: Based on the brightness value of each pixel on multiple vertical pixel lines in the enhanced image, filter out the pixels with sudden brightness changes on each vertical pixel line.

[0074] Each vertical pixel line is perpendicular to the horizontal direction of the enhanced image, and multiple vertical pixel lines divide the enhanced image into at least 3 parts.

[0075] Furthermore, in order to avoid local data deviations caused by uneven sludge settling, multiple pixels with abrupt brightness changes can be extracted from the enhanced image, and the height of the sludge layer can be determined by the height information of these pixels.

[0076] As an example, multiple pixel lines can be selected in the horizontal direction perpendicular to the enhanced image, i.e., in the vertical direction of the enhanced image, to obtain multiple vertical pixel lines. These multiple vertical pixel lines can divide the enhanced image into at least three parts.

[0077] Furthermore, based on the brightness value of each pixel along each vertical pixel line, pixels with abrupt brightness changes along the corresponding vertical pixel line are selected. Specifically, the brightness value of each pixel along each vertical pixel line can be determined traversally from bottom to top, forming a brightness value sequence. The brightness values ​​in the sequence are then connected sequentially to form corresponding brightness value curves. The Douglas-Peucker Algorithm (DP) can then be used to determine the fitting curves for each brightness value curve, and the points forming each fitting curve are identified as the pixels with abrupt brightness changes along the corresponding vertical pixel line.

[0078] Step 204: Determine the height of the sludge layer based on the height information of pixels with brightness abrupt changes along all vertical pixel lines.

[0079] Furthermore, the height of the sludge layer can be determined by averaging the height information of pixels with abrupt brightness changes along all vertical pixel lines. Alternatively, the height of the sludge layer can be determined by weighted averaging of the height information of pixels with abrupt brightness changes along all vertical pixel lines.

[0080] Since the brightness of the pixels corresponding to the sludge layer changes abruptly after sludge settling, the height of the sludge layer can be determined by jointly using the height information of the pixels with brightness changes along different vertical pixel lines. This can effectively avoid the deviation caused by estimating the overall sludge layer height from the height data of a single measuring point, thereby improving the accuracy of sludge layer height determination.

[0081] Step 205: Determine the sludge settling ratio based on the sludge layer height and the initial height of the sludge in the transparent container.

[0082] Further, based on the determined sludge layer height and the initial height of the sludge in the transparent container, the sludge settling ratio is determined. As an example, the determined sludge layer height is quantified using a scale = H / h to obtain the actual sludge layer height H_settle. Then, based on the ratio between the actual sludge layer height H_settle and the initial sludge height H_total in the transparent container, the sludge settling ratio SV is obtained. That is, the sludge settling ratio SV can be determined by the following expression:

[0083] SV = H_settle / H_total * 100%;

[0084] Where SV is the sludge settling ratio; H_total is the initial height of the sludge in the transparent container; and H_settle is the height of the sludge layer.

[0085] As another example, the sludge settling ratio (SV) can also be determined based on the ratio between the initial pixel height of the sludge in the transparent container and the determined pixel height of the sludge layer, without having to quantify the initial pixel height and the pixel height of the sludge layer using a scale.

[0086] In the above implementation process, by acquiring and analyzing the brightness image corresponding to the sludge settling in the transparent container, the interference of color information on interface recognition can be effectively eliminated, significantly improving the stability and accuracy of sludge-water interface recognition. Furthermore, contrast enhancement of the brightness image yields an enhanced image, which effectively reduces the problem of blurred turbidity gradient features at the sludge-water interface when the sludge settling area is relatively dark, thus reducing subsequent recognition errors. Further, by filtering the brightness values ​​of each pixel along multiple vertical pixel lines in the enhanced image, pixels with abrupt brightness changes along each vertical pixel line are identified. The sludge layer height is determined based on the height information of all pixels with abrupt brightness changes, effectively reducing the deviation caused by estimating the overall sludge layer height from the height data of a single measuring point, thereby improving the accuracy of sludge layer height determination. Finally, based on the accurate sludge layer height and the initial height of the sludge in the transparent container, the sludge settling ratio is determined, effectively improving the accuracy of the sludge settling ratio detection results.

[0087] In one embodiment, filtering out pixels with abrupt brightness changes along multiple vertical pixel lines based on the brightness value of each pixel along multiple vertical pixel lines in the enhanced image may include the following steps:

[0088] Step 1: Select any one of the multiple vertical pixel lines as the target vertical pixel line.

[0089] Step 2: Based on the brightness values of each pixel point on the target vertical pixel line, form the brightness value curve corresponding to the target vertical pixel line.

[0090] Step 3: Based on the Douglas-Peucker algorithm, screen the pixel points in the brightness value curve to obtain the fitting pixel points of the brightness value curve.

[0091] Step 4: Determine the pixel point closest to the bottom of the enhanced image among the fitting pixel points as the brightness mutation pixel point on the target vertical pixel line.

[0092] Step 5: If there is one fitting pixel point in the brightness value curve, determine the fitting pixel point as the brightness mutation pixel point on the target vertical pixel line; if there are multiple fitting pixel points in the brightness value curve, determine the fitting pixel point closest to the bottom of the enhanced image among the multiple fitting pixel points as the brightness mutation pixel point on the target vertical pixel line.

[0093] Exemplarily, determine any one of the multiple vertical pixel lines as the target vertical pixel line, and traversely determine the brightness value of each pixel point in the upward direction on the target vertical pixel line to form the brightness value sequence of the target vertical pixel line. Then connect the brightness values in sequence according to the magnitudes of the brightness values in the brightness value sequence to form the corresponding brightness value curve.

[0094] Further, use the Douglas-Peucker algorithm to screen the pixel points in the brightness value curve of the target vertical pixel line to obtain the fitting pixel points of the brightness value curve.

[0095] Specifically, the fitting pixel points of the brightness value curve corresponding to the target vertical pixel line can be obtained through the following steps:

[0096] Step (1): Respectively determine the two end points of the brightness value curve of the target vertical pixel line as points A and B, and connect points A and B to form a straight line AB, which can be defined as the chord of the brightness value curve.

[0097] Step (2): Traverse all points on the brightness value curve except A and B, calculate the perpendicular distances from each point to the straight line AB, and screen out the point C corresponding to the maximum distance. This maximum value is denoted as dmax.

[0098] Step (3): Compare the maximum distance dmax with the preset threshold Dmax. If dmax < Dmax, then use the straight line AB as the approximate fitting of this segment of the brightness value curve, and point C is the fitting pixel point of the brightness value curve, and the processing of this segment of the curve is completed.

[0099] If dmax ≥ Dmax, then point C is used as the dividing point to divide the original brightness value curve into two segments, AC and CB. Then, steps (1) to (3) are repeated for each segment until the vertical distance from the point on the divided curve to the corresponding chord is less than the preset threshold Dmax. After all curve segments have completed the above processing, each dividing point is connected to the first and last points to form a broken line. This broken line is the approximate fit of the original brightness value curve, and all dividing points are the fitted pixels of the brightness value curve.

[0100] The preset threshold Dmax can be determined based on multiple experiments and can also be adjusted adaptively according to the scenario; no restrictions are imposed here.

[0101] As an example, in the DP algorithm, Heron's formula can be used to determine the perpendicular distance d from point C outside line AB to line AB, where points A, B, and C are all latitude and longitude coordinates.

[0102] Specifically, the distance is solved using the method of equal triangle areas. The specific calculation logic is as follows: construct a triangle with points A, B, and C, calculate the area S of the triangle using Heron's formula, and then calculate the height corresponding to side AB from the area. This height is the perpendicular distance d from point C to line AB.

[0103] Among them, Heron's formula In the formula, p is the semi-perimeter of the triangle, calculated as follows: Let a, b, and c be the lengths of the three sides of the triangle formed by points A, B, and C. First, calculate the area S of the triangle using Heron's formula. Then, calculate the height corresponding to side AB using the area formula to obtain the required perpendicular distance d.

[0104] If the brightness value curve of the target vertical pixel line includes only one fitted pixel, then that fitted pixel is determined as the brightness abrupt change pixel on the target vertical pixel line; if the brightness value curve of the target vertical pixel line includes only multiple fitted pixels, then the fitted pixel closest to the bottom of the enhanced image among the multiple fitted pixels is determined as the brightness abrupt change pixel on the target vertical pixel line.

[0105] Furthermore, this method can be used to identify pixels with abrupt changes in brightness along all vertical pixel lines.

[0106] In the above implementation process, a corresponding brightness value curve is formed based on the brightness value of each pixel on the vertical pixel line. The Douglas-Puk algorithm is then used to filter the pixels in the brightness curve, which can effectively remove redundant pixels in the smooth brightness value segment and retain only the pixels corresponding to the brightness change at the mud-water interface. This yields the fitted pixels of the brightness value curve. By using the fitted pixels, the brightness change pixels on the target vertical pixel line are determined, reducing the computational complexity of subsequent algorithms and effectively avoiding the loss of core features. This improves the efficiency and accuracy of determining the brightness change pixels on the vertical pixel line.

[0107] In one embodiment, the method further includes:

[0108] If there are no pixels with sudden brightness changes in the target vertical pixel line, then the target vertical pixel line is deleted from the multiple vertical pixel lines to obtain the remaining vertical pixel line.

[0109] The height of the sludge layer is determined based on the height information of pixels with brightness abrupt changes along all remaining vertical pixel lines.

[0110] For example, if there are no pixels with abrupt changes in brightness in the target vertical pixel line, the target vertical pixel line is deleted from the multiple vertical pixel lines to obtain the remaining vertical pixel lines. The height of the sludge layer is then determined based on the height information of the pixels with abrupt changes in brightness on all the remaining vertical pixel lines. Specifically, the average or weighted average of the height information of the pixels with abrupt changes in brightness on all the remaining vertical pixel lines is used to determine the height of the sludge layer.

[0111] To avoid leaving only one vertical pixel line after deleting vertical pixel lines of pixels without brightness abrupt changes, the number of vertical pixel lines can be kept at 3 or more, which makes it easier to determine the sludge layer height based on the height information of pixels with brightness abrupt changes at different locations.

[0112] In the above implementation process, if there are no pixels with sudden brightness changes in the target vertical pixel line, the target vertical pixel line is deleted from multiple vertical pixel lines. The height of the sludge layer is determined based on the height information of the pixels with sudden brightness changes in the remaining vertical pixel lines. This can reduce the redundancy of invalid data and improve the efficiency of determining the height of the sludge layer.

[0113] In one embodiment, the method may further include the following steps:

[0114] Step 1: Determine the N equal division points of the enhanced image in the horizontal direction, where N is greater than or equal to 3.

[0115] Step 2: In the enhanced image, determine the pixel lines that are perpendicular to each dividing point in the vertical direction, resulting in N-1 vertical pixel lines.

[0116] For example, in order to reduce local data deviations caused by uneven sludge settling, multiple evenly distributed vertical pixel lines can be selected in the enhanced image.

[0117] Specifically, Figure 3 This is a schematic diagram of a vertical pixel line distribution provided in an embodiment of this application, such as... Figure 3 As shown, N is 4, and pixel lines perpendicular to each dividing point in the vertical direction are determined in the enhanced image, thus obtaining 3 vertical pixel lines. The 3 vertical pixel lines are evenly distributed in the enhanced image, and the enhanced image is divided into four parts.

[0118] Furthermore, in the process of traversing and determining the brightness value of each pixel on each vertical pixel line, the brightness value of each pixel on each vertical pixel line is determined from bottom to top.

[0119] In the above implementation process, multiple vertical pixel lines are determined based on N equal division points in the horizontal direction of the enhanced image, so that the multiple vertical pixel lines are evenly distributed in the enhanced image. This makes it easier to ensure that the pixel points with brightness abrupt changes are evenly distributed in the horizontal direction in the enhanced image, thereby effectively reducing local data deviations caused by uneven sludge settling and improving the accuracy of the subsequently determined sludge settling ratio. Setting N to be greater than or equal to 3 can reduce the need to determine the sludge layer height based on a single pixel point with brightness abrupt changes, further improving the accuracy of the determined sludge settling ratio.

[0120] In one embodiment, contrast enhancement of the brightness image to obtain an enhanced image may further include the following steps:

[0121] Step 1: Divide the brightness image into multiple sub-image blocks.

[0122] Step 2: Based on the cumulative distribution function of the grayscale histogram corresponding to each sub-image block and the size of each sub-image block, determine the local grayscale mapping function of each sub-image block.

[0123] Step 3: Determine the grayscale histogram limit height of the corresponding sub-image block based on the maximum slope of the local grayscale mapping function of each sub-image block.

[0124] Step 4: Based on the grayscale histogram of each sub-image block, limit the height, use histogram equalization, and perform contrast enhancement on the corresponding sub-image blocks to obtain the corresponding enhanced sub-image blocks.

[0125] Step 5: Fuse the enhanced sub-image blocks to obtain the enhanced image.

[0126] For example, a sliding window of size M×M can be used to divide the brightness image into multiple sub-image blocks. The local grayscale mapping function of each sub-image block is determined based on the cumulative distribution function of its grayscale histogram and the size of the corresponding sub-image block. Specifically, the local grayscale mapping function of the sub-image block can be determined by the following expression:

[0127] ;

[0128] Where CDF(i) is the cumulative distribution function of the gray-level histogram of the sub-image block, i is the image gray level, and M×M is the size of the sub-image block.

[0129] Since the derivative of the cumulative distribution function CDF(i) with respect to image gray level i is the gray level histogram value Hist(i) of the corresponding gray level, the slope S of the local gray-level mapping function m(i) can be derived from this, that is:

[0130] ;

[0131] Furthermore, the gray-level histogram limit height of the corresponding sub-image block can be determined based on the maximum slope of the local gray-level mapping function of each sub-image block. Specifically, if the maximum slope of the local gray-level mapping function m(i) of a certain sub-image block is Smax, the gray-level histogram limit height H of the corresponding sub-image block is... max for:

[0132] ;

[0133] Furthermore, after determining the grayscale histogram limit height H... max Then, Contrast Limited Adaptive Histogram Equalization (CLAHE) is used to enhance the contrast of each sub-image block, resulting in the enhanced sub-image blocks. Specifically, during the contrast enhancement process for each sub-image block, if the height of the grayscale histogram corresponding to a certain sub-image block exceeds H... max At that time, the corresponding grayscale histogram is truncated at the truncation threshold T; simultaneously, the truncated portion is evenly distributed across the entire grayscale range to ensure that the total area of ​​the grayscale histogram remains unchanged, ultimately raising the entire grayscale histogram by a fixed height L. Based on this processing principle, H max The three elements, T and L, must satisfy the following relationship:

[0134] ;

[0135] The truncation threshold T can be adaptively set according to the actual scenario, and H... maxThe height of the grayscale histogram of the sub-image block is limited, and L is the fixed height of the overall grayscale histogram.

[0136] Finally, the improved grayscale histogram values ​​are:

[0137] ;

[0138] This yields the enhanced sub-image blocks corresponding to each sub-image block.

[0139] Furthermore, during the fusion process of each enhanced sub-image block, bilinear interpolation is used to smooth the transition of overlapping areas, eliminating block boundary artifacts, thereby outputting the overall enhanced image.

[0140] In the above implementation process, the brightness image is divided into multiple sub-image blocks. Based on the cumulative distribution function and size of the grayscale histogram corresponding to each sub-image block, the local grayscale mapping function for that sub-image block is determined. The maximum slope of the local grayscale mapping function is then used to determine the grayscale histogram limit height for that sub-image block. This allows for adaptive control of the grayscale histogram limit height of each sub-image block through the maximum slope of its local grayscale mapping function, thereby achieving adaptive adjustment of the contrast enhancement magnitude of the sub-image blocks and improving the effectiveness of image contrast enhancement.

[0141] In one embodiment, contrast enhancement of a brightness image to obtain an enhanced image may include the following steps:

[0142] Step 1: Filter the brightness image using the Gaussian filtering algorithm to obtain the filtered image.

[0143] Step 2: Enhance the contrast of the filtered image to obtain the enhanced image.

[0144] For example, after sludge settles in the glass tube, its supernatant may still contain difficult-to-settle suspended matter. Furthermore, noise interference from the glass tube and the lighting plate during image acquisition directly disrupts the integrity of the sludge-water interface, generating a large amount of invalid data during feature extraction and severely reducing the accuracy of subsequent interface recognition. To effectively address this issue, before contrast enhancement of the brightness image, filtering can be applied to suppress suspended particle noise in the sludge settling image.

[0145] Specifically, a Gaussian filtering algorithm can be used to filter the brightness image to obtain a filtered image. Further, contrast enhancement is performed on the filtered image. Specifically, contrast-limited adaptive histogram equalization is applied to the filtered image to enhance its contrast, resulting in an enhanced image.

[0146] In the above implementation process, the Gaussian filtering algorithm is used to filter the brightness image. Compared with traditional algorithms such as median filtering and mean filtering, the Gaussian filtering algorithm can better preserve the edge features of the mud-water interface while suppressing the noise of suspended particles in the sludge settling image, and avoid excessive blurring of the interface information, thereby achieving better noise reduction effect and higher interface recognition accuracy.

[0147] In one exemplary embodiment, this application also provides a sludge settling ratio detection system. Figure 4 This is a schematic diagram of a sludge settling ratio detection system provided in an embodiment of this application. The sludge settling ratio detection system 400 may include: a lighting device 401, a temperature control device 401, and a sludge settling ratio detection device 403. The lighting device 401 is used to illuminate a transparent container containing sludge. The temperature control device 402 is used to control the ambient temperature of the transparent container containing sludge. The lighting device 401 and the temperature control device 402 can be connected to the sludge settling ratio detection device 403, which is used to execute the sludge settling ratio detection method in any of the above embodiments to detect the sludge settling ratio in the transparent container containing sludge.

[0148] In addition, the sludge settling ratio detection system 400 may also include: a suction pump, a flushing water pump, an air pump, a level sensor, an overflow solenoid valve, and a drain solenoid valve. Figure 4 (Not shown in the image).

[0149] The sludge settling ratio detection system 400 performs the following during the sludge settling ratio detection process: Figure 5 This is a schematic diagram of the process for detecting sludge settling ratio using a sludge settling ratio detection system provided in an embodiment of this application. Figure 5 As shown, the following steps may be included:

[0150] Step 501: Start.

[0151] Specifically, the temperature control device is turned on to maintain a constant temperature inside the tube. The flushing water pump drives clean water to flow through the inner wall of the settling tube to flush the residual sewage inside the tube under pressure, remove the pollutants attached to the tube wall, and prevent the residual mixture from contaminating the sample from the source, thereby reducing background interference in the detection.

[0152] Step 502: Start the water pump.

[0153] Specifically, the suction pump is started to draw the wastewater to be tested into the oxygen tank at a preset flow rate and stably transport it into the sedimentation tube to complete the initial sample filling; after the liquid level sensor detects the liquid level, the suction pump is turned off.

[0154] Step 503: Open the overflow solenoid valve.

[0155] Once the liquid level in the pipe reaches the preset high level, open the overflow solenoid valve to drain excess wastewater from the pipe until the liquid level stabilizes at the volume corresponding to the standard scale. The volume adjustment operation ensures that the sample volume is consistent for each test, providing a standardized initial quantitative benchmark for sedimentation ratio calculation and ensuring the comparability of test results.

[0156] Step 504: Close all pipeline valves.

[0157] After the volume is stabilized, all pipeline valves are closed, and static settling is carried out for the preset settling time (usually 30 minutes). At the same time, a camera with a lighting device is used to capture images of the settling process, with a focus on capturing clear images of the settling endpoint.

[0158] Step 505: Turn on the air pump.

[0159] After sedimentation and image acquisition are completed, the solenoid valve at the bottom of the sedimentation pipe is opened, and the air pump is started to assist in purging, so as to completely empty the sludge that has settled in the pipe, thus completing the end of a single test and preparing for the next round of testing.

[0160] By illuminating the transparent container filled with sludge using a lighting device, the impact of ambient light fluctuations on image acquisition quality can be effectively reduced. By controlling the ambient temperature of the transparent container filled with sludge using a temperature control device, the impact of ambient temperature on image acquisition quality can be effectively reduced, ensuring the consistency and reliability of test results under different seasons and environments.

[0161] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0162] Based on the same inventive concept, this application also provides a sludge settling ratio detection device for implementing the sludge settling ratio detection method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more sludge settling ratio detection device embodiments provided below can be found in the limitations of the sludge settling ratio detection method described above, and will not be repeated here.

[0163] In one exemplary embodiment, Figure 6 This is a schematic diagram of the structure of a sludge settling ratio detection device provided in an embodiment of this application, as shown below. Figure 6 As shown, the device may include:

[0164] Image acquisition module 601 is used to acquire the brightness image of the brightness channel in the HSV color space after the sludge settles in the transparent container;

[0165] The contrast enhancement module 602 is used to enhance the contrast of the brightness image to obtain the enhanced image.

[0166] The pixel filtering module 603 is used to filter out pixels with sudden brightness changes on each vertical pixel line based on the brightness value of each pixel on multiple vertical pixel lines in the enhanced image; each vertical pixel line is perpendicular to the horizontal direction of the enhanced image, and multiple vertical pixel lines divide the enhanced image into at least 3 parts.

[0167] The sludge layer height determination module 604 is used to determine the sludge layer height based on the height information of the pixels with brightness abrupt changes along all vertical pixel lines;

[0168] The sludge settling ratio determination module 605 is used to determine the sludge settling ratio based on the sludge layer height and the initial height of the sludge in the transparent container.

[0169] In one embodiment, the pixel filtering module 603 is specifically used for:

[0170] Select any one of the multiple vertical pixel lines as the target vertical pixel line;

[0171] Based on the brightness value of each pixel on the target vertical pixel line, a brightness value curve corresponding to the target vertical pixel line is formed.

[0172] Based on the Douglas-Puk algorithm, the pixels in the brightness value curve are filtered to obtain the fitted pixels of the brightness value curve.

[0173] If the brightness value curve includes a fitted pixel, then the fitted pixel is determined as the brightness abrupt change pixel on the target vertical pixel line;

[0174] If the brightness value curve includes multiple fitted pixels, then the fitted pixel closest to the bottom of the enhanced image is determined as the brightness abrupt change pixel on the target vertical pixel line.

[0175] In one embodiment, the pixel filtering module 603 is specifically used for:

[0176] If there are no pixels with sudden brightness changes in the target vertical pixel line, then the target vertical pixel line is deleted from the multiple vertical pixel lines to obtain the remaining vertical pixel line.

[0177] The height of the sludge layer is determined based on the height information of pixels with brightness abrupt changes along all remaining vertical pixel lines.

[0178] In one embodiment, the pixel filtering module 603 is specifically used for:

[0179] Determine N equal division points in the horizontal direction of the enhanced image, where N is greater than or equal to 3;

[0180] In the enhanced image, pixel lines perpendicular to each dividing point in the vertical direction are determined, resulting in N-1 vertical pixel lines.

[0181] In one embodiment, the contrast enhancement module 602 is specifically used for:

[0182] Divide the brightness image into multiple sub-image blocks;

[0183] Based on the cumulative distribution function of the gray-level histogram corresponding to each sub-image block and the size of each sub-image block, the local gray-level mapping function of each sub-image block is determined.

[0184] The grayscale histogram limit height of the corresponding sub-image block is determined based on the maximum slope of the local grayscale mapping function of each sub-image block.

[0185] Based on the height limit of the gray-level histogram of each sub-image block, the contrast-limited adaptive histogram equalization is used to enhance the contrast of the corresponding sub-image block, thus obtaining the corresponding enhanced sub-image block.

[0186] The enhanced sub-image blocks are then fused together to obtain the enhanced image.

[0187] In one embodiment, the contrast enhancement module 602 is specifically used for:

[0188] The brightness image is filtered using a Gaussian filtering algorithm to obtain the filtered image.

[0189] The filtered image is then contrast-enhanced to obtain the enhanced image.

[0190] Each module in the aforementioned sludge settling ratio detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0191] In one exemplary embodiment, a computer device is provided, which may be a server. Figure 7 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application, such as... Figure 7 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores image data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a sludge settling ratio detection method.

[0192] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0193] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the sludge settling ratio detection method of any of the above embodiments.

[0194] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the sludge settling ratio detection method of any of the above embodiments.

[0195] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0196] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0197] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0198] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for detecting sludge settling ratio, characterized in that, The method includes: Obtain the brightness image of the brightness channel in the HSV color space after the sludge has settled in a transparent container; The brightness image is contrast-enhanced to obtain the enhanced image; Based on the brightness value of each pixel on multiple vertical pixel lines in the enhanced image, pixels with abrupt brightness changes on each vertical pixel line are selected; each vertical pixel line is perpendicular to the horizontal direction of the enhanced image, and multiple vertical pixel lines divide the enhanced image into at least 3 parts; The height of the sludge layer is determined based on the height information of the pixels with brightness abrupt changes along all the longitudinal pixel lines. The sludge settling ratio is determined based on the sludge layer height and the initial height of the sludge in the transparent container.

2. The method according to claim 1, characterized in that, The step of filtering out pixels with abrupt brightness changes along multiple vertical pixel lines based on the brightness value of each pixel along multiple vertical pixel lines in the enhanced image includes: Any one of the multiple vertical pixel lines is determined as the target vertical pixel line; Based on the brightness value of each pixel on the target vertical pixel line, a brightness value curve corresponding to the target vertical pixel line is formed. Based on the Douglas-Puk algorithm, the pixels in the brightness value curve are filtered to obtain the fitted pixels of the brightness value curve. If the brightness value curve includes a fitted pixel, then the fitted pixel is determined as the brightness abrupt change pixel on the target vertical pixel line; If the brightness value curve includes multiple fitted pixels, then the fitted pixel closest to the bottom of the enhanced image among the multiple fitted pixels is determined as the brightness abrupt change pixel on the target vertical pixel line.

3. The method according to claim 2, characterized in that, The method further includes: If there are no pixels with sudden brightness changes in the target vertical pixel line, then the target vertical pixel line is deleted from the multiple vertical pixel lines to obtain the remaining vertical pixel line; The height of the sludge layer is determined based on the height information of the pixels with brightness abrupt changes on all the remaining longitudinal pixel lines.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: Determine N equal division points in the horizontal direction of the enhanced image, where N is greater than or equal to 3; In the enhanced image, pixel lines perpendicular to each of the dividing points in the vertical direction are determined to obtain N-1 vertical pixel lines.

5. The method according to any one of claims 1-3, characterized in that, The step of enhancing the contrast of the brightness image to obtain the enhanced image includes: The brightness image is divided into multiple sub-image blocks; Based on the cumulative distribution function of the gray-level histogram corresponding to each sub-image block and the size of each sub-image block, the local gray-level mapping function of each sub-image block is determined; Based on the maximum slope of the local grayscale mapping function of each sub-image block, the grayscale histogram limit height of the corresponding sub-image block is determined; Based on the height limit of the grayscale histogram of each sub-image block, contrast-limited adaptive histogram equalization is used to enhance the contrast of the corresponding sub-image block, resulting in the enhanced sub-image block. The enhanced sub-image blocks are then fused to obtain the enhanced image.

6. The method according to any one of claims 1-3, characterized in that, The step of enhancing the contrast of the brightness image to obtain the enhanced image includes: The brightness image is filtered using a Gaussian filtering algorithm to obtain a filtered image. The filtered image is then contrast-enhanced to obtain the enhanced image.

7. A sludge settling ratio detection system, characterized in that, The system includes: A lighting device used to illuminate transparent containers filled with sludge; A temperature control device is used to control the ambient temperature of the transparent container containing the sludge. A sludge settling ratio detection device is used to perform the sludge settling ratio detection method according to any one of claims 1 to 6, to detect the sludge settling ratio in the transparent container containing sludge.

8. A sludge settling ratio detection device, characterized in that, The device includes: The image acquisition module is used to acquire the brightness image of the brightness channel in the HSV color space after the sludge settles in the transparent container. A contrast enhancement module is used to enhance the contrast of the brightness image to obtain an enhanced image; A pixel filtering module is used to filter out pixels with sudden brightness changes on each of the vertical pixel lines based on the brightness value of each pixel on multiple vertical pixel lines in the enhanced image; each vertical pixel line is perpendicular to the horizontal direction of the enhanced image, and the multiple vertical pixel lines divide the enhanced image into at least 3 parts; The sludge layer height determination module is used to determine the sludge layer height based on the height information of the pixels with brightness abrupt changes along all the longitudinal pixel lines; The sludge settling ratio determination module is used to determine the sludge settling ratio based on the sludge layer height and the initial height of the sludge in the transparent container.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.