A method and system for monitoring the treatment of wastewater in a sand-water separator

By combining local variance maps and enhanced texture gradient maps, the problem of blurred foam boundaries was solved, enabling precise segmentation of foam regions and three-dimensional accumulation assessment, thereby improving the automation and energy efficiency of wastewater treatment in sand and gravel separators.

CN121121659BActive Publication Date: 2026-02-13SHAANXI TIANSHI IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511665967.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-14
Publication Date
2026-02-13
Estimated Expiration
2045-11-14

AI Technical Summary

Technical Problem

In existing technologies, the boundary between foam and water surface in the wastewater pool of sand and gravel separators is blurred and has low contrast, which leads to inaccurate assessment of the severity of foam accumulation and leakage of the active contour model. This results in a one-size-fits-all control strategy, waste of resources, or untimely handling.

Method used

By calculating the local variance map and adaptive histogram equalization to enhance the texture gradient map, and combining the active contour model to segment the foam region, and calculating the foam coverage and thickness index, accurate segmentation and evaluation of the foam state are achieved. A greedy algorithm is used to optimize the contour line iteration, and a multi-feature fusion control strategy is set.

Benefits of technology

It enables precise segmentation of foam areas and assessment of three-dimensional accumulation, improving the intelligence, precision, and energy efficiency of defoaming treatment, and enhancing the automation level and operational efficiency of wastewater treatment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121121659B_ABST
    Figure CN121121659B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of image analysis, and particularly relates to a wastewater recycling treatment monitoring method and system for a sandstone separator, which comprises the following steps: collecting a surface image of a wastewater pool, using local variance calculation and adaptive histogram equalization and other technologies to enhance the texture difference between foam and wastewater, and then using an active contour model based on an enhanced texture gradient image to accurately segment the foam area; calculating the area surrounded by the converged contour line to obtain the foam coverage, and extracting the average brightness and average texture of the foam area to be weighted and fused into a foam thickness index; finally, the system executes a hierarchical collaborative control strategy according to the two key indicators of the foam coverage and the thickness index, intelligently starts and stops or adjusts the defoaming device, and realizes the automatic, refined and energy-saving management of the foam.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image analysis. More particularly, the present application relates to a wastewater recycling treatment monitoring method and system for a sandstone separator. BACKGROUND

[0002] In a concrete production enterprise, a sandstone separator is used to recover waste generated after a mixer truck is washed, separating sand and stone aggregates; this process generates a large amount of wastewater carrying cement and powder, which is usually collected in a mixing tank or a sedimentation tank for recycling and reuse; during wastewater treatment, a large amount of foam often appears on the surface of the wastewater due to stirring or chemical additive residues. Excessive accumulation of foam not only may cause the tank to overflow, polluting the environment, but also may interfere with the normal operation of other sensors such as liquid level meters, leading to system misjudgment.

[0003] In order to achieve automatic monitoring, the prior art uses an active contour model to segment and measure the coverage area of the foam; the active contour model defines a deformable initial contour on the image, which iteratively deforms under the joint action of internal and external energy, and finally fits to the real boundary of the target.

[0004] However, the active contour model relies on the gradient of the image, i.e., the edge intensity, as the main external energy, but in the specific scenario of the wastewater tank of the sandstone separator, the wastewater itself is a highly turbid cement slurry, and the contrast between its surface color and sparse foam or thin layer of foam is very low, forming a blurred and discontinuous boundary. The gradient energy caused by this weak edge is very weak and is not enough to hold the active contour line; therefore, when the contour line iteratively approaches this blurred boundary, it cannot stop, but will leak, i.e., it will continue to shrink into the foam or expand into the wastewater area, resulting in a serious inaccuracy in the measurement of the foam coverage area.

[0005] In addition, measuring only the two-dimensional coverage area of the foam has limitations in industrial control: the same coverage rate, a layer of sparse thin foam and a heavily accumulated thick foam pose completely different threats to the system, and the prior art cannot assess the severity of the foam accumulation, resulting in a one-size-fits-all control strategy, causing problems such as resource waste or delayed treatment. SUMMARY

[0006] To solve the technical problems in the prior art that the active contour model leaks due to the blurred boundary between the foam and the wastewater, and that measuring only the two-dimensional area cannot assess the severity of the foam accumulation, the present application provides solutions in the following aspects.

[0007] In a first aspect, the present application provides a sandstone separator wastewater recycling treatment monitoring method, comprising: collecting a wastewater pool surface image; calculating the local variance of the wastewater pool surface image to obtain a local variance map; performing adaptive histogram equalization and gradient extraction on the local variance map to obtain an enhanced texture gradient map; segmenting a foam region based on the enhanced texture gradient map using an active contour model to obtain a converged contour line; the external energy of the active contour model is negatively correlated with the square of the gradient amplitude of the corresponding contour point in the enhanced texture gradient map; calculating the ratio of the area of the region surrounded by the converged contour line to the total area of the wastewater pool surface image to obtain a foam coverage rate; generating a binary mask based on the converged contour line and applying it to the wastewater pool surface image and the local variance map to extract a brightness subgraph and a texture subgraph corresponding to the foam region; calculating the average value of the gray values of all non-zero pixel points in the brightness subgraph as the average brightness; calculating the average value of the gray scale variance of all non-zero pixel points in the texture subgraph as the average texture; performing weighted fusion on the average brightness and the average texture to calculate a foam thickness index; and performing hierarchical cooperative control based on the foam coverage rate and the foam thickness index.

[0008] The present application converts the image from the gray scale domain to the texture domain by calculating the local variance, effectively overcoming the problems of blurred boundary between foam and water surface and low contrast; then, the active contour model based on the enhanced texture gradient map is used to realize accurate segmentation of irregular foam regions, avoiding misclassification and omission of traditional threshold segmentation methods; more importantly, the present application not only calculates the foam coverage rate, but also proposes a foam thickness index combining the average brightness and the average texture, realizing comprehensive evaluation of the foam state from two-dimensional area to three-dimensional accumulation degree; finally, hierarchical cooperative control is performed based on the two key indicators, making the defoaming treatment more intelligent, precise and energy-saving, and significantly improving the automation level and operation efficiency of wastewater treatment.

[0009] Preferably, the wastewater pool surface image is collected, comprising: an industrial camera is installed directly above the wastewater pool of the sandstone separator or above the side with a clear overhead angle, and images are collected at a preset frame rate, and the collected image frames are taken as the original image; a Gaussian filter is applied to the original image to obtain a pretreated wastewater pool surface image.

[0010] Preferably, the foam region is segmented based on the enhanced texture gradient map using an active contour model to obtain a converged contour line, comprising: in each iteration step, the energy of each contour point on the contour line is calculated by a greedy algorithm, and the contour point is moved to the position with the lowest total energy in the 5*5 neighborhood, so that the total energy function of the contour line is reduced; repeat this iteration process until the contour line converges; finally, the region surrounded by the converged contour line is recorded as .

[0011] The present application provides an energy minimization strategy with high calculation efficiency and easy implementation by adopting a greedy algorithm to search for the position with the lowest energy in the local neighborhood of each contour point in iteration, so that the contour line can quickly and stably converge to the real texture boundary of the foam, and the real-time performance and accuracy of the segmentation process are ensured.

[0012] Preferably, the initial contour line of the active contour model is a rectangle arranged at a specific distance from the image boundary; the specific distance is 10% of the total width of the image.

[0013] Preferably, the calculation formula of the total energy function of the contour line is: ; in the formula, is the total energy function of the contour line, is a contour point on the contour line, ; is the internal energy of the contour point . is the external energy of the contour point .

[0014] The present application defines the total energy as the sum of the internal energy and the external energy, wherein the internal energy ensures the smoothness and continuity of the contour line, and the external energy pulls the contour line to the target feature, i.e. the foam boundary, and this energy driving mechanism is the core of realizing accurate fitting to the complex and irregular foam boundary.

[0015] Preferably, the calculation formula of the internal energy of the contour point is: ; in the formula, is the internal energy of the contour point ; is an elastic coefficient for controlling the stretching and contraction of the contour line; is a rigid coefficient for controlling the bending of the contour line; and are the first derivative and the second derivative of the contour line, respectively, denotes the modulus length.

[0016] The present application introduces the elastic coefficient for controlling the stretching and contraction of the contour line and the rigid coefficient for controlling the bending, so that the shape of the contour line can be flexibly adjusted according to the smoothness or tortuosity of the foam edge, and the continuity and integrity of the contour line in the evolution process are ensured, and the contour line can adapt to the complex shape of the foam with interlocking teeth, thereby improving the fineness and authenticity of the segmentation result.

[0017] Preferably, the pixel value of the binary mask in the region enclosed by the contour line is 1 inside and 0 outside.

[0018] Preferably, the average brightness and the average texture are weightedly fused to calculate a foam thickness index, comprising: ; wherein, is a foam thickness index; and are brightness weight and texture weight, respectively, , and ; , are average brightness and average texture, respectively.

[0019] The present application constructs a quantitative index capable of comprehensively reflecting the foam accumulation thickness by weightedly fusing the average brightness and the average texture, which is more comprehensive and reliable compared with relying on a single feature; and by setting the brightness weight slightly higher than the texture weight, the constructed foam thickness index also conforms to the physical characteristics that the thicker the foam, the more intense the reflection, so that the thickness evaluation result is more accurate, providing a reliable decision basis for subsequent grading control.

[0020] Preferably, the grading cooperative control is performed based on the foam coverage rate and the foam thickness index, comprising: if the foam coverage rate is greater than an area high threshold , and the foam thickness index is greater than a thickness high threshold , the control system immediately starts a high-power defoaming mode, and the stirrer is turned on at full power or the defoaming agent is sprayed at maximum flow rate; if is greater than , and is less than or equal to , the control system starts a low-power defoaming mode for intermittent stirring or small-flow spraying to maintain the status quo and save energy; if is less than or equal to , and is greater than or equal to , the control system keeps the state of the last monitoring period unchanged; if is less than , the control system stops all defoaming devices.

[0021] The present application divides the foam state into four different grades by setting the high and low thresholds of the area and the thickness, and correspondingly performs four different operations of high-power defoaming, low-power defoaming, maintaining the status quo, and stopping defoaming; such a refined control strategy can take the most appropriate measures according to the actual risk level of the foam, which can not only timely eliminate the risk caused by serious foam accumulation, but also avoid excessive treatment of a small amount of thin foam, thereby maximizing the saving of energy and cost under the premise of ensuring safety.

[0022] In a second aspect, the present application provides a wastewater recycling treatment monitoring system for a sandstone separator, comprising a processor and a memory, wherein the memory stores computer program instructions which, when executed by the processor, implement the above-mentioned wastewater recycling treatment monitoring method for a sandstone separator.

[0023] By adopting the above technical solution, the above-mentioned wastewater recycling treatment monitoring method for a sandstone separator is generated into a computer program and stored in the memory to be loaded and executed by the processor, so that a terminal device is made according to the memory and the processor, and use is facilitated.

[0024] The present application has the following advantages:

[0025] The present application converts the image from the gray domain to the texture domain by calculating the local variance, effectively overcoming the problems of blurred boundary between the foam and the water surface and low contrast. Then, the active contour model based on the enhanced texture gradient graph is used to realize accurate segmentation of the irregular foam area, avoiding the misclassification and omission of the traditional threshold segmentation method. More importantly, the present application not only calculates the foam coverage rate, but also proposes a foam thickness index combining the average brightness and the average texture, realizing comprehensive evaluation of the foam state from two-dimensional area to three-dimensional accumulation degree. Finally, based on the two key indicators, hierarchical cooperative control is performed, so that the defoaming treatment is more intelligent, accurate and energy-saving, significantly improving the automation level and operation efficiency of the wastewater treatment. BRIEF DESCRIPTION OF DRAWINGS

[0026] Figure 1 is a flowchart schematically showing a wastewater recycling treatment monitoring method for a sandstone separator in the present application;

[0027] Figure 2 is a wastewater pool surface image schematically showing moderate foam area and thickness;

[0028] Figure 3 is a wastewater pool surface image schematically showing large foam area and serious accumulation. DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0030] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0031] The embodiments of the present application disclose a wastewater recycling treatment monitoring method for a sandstone separator, which is described with reference toFigure 1 , comprising steps S1-S5:

[0032] S1: Collecting a wastewater pool surface image.

[0033] In order to analyze the foam on the surface of the wastewater pool, first of all, it is necessary to obtain real-time image data by using an image acquisition device.

[0034] Specifically, an industrial camera is installed directly above the wastewater pool of the sandstone separator or above the side with a clear overhead angle, and the camera is vertically or obliquely aligned with the water surface; the system collects images at a preset frame rate and takes the collected image frames as original images; wherein the preset frame rate is 1 frame / 5 seconds.

[0035] The camera will introduce Gaussian noise or sensor noise during collection, especially in an insufficient light industrial environment, and these random noises will interfere with subsequent texture and gradient calculations, so smoothing needs to be performed first.

[0036] Specifically, a Gaussian filter is applied to the original image to obtain a pretreated wastewater pool surface image; Gaussian filtering is a linear smoothing filter that can effectively suppress Gaussian noise while preserving edge information by weighting and averaging the neighborhood pixels with a Gaussian kernel.

[0037] Wherein, the selection of the kernel size and the standard deviation is a balance between denoising effect and image blurring, and a smaller kernel is sufficient to remove slight noise without excessive blurring of the texture features required in subsequent steps, therefore, the size of the Gaussian kernel is set to , and the standard deviation is set to 1.

[0038] S2: Calculate the local variance of the pool surface image to obtain a local variance map; perform adaptive histogram equalization and gradient extraction on the local variance map to obtain an enhanced texture gradient map.

[0039] It should be noted that the core of the present application lies in distinguishing between foam and wastewater, and their boundaries in gray scale are blurred, but the differences in texture are significant: the foam is composed of a large number of bubbles and has complex texture; the wastewater surface is relatively smooth and has single texture; therefore, the local variance is an effective indicator for quantifying the complexity of the texture.

[0040] Specifically, a picture with the same size as the wastewater pool surface image and pixel values of 0 is initialized as a local variance map.

[0041] Further, each pixel point in the wastewater pool surface image is traversed , a neighborhood window the average gray value of all pixels in the window, and then calculates the gray variance in the window according to the average value as the gray variance of the pixel point .

[0042] wherein the size of the neighborhood window side length is used to balance the scale of the texture and the locality of the calculation: too small is not descriptive enough for the texture and is sensitive to noise, too large will cause the blurring of the boundary, and is an empirical value that can achieve a good balance between describing the bubble texture and maintaining the edge sharpness, therefore, the neighborhood window side length is set to 5.

[0043] It should be noted that the above steps convert the wastewater tank surface image with blurred gray boundaries into a new feature map, i.e., a local variance map, in which the foam area presents a high light, i.e., a high variance feature, and the wastewater area presents a dark, i.e., a low variance feature, and the separability of the two is enhanced.

[0044] Further, if the foam is thin or the wastewater fluctuates greatly, the transition zone between the foam and the wastewater area, i.e., the boundary, can still be gradual, which is not conducive to the calculation of the subsequent gradient; therefore, an enhancement algorithm that can enhance the boundary contrast and does not amplify the noise in the flat area is needed to perform adaptive contrast enhancement on the local variance map.

[0045] Specifically, the local variance map is taken as the input, a contrast-limited adaptive histogram equalization (CLAHE) algorithm is applied to obtain an enhanced texture map; this sharpens the boundary between the high variance area and the low variance area, so that the enhanced texture map has nearly step gray changes at the junction of the foam and the wastewater, laying a foundation for the subsequent step of calculating a high-intensity gradient field.

[0046] wherein the CLAHE algorithm is a well-known image enhancement technique, unlike global histogram equalization, it first divides the image into multiple non-overlapping rectangular small blocks, for example a grid; then, it independently calculates the gray histogram of each small block; in order to prevent noise from being amplified too much, the CLAHE introduces a contrast limit, which will clip the part exceeding a certain threshold in the histogram before calculating the cumulative distribution function, and evenly redistribute the number of clipped pixels to other gray levels; finally, the algorithm applies equalization to each small block; since the pixel point can fall on the boundary of the block, its final gray value is obtained by bilinear interpolation of the equalization results of the surrounding 4 small blocks to eliminate the block effect.

[0047] In this embodiment, the grid size of the CLAHE algorithm is set to 1. The contrast limit threshold is It should be noted that the grid size This ensures enhanced locality, making it suitable for detecting foam at different locations; the contrast limit threshold is set to... It is sufficient to stretch the true contrast between foam and wastewater without causing artifacts in flat wastewater areas.

[0048] It should be noted that the active contour model requires an energy field to attract the contour lines. This energy field should have an extremum at the target boundary. For the obtained enhanced texture map with sharp boundaries, its gradient map will produce a strong response precisely at the texture boundary between foam and wastewater.

[0049] Therefore, the Sobel operator is used to perform a convolution operation on the enhanced texture map, at the pixel level. For example, calculate its gradient in the horizontal direction. and the gradient in the vertical direction Then calculate the pixel points. gradient magnitude The gradient magnitudes of all pixels form an enhanced texture gradient map. In the enhanced texture gradient map, the peak position, i.e. the high gradient value, precisely corresponds to the texture boundary of the bubble, and the peak intensity is much higher than the blur intensity gradient of the original image at the same position, thus providing accurate tension for the active contour model in subsequent steps to hold the active contour line.

[0050] S3: Based on the enhanced texture gradient map, the active contour model is used to segment the foam region to obtain the converged contour line.

[0051] First, the active contour model needs an iterative starting point, namely the initial contour line. This contour line should be placed near the target area. Since foam usually floats on the water surface and does not stick to all the pool walls, a rectangle can be set as the initial contour line at a certain safe distance from the image boundary. The safe distance is equal to 10% of the total width of the image.

[0052] It should be noted that the evolution of the active contour model is driven by its total energy function, and the contour line will spontaneously deform to seek the minimum value of the total energy; the core of this invention lies in redefining the external energy term in this energy function.

[0053] Therefore, the total energy function of the active contour model is defined. For internal energy and external energy The sum, specifically calculated as follows:

[0054]

[0055] In the formula, Let be the total energy function of the contour line. These are the contour points on the contour line, representing the parametric representation of the contour line. ; For contour points The internal energy; For contour points External energy, For contour points Total energy.

[0056] Among them, internal energy Used to control the elasticity and rigidity of the contour line, therefore, internal energy The formula for calculation is:

[0057]

[0058] In the formula, For contour points The internal energy; The elastic coefficient controls the stretching and contraction of the contour line; The stiffness coefficient controls the curvature of the contour line; and These are the first and second derivatives of the contour line, respectively. Indicates the modulus length.

[0059] in, It is a position vector representing the position of a point on the contour line. yes The first derivative, i.e., the tangent vector, represents the stretching of the contour line at that point. The larger the value, the longer the outline is stretched at that point. yes The second derivative of represents the curvature of the contour line at that point. The larger the value, the less smooth the contour line is at that point; therefore, the higher the internal energy... In the calculation formula: It's used to punish stretching; if the outline is stretched too long... If the value is large, this energy level will be high, causing the outline to tend to shrink. It is used to punish bends; if the outline bends very sharply, that is... If the value is large, the energy level will be high, which will cause the outline to tend to become smooth.

[0060] The edges of the foam are jagged, thus requiring low rigidity to fit the complex shape. It shouldn't be too big, but is kept constant to prevent the contour from being pulled too long, thus, is set to 0.2, and is set to 0.4.

[0061] where the contour points have an external energy , where is the gradient magnitude of the enhanced texture gradient map at the contour point , and denotes the modulus.

[0062] Further, by a greedy algorithm, the energy of each contour point on the contour is calculated in each iteration step, and it is moved to the position with the lowest total energy in the 5x5 neighborhood, so that the total energy function of the contour is decreased; this iteration process is repeated until the contour converges, i.e., the number of points moved in the two consecutive iterations is less than 1% of the total number of points or the maximum number of iterations is reached 100 times; finally, the area surrounded by the converged contour is recorded as .

[0063] It should be noted that, since the external energy is driven by the strong texture gradient, the contour will be strongly attracted to the real texture boundary of the foam in the iteration process, and will stop at the peak value of the enhanced texture gradient map at the boundary, thus achieving accurate segmentation of the low-contrast and fuzzy boundary and solving the leakage problem.

[0064] S4: Calculate the ratio of the area of the region surrounded by the converged contour to the total area of the wastewater tank surface image to obtain the foam coverage; generate a binary mask according to the converged contour and apply it to the wastewater tank surface image and the local variance map to extract the luminance subgraph and the texture subgraph corresponding to the foam region, and then calculate the foam thickness index.

[0065] It should be noted that, in order to evaluate the accumulation severity of the foam, i.e., the thickness, it is necessary to deeply analyze the physical characteristics of the region inside the contour, i.e., the morphology of the foam itself.

[0066] Specifically, according to the converged contour obtained in step S3, a binary mask is generated, which has a pixel value of 1 inside the region surrounded by the contour and a pixel value of 0 outside; the binary mask is applied to the wastewater tank surface image obtained in step S1 and the local variance map obtained in step S2, respectively, to extract the luminance subgraph and the texture subgraph corresponding to the foam region.

[0067] It should be noted that the thicker the foam, the more tightly it accumulates, resulting in a closer optical reflection to white, i.e., a higher brightness, and a higher texture complexity, i.e., a higher variance, caused by the fine bubbles.

[0068] Therefore, the average value of the gray values of all non-zero pixel points in the luminance subgraph is calculated as the average luminance The average value of the gray value variance of all non-zero pixel points in the texture subgraph is calculated as the average texture Further, the average luminance and the average texture are normalized to map them to the interval to eliminate the influence of the dimension of different physical quantities.

[0069] Further, the average luminance and the average texture are weighted and fused to calculate the foam thickness index The specific calculation formula is as follows:

[0070]

[0071] In the formula, the foam thickness index ranges between 0 and 1; and are the luminance weight and the texture weight, respectively, and Since the intuitiveness of luminance is usually stronger than that of texture, a slightly higher weight is given to luminance, that is, In the embodiment, the luminance weight and the texture weight are set as ; , are the average luminance and the average texture, respectively.

[0072] Finally, the ratio of the total number of pixel points in the area enclosed by the contour line to the total number of pixel points in the wastewater pool surface image is calculated to obtain the foam coverage .

[0073] S5: Based on the foam coverage and the foam thickness index, hierarchical and cooperative control is performed.

[0074] It should be noted that in order to realize fine and energy-saving control, a hierarchical response strategy is formulated according to the two indexes of area and thickness.

[0075] Specifically, three key control thresholds are set: an area high threshold , an area low threshold , and a thickness high threshold .

[0076] Among them, the area high threshold is the decision threshold for starting intervention, which represents the upper limit of the foam coverage area that the system can tolerate, and is a safety red line set between energy saving and preventing overflow. If it is set too low, a little normal foam may cause the defoaming system to start frequently, resulting in waste of energy. If it is set too high, the system may lag behind when foam accumulates rapidly, increasing the risk of overflow or interfering with the sensor. Therefore, in order to balance sensitivity and fault tolerance, is in the range of [30%, 60%], and is set to 40% in this embodiment.

[0077] wherein the area low threshold is the decision threshold for stopping intervention, which represents a signal that the foam has been eliminated to a safe range, and together with forms a hysteresis interval. This value must be significantly lower than to form an effective hysteresis interval to ensure the success of the defoaming work. Therefore, is in the range of [5%, 20%], and is set to 10% in this embodiment.

[0078] wherein the thickness high threshold is the decision threshold for intervention grading, used to distinguish between thin foam and thick foam, and further used to capture severe working conditions. If it is set too low, most of the foam will be misjudged as thick foam, causing the system to start the high-power mode frequently, losing the significance of grading control and energy saving. If it is set too high, the system may be slow to respond to the truly dangerous accumulated foam; therefore, is in the range of [0.6, 0.8], and is set to 0.7 in this embodiment.

[0079] Further, in each monitoring period, the following cooperative control judgment is performed, wherein the time interval of the adjacent two monitoring periods is equal to the time interval of collecting adjacent two original images in step S1, i.e. 5 seconds:

[0080] 1. If the foam coverage rate is greater than the area high threshold , and the foam thickness index is greater than the thickness high threshold , it indicates that the foam area is large and the accumulation is serious, and the control system immediately starts the high-power defoaming mode, and the stirrer or the maximum flow of the defoaming agent is opened at full power.

[0081] 2. If the foam coverage rate is greater than the area high threshold , and the foam thickness index is less than or equal to the thickness high threshold , it indicates that the foam area is large but the foam is very thin, and the control system starts the low-power defoaming mode for intermittent stirring or small-flow spraying to maintain the status quo and save energy.

[0082] 3. If the foam coverage is less than or equal to the area height threshold And greater than or equal to the area low threshold The control system remains unchanged from the previous state.

[0083] 4. If the foam coverage is less than the area low threshold This indicates that the foam area is within a safe range, and the control system stops all defoaming devices.

[0084] It should be noted that this step will use the high-precision segmentation results, i.e., the foam coverage rate. And the thickness assessment index, namely the foam thickness index This combination enables intelligent hierarchical control, timely elimination of high-risk foam, ensuring system safety, while avoiding over-treatment of thin foam and optimizing operating costs.

[0085] For example, targeting Figure 2 The wastewater pool surface image shown is used to calculate the foam coverage rate through steps S2 to S4. The calculated foam thickness index is equal to 0.3643. It equals 0.2991; then, based on the three key control thresholds set, the above collaborative control judgment is executed: the state assessment result is: the foam area and thickness are moderate, and the corresponding control decision is: keep the state of the previous monitoring cycle unchanged.

[0086] For example, targeting Figure 3 The wastewater pool surface image shown is used to calculate the foam coverage rate through steps S2 to S4. The calculated foam thickness index is equal to 0.7305. Equal to 0.8421; then, based on the three key control thresholds set, the above collaborative control judgment is executed: the state assessment result is: the foam area is large and the accumulation is serious, and the corresponding control decision is: the control system immediately starts the high-power defoaming mode, turns on the agitator at full power or sprays the defoamer at the maximum flow rate.

[0087] This invention also discloses a wastewater recycling and monitoring system for sand and gravel separators, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, a wastewater recycling and monitoring method for sand and gravel separators according to the present invention is implemented.

[0088] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

Claims

1. A method for monitoring wastewater recycling treatment in a sand and gravel separator, characterized in that, include: Acquire images of the wastewater pool surface; The local variance of the pool surface image is calculated to obtain a local variance map; adaptive histogram equalization and gradient extraction are performed on the local variance map to obtain an enhanced texture gradient map; Based on the enhanced texture gradient map, the foam region is segmented using an active contour model to obtain a converged contour line. The external energy of the active contour model is negatively correlated with the square of the gradient magnitude of the corresponding contour point in the enhanced texture gradient map; The foam coverage rate is obtained by calculating the ratio of the area enclosed by the converged contour line to the total area of ​​the wastewater pool surface image. Based on the converged contour lines, a binary mask is generated and applied to the wastewater pool surface image and local variance map to extract the brightness sub-image and texture sub-image corresponding to the foam area. Calculate the average grayscale value of all non-zero pixels in the luminance sub-image as the average luminance; Calculate the average grayscale variance of all non-zero pixels in the texture sub-image as the average texture. The average brightness and average texture are weighted and fused to calculate the foam thickness index; Based on the foam coverage rate and foam thickness index, hierarchical collaborative control is implemented.

2. The wastewater recycling and monitoring method for a sand and gravel separator according to claim 1, characterized in that, The acquisition of images of the wastewater pool surface includes: An industrial camera installed directly above the wastewater pool of the sand and gravel separator or to the side with a clear overhead view captures images at a preset frame rate, and the captured image frames are used as the original images. A Gaussian filter is applied to the original image to obtain a preprocessed image of the wastewater pool surface.

3. The wastewater recycling and monitoring method for a sand and gravel separator according to claim 1, characterized in that, Based on the enhanced texture gradient map, the foam region is segmented using an active contour model to obtain a converged contour line, including: A greedy algorithm is used to calculate the energy of each contour point on the contour line in each iteration step, and then move it to the position with the lowest total energy in the 5×5 neighborhood, thereby reducing the total energy function of the contour line. This iteration process is repeated until the contour line converges. Finally, the region enclosed by the converged contour line is denoted as... .

4. The wastewater recycling and monitoring method for a sand and gravel separator according to claim 3, characterized in that, The initial outline of the active contour model is a rectangle set at a specific distance from the image boundary; the specific distance is 10% of the total width of the image.

5. The wastewater recycling and monitoring method for a sand and gravel separator according to claim 3, characterized in that, The formula for calculating the total energy function of the contour line is: ; In the formula, Let be the total energy function of the contour line. For contour points on the contour line, ; For contour points The internal energy; For contour points External energy.

6. The wastewater recycling treatment monitoring method for a sand and gravel separator according to claim 5, characterized in that, The internal energy The formula for calculation is: ; In the formula, For contour points The internal energy; The elastic coefficient controls the stretching and contraction of the contour line; The stiffness coefficient controls the curvature of the contour line; and These are the first and second derivatives of the contour line, respectively. Indicates the modulus length.

7. The wastewater recycling and monitoring method for a sand and gravel separator according to claim 3, characterized in that, The binary mask is located in the region enclosed by the outline. The internal pixel value is 1, and the external pixel value is 0.

8. The wastewater recycling and monitoring method for a sand and gravel separator according to claim 1, characterized in that, The weighted fusion of average brightness and average texture to calculate the foam thickness index includes: ; In the formula, This refers to the foam thickness index. and These are respectively brightness weight and texture weight. ,and ; , These represent average brightness and average texture, respectively.

9. A method for monitoring wastewater recycling treatment in a sand and gravel separator according to claim 1, characterized in that, The hierarchical collaborative control based on foam coverage and foam thickness index includes: If foam coverage Greater than the area high threshold And the foam thickness index Greater than the thickness threshold The control system immediately activates the high-power defoaming mode, turning on the agitator at full power or spraying the defoamer at maximum flow rate; if Greater than ,and Less than or equal to The control system activates a low-power defoaming mode to perform intermittent stirring or low-flow spraying in order to maintain the status quo and save energy. if Less than or equal to and greater than or equal to The control system maintains the state of the previous monitoring cycle; if Less than The control system stops all defoaming devices.

10. A wastewater recycling and monitoring system for a sand and gravel separator, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a wastewater recycling treatment monitoring method for a sand and gravel separator according to any one of claims 1-9.

Citation Information

Patent Citations

  • Drain outlet off-site law enforcement method and system based on digital twinborn technology

    CN120496052A

  • Physical defoaming alkali liquor circulation method

    CN120591793A