Sewage state recognition method and device based on image processing and quantization statistical differences

Through image processing and quantitative statistical difference technology, real-time identification of changes in particulate matter in sewage has solved the problem of difficult control of the amount of medicine used in sewage treatment, and achieved accurate addition of medicines and improved sewage treatment effect.

CN116580304BActive Publication Date: 2025-07-04JIEYANG RONGTU ENVIRONMENTAL PROTECTION EQUIP ENG CO LTD +1

Patent Information

Application Number
CN202310539791.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-15
Publication Date
2025-07-04
Estimated Expiration
2043-05-15

AI Technical Summary

Technical Problem

The prior art is difficult to determine the sewage status in real time during sewage treatment, which makes it difficult to accurately control the amount of treatment agents used, waste resources and poor results.

Method used

Through image processing and quantitative statistical difference technology, real-time images during the sewage treatment process are obtained, pretreatment and multi-region binary processing are performed, the morphological changes of particulate matter are identified, the sewage treatment status is determined based on the morphological changes of particulate matter, and the amount of treatment agents is reasonably adjusted.

Benefits of technology

It has achieved accurate addition of treatment agents according to the sewage treatment status, reducing the use of agents, improving the sewage treatment effect, and reducing manpower and drug costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116580304B_ABST
    Figure CN116580304B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of sewage treatment, and particularly relates to a sewage state recognition method and device based on image processing and quantitative statistical differences. The method includes obtaining real-time sewage images during the sewage treatment process at intervals; preprocessing each real-time sewage image to obtain each sewage feature image; performing quantitative statistical differences on each sewage feature image to obtain the morphological changes of particulate matters in the sewage; and determining the sewage treatment state according to the morphological changes of the particulate matters. By performing quantitative statistical differences on each sewage feature image to obtain the morphological changes of the particulate matters, and then determining the sewage treatment state according to the morphological changes of the particulate matters, it is possible to better add treatment agents according to the sewage treatment state, reduce the usage amount of the treatment agents, and improve the sewage treatment effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sewage treatment, and particularly relates to a sewage state recognition method and device based on image processing and quantitative statistical differences. Background Art

[0002] With the increasing degree of urban industrialization, there are more and more factories. During the process of manufacturing products, factories will generate various wastes, such as wastewater, and this wastewater may contain a large amount of toxic and harmful substances, especially the wastewater from chemical factories. If these industrial wastewaters are directly discharged into the natural environment, it may cause a large number of plants to wither and may also cause the death of fish in the water body, seriously damaging the ecological environment. Moreover, light, water, and air are three essential resources in people's lives, and people cannot survive for a long time without any of them. If industrial wastewater is directly discharged into the natural environment without treatment and is once consumed by humans, it will cause harm to the human body. Therefore, sewage treatment must be carried out before the discharge of industrial wastewater to reduce the damage to the natural environment and improve the virtuous cycle of water. In addition to production sewage such as industrial wastewater, domestic sewage generated in people's daily lives also needs to be treated before entering the natural water cycle.

[0003] One step of sewage treatment is to remove pollutants in the sewage. Usually, the method of adding treatment agents to the sewage is adopted to make numerous pollutants in the sewage gradually coagulate into particles, and then the particles are separated from the sewage to achieve the purpose of removing pollutants. During the treatment process, there are usually multiple processes of adding treatment agents. Each process makes the particles coagulate and become larger. When the particles can no longer become larger, the sewage will enter the next process of adding treatment agents or be separated when the particles reach the separation standard. In the process of adding treatment agents, by continuously adding treatment agents to the sewage, the particles in the sewage will gradually coagulate and become larger. However, when the particles become larger to a certain extent, if the treatment agents continue to be added according to the original addition amount, the particles will not be able to become larger further. At this time, the addition amount of the treatment agents should be gradually reduced until the particles show a tendency to become smaller, and then the addition amount of the treatment agents is gradually increased. Therefore, the present invention provides a sewage state recognition method based on image processing to be able to determine the sewage treatment state in real time during the sewage treatment process, and then add treatment agents more reasonably to achieve the purpose of reducing the usage amount of treatment agents. Summary of the Invention

[0004] Aiming at the deficiencies of the existing technology, the present invention proposes a sewage state recognition method and device based on image processing and quantitative statistical differences, which reduces the usage amount of treatment agents.

[0005] In the first aspect, the present invention provides a sewage state recognition method based on image processing and quantitative statistical differences.

[0006] In the first implementable manner, a sewage state recognition method based on image processing and quantitative statistical differences includes:

[0007] Obtain real-time sewage images during the sewage treatment process at intervals;

[0008] Preprocess each real-time sewage image to obtain each sewage feature image;

[0009] Perform quantitative statistical differences on each sewage feature image to obtain the morphological changes of particulate matter in the sewage;

[0010] Determine the sewage treatment state according to the morphological changes of particulate matter.

[0011] Combined with the first implementable manner, in the second implementable manner, preprocessing each real-time sewage image to obtain each sewage feature image includes:

[0012] Perform grayscale processing on each real-time sewage image to obtain a sewage grayscale image;

[0013] Perform multi-region binaryzation processing on each sewage grayscale image to obtain a sewage feature image.

[0014] Combined with the second implementable manner, in the third implementable manner, performing multi-region binaryzation processing on each sewage grayscale image to obtain a sewage feature image includes:

[0015] Divide each sewage grayscale image into multiple regions, and perform binaryzation processing on each region respectively to obtain a sewage feature image.

[0016] Combined with the first implementable manner, in the fourth implementable manner, performing quantitative statistical differences on each sewage feature image to obtain the morphological changes of particulate matter in the sewage includes:

[0017] Obtain the difference values of each pixel point in each sewage feature image;

[0018] Obtain the average difference value of each sewage feature image according to the difference values of each pixel point; the average difference value is used to characterize the morphology of particulate matter;

[0019] Obtain the morphological changes of particulate matter in the sewage according to each average difference value.

[0020] Combined with the fourth implementable manner, in the fifth implementable manner, obtaining the difference values of each pixel point in each sewage feature image includes:

[0021] Obtain the differences between each pixel point and its corresponding upper, lower, left, and right adjacent pixel points respectively, and determine the sum of each difference as the difference value of each pixel point.

[0022] Combined with the fourth implementation manner, in the sixth implementation manner, obtaining the morphological change of particulate matter in sewage according to each difference mean value includes:

[0023] Sort the sewage characteristic images according to the shooting time sequence, and draw the change curve of the particulate matter morphology by plotting the difference mean values of each frame of sewage characteristic images according to the sorting.

[0024] Combined with the first implementation manner, in the seventh implementation manner, determining the sewage treatment state according to the morphological change of particulate matter includes:

[0025] When the morphology of the particulate matter continues to increase, determine that the sewage treatment state is the first stage, and add treatment agents to the sewage according to a preset addition amount within the first stage;

[0026] When the morphology of the particulate matter first increases and then remains unchanged, determine that the sewage treatment state is the second stage, and reduce the addition amount of the treatment agent within the second stage;

[0027] When the morphology of the particulate matter begins to decrease, determine that the sewage treatment state is the third stage, and increase the addition amount of the treatment agent within the third stage.

[0028] In a second aspect, the present invention provides a sewage state recognition device based on image processing and quantitative statistical differences.

[0029] In an eighth implementation manner, a sewage state recognition device based on image processing and quantitative statistical differences includes:

[0030] A sewage real-time image acquisition module, configured to acquire sewage real-time images during the sewage treatment process at intervals;

[0031] A sewage characteristic image acquisition module, configured to preprocess each sewage real-time image to obtain each sewage characteristic image;

[0032] A quantitative statistical difference module, configured to perform quantitative statistical differences on each sewage characteristic image to obtain the morphological change of particulate matter in the sewage;

[0033] A sewage treatment state determination module, configured to determine the sewage treatment state according to the change of the particulate matter morphology.

[0034] In a third aspect, the present invention provides a sewage state recognition device based on image processing and quantitative statistical differences.

[0035] In a ninth implementation manner, a sewage state recognition device based on image processing and quantitative statistical differences includes a processor and a memory storing program instructions. The processor is configured to execute the sewage state recognition method based on image processing as described above when running the program instructions.

[0036] In a fourth aspect, the present invention provides a sewage treatment device.

[0037] In a tenth realizable manner, a sewage treatment device includes the image processing-based sewage state recognition device as described above.

[0038] As can be seen from the above technical solutions, the beneficial technical effects of the present invention are as follows:

[0039] 1. Quantify and statistically analyze the differences in each sewage feature image to obtain the morphological changes of particulate matter, and then determine the sewage treatment state according to the morphological changes of particulate matter, so as to better add treatment agents according to the sewage treatment state, reduce the usage amount of treatment agents, and improve the sewage treatment effect.

[0040] 2. Divide the sewage grayscale image into multiple regions, and then perform binary calculation on each region separately. Since the light receiving intensity within the same region is similar and close to the uniform light receiving state, therefore, performing binary calculation on each region can basically set the sewage particulate matter within the region to the same brightness value, and set the sewage gap to another same brightness value, which is more conducive to identifying the particulate matter in the sewage, and thus can improve the accuracy of identifying the particulate matter in the real-time sewage image in the actual production environment.

[0041] 3. When the sewage particulate matter is smaller, there are more pixel points on the boundary edge and the difference value is larger; on the contrary, when the sewage particulate matter is larger, there are fewer pixel points on the boundary edge and the difference value is smaller. Therefore, the difference mean value obtained from the difference values of all pixel points can reflect the size of the sewage particulate matter in the sewage feature image, so as to guide the sewage treatment system to identify the sewage state, control the dosage and timing of treatment agents, and achieve the purposes of reducing human resource costs and reducing agent dosage costs. Description of the Drawings

[0042] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts do not necessarily draw according to the actual ratio.

[0043] Figure 1 It is a schematic diagram of an image processing-based sewage state recognition method provided in this embodiment;

[0044] Figure 2 It is a sewage grayscale image with uneven light reception provided in this embodiment;

[0045] Figure 3 It is a schematic diagram of dividing the sewage grayscale image into multiple regions provided in this embodiment;

[0046] Figure 4-(1) is the first real-time sewage image provided by this embodiment;

[0047] Figure 4-(2) is the first grayscale sewage image provided by this embodiment;

[0048] Figure 4-(3) is the first characteristic sewage image provided by this embodiment;

[0049] Figure 4-(4) is the second real-time sewage image provided by this embodiment;

[0050] Figure 4-(5) is the second grayscale sewage image provided by this embodiment;

[0051] Figure 4-(6) is the second characteristic sewage image provided by this embodiment;

[0052] Figure 5 Schematic diagram of the difference between the first pixel point and its adjacent pixel points provided by this embodiment;

[0053] Figure 6 Schematic diagram of the difference between the second pixel point and its adjacent pixel points provided by this embodiment;

[0054] Figure 7 Schematic diagram of the average difference curve provided by this embodiment;

[0055] Figure 8 Schematic diagram of the structure of a sewage state recognition device based on image processing provided by this embodiment. Detailed implementation manners

[0056] Next, embodiments of the technical solution of the present invention will be described in detail with reference to the accompanying drawings. The following embodiments are only used to illustrate the technical solution of the present invention more clearly, so they are only examples and cannot be used to limit the protection scope of the present invention.

[0057] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the ordinary meanings understood by those skilled in the art to which the present invention pertains. In the description of the embodiments of the present disclosure, the claims, and the above-mentioned drawings, terms such as "first", "second", etc. are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so as to implement the embodiments of the present disclosure described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. Unless otherwise specified, the term "plurality" means two or more. In the embodiments of the present disclosure, the character " / " indicates that the objects before and after are in an "or" relationship. For example, A / B means: A or B. The term "and / or" is a description of the associated relationship of objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, the three relationships of A and B. The term "corresponding" may refer to an associated relationship or a binding relationship. A corresponding to B means that there is an associated relationship or a binding relationship between A and B.

[0058] Combined with Figure 1 As shown, this embodiment provides a sewage state recognition method based on image processing, including:

[0059] Step S01: Obtain real-time sewage images during the sewage treatment process at intervals;

[0060] Step S02: Preprocess each real-time sewage image to obtain each sewage feature image;

[0061] Step S03: Quantify and statistically analyze the differences in each sewage feature image to obtain the morphological changes of the particulate matter in the sewage;

[0062] Step S04: Determine the sewage treatment state according to the change situation of the particulate matter morphology.

[0063] In some embodiments, when treating sewage, a camera is used to capture the surface image of the sewage at preset time intervals to obtain real-time sewage images during the sewage treatment process.

[0064] Optionally, preprocessing each real-time sewage image to obtain each sewage feature image includes: performing grayscale processing on each real-time sewage image to obtain a sewage grayscale image; performing multi-region binary processing on each sewage grayscale image to obtain a sewage feature image.

[0065] In some embodiments, real-time sewage images are sent to an electronic device, and the existing software in the electronic device is used to grayscale each real-time sewage image to obtain a grayscale sewage image. Converting the real-time sewage image into a grayscale sewage image enables the pixel points in the image to retain only the brightness value as the pixel point, simplifies the image, thereby reducing the amount of calculation, improving the operation speed, and at the same time reducing the memory occupancy and enhancing the operation speed of the electronic device.

[0066] Optionally, multi-region binarization processing is performed on each grayscale sewage image to obtain a sewage feature image, including:

[0067] Each grayscale sewage image is divided into multiple regions, and binarization processing is respectively performed on each region to obtain a sewage feature image.

[0068] In some embodiments, there are a large number of particulate matters in the sewage, and there are sewage gaps between the particles. In the state where the sewage surface is evenly illuminated, the brightness of the sewage particles is similar, and the brightness of the sewage gaps is also similar, but the brightness difference between the particles and the sewage gaps is relatively large. Therefore, for a sewage image with uniform illumination, after being processed by the image grayscale module, image binarization is used for processing, and then an appropriate threshold is selected to set the sewage particles to the same brightness value and the sewage gaps to another same brightness value, so as to identify the particulate matters from the real-time sewage image. However, during the imaging process of the sewage surface in the actual production environment, when the camera takes pictures of the sewage, in order to clearly capture the sewage surface, auxiliary lighting is required, but the intensity of the sewage imaging area irradiated by the light is often inconsistent, resulting in the dark part of the strongly illuminated area being brighter than the bright part of the weakly illuminated area. For example, Figure 2 As shown, the brightness value of the dark part (the area within the circle) in the strongly illuminated area (upper left corner) is 171, while the brightness value of the bright part (the area within the circle) in the weakly illuminated area (right side) is 123. If the whole image is binarized, it cannot ensure that all the particulate matters in the sewage are set to the same brightness value and all the sewage gaps are set to another same brightness value, resulting in a low accuracy rate when identifying the particulate matters in the real-time sewage image.

[0069] In some embodiments, the real-time sewage image is divided into N×M (N≧6, M≧6) regions, such as Figure 3As shown, the real-time sewage image is divided into 8×6 small squares. Each small square represents the same area, and within the same area, the brightness of sewage particles is similar, and the brightness of sewage gaps is also similar. Then, binary calculation is performed on each area separately. Since the light-receiving intensity within the same area is similar, approaching a uniform light-receiving state, therefore, when performing binary calculation on each area, the sewage particles within the area can basically be set to the same brightness value, and the sewage gaps can be set to another same brightness value, which is more conducive to identifying the particles in the sewage, and further enables the accuracy of identifying the particles in the real-time sewage image to be improved in the actual production environment.

[0070] Optionally, when turning on the auxiliary lighting, it is necessary to make the light-receiving degree of the sewage imaging area as consistent as possible to further improve the accuracy of binary processing.

[0071] Optionally, the number of pixel points in the horizontal direction in a certain area is n (n>2), and the number of pixel points in the vertical direction is m (m>2). The pixel point P i,j has a brightness value of O i,j (1≤i≤n, 1≤j≤m). The average brightness value of the pixel points in each area is AVL, and the brightness value of the pixel point P i,j after binary calculation is L i,j . Performing binary processing on each area includes: performing binary calculation on each pixel point P i,j through the following formula to obtain the brightness value L i,j of each pixel point:

[0072]

[0073] In some embodiments, the present solution first calculates the average value of the pixels in the area, then subtracts a constant parameter C value from the average brightness value to obtain a comparison threshold, and then sets the pixel values greater than the comparison threshold to the maximum brightness value 255, and sets the pixel values less than or equal to the comparison threshold to the brightness value 0. In this way, the sewage grayscale image can be set to two brightness values of 0 (black) or 255 (white), presenting the entire image in a black-and-white state, which is more convenient for distinguishing the particle area and non-particle area of the sewage grayscale image and reducing the calculation amount.

[0074] In some embodiments, the preprocessing process of real-time sewage images is shown in the figures of Figure 4. In Figure 4, Figures (1) and (4) are two real-time sewage images taken at different times during the sewage treatment process. After grayscale processing of the images, the sewage grayscale images shown in Figures (2) and (5) are obtained respectively. Then, after multi-region binarization processing of the sewage grayscale images, the sewage feature images shown in Figures (3) and (6) are obtained respectively. It can be clearly seen from Figures (3) and (6) the sewage particulate matters in the two images. At the same time, by comparing Figures (3) and (6), it can be seen that the shapes and sizes of the particulate matters in the two images are different. And during the preprocessing process, since there are only two brightness values, 0 and 255, for the image pixel points, the system memory requirement is reduced and the processing speed is improved.

[0075] Optionally, quantize and statistically analyze the differences of each sewage feature image to obtain the morphological changes of the particulate matters in the sewage, including: obtaining the difference values of each pixel point in each sewage feature image; obtaining the average difference value of each sewage feature image according to the difference values of each pixel point; the average difference value is used to characterize the morphology of the particulate matter; obtaining the morphological changes of the particulate matters in the sewage according to each average difference value.

[0076] Optionally, obtaining the difference values of each pixel point in each sewage feature image includes: respectively obtaining the differences between each pixel point and its corresponding upper, lower, left, and right adjacent pixel points, and determining the sum of each difference as the difference value of each pixel point.

[0077] Optionally, the average difference value is obtained through the following formula:

[0078]

[0079] In the above formula, ADL is the average difference value, and L i,j is the brightness value of the pixel point at the i-th row and j-th column in the sewage feature image. The number of pixel points in the horizontal direction of the sewage feature image is n (n > 2), and the number of pixel points in the vertical direction is m (m > 2).

[0080] In some embodiments, the smaller the particulate matters in the sewage are, the more the number of sewage particulate matters in the entire sewage feature image is, and the more the number of sewage particulate matters is, the more the boundary edges between the sewage particulate matters and the gaps in the entire sewage feature image are. Thus, the smaller the sewage particulate matters are, the more the boundary edges between the sewage particulate matters and the gaps in the entire sewage feature image are, and the more the pixel points on the boundary edges are.

[0081] Combined with Figure 5As shown, through the above-mentioned image grayscale conversion and multi-region binarization processing, the real-time sewage image is converted into a sewage feature image, in which the sewage particles are unified into the same color and the sewage gaps are unified into another same color. Therefore, the pixel points inside the sewage particles and inside the gaps have the same brightness values as the pixel points adjacent to them above, below, left, and right. Thus, the difference between the pixel points inside the sewage particles and inside the gaps and the adjacent pixel points is small. For example, Figure 5 the pixel points 1 and 2 in it have the same brightness values as their adjacent pixel points, and the difference value is 0. However, for the pixel points on the boundary edge between the sewage particles and the gaps, compared with the pixel points adjacent to them above, below, left, and right, there are usually one or two points with different brightness values from them. Therefore, the difference value between the pixel points on the boundary edge and their adjacent pixel points is large. For example, Figure 5 in the pixel point 3 in it, there is one adjacent point with a different brightness value from it, and the pixel point 4 has two adjacent points with different brightness values from it.

[0082] Due to the irregularity of the shapes of the sewage particles and the large number of sewage particles in the sewage feature image, the probability that there are one or two adjacent pixel points with different brightness values from a pixel point on the boundary edge is basically the same. When the sewage particles are smaller, the number of pixel points on the boundary edge is larger, and the total difference value between all the pixel points in the entire sewage feature image and the pixel points adjacent to them above, below, left, and right is larger. Therefore, the average difference value between the pixel points in the entire sewage feature image and the adjacent pixel points is larger.

[0083] Combined with Figure 5 as shown, the pixel points in the sewage feature image have four adjacent pixel points above, below, left, and right. Usually, there may be 0, 1, or 2 adjacent pixel points with different brightness values from this pixel point. And in Figure 6 the pixel point 5 in it, the brightness value of this pixel point is different from the brightness values of the pixel points above, below, left, and right of it. Therefore, the number of different adjacent pixel points of the pixel point 5 is 4. The pixel point 5 belongs to free tiny particles. When the cohesion of the sewage particles is weaker, that is, when the sewage particles are smaller, the number of free tiny particles is larger. Therefore, it conforms to the setting that the smaller the sewage particles, the larger the difference value. Similarly, the number of different adjacent pixel points of the pixel points 6, 7, 8, and 9 is 3. The pixel points 6 and 7 form a free small particle. The smaller the sewage particles, the higher the probability of this combination; the pixel points 8 and 9 belong to a protrusion or depression of a pixel point generated on the edge of the sewage particles, and their appearance is random. Generally speaking, the smaller the sewage particles, the more pixel points with 3 different adjacent pixel points appear in the sewage feature image, which also conforms to the setting that the smaller the sewage particles, the larger the difference value.

[0084] As can be seen from the above, the smaller the sewage particulate matter is, the more pixel points there are on the junction edge and the greater the difference value is; conversely, the larger the sewage particulate matter is, the fewer pixel points there are on the junction edge and the smaller the difference value is. Therefore, the average difference value obtained from the difference values of all pixel points can reflect the size of the sewage particulate matter in the sewage characteristic image, so as to guide the sewage treatment system to identify the sewage state, control the dosage and application timing of the treatment agent, and achieve the purposes of reducing the human resource cost and the dosage cost of the agent.

[0085] Optionally, obtain the morphological changes of the particulate matter in the sewage according to the average difference values, including: sorting the sewage characteristic images in the order of the shooting time, and plotting the average difference values of each frame of the sewage characteristic images into a change curve of the particulate matter morphology according to the sorting.

[0086] In some embodiments, sort according to the shooting time order of the real-time sewage images corresponding to each frame of the sewage characteristic images, plot the average difference values corresponding to each frame of the sewage characteristic images into a curve graph according to the sorting, and judge the morphological changes of the particulate matter from the trend of the curve graph. The morphological changes of the particulate matter include continuously increasing, increasing first and then remaining unchanged, or increasing first, remaining unchanged, and then decreasing.

[0087] Optionally, determine the sewage treatment state according to the morphological changes of the particulate matter, including: when the particulate matter morphology continuously increases, determine the sewage treatment state as the first stage, and add the treatment agent to the sewage according to the preset dosage within the first stage; when the particulate matter morphology increases first and then remains unchanged, determine the sewage treatment state as the second stage, and reduce the dosage of the treatment agent added within the second stage; when the particulate matter morphology begins to decrease, determine the sewage treatment state as the third stage, and increase the dosage of the treatment agent added within the third stage.

[0088] In some embodiments, first determine the sewage treatment state according to the morphological changes of the particulate matter in the sewage. The sewage treatment state includes at least three stages, and then formulate an addition strategy for the treatment agent according to the sewage treatment state. In the first stage of sewage treatment, the particulate matter in the sewage will gradually agglomerate and increase with the continuous addition of the treatment agent, and the number of particles per unit space shows a trend from more to less. Therefore, the addition strategy for the treatment agent is to add the treatment agent to the sewage according to the preset dosage. In the second stage of sewage treatment, the sewage particles have increased to a certain extent, and the increase of the treatment agent cannot make the particles increase further. Therefore, the addition strategy for the treatment agent is to reduce the dosage of the treatment agent added and wait for a period of time before entering the third stage of sewage treatment. In the third stage, the sewage particulate matter shows a decreasing trend, and the addition strategy for the treatment agent is to increase the dosage of the treatment agent added. The dosage of the agent added in this stage does not need to be greater than the preset dosage in the first stage, and the sewage particulate matter will also re-agglomerate and increase.

[0089] In some embodiments, during the second stage, the addition amount of the treatment agent is reduced to 0, and the treatment agent is re-added during the third stage, further reducing the usage amount of the treatment agent.

[0090] In some embodiments, the process and results of experimental verification of this solution are as follows:

[0091] During the production process, a portion of industrial sewage is sampled for experimental verification. A chemical agent is manually added to the sewage for treatment. During this period, a high-frame-rate camera is used to capture images of the sewage, recording the images of the sewage particles growing from small to large, unable to grow further, and then shrinking again after stabilizing for a period of time when the addition of the chemical agent stops. A total of 92 images are obtained, forming a database of real-time sewage images. After observation, in images 1 to 55, the sewage particles gradually become coarser. After the 55th image, the size of the sewage particles is relatively stable and cannot grow further. The addition of the chemical agent stops after the 65th image, and a trend of shrinking sewage particles begins to form after the 81st image. During the sewage treatment process, the sewage is in a flowing state. In this experiment, a magnetic stirrer is used to drive the flow of the sewage. Since the flowing state will affect the change in the size of the sewage particles, and in addition, the treatment agent requires a certain reaction time, there will be a problem that the sewage particles at some shooting moments are smaller than those at the previous shooting moment during the process of the sewage particles growing larger, but generally, there is a trend of increasing in form. Similarly, when the sewage particles grow to a stable state, there will also be a problem of slight changes in the size of the sewage particles, but generally, the form size is in a stable state.

[0092] The above are the conclusions drawn from the observation. Using this solution to process 92 real-time sewage images, the difference mean corresponding to each real-time sewage image is obtained. These 92 difference means are plotted in sequence on a curve graph, obtaining a curve graph as Figure 7 shown. The abscissa is the corresponding image number, and the ordinate is the difference mean. As Figure 7 can be seen, the difference means gradually decrease from images 1 to 55, and the change in the difference means tends to be stable after the 55th image. The addition of the chemical agent stops after the 65th image, and a trend of gradually increasing difference means begins to form after the 81st image. The change in the size of the difference means is inversely proportional to the change in the size of the sewage particles in the above real-time sewage images, thus verifying the rationality and correctness of this solution, and at the same time verifying the influence of sewage flow and the reaction time of the treatment agent on the size of sewage particles.

[0093] In some embodiments, according to the above experimental process, starting from the 65th image when the addition of the chemical agent stops, until a gradually increasing trend appears after the 81st image and the addition of the chemical agent is resumed, calculating based on taking a photo once per second, the addition of the chemical agent stops 16 times. Comparing with the total 91 times of the addition amount of the chemical agent throughout the process, this solution saves at least 16 / 91 = 17.58% of the chemical agent.

[0094] Combined with Figure 8As shown in the figure, a sewage state recognition device based on image processing includes:

[0095] A sewage real-time image acquisition module 101, configured to acquire sewage real-time images during the sewage treatment process at intervals;

[0096] A sewage feature image acquisition module 102, configured to preprocess each sewage real-time image to obtain each sewage feature image;

[0097] A quantization statistical difference module 103, configured to perform quantization statistical differences on each sewage feature image to obtain the morphological changes of particulate matter in the sewage;

[0098] A sewage treatment state determination module 104, configured to determine the sewage treatment state according to the morphological changes of particulate matter.

[0099] Optionally, the sewage feature image acquisition module preprocesses each sewage real-time image to obtain each sewage feature image in the following manner:

[0100] A grayscale processing module, configured to perform grayscale processing on each sewage real-time image to obtain a sewage grayscale image;

[0101] A binarization processing module, configured to perform multi-region binarization processing on each sewage grayscale image to obtain a sewage feature image.

[0102] Optionally, the binarization processing module performs multi-region binarization processing on each sewage grayscale image to obtain a sewage feature image in the following manner:

[0103] Divide each sewage grayscale image into multiple regions, and perform binarization processing on each region respectively to obtain a sewage feature image.

[0104] Optionally, the quantization statistical difference module performs quantization statistical differences on each sewage feature image to obtain the morphological changes of particulate matter in the sewage in the following manner:

[0105] A difference value acquisition module, configured to acquire the difference values of each pixel point in each sewage feature image;

[0106] A difference mean value acquisition module, configured to acquire the difference mean value of each sewage feature image according to the difference values of each pixel point; the difference mean value is used to characterize the morphology of particulate matter;

[0107] A particulate matter morphology change acquisition module, configured to acquire the morphological changes of particulate matter in the sewage according to each difference mean value.

[0108] Optionally, the difference value acquisition module acquires the difference values of each pixel point in each sewage feature image in the following manner:

[0109] Obtain the differences between each pixel point and its corresponding upper, lower, left, and right adjacent pixel points respectively, and determine the sum of each difference as the difference value of each pixel point.

[0110] Optionally, the particulate matter morphology change acquisition module implements obtaining the particulate matter morphology change in the sewage according to each difference mean value in the following manner:

[0111] Sort the sewage characteristic images in the order of shooting time, and draw a change curve of the particulate matter morphology based on the difference means of each frame of sewage characteristic images according to the sorting.

[0112] The sewage treatment state determination module implements determining the sewage treatment state according to the particulate matter morphology change in the following manner, including:

[0113] When the particulate matter morphology continues to increase, determine that the sewage treatment state is the first stage, and add treatment agents to the sewage according to a preset addition amount within the first stage;

[0114] When the particulate matter morphology first increases and then remains unchanged, determine that the sewage treatment state is the second stage, and reduce the addition amount of treatment agents within the second stage;

[0115] When the particulate matter morphology begins to decrease, determine that the sewage treatment state is the third stage, and increase the addition amount of treatment agents within the third stage.

[0116] In some embodiments, an apparatus for identifying sewage state based on image processing includes a processor and a memory storing program instructions. The processor is configured to execute the method for identifying sewage state based on image processing as described above when running the program instructions.

[0117] In some embodiments, a sewage treatment device includes the apparatus for identifying sewage state based on image processing as described above.

[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered by the scope of the claims and the description of the present invention.

Claims

1. A sewage state recognition method based on image processing and quantitative statistical differences, characterized in that, Including: Intermittently obtaining real-time images of sewage during the sewage treatment process; Preprocessing each of the real-time sewage images to obtain respective sewage feature images; including: performing grayscale processing on each of the real-time sewage images to obtain grayscale sewage images; dividing each of the grayscale sewage images into multiple regions; respectively performing binarization processing on each region to obtain sewage feature images, where sewage particles in the sewage feature images are unified into the same color, and sewage gaps are unified into another same color; Performing quantitative statistical differences on each of the sewage feature images to obtain morphological changes of particles in the sewage; including: obtaining difference values of each pixel point in each of the sewage feature images; including: respectively obtaining differences between each pixel point and its corresponding upper, lower, left, and right adjacent pixel points, and determining the sum of each difference as the difference value of each pixel point; obtaining the difference mean value of each of the sewage feature images according to the difference values of each pixel point; the difference mean value is used to characterize the morphology of the particles; obtaining morphological changes of particles in the sewage according to each of the difference mean values; Determining the sewage treatment status according to the morphological changes of the particles.

2. The sewage state recognition method according to claim 1, characterized in that Obtaining morphological changes of particles in the sewage according to each of the difference mean values, including: Sorting each of the sewage feature images in the order of shooting time, and plotting the difference mean values of each frame of sewage feature images into a curve of morphological changes of particles according to the sorting.

3. The sewage state recognition method according to claim 1, characterized in that Determining the sewage treatment status according to the morphological changes of the particles, including: In the case where the particle morphology continuously becomes larger, determining the sewage treatment status as the first stage, and adding treatment agents to the sewage according to a preset addition amount within the first stage; In the case where the particle morphology first becomes larger and then remains unchanged, determining the sewage treatment status as the second stage, and reducing the addition amount of the treatment agent within the second stage; In the case where the particle morphology begins to become smaller, determining the sewage treatment status as the third stage, and increasing the addition amount of the treatment agent within the third stage.

4. A sewage state recognition device based on image processing and quantization statistical differences, characterized in that, For implementing the sewage state recognition method based on image processing and quantitative statistical differences according to any one of claims 1 to 3, including: A real-time sewage image acquisition module configured to intermittently acquire real-time images of sewage during the sewage treatment process; A sewage feature image acquisition module configured to preprocess each of the real-time sewage images to obtain respective sewage feature images; A quantitative statistical difference module configured to perform quantitative statistical differences on each of the sewage feature images to obtain morphological changes of particles in the sewage; A sewage treatment status determination module configured to determine the sewage treatment status according to the morphological changes of the particles.

5. A sewage state recognition device based on image processing and quantitative statistical differences, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to execute the sewage state recognition method based on image processing and quantitative statistical differences according to any one of claims 1 to 3 when running the program instructions.

6. A sewage treatment device, characterized in that, Including the sewage state recognition device based on image processing and quantitative statistical differences according to claim 4 or 5.

Citation Information

Patent Citations

  • Image feature extraction method and system for sewage treatment

    CN119723310A

Cited By

  • Sewage treatment flocculant feeding method and system

    CN121627166A