A method, system and computing device for real-time intelligent analysis of flocculation reaction
By real-time acquisition and multi-scale treatment of sewage videos during flocculation reactions, the reaction process coefficients are calculated, and the problem of difficulty in real-time and accurate analysis of flocculation reactions in the existing technology is solved, and the precise control of flocculation reactions and the improvement of water quality treatment effects are achieved.
Patent Information
- Application Number
- CN202210369970.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-08
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-04-08
AI Technical Summary
The prior art is difficult to evaluate the flocculation reaction process accurately in real time and cannot effectively control the input of flocculant, resulting in poor water quality treatment effect.
The industrial camera collects sewage videos during the flocculation reaction in real time, performs multi-scale downsampling and image processing, calculates the grayscale difference value and two-dimensional difference entropy of grayscale images of each scale, and obtains the reaction process coefficients to analyze the flocculation reaction process and control the addition of flocculant.
Real-time accurate analysis and control of the flocculation reaction process is achieved, the effect and efficiency of water quality treatment is improved, the influence of binarization threshold is avoided, and the accuracy of the analysis is enhanced.
Smart Images

Figure CN114663684B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of sewage treatment, and in particular to a method, system and computing equipment for real-time intelligent analysis of flocculation reactions. Background Art
[0002] In the water supply industry, flocculation reaction is an important part of sewage treatment. The purpose of flocculation reaction is to remove colloidal particle impurities in water. By adding flocculants to water, the colloidal particles in the water collide and aggregate with each other to form larger floccules. The aggregates are settled at the bottom of the flocculation tank through sedimentation, and are separated from the water through subsequent filtration and other treatment steps. Therefore, the effect of flocculation reaction directly affects the treatment effect of subsequent treatment steps. Therefore, accurately and real-time evaluation of the progress of flocculation reaction, and analysis and control of flocculant input are key factors in improving water quality and reducing water purification costs.
[0003] In the flocculation reaction, the dosage of flocculant required is different due to the different content of colloidal particle impurities in the sewage to be treated. The important indicator for determining the amount of flocculant input is the progress of the flocculation reaction. If the degree of aggregation of the colloidal particle aggregates is high during the flocculation reaction, and there is no obvious change in the degree of aggregation when the flocculant is continued to be added, it means that the flocculation reaction process is basically completed, the colloidal particles in the water are better aggregated, and the flocculation reaction effect is good.
[0004] Therefore, accurately evaluating the effect of the flocculation reaction is an important step in determining the progress of the flocculation reaction and controlling the amount of flocculant added. In the prior art, it is generally determined manually whether the addition of flocculants needs to be adjusted, and the amount of flocculants added cannot be controlled in real time when the quality of the water to be treated changes. When the amount of flocculants added is controlled by using image processing and other technologies, the binarization method is generally used to directly segment the colloidal particle aggregates and judge the contour morphology of the colloidal particle aggregates. However, this method is easily affected by the setting of the binarization threshold, resulting in a deviation between the colloidal contour morphology and the actual morphology. This reduces the accuracy of the evaluation and makes it impossible to analyze and estimate the progress of the flocculation reaction. Summary of the invention
[0005] In order to solve the above technical problems, the purpose of the present invention is to provide a method, system and computing device for real-time intelligent analysis of flocculation reaction. The technical solutions adopted are as follows:
[0006] The present invention provides a technical solution for a method for real-time intelligent analysis of flocculation reaction, comprising the following steps:
[0007] Use industrial cameras to collect real-time sewage reaction videos during the flocculation reaction process, and obtain sewage grayscale images of each frame corresponding to the reaction process video;
[0008] Perform multi-scale downsampling on each frame of sewage grayscale image to obtain several scale grayscale images corresponding to each frame of sewage grayscale image. Based on each scale grayscale image, calculate the grayscale difference value of all pixel points of each scale grayscale image and the two-dimensional difference entropy of the corresponding grayscale image;
[0009] Based on the two-dimensional difference entropy of each scale grayscale image, the adjacent scale differences of all adjacent scale grayscale images are calculated; based on the grayscale difference value of each scale grayscale image, the average grayscale difference value of all scale grayscale images corresponding to each frame of sewage grayscale image is calculated;
[0010] Based on the adjacent scale differences and the average grayscale difference value, a reaction process coefficient of each frame of sewage grayscale image is obtained;
[0011] The flocculation reaction process is analyzed according to the reaction process coefficient corresponding to each frame of sewage grayscale image, and the addition of flocculant is controlled.
[0012] Preferably, the grayscale difference value is obtained by:
[0013] Get any pixel point and the eight neighborhood points of the pixel point in the grayscale image of each scale;
[0014] Calculate the grayscale difference between the eight neighborhood points and the grayscale value of the pixel:
[0015] in, is the grayscale difference of the i-th pixel in grayscale images of different scales, is the gray value of the i-th pixel, Represents the grayscale value of the kth pixel in the eight-neighborhood of the i-th pixel.
[0016] Preferably, the method for obtaining the two-dimensional difference entropy is:
[0017] Obtaining the grayscale value and the grayscale difference value of any pixel in each scale grayscale image, forming a two-tuple of the grayscale value and the grayscale difference value corresponding to the arbitrary pixel, and then obtaining a two-tuple set of all pixels in each scale grayscale image;
[0018] Based on the probability of occurrence of each binary in the binary set, the two-dimensional difference entropy of the grayscale image at that scale is calculated.
[0019] Preferably, the adjacent scale difference is:
[0020] in, is the adjacent scale difference of all adjacent two-dimensional difference entropies, is the two-dimensional difference entropy of the l-th scale grayscale image, is the two-dimensional difference entropy of the grayscale image at the l-1th scale, and L is the number of scales.
[0021] Preferably, the method further comprises a step of normalizing the adjacent scale differences and the average grayscale difference values.
[0022] Preferably, the reaction progress coefficient is
[0023]
[0024] in, is the average grayscale difference value after normalization, is the normalized adjacent scale difference, The value range is [-1, 1].
[0025] Preferably, the reaction progress coefficients of each frame of sewage grayscale image are sorted according to time, and the size of each reaction progress coefficient and the set threshold are judged. When the reaction progress coefficients corresponding to continuous time remain unchanged and are less than the set threshold, the flocculation reaction stagnates, and flocculants are added to promote the reaction until the reaction progress coefficient is greater than the set threshold and approaches 1. In this case, the flocculation reaction is sufficient and no flocculant is added.
[0026] The present invention also provides a technical solution for a system for real-time intelligent analysis of flocculation reactions, comprising:
[0027] An image acquisition unit is used to collect the sewage reaction video during the flocculation reaction in real time to obtain the sewage grayscale image of each frame corresponding to the reaction process video;
[0028] The image processing unit performs multi-scale downsampling on each frame of sewage grayscale image to obtain a plurality of scale grayscale images corresponding to each frame of sewage grayscale image, and calculates the grayscale difference value of all pixel points of each scale grayscale image and the two-dimensional difference entropy of the corresponding grayscale image based on each scale grayscale image;
[0029] Based on the two-dimensional difference entropy of each scale grayscale image, the adjacent scale differences of all adjacent scale grayscale images are calculated; based on the grayscale difference value of each scale grayscale image, the average grayscale difference value of all scale grayscale images corresponding to each frame of sewage grayscale image is calculated;
[0030] The image calculation unit is used to obtain the reaction process coefficient of each frame of sewage grayscale image based on the adjacent scale difference and the average grayscale difference value; the image analysis unit analyzes the flocculation reaction process according to the reaction process coefficient corresponding to each frame of sewage grayscale image and controls the addition of flocculant.
[0031] The present invention also provides a computing device, comprising: one or more processors; and one or more machine-readable media storing instructions thereon, wherein when the one or more processors are executed, the computing device executes the above-mentioned technical solution of a method for real-time intelligent analysis of flocculation reactions.
[0032] Beneficial effects of the present invention:
[0033] The scheme of the present invention can perform image processing on the entire sewage image in the flocculation reaction, and use grayscale images at different scales to refine the features of each frame of grayscale images, and then characterize the characteristics of each frame of images by calculating adjacent difference values and average grayscale difference values of grayscale images at all scales, thereby reflecting the status of each time node in the flocculation reaction process, and can accurately grasp the reaction conditions at each time, and then can timely control the sewage treatment process, and add flocculants at appropriate actual conditions to make the reaction in the sewage treatment process most complete.
[0034] At the same time, compared with the prior art technology using binary segmentation processing, the solution of the present invention avoids the influence of the binary threshold and improves the accuracy of analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 It is a flow chart of the steps of a method for real-time intelligent analysis of flocculation reaction of the present invention;
[0037] Figure 2 It is a schematic diagram of the structure of an industrial camera collecting sewage flocculation reaction video;
[0038] Figure 3 It is a structural block diagram of a system for real-time intelligent analysis of flocculation reaction of the present invention;
[0039] Figure numbers: 1-industrial camera, 2-flocculation tank, 3-LED light source. DETAILED DESCRIPTION
[0040] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the scheme according to the present invention, its specific implementation, structure, features and effects in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics in one or more embodiments may be combined in any suitable form.
[0041] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0042] Specifically, see Figure 1 As shown, the present invention provides a method for real-time intelligent analysis of flocculation reaction, comprising the following steps:
[0043] Step 1: Use an industrial camera to collect real-time video of sewage reaction during the flocculation reaction process to obtain grayscale images of sewage frames corresponding to the reaction process video.
[0044] In this embodiment, an industrial camera is used to collect the video of the sewage reaction process during the flocculation reaction and grayscale each frame of the video image to obtain each frame of the sewage grayscale image. It should be noted that the collected video image is an underwater video image, which requires further denoising.
[0045] Of course, as other implementations, the present invention can also perform image preprocessing on each frame image in the collected sewage reaction video based on OpenCV to obtain a processed image for subsequent image processing analysis.
[0046] Specifically, Figure 2 As shown, an industrial camera 1 is arranged above the sewage pool, and an LED light source 3 is laid at the bottom of the pool; that is, the arranged camera is used to collect video of the sewage flocculation reaction process in the flocculation pool 2, and then the collected video is processed.
[0047] Step 2, performing multi-scale downsampling on each frame of sewage grayscale image to obtain a plurality of scale grayscale images corresponding to each frame of sewage grayscale image, and based on each scale grayscale image, calculating the grayscale difference value of all pixel points of each scale grayscale image and the two-dimensional difference entropy of the corresponding grayscale image;
[0048] Based on the two-dimensional difference entropy of each scale grayscale image, the adjacent scale differences of all adjacent scale grayscale images are calculated; based on the grayscale difference value of each scale grayscale image, the average grayscale difference value of all scale grayscale images corresponding to each frame of sewage grayscale image is calculated.
[0049] In this embodiment, each frame of sewage grayscale image is subjected to multi-scale pyramid down-sampling to obtain grayscale images at several different scales.
[0050] Specifically, for a sewage grayscale image, the scale pyramid is downsampled. The sampling scale of the original sewage grayscale image is numbered 0, and the sampling scale after downsampling is numbered 1. Similarly, grayscale images of each sampling scale of a single frame image are obtained, which are expressed in the following way: ,..., ,..., .in, Indicates the number corresponding to the sampling scale, , t represents the time sequence number of the sewage grayscale image in the video image frame, and then the above sampling process is performed on each frame of the image to obtain grayscale images of each scale of each frame of the image.
[0051] It should be noted that the number corresponding to the sampling scale in the above, that is, the number corresponding to the scale grayscale image, only indicates how many times the downsampling is performed, and the scale of each scale grayscale image used is determined according to the size of the original sewage grayscale image. For example, when the size of the original sewage grayscale image is 256×256, the first downsampling can be 128×128, and so on. When the sampling scale number L is 7, the image size at this scale is 2×2. Of course, as other implementations, the downsampling scale of the present invention is not limited to the above embodiment, and it is determined according to actual conditions.
[0052] Among them, the method for obtaining the grayscale difference value of each scale grayscale image is:
[0053] 1) Obtain grayscale images of various scales Any pixel point in and its eight neighborhood points;
[0054] 2) Calculate the grayscale difference between the eight neighboring points and the grayscale value of the pixel :
[0055]
[0056] in, is the grayscale difference of the i-th pixel in grayscale images of different scales, is the gray value of the i-th pixel, Represents the grayscale value of the kth pixel in the eight-neighborhood of the i-th pixel.
[0057] Furthermore, based on the grayscale difference values of the grayscale images at each scale, the average grayscale difference values of all scale grayscale images corresponding to the grayscale image of the sewage are calculated, and normalized to obtain .
[0058] As another implementation method, the grayscale difference values of the grayscale images at each scale may be directly normalized to obtain , and then calculate , specifically,
[0059] in, is the grayscale difference value of the normalized l-th scale grayscale image.
[0060] It should be noted that, in this embodiment, by utilizing the multi-scale average grayscale difference, the difference in pixel points in the image can be measured more evenly. When the water is turbid, it will become larger as the reaction proceeds, becoming clearer and the precipitation more concentrated.
[0061] Among them, the method for obtaining the two-dimensional difference entropy is:
[0062] Obtaining the grayscale value and the grayscale difference value of any pixel in each scale grayscale image, forming a two-tuple of the grayscale value and the grayscale difference value corresponding to the arbitrary pixel, and then obtaining a two-tuple set of all pixels in each scale grayscale image;
[0063] Based on the probability of occurrence of each binary in the binary set, the two-dimensional difference entropy of the grayscale image at that scale is calculated.
[0064] Specifically, the sampling scale grayscale image is calculated in the above manner On each point , and the grayscale image is sampled Each pixel on as well as As elements to form a tuple, each pixel corresponds to a tuple, and then the tuple set of all pixels is obtained; Represents a tuple In the sample image The probability of occurrence is express The value of is ; express The value of is , is the sequence number of the values corresponding to each pixel, sorted from small to large, and the sampled image is calculated The two-dimensional difference entropy is as follows:
[0065]
[0066] Among them, A represents the serial number The maximum sequence number of How many different values appear in total. Similarly, B represents The maximum sequence number value of How many different values appear in total? express The value of is , The value of is The pixel point in the sampling scale grayscale image The proportion of is the sampling scale grayscale image The two-dimensional difference entropy of .
[0067] Furthermore, in order to characterize the aggregation of aggregates inside the water body, if the aggregation is good, it means that the impurities in the water body are all gathered together, the grayscale values are large, that is, the clear part is very clear, and the small grayscale values are small, that is, the impurity part is highly condensed. This leads to the fact that when calculating the two-dimensional difference entropy, the better the aggregation in the acquired single-frame image, the smaller the difference in the two-dimensional difference entropy between the two adjacent scales. That is, The smaller it is, the greater the degree of reaction.
[0068] Therefore, based on the two-dimensional difference entropy of each scale grayscale image in the above embodiment, the scale difference between any two adjacent scale grayscale images is calculated, and then the mean value of all scale differences is obtained:
[0069]
[0070] in, is the adjacent scale difference of all adjacent two-dimensional difference entropies, is the two-dimensional difference entropy of the l-th scale grayscale image, is the two-dimensional difference entropy of the l-1th scale grayscale image, and L is the number corresponding to the scale grayscale image. It should be noted that it is also necessary to Normalization is performed, and of course, the two-dimensional difference entropy can also be normalized.
[0071] Step 3: Based on the adjacent scale differences and the average grayscale difference value, the reaction process coefficient of each frame of the sewage grayscale image is obtained.
[0072] The reaction progress coefficient in this example is
[0073]
[0074] in, is the average grayscale difference value after normalization, is the normalized adjacent scale difference, The value range is [-1, 1].
[0075] At this point, the reaction process coefficients corresponding to the sewage grayscale images in different frames can be obtained.
[0076] In the above embodiment, and The process of characterizing flocculation reaction is based on It will become larger as the reaction progresses. As the reaction progresses, it will become smaller and smaller. The difference between the two is taken as the reaction progress coefficient. big The reaction process is nearing completion. Small The larger the difference between the two, the more the reaction process has just begun. The smaller the difference between the two, the more the reaction is in the middle stage. The reaction progress can be measured by the following formula.
[0077] Step 4: Analyze the flocculation reaction process according to the reaction process coefficient corresponding to each frame of the sewage grayscale image, and control the addition of flocculant.
[0078] In this embodiment, according to the reaction progress coefficients corresponding to the grayscale images of sewage in different frames, the state of the flocculation reaction process can be clearly grasped, that is, the reaction progress coefficients of the grayscale images of sewage in each frame are sorted according to time, and the size of each reaction progress coefficient and the set threshold are judged. When the reaction progress coefficients corresponding to continuous time remain unchanged and are less than the set threshold, the flocculation reaction stagnates, and flocculants are added to promote the reaction until the reaction progress coefficient is greater than the set threshold and approaches 1. In this case, the flocculation reaction is sufficient and no flocculants are added.
[0079] The threshold value in the above embodiment is set to 0.9, and of course the threshold value can also be set according to actual conditions.
[0080] It should be noted that the reaction progress coefficient The closeness to -1 indicates that the reaction effect of the reaction process is the multi-scale average grayscale variance Small but adjacent scale differences Therefore, it indicates that the reaction process is in the initial stage, that is, the reaction process is early. When it approaches 1, it indicates that the reaction effect of the reaction process is the multi-scale average grayscale variance Large and adjacent scale differences small. This indicates that the reaction is almost finished. Therefore, the reaction progress coefficient It can not only indicate the progress of the reaction, but also evaluate whether the reaction needs to continue to add flocculants. After arranging them in chronological order, it was found that the subsequent If it does not grow any more and remains below 0.9, it indicates that the reaction is stagnant and flocculants should be added to promote the reaction. If it continues to grow, no flocculant needs to be added until it stops growing. When it is greater than 0.9 and infinitely close to 1, it proves that the flocculation reaction is sufficient and there is no need to add flocculants.
[0081] When the reaction stagnates, the control pump continues to add flocculant to promote the reaction. If it continues to grow, the drug pump is controlled to stop adding flocculants until it stops growing and then it is judged whether it is close enough to 1, and then further judged whether to add flocculants. It should be noted that the control of the drug pump is a real-time process, that is, each frame of video corresponds to a reaction process coefficient , that is, a judgment interval consisting of continuous frames is required. This continuous frame judgment interval can be defined as 50 frames, that is, 50 corresponding frames in 50 frames. When the number of cells no longer increases, it indicates that the reaction has stagnated. Whether it approaches 1, if it approaches 1, the drug pump is controlled to stop adding drugs, if it does not approach 1, the drug pump is controlled to continue adding drugs, and the above judgment process is repeated in the subsequent continuous frame judgment interval.
[0082] Therefore, the scheme of the present invention can process the sewage image in the flocculation reaction as a whole, avoid the influence of the binarization threshold, and evaluate the aggregation degree of the flocculants, so it has better accuracy and adaptability to different water qualities to be treated. Compared with the prior art that uses image processing technology to analyze the effect of the flocculation reaction, it does not need to calculate the binarization threshold, that is, it does not need to segment the colloidal particle aggregates by image binarization during analysis, avoiding the inaccuracy of the binarization threshold, which leads to inaccurate analysis of the flocculation reaction and ineffective sewage treatment.
[0083] like Figure 3 As shown, the present invention also provides a technical solution of a system for real-time intelligent analysis of flocculation reaction, comprising:
[0084] An image acquisition unit is used to collect the sewage reaction video during the flocculation reaction in real time to obtain the sewage grayscale image of each frame corresponding to the reaction process video;
[0085] The image processing unit performs multi-scale downsampling on each frame of sewage grayscale image to obtain a plurality of scale grayscale images corresponding to each frame of sewage grayscale image, and calculates the grayscale difference value of all pixel points of each scale grayscale image and the two-dimensional difference entropy of the corresponding grayscale image based on each scale grayscale image;
[0086] Based on the two-dimensional difference entropy of each scale grayscale image, the adjacent scale differences of all adjacent scale grayscale images are calculated; based on the grayscale difference value of each scale grayscale image, the average grayscale difference value of all scale grayscale images corresponding to each frame of sewage grayscale image is calculated;
[0087] An image calculation unit, used for obtaining a reaction process coefficient of each frame of sewage grayscale image based on the adjacent scale difference and the average grayscale difference value;
[0088] The image analysis unit analyzes the flocculation reaction process according to the reaction process coefficient corresponding to each frame of the sewage grayscale image, and controls the addition of the flocculant.
[0089] Since the specific implementation process of the system for real-time intelligent analysis of flocculation reaction in this embodiment is the same as the specific implementation process of the method for real-time intelligent analysis of flocculation reaction described above, it will not be described in detail here.
[0090] The present invention also provides a computing device, comprising:
[0091] one or more processors; and
[0092] One or more machine-readable media having instructions stored thereon, when the one or more processors execute, enable the computing device to execute the above-mentioned technical solution of a method for real-time intelligent analysis of flocculation reactions.
[0093] Since a method for real-time intelligent analysis of flocculation reactions has been introduced in detail above, it will not be elaborated here.
[0094] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for real-time intelligent analysis of flocculation reaction, characterized in that: The following steps are involved: Use industrial cameras to collect real-time sewage reaction videos during the flocculation reaction process, and obtain sewage grayscale images of each frame corresponding to the reaction process video; Perform multi-scale downsampling on each frame of sewage grayscale image to obtain several scale grayscale images corresponding to each frame of sewage grayscale image. Based on each scale grayscale image, calculate the grayscale difference value of all pixel points of each scale grayscale image and the two-dimensional difference entropy of the corresponding grayscale image; Based on the two-dimensional difference entropy of grayscale images at each scale, the adjacent scale differences of all adjacent scale grayscale images are calculated; Based on the grayscale difference values of the grayscale images at each scale, the average grayscale difference values of all scale grayscale images corresponding to each frame of sewage grayscale image are calculated; Based on the adjacent scale differences and the average grayscale difference value, a reaction process coefficient of each frame of sewage grayscale image is obtained; Analyze the flocculation reaction process according to the reaction process coefficient corresponding to each frame of sewage grayscale image, and control the addition of flocculant; The method for obtaining the grayscale difference value is: Get any pixel point and the eight neighborhood points of the pixel point in the grayscale image of each scale; Calculate the grayscale difference between the eight neighborhood points and the grayscale value of the pixel: ; in, is the grayscale difference value of the i-th pixel in grayscale images of different scales, is the gray value of the i-th pixel, Represents the gray value of the kth pixel in the eight-neighborhood of the i-th pixel; The method for obtaining the two-dimensional difference entropy is: Obtaining the grayscale value and the grayscale difference value of any pixel in each scale grayscale image, forming a two-tuple of the grayscale value and the grayscale difference value corresponding to the arbitrary pixel, and then obtaining a two-tuple set of all pixels in each scale grayscale image; Based on the probability of occurrence of each binary group in the binary group set, the two-dimensional difference entropy of the grayscale image at that scale is calculated; The adjacent scale difference is: ; in, is the adjacent scale difference of all adjacent two-dimensional difference entropies, For the The two-dimensional difference entropy of the grayscale image at each scale is For the The two-dimensional difference entropy of the scaled grayscale image, L is the number corresponding to the scaled grayscale image; Normalizing the adjacent scale differences and the average grayscale difference values; The reaction progress coefficient is ; in, is the average grayscale difference value after normalization, is the normalized adjacent scale difference, The value range is [-1, 1].
2. The method for real-time intelligent analysis of flocculation reaction according to claim 1, characterized in that: The reaction process coefficients of each frame of sewage grayscale image are sorted by time, and the size of each reaction process coefficient and the set threshold are judged. When the reaction process coefficients corresponding to continuous time remain unchanged and are less than the set threshold, the flocculation reaction stagnates, and flocculants are added to promote the reaction until the reaction process coefficient is greater than the set threshold and approaches 1. The flocculation reaction is sufficient and no flocculants are added.
3. A system for real-time intelligent analysis of flocculation reactions, characterized in that: include: An image acquisition unit is used to collect the sewage reaction video during the flocculation reaction in real time to obtain the sewage grayscale image of each frame corresponding to the reaction process video; The image processing unit performs multi-scale downsampling on each frame of sewage grayscale image to obtain a plurality of scale grayscale images corresponding to each frame of sewage grayscale image, and calculates the grayscale difference value of all pixel points of each scale grayscale image and the two-dimensional difference entropy of the corresponding grayscale image based on each scale grayscale image; Based on the two-dimensional difference entropy of grayscale images at each scale, the adjacent scale differences of all adjacent scale grayscale images are calculated; Based on the grayscale difference values of the grayscale images at each scale, the average grayscale difference values of all scale grayscale images corresponding to each frame of sewage grayscale image are calculated; An image calculation unit, used for obtaining a reaction process coefficient of each frame of sewage grayscale image based on the adjacent scale difference and the average grayscale difference value; An image analysis unit analyzes the flocculation reaction process according to the reaction process coefficient corresponding to each frame of the sewage grayscale image, and controls the addition of flocculants; The method for obtaining the grayscale difference value is: Get any pixel point and the eight neighborhood points of the pixel point in the grayscale image of each scale; Calculate the grayscale difference between the eight neighborhood points and the grayscale value of the pixel: ; in, is the grayscale difference value of the i-th pixel in grayscale images of different scales, is the gray value of the i-th pixel, Represents the gray value of the kth pixel in the eight-neighborhood of the i-th pixel; The method for obtaining the two-dimensional difference entropy is: Obtaining the grayscale value and the grayscale difference value of any pixel in each scale grayscale image, forming a two-tuple of the grayscale value and the grayscale difference value corresponding to the arbitrary pixel, and then obtaining a two-tuple set of all pixels in each scale grayscale image; Based on the probability of occurrence of each binary group in the binary group set, the two-dimensional difference entropy of the grayscale image at that scale is calculated; The adjacent scale difference is: ; in, is the adjacent scale difference of all adjacent two-dimensional difference entropies, For the The two-dimensional difference entropy of the grayscale image at each scale is For the The two-dimensional difference entropy of the scaled grayscale image, L is the number corresponding to the scaled grayscale image; Normalizing the adjacent scale differences and the average grayscale difference values; The reaction progress coefficient is ; in, is the average grayscale difference value after normalization, is the normalized adjacent scale difference, The value range is [-1, 1].
4. A computing device, characterized in that: include: one or more processors; and one or more machine-readable media having instructions stored thereon, wherein when the one or more processors execute the instructions, the computing device executes the method for real-time intelligent analysis of flocculation reactions as claimed in claim 1 or 2.
Citation Information
Patent Citations
Alumen ustum image processing method and system, medium and electronic equipment
CN111833369A
Sewage treatment system and method based on image acquisition
CN112919605A