CN115294131A - Sewage treatment quality detection method and system - Google Patents
Sewage treatment quality detection method and system Download PDFInfo
- Publication number
- CN115294131A CN115294131A CN202211220233.3A CN202211220233A CN115294131A CN 115294131 A CN115294131 A CN 115294131A CN 202211220233 A CN202211220233 A CN 202211220233A CN 115294131 A CN115294131 A CN 115294131A
- Authority
- CN
- China
- Prior art keywords
- image
- sewage
- superpixel
- block
- degree
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 239000010865 sewage Substances 0.000 title claims abstract description 208
- 238000001514 detection method Methods 0.000 title claims abstract description 18
- 230000008859 change Effects 0.000 claims abstract description 100
- 238000000034 method Methods 0.000 claims abstract description 35
- 239000000701 coagulant Substances 0.000 claims abstract description 30
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Chemical compound O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims abstract description 30
- 239000008213 purified water Substances 0.000 claims abstract description 27
- 238000004364 calculation method Methods 0.000 claims description 15
- 239000000126 substance Substances 0.000 claims description 12
- 230000011218 segmentation Effects 0.000 claims description 10
- 230000009471 action Effects 0.000 claims description 8
- 238000004422 calculation algorithm Methods 0.000 claims description 8
- 238000012937 correction Methods 0.000 claims description 8
- 238000007781 pre-processing Methods 0.000 claims description 7
- 239000002351 wastewater Substances 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 6
- 230000006870 function Effects 0.000 claims description 6
- 239000011159 matrix material Substances 0.000 claims description 6
- 230000004048 modification Effects 0.000 claims description 4
- 238000012986 modification Methods 0.000 claims description 4
- 238000004065 wastewater treatment Methods 0.000 claims description 3
- 238000011109 contamination Methods 0.000 claims description 2
- 238000005259 measurement Methods 0.000 abstract description 2
- 238000012545 processing Methods 0.000 abstract description 2
- 230000000694 effects Effects 0.000 description 8
- 239000012535 impurity Substances 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 2
- 239000002244 precipitate Substances 0.000 description 2
- 241000287196 Asthenes Species 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000003912 environmental pollution Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- OVBPIULPVIDEAO-LBPRGKRZSA-N folic acid Chemical compound C=1N=C2NC(N)=NC(=O)C2=NC=1CNC1=CC=C(C(=O)N[C@@H](CCC(O)=O)C(O)=O)C=C1 OVBPIULPVIDEAO-LBPRGKRZSA-N 0.000 description 1
- 239000007788 liquid Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000001556 precipitation Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/761—Proximity, similarity or dissimilarity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of sewage treatment quality measurement, in particular to a sewage treatment quality detection method and system. The method comprises the steps of firstly, acquiring a sewage area image; and (3) carrying out data processing on the sewage area image, and acquiring a sewage treatment quality influence factor according to the change of the sewage surface image before and after the coagulant is added and the difference between the sewage surface image and the purified water image. The method realizes the representation of the sewage treatment quality through the change of the sewage surface image after the coagulant is added and the difference between the sewage and the purified water image, and improves the efficiency and the precision of the sewage treatment quality detection.
Description
Technical Field
The invention relates to the technical field of sewage treatment quality measurement, in particular to a sewage treatment quality detection method and system.
Background
Sewage treatment is a process of purifying sewage to meet the water quality requirement of discharging the sewage into a certain water body or reusing the sewage. Sewage treatment is widely applied to various fields such as buildings, agriculture, environmental protection and the like, and if the sewage treatment effect is poor, serious environmental pollution can be caused when the sewage is discharged. Therefore, the quality detection of sewage treatment is also more critical.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a method and a system for detecting the sewage treatment quality, and the adopted technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for detecting sewage treatment quality, including the following steps:
collecting a sewage image, and preprocessing the sewage image to obtain a sewage surface image;
acquiring a sewage area of a sewage surface image to obtain a sewage area image; dividing the sewage area image into a plurality of superpixel blocks by using a superpixel segmentation algorithm, and representing the dirty degree of the sewage through the gray difference between the sewage area image and the purified water image; acquiring an adjacent superpixel block in the vertical direction for any superpixel block, and calculating the similarity between the superpixel block and the adjacent superpixel block; obtaining the change degree of the super pixel block according to the similarity of the super pixel block and the adjacent super pixel block; acquiring front and back change information of a superpixel block in a sewage area image of an adjacent frame under the action of a coagulant, and correcting the change degree to obtain a corrected change degree; calculating the overall change degree of the sewage area image based on the correction change degree of each super pixel block; acquiring a sewage treatment quality influence factor according to the change of the sewage surface image before and after the coagulant is added and the difference between the sewage surface image and the purified water image;
and obtaining the sewage treatment quality index by combining the integral change degree and the sewage treatment quality influence factor.
Preferably, the preprocessing the sewage image to obtain the sewage surface image includes:
and carrying out gray level treatment on the sewage image by using a weighted gray level method to obtain a sewage surface image.
Preferably, the representing the degree of dirtiness of the sewage through the gray scale difference between the sewage area image and the purified water image includes:
the dirtiness is calculated by the formula:
wherein, the first and the second end of the pipe are connected with each other,degree of dirtiness;the average gray value of the image of the sewage area when no coagulant is added is shown,representing the average gray value of the purified water image;as a function of the maximum value.
Preferably, the acquiring, for any super pixel block, a super pixel block adjacent in the vertical direction, and calculating the similarity between the super pixel block and the adjacent super pixel block includes:
the calculation formula of the similarity is as follows:
wherein, the first and the second end of the pipe are connected with each other,is similarity;the probability that the gray co-occurrence matrix gray point pair (i, j) of the super pixel block Q appears is represented,represents a super pixel blockThe probability of occurrence of the gray-level co-occurrence matrix gray-level point pair (i, j),then respectively represent superpixel block Q and pairDirectly above adjacent superpixel block in the corresponding vertical directionAverage gray value within; e is a natural constant.
Preferably, the obtaining the degree of change of the super pixel block according to the similarity between the super pixel block and the adjacent super pixel block includes:
the calculation formula of the change degree is as follows:
wherein the content of the first and second substances,to varying degrees;show thatSuper pixel block Q and adjacent super pixel block right above in imageThe similarity of (a) to (b) is,show thatSuperpixel block Q and immediate downward Fang Linjin superpixel block in imageThe similarity of (a) to (b),show thatAdjacent frames of an imageSuper pixel block in imageAnd the immediately above neighboring super pixel blockThe similarity of (a) to (b),show thatAdjacent frames of an imageSuper pixel block in imageAnd right down Fang Linjin superpixel blockSimilarity of (c);as a function of the maximum value.
Preferably, the correcting the variation degree to obtain a corrected variation degree includes:
the calculation formula of the correction change degree is as follows:
wherein, the first and the second end of the pipe are connected with each other,to varying degrees;to correct the degree of change; m and k are statistical information of pixel point category change in the super pixel block;is a superpixel block Q andthe number of the common pixel points;indicating that the ith common pixel point is in the imageA gray value of (d);indicating that the ith common pixel point is in the imageThe gray-scale value of (a) above,is shown in the imageThe j-th neighborhood feature value of the ith shared pixel point,is shown in the imageThe j-th neighborhood feature value of the ith shared pixel point,to adjust the parameters.
Preferably, the calculating the overall degree of change of the sewage area image based on the corrected degree of change of each super pixel block includes:
the calculation formula of the overall change degree is as follows:
wherein, the first and the second end of the pipe are connected with each other,the degree of change is global; 400n represents the number of superpixels;coordinate information in the vertical direction of the seed point of the ith super-pixel block is represented;coordinate information in a vertical direction representing a center point of the image;indicating the extent of modification change for the ith superpixel block,the frame number corresponding to the image of the ith super pixel block is shown;the number of frames required when the sewage image is no longer changed is indicated.
Preferably, the acquiring of the sewage treatment quality influence factor according to the change of the sewage surface image before and after the coagulant addition and the difference with the purified water image comprises:
the calculation formula of the sewage treatment quality influence factor is as follows:
wherein the content of the first and second substances,is sewageProcessing the quality impact factor; e is a natural constant;the degree of dirtiness before sewage treatment;is the dirtiness degree after sewage treatment.
Preferably, the step of obtaining the sewage treatment quality index by combining the overall change degree and the sewage treatment quality influence factor comprises the following steps:
and multiplying the integral change degree by the sewage treatment quality influence factor to obtain a sewage treatment quality index.
In a second aspect, an embodiment of the present invention provides a sewage treatment quality detection system, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned sewage treatment quality detection method when executing the computer program.
The embodiment of the invention at least has the following beneficial effects:
firstly, collecting a sewage image, and preprocessing the sewage image to obtain a sewage surface image; acquiring a sewage area of a sewage surface image to obtain a sewage area image; dividing the sewage area image into a plurality of superpixel blocks by using a superpixel segmentation algorithm, and representing the dirty degree of the sewage through the gray difference between the sewage area image and the purified water image; acquiring an adjacent superpixel block in the vertical direction for any superpixel block, and calculating the similarity between the superpixel block and the adjacent superpixel block; obtaining the change degree of the super pixel block according to the similarity of the super pixel block and the adjacent super pixel block; acquiring front and back change information of a superpixel block in an adjacent frame sewage area image under the action of a coagulant, and correcting the change degree to obtain a corrected change degree; calculating the overall change degree of the sewage area image based on the correction change degree of each super pixel block; acquiring a sewage treatment quality influence factor according to the change of the sewage surface image before and after the coagulant is added and the difference between the sewage surface image and the purified water image; and obtaining the sewage treatment quality index by combining the integral change degree and the sewage treatment quality influence factor.
The quality of sewage treatment is represented by the change of the image on the surface of the sewage after the coagulant is added and the difference between the image of the sewage and the image of the purified water, so that the efficiency and the precision of the detection of the quality of the sewage treatment are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flow chart of a method for detecting the quality of sewage treatment according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given to a method and a system for detecting the quality of sewage treatment according to the present invention, and the specific implementation, structure, characteristics and effects thereof with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
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.
The embodiment of the invention provides a specific implementation method of a sewage treatment quality detection method and system, and the method is suitable for a scene that sewage generated by factory production needs sewage treatment quality detection.
The following describes a specific scheme of a sewage treatment quality detection method and system provided by the invention in detail with reference to the accompanying drawings.
Referring to fig. 1, a flow chart of steps of a method for detecting quality of wastewater treatment according to an embodiment of the present invention is shown, the method including the following steps:
and S100, acquiring a sewage image, and preprocessing the sewage image to obtain a sewage surface image.
In the invention, sewage is collected by a transparent container, and a fixed light source is used for collecting a sewage surface image and a continuous multi-frame sewage surface image added with a coagulant by an industrial camera, wherein the images are respectively recorded as a,…In whichCorresponding to the surface image of the sewage without adding the coagulant,correspondingly, the image is the image when the sewage image is not changed any more when the coagulant is added, and the acquired image is the front view of the measuring cylinder and is an RGB image. And (4) carrying out gray level treatment on the sewage image by using a weighted gray level method to obtain a sewage surface image. Weighted graying is a well-known technique and will not be described in detail herein.
Thus, a surface image of the wastewater was obtained.
S200, dividing the sewage area image into a plurality of superpixel blocks by using a superpixel segmentation algorithm, and representing the dirty degree of the sewage through the gray difference between the sewage area image and the purified water image; acquiring an adjacent superpixel block in the vertical direction for any superpixel block, and calculating the similarity between the superpixel block and the adjacent superpixel block; obtaining the change degree of the super pixel block according to the similarity of the super pixel block and the adjacent super pixel block; acquiring front and back change information of a superpixel block in a sewage area image of an adjacent frame under the action of a coagulant, and correcting the change degree to obtain a corrected change degree; calculating the overall change degree of the sewage area image based on the correction change degree of each super pixel block; and acquiring a sewage treatment quality influence factor according to the change of the sewage surface image before and after the coagulant is added and the difference between the sewage surface image and the purified water image.
After the coagulant is added, impurities in the sewage are combined with the coagulant to form floccules and precipitate to the bottom, so that the method uses a superpixel segmentation algorithm for sewage area images, analyzes the change of sewage surface images and the difference between the sewage surface images before and after treatment and purified water images to obtain a sewage treatment quality influence factor.
And acquiring a sewage area of the sewage surface image to obtain a sewage area image. In the present invention, (b) obtaining the surface image of the wastewater) And (4) segmenting the surface image of the sewage obtained in the measuring cylinder as the foreground and the rest of the area as the background by using an Otsu threshold segmentation method to obtain the image of the sewage area. The Otsu threshold segmentation method is a well-known technique and will not be described herein.
A superpixel segmentation algorithm is used for the sewage area image, the sewage is segmented into K superpixel blocks by presetting K =400, the superpixel segmentation algorithm is a known technology, and details are not repeated here. The above steps are also carried out on the sewage images at different moments, and 400 superpixel blocks can be obtained. The superpixel blocks on the two images can correspond to one another, and the specific process is as follows: image of sewage areaThe first line and the first superpixel block correspond to the sewage area imageThe first row, the first superpixel block, and so on.
According to the priori knowledge, the purified water is usually transparent liquid and has a large gray value, the surface of the sewage is usually dirty due to various objects such as impurities, the gray value is low, namely the surfaces of the purified water and the sewage have a certain gray value difference, so that the dirty degree Y of the sewage is represented by the gray value difference, namely the dirty degree of the sewage is represented by the gray value difference between the sewage area image and the purified water image.
The degree of dirtiness is calculated by:
wherein the content of the first and second substances,a degree of dirtiness;the average gray value of the image of the sewage area without coagulant addition is shown,representing the average gray value of the purified water image;as a function of the maximum value. The larger the Y value, the more turbid the waste water becomes, and the greater the degree of contamination becomes.
After the coagulant is added to the sewage, impurities in the sewage are combined with the coagulant and gradually precipitate, and the impurities are gradually separated from the water, so that the gray value of the pixel points of the superpixel blocks in the vertical direction also changes, the higher the gray value of the superpixel blocks is, the closer the superpixel blocks are to the purified water, the larger the gray value is, the more serious the impurity accumulation of the superpixel blocks below is, and the smaller the gray value is. Therefore, the change process is analyzed to obtain the change degree of the superpixel block, thereby representing the treatment effect of the coagulant and obtaining the sewage treatment quality influence factor.
Taking superpixel block Q as an example, inObtaining adjacent superpixel blocks in the vertical direction on the gray map, at least two superpixel blocks exist in the vertical direction of the superpixel block Q, and the superpixel block positioned right above the superpixel block Q is recorded asThe super pixel block located right below it is denoted asThen Q and Q can be calculated separately,The similarity XS between, here the formula is denoted Q,for example, for a super pixel block Q,respectively acquiring gray level co-occurrence matrices (gray levels are compressed into 16 levels, and the values of the gray level co-occurrence matrices are normalized), wherein the method for acquiring the gray level co-occurrence matrices is a known technology, and is not described herein again, and there are. For any super-pixel block, an adjacent super-pixel block in the vertical direction is acquired, and the similarity between the super-pixel block and the adjacent super-pixel block is calculated.
The similarity is calculated by the formula:
wherein the content of the first and second substances,is similarity;the probability that the gray co-occurrence matrix gray point pair (i, j) of the super pixel block Q appears is represented,represents a super pixel blockThe probability of occurrence of the gray point pair (i, j) of the gray co-occurrence matrix of (a),respectively, the superpixel block Q and the corresponding vertically immediately above neighboring superpixel block Q are representedAverage gray value within; e is a natural constant.
Difference value thereofThe smaller the size, the greater the similarity between two super pixel blocks,respectively represent superpixel block Q and superpixel blockThe average gray value of the inner.
Then to the adjacent frame imagePerforming association acquisition of superpixel blocks, and acquiring superpixel blocks QCorresponding superpixel blocks on an image,,Corresponding super pixel blocks are respectively,. For superpixel block,Can also calculate according to the stepsAccording to the above steps, the method can be obtained,,,Therefore, the variation degree BY of the superpixel block Q can be obtained. And obtaining the change degree of the super pixel block according to the similarity of the super pixel block and the adjacent super pixel block.
The calculation formula of the degree of change is:
wherein the content of the first and second substances,to varying degrees;show thatSuper pixel block Q and adjacent super pixel block right above in imageThe similarity of (a) to (b) is,show thatSuper pixel block Q and immediate downward Fang Linjin super pixel block in imageThe similarity of (a) to (b),show thatAdjacent frames of an imageSuper pixel block in imageAnd the directly above adjacent super pixel blockThe similarity of (a) to (b) is,show thatAdjacent frames of an imageSuper pixel block in imageAnd right down Fang Linjin superpixel blockSimilarity of (c);as a function of the maximum value.
The larger BY is, the better the treatment effect is under the action of the coagulant. However, the BY only considers the similarity change information of adjacent superpixel blocks on the adjacent frame images, and ignores the change information of the superpixel blocks, so that the BY evaluation is not complete. Therefore, the superpixel block Q and the superpixel block are aligned hereAnalyzing to obtain the change information of the superpixel block in the front and back of the adjacent frame images under the action of the coagulant, correcting the BY value to obtain the corrected change degree。
Firstly, a superpixel block Q and a superpixel block are obtainedThe number of pixels in the table is recorded as,. By comparison,Of (3) then the superpixel block Q andthe larger of the two (e.g., the superpixel Q is larger, i.e., the size of the superpixel Q is selected as the example)>) Then, the pixel points in the superpixel block can be determined, taking the pixel point Q in the superpixel block Q as an example, let m =0 and k =0. Firstly, the q points are subjected to image coordinate acquisition, which is expressed as (,) If the Q point belongs to a super-pixel block Q, thenThe pixels with the same coordinates in the image do not belong to the superpixel blockIf m = m +1, otherwise m = m, the judgment is carried out on all the pixels in the superpixel block Q, and the superpixel blocks are judged in the same wayThe inner pixel point is also judged, if the pixel point belongs to the superpixel blockAnd the same coordinate corresponds toAnd when the pixel point in the image does not belong to the super pixel block Q, k = k +1, otherwise k = k. When the Q point belongs to both the superpixel block Q and the superpixel blockIn the process, the q point is subjected to the acquisition of 3*3 neighborhood, and then the q point can be acquiredNeighborhood eigenvalues of pointsWhereinExpressing the gray value of the ith pixel point in the q point neighborhood, wherein the clockwise included angle between the straight line formed by the pixel point and the q point and the horizontal straight line is,The gray value of the pixel point Q in the superpixel block Q is represented. According to the superpixel block Q andthe change degree of the common pixel points and the change degree of the super pixel blocks are corrected by m, k, and then the change degree of the super pixel blocks is obtained. And acquiring front and back change information of the superpixel block in the adjacent frame sewage area image under the action of a coagulant, and correcting the change degree to obtain the corrected change degree.
The calculation formula of the correction change degree is as follows:
wherein, the first and the second end of the pipe are connected with each other,to varying degrees;to correct the degree of change; m and k are statistical information of the change of pixel point types in the super pixel block;is a superpixel block Q andthe number of the common pixel points;indicating the ith common pixel point in the imageUpper gray value;indicating that the ith common pixel point is in the imageThe gray-scale value of (a) above,is shown in the imageThe j-th neighborhood feature value of the ith shared pixel point,is shown in the imageThe j-th neighborhood feature value of the ith shared pixel point,to adjust the parameters.
Wherein m and k are statistical information of the change of the pixel point category in the super pixel block, the larger the value is, the larger the change degree is,to adjust the parameters, a very small positive number is used, preventing the denominator from being 0.The larger the size, the more effective the treatment of wastewater.
Analyzing the adjacent images according to the steps, and then each super-pixel block in each image has the corresponding super-pixel blockValue, so that the overall degree of change can be calculated. And calculating the overall change degree of the sewage area image based on the corrected change degree of each super-pixel block.
The calculation formula of the overall change degree is as follows:
wherein the content of the first and second substances,the degree of change is global; 400n represents the number of superpixels;coordinate information in the vertical direction of the seed point of the ith super-pixel block is represented;coordinate information in a vertical direction representing a center point of the image;indicating the extent of modification change for the ith superpixel block,the frame number corresponding to the image of the ith super pixel block is shown;the number of frames required when the sewage image is no longer changed is indicated.
The number of the collected images is n +1, each image has 400 super-pixel blocks, and the last image does not have a subsequent adjacent frame image, so that the calculation is not performed here.Coordinate information in the vertical direction of the seed point of the ith superpixel block is shown,indicating coordinate information in the vertical direction of the center point of the imageThe larger the difference is, the more the superpixel block is located above or below, the more the change degree can reflect the sewage treatment effect, so the larger weight is given.The smaller the change in the superpixel block at this time, the more important the degree of change at the beginning of the precipitation, and the greater the weight given thereto,the larger the size, the better the effect of the sewage treatment.
Then according to the above-mentioned steps, forThe corresponding image and the purified water image are calculated again to obtain the dirtiness degreeThen, the sewage treatment quality influence factor U can be obtained. Acquiring a sewage treatment quality influence factor according to the change of the surface image of the sewage before and after adding the coagulant and the difference between the surface image and the purified water image
The calculation formula of the sewage treatment quality influence factor is as follows:
wherein the content of the first and second substances,is a sewage treatment quality influence factor; e is a natural constant;the degree of dirt before sewage treatment;is the dirtiness degree after the sewage treatment. The larger the value of the sewage treatment quality influence factor is, the better the sewage treatment effect is.
Thus, the influence index of the sewage treatment quality is obtained.
And step S300, combining the overall change degree and the sewage treatment quality influence factor to obtain a sewage treatment quality index.
According to the steps, the influence indexes of the sewage treatment quality are obtained: a sewage treatment quality influencing factor. Therefore, the sewage treatment quality index R is obtained by combining the overall change degree and the sewage treatment quality influence factor. Specifically, the method comprises the following steps: and multiplying the integral change degree by the sewage treatment quality influence factor to obtain a sewage treatment quality index. The higher the index value of the sewage treatment quality is, the better the sewage treatment quality is.
In summary, the method comprises the steps of firstly collecting a sewage image, and preprocessing the sewage image to obtain a sewage surface image; acquiring a sewage area of a sewage surface image to obtain a sewage area image; dividing the sewage area image into a plurality of superpixel blocks by using a superpixel segmentation algorithm, and representing the dirty degree of the sewage through the gray difference between the sewage area image and the purified water image; acquiring an adjacent superpixel block in the vertical direction for any superpixel block, and calculating the similarity between the superpixel block and the adjacent superpixel block; obtaining the change degree of the super pixel block according to the similarity of the super pixel block and the adjacent super pixel block; acquiring front and back change information of a superpixel block in an adjacent frame sewage area image under the action of a coagulant, and correcting the change degree to obtain a corrected change degree; calculating the overall change degree of the sewage area image based on the correction change degree of each superpixel block; acquiring a sewage treatment quality influence factor according to the change of the sewage surface image before and after the coagulant is added and the difference between the sewage surface image and the purified water image; and obtaining the sewage treatment quality index by combining the integral change degree and the sewage treatment quality influence factor.
A sewage treatment quality detection system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the method when executing the computer program. Since a sewage treatment quality detection method is described in detail above, it is not described again.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. The processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. A sewage treatment quality detection method is characterized by comprising the following steps:
collecting a sewage image, and preprocessing the sewage image to obtain a sewage surface image;
acquiring a sewage area of a sewage surface image to obtain a sewage area image; dividing the sewage area image into a plurality of superpixel blocks by using a superpixel segmentation algorithm, and representing the dirty degree of the sewage through the gray difference between the sewage area image and the purified water image; acquiring an adjacent superpixel block in the vertical direction for any superpixel block, and calculating the similarity between the superpixel block and the adjacent superpixel block; obtaining the change degree of the super pixel block according to the similarity of the super pixel block and the adjacent super pixel block; acquiring front and back change information of a superpixel block in a sewage area image of an adjacent frame under the action of a coagulant, and correcting the change degree to obtain a corrected change degree; calculating the overall change degree of the sewage area image based on the correction change degree of each super pixel block; acquiring a sewage treatment quality influence factor according to the change of the sewage surface image before and after the coagulant is added and the difference between the sewage surface image and the purified water image;
and obtaining the sewage treatment quality index by combining the integral change degree and the sewage treatment quality influence factor.
2. The method for detecting the sewage treatment quality according to claim 1, wherein the preprocessing the sewage image to obtain the sewage surface image comprises:
and carrying out gray level treatment on the sewage image by using a weighted gray level method to obtain a sewage surface image.
3. The method of claim 1, wherein the step of characterizing the degree of contamination of the wastewater by the difference between the gray levels of the image of the wastewater region and the image of the purified water comprises:
the dirtiness level is calculated by the formula:
4. The wastewater treatment quality detection method according to claim 1, wherein the acquiring of the neighboring superpixel blocks in the vertical direction for any superpixel block, and the calculating of the similarity between the superpixel block and the neighboring superpixel block comprise:
the calculation formula of the similarity is as follows:
wherein the content of the first and second substances,is similarity;a gray co-occurrence matrix gray point pair (i,j) The probability of occurrence of the event is determined,representing a superpixel blockThe probability of occurrence of the gray point pair (i, j) of the gray co-occurrence matrix of (a),respectively, the superpixel Q and the corresponding vertically immediately above neighboring superpixel blockAverage gray value within; e is a natural constant.
5. The method of claim 1, wherein the obtaining the degree of change of the superpixel block according to the similarity between the superpixel block and the neighboring superpixel block comprises:
the calculation formula of the change degree is as follows:
wherein the content of the first and second substances,to varying degrees;show thatSuper pixel block Q and adjacent super pixel block right above in imageThe similarity of (a) to (b) is,show thatSuperpixel block Q and immediate downward Fang Linjin superpixel block in imageThe similarity of (a) to (b) is,show thatAdjacent frames of an imageSuper pixel block in imageAnd the directly above adjacent super pixel blockThe similarity of (a) to (b),show thatAdjacent frames of an imageSuper pixel block in imageAnd right down Fang Linjin superpixel blockThe similarity of (c);as a function of the maximum value.
6. The method for detecting sewage treatment quality according to claim 1, wherein the correcting the variation degree to obtain a corrected variation degree comprises:
the calculation formula of the correction change degree is as follows:
wherein the content of the first and second substances,to varying degrees;to correct the degree of change; m and k are statistical information of the change of pixel point types in the super pixel block;is a superpixel block Q andthe number of the common pixel points;indicating that the ith common pixel point is in the imageA gray value of (d);indicating that the ith common pixel point is in the imageThe gray-scale value of (a) above,is shown in the imageThe j-th neighborhood feature value of the ith shared pixel point,is shown in the imageThe jth neighborhood feature value of the ith common pixel point,to adjust the parameters.
7. The method of claim 1, wherein the calculating of the overall degree of change of the wastewater region image based on the corrected degree of change of each superpixel block comprises:
the calculation formula of the overall change degree is as follows:
wherein the content of the first and second substances,the degree of change is global; 400n represents the number of superpixels;coordinate information in the vertical direction of the seed point of the ith super-pixel block is represented;coordinate information in a vertical direction representing a center point of the image;indicating the extent of modification change for the ith superpixel block,the frame number corresponding to the image of the ith super pixel block is shown;the number of frames required when the sewage image is no longer changed is indicated.
8. The sewage treatment quality detection method according to claim 1, wherein the obtaining of the sewage treatment quality influence factor based on the change of the image of the surface of the sewage before and after the addition of the coagulant and the difference from the image of the purified water comprises:
the calculation formula of the sewage treatment quality influence factor is as follows:
9. The method of claim 1, wherein the step of combining the overall variation degree and the sewage treatment quality influencing factor to obtain the sewage treatment quality index comprises:
and multiplying the integral change degree by the sewage treatment quality influence factor to obtain a sewage treatment quality index.
10. A wastewater treatment quality detection system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program performs the steps of the method of any one of claims 1~9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211220233.3A CN115294131A (en) | 2022-10-08 | 2022-10-08 | Sewage treatment quality detection method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211220233.3A CN115294131A (en) | 2022-10-08 | 2022-10-08 | Sewage treatment quality detection method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115294131A true CN115294131A (en) | 2022-11-04 |
Family
ID=83834783
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211220233.3A Pending CN115294131A (en) | 2022-10-08 | 2022-10-08 | Sewage treatment quality detection method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115294131A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022001571A1 (en) * | 2020-06-29 | 2022-01-06 | 南京巨鲨显示科技有限公司 | Computing method based on super-pixel image similarity |
CN114882031A (en) * | 2022-07-11 | 2022-08-09 | 江苏瑞立环保工程股份有限公司 | Sewage treatment method and system based on activated sludge process |
CN114882040A (en) * | 2022-07-12 | 2022-08-09 | 山东中治环境工程设备有限公司 | Sewage treatment detection method based on template matching |
CN115049665A (en) * | 2022-08-16 | 2022-09-13 | 南通森田消防装备有限公司 | Fire hose surface quality detection method and system based on image processing |
-
2022
- 2022-10-08 CN CN202211220233.3A patent/CN115294131A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022001571A1 (en) * | 2020-06-29 | 2022-01-06 | 南京巨鲨显示科技有限公司 | Computing method based on super-pixel image similarity |
CN114882031A (en) * | 2022-07-11 | 2022-08-09 | 江苏瑞立环保工程股份有限公司 | Sewage treatment method and system based on activated sludge process |
CN114882040A (en) * | 2022-07-12 | 2022-08-09 | 山东中治环境工程设备有限公司 | Sewage treatment detection method based on template matching |
CN115049665A (en) * | 2022-08-16 | 2022-09-13 | 南通森田消防装备有限公司 | Fire hose surface quality detection method and system based on image processing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114972329B (en) | Image enhancement method and system of surface defect detector based on image processing | |
CN115829883B (en) | Surface image denoising method for special-shaped metal structural member | |
CN109785291B (en) | Lane line self-adaptive detection method | |
CN111583227B (en) | Method, device, equipment and medium for automatically counting fluorescent cells | |
CN115131354B (en) | Laboratory plastic film defect detection method based on optical means | |
CN109540917B (en) | Method for extracting and analyzing yarn appearance characteristic parameters in multi-angle mode | |
CN110648330B (en) | Defect detection method for camera glass | |
CN116310845B (en) | Intelligent monitoring system for sewage treatment | |
CN109472779A (en) | A kind of yarn appearance characteristic parameter extraction and analysis method based on morphosis | |
CN115082465B (en) | Wool and cashmere classification method based on scanning electron microscope image processing | |
CN115359053A (en) | Intelligent detection method and system for defects of metal plate | |
CN111178193A (en) | Lane line detection method, lane line detection device and computer-readable storage medium | |
CN112101352A (en) | Underwater alumen ustum state identification method and monitoring device, computer equipment and storage medium | |
CN116416252A (en) | Method for detecting sedimentation image of wastewater in boehmite production process | |
CN116883408A (en) | Integrating instrument shell defect detection method based on artificial intelligence | |
CN114742785A (en) | Hydraulic joint cleanliness control method based on image processing | |
CN116778431B (en) | Automatic sludge treatment monitoring method based on computer vision | |
CN117853484A (en) | Intelligent bridge damage monitoring method and system based on vision | |
CN115294131A (en) | Sewage treatment quality detection method and system | |
CN111882549A (en) | Automatic detection and identification method and system for grayish green small foreign fibers | |
CN114862765B (en) | Cell layered image processing method | |
CN114742849B (en) | Leveling instrument distance measuring method based on image enhancement | |
CN115471537A (en) | Monocular camera-based moving target distance and height measuring method | |
CN113763404B (en) | Foam image segmentation method based on optimization mark and edge constraint watershed algorithm | |
CN115546799A (en) | Backlight-free water meter liquid crystal display screen display number identification method under poor lighting condition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |