Disclosure of Invention
The invention provides a visual detection method for acrylic emulsion production wastewater, aiming at improving the accuracy of visual detection for acrylic emulsion production wastewater.
In order to achieve the above object, the present invention provides a visual inspection method for acrylic emulsion production wastewater, the method comprising:
preprocessing an RGB image of an acrylic emulsion production wastewater flocculation tank to obtain a target gray image;
counting the total number of pixel points and the number of pixel black points in a pixel window based on the binarized image of the target gray level image, and determining the flocculation degree of the corresponding pixel window based on the total number of pixel points and the number of pixel black points;
obtaining curvature of edge pixel points of the target gray level image and the flocculation degree to determine flocculation confidence, and correcting the flocculation confidence to obtain a flocculation confidence correction value;
determining flocculation block density of a pixel window based on the flocculation confidence correction value, the Euclidean distance of non-edge pixel points of the target gray level image and the size of the pixel window, calculating flocculation distances among the pixel points based on the flocculation block densities of adjacent flocculation blocks, and obtaining normalized flocculation distances of the flocculation distances;
determining the membership degree of the pixel points based on the normalized flocculation distance from the pixel points in the pixel window to the clustering center by using the FCM algorithm, and determining the flocculation condition of the flocculation tank of the acrylic acid emulsion production wastewater based on the membership degree of each pixel point.
Optionally, the preprocessing the RGB image of the acrylic emulsion production wastewater flocculation tank to obtain the target gray image comprises the following steps:
an RGB image of an acrylic emulsion production wastewater flocculation tank is obtained through a camera;
cutting the RGB image, reserving an inner area of a flocculation tank, and obtaining a target RGB image;
performing gray level conversion on the target RGB image to obtain a gray level image;
and denoising, sharpening and enhancing the gray level image to obtain a target gray level image.
Optionally, the counting the total number of pixels and the number of the black pixels in the pixel window based on the binarized image of the target gray image, and determining the flocculation degree of the corresponding pixel window based on the total number of pixels and the number of the black pixels includes:
acquiring a binarized image of the target gray level image based on an Ojin threshold method;
constructing a pixel window with a preset size for the pixel points of the binarized image;
counting the total number of pixel points and the number of pixel black points of each pixel window;
and determining the ratio of the number of the pixel black points to the total number of the pixel points as the flocculation degree of the corresponding pixel window.
Optionally, the curvature of the edge pixel point for obtaining the target gray level image and the flocculation degree determine flocculation confidence, and correct the flocculation confidence, and obtaining a flocculation confidence correction value includes:
performing edge detection on the target gray level image to obtain a plurality of edges, performing curve fitting on each edge, and determining flocculation confidence of a pixel window based on curvature of each pixel point on the edge and the flocculation degree;
and correcting the flocculation confidence based on the edge breakpoint tightness index to obtain a flocculation confidence correction value.
Optionally, the performing edge detection on the target gray level image to obtain a plurality of edges, performing curve fitting on each edge, and determining the flocculation confidence of the pixel window based on the curvature of each pixel point on the edge and the flocculation degree includes:
performing edge detection on the target gray level image to obtain a plurality of edges, and establishing an edge pixel point set of pixel points on the edges;
performing curve fitting on each edge to obtain a curve equation of each edge;
obtaining the curvature of each pixel point on each edge based on a curvature solving formula, and calculating the curvature average value of each edge;
and calculating the sum of curvature average values of all edges in the pixel window, and determining the product of the sum of the curvature average values and the flocculation degree of the pixel window as the flocculation confidence of the corresponding pixel window.
Optionally, before the correcting the flocculation confidence based on the edge breakpoint tightness index to obtain a flocculation confidence correction value, the method further includes:
selecting edge break points from the edge pixel point set, wherein eight neighborhoods of the edge break points have and only have points on the same edge;
calculating a first Euclidean distance between every two edge break points in the pixel window;
and determining the edge breakpoint tightness index of the corresponding pixel window based on the total number of edge breakpoints in the pixel window and each first Euclidean distance.
Optionally, the determining the flocculation block density of the pixel window based on the flocculation confidence correction value, the euclidean distance of the non-edge pixels of the target gray scale image, and the size of the pixel window, calculating the flocculation distance between pixels based on the flocculation block densities of adjacent flocculation blocks, and obtaining the normalized flocculation distance of the flocculation distance comprises:
performing corner detection on the target gray image to obtain a corner in the target gray image;
acquiring non-edge pixel points in the corner points, and calculating a second Euclidean distance of every two non-edge pixel points;
calculating a flocculation block density of the pixel window based on the pixel window size, the second euclidean distance, and the flocculation confidence correction value;
and calculating flocculation distances among the pixel points based on flocculation block densities of adjacent flocculation blocks in the pixel window, and normalizing the flocculation distances to obtain normalized flocculation distances.
Optionally, determining the membership degree of the pixel points by using the FCM algorithm based on the normalized flocculation distance from the pixel points to the clustering center in the pixel window, and determining the flocculation condition of the flocculation tank of the acrylic emulsion production wastewater based on the membership degree of each pixel point includes:
classifying and determining an initial cluster center based on the initialized membership;
updating the initialization membership based on the initial clustering center and the normalized flocculation distance from the pixel point to the clustering center, determining the iteration end when a minimum target initial function is obtained, and storing the membership of each pixel point;
dividing a target gray level image into a complete flocculation area, a preliminary flocculation area and a water surface, screening out target pixel points belonging to the complete flocculation area based on membership, and determining the area of the complete flocculation area based on the target pixel points;
and when the area ratio of the complete flocculation area is larger than or equal to the threshold value, determining that the flocculation of the acrylic emulsion production wastewater flocculation tank is complete.
Compared with the prior art, the visual detection method for the acrylic emulsion production wastewater provided by the invention comprises the following steps: preprocessing an RGB image of an acrylic emulsion production wastewater flocculation tank to obtain a target gray image; counting the total number of pixel points and the number of pixel black points in a pixel window based on the binarized image of the target gray level image, and determining the flocculation degree of the corresponding pixel window based on the total number of pixel points and the number of pixel black points; obtaining curvature of edge pixel points of the target gray level image and the flocculation degree to determine flocculation confidence, and correcting the flocculation confidence to obtain a flocculation confidence correction value; determining flocculation block density of a pixel window based on the flocculation confidence correction value, the Euclidean distance of non-edge pixel points of the target gray level image and the size of the pixel window, calculating flocculation distances among the pixel points based on the flocculation block densities of adjacent flocculation blocks, and obtaining normalized flocculation distances of the flocculation distances; determining the membership degree of the pixel points based on the normalized flocculation distance from the pixel points in the pixel window to the clustering center by using the FCM algorithm, and determining the flocculation condition of the flocculation tank of the acrylic acid emulsion production wastewater based on the membership degree of each pixel point. Therefore, the edge and the pixel points are obtained from the gray level image of the flocculation tank are analyzed, FCM classification is carried out based on the normalized flocculation distance from the pixel points to the clustering center, and the membership degree of each pixel point belonging to each region is obtained, so that the accurate flocculation condition of the flocculation tank is obtained, and the accuracy of visual detection of the acrylic emulsion production wastewater is improved.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic flow chart of a visual inspection method for acrylic emulsion production wastewater according to a first embodiment of the present invention.
As shown in fig. 1, a first embodiment of the present invention provides a visual inspection method for acrylic emulsion production wastewater, which includes:
s101, preprocessing an RGB image of an acrylic emulsion production wastewater flocculation tank to obtain a target gray image;
specifically, an RGB image of an acrylic emulsion production wastewater flocculation tank is obtained through a camera; cutting the RGB image, reserving an inner area of a flocculation tank, and obtaining a target RGB image; performing gray level conversion on the target RGB image to obtain a gray level image; and denoising, sharpening and enhancing the gray level image to obtain a target gray level image.
A CMOS (Complementary Metal Oxide Semiconductor ) camera is arranged above the acrylic emulsion production wastewater flocculation tank in advance, under the condition of sufficient illumination, the flocculation tank is integrally shot and flocculated Chi Quanmao in a overlook view angle, an RGB image of the acrylic emulsion production wastewater flocculation tank is obtained, target identification and cutting are carried out on the RGB image, the inner area of the flocculation tank is identified, cutting is carried out, and only the inner area of the flocculation tank is reserved, so that a target RGB image is obtained. And carrying out gray level image conversion on the target RGB image based on a gray level value average method to obtain a gray level image, carrying out denoising treatment on the gray level image based on bilateral filtering, carrying out sharpening treatment on the image by using a Laplacian operator, and enhancing flocculation details in a wastewater pool to obtain the target gray level image.
Step S102, counting the total number of pixel points and the number of pixel black points in a pixel window based on the binarized image of the target gray level image, and determining the flocculation degree of the corresponding pixel window based on the total number of pixel points and the number of pixel black points;
flocculation is a common physical and chemical method in the chemical wastewater treatment process, mainly uses the characteristics of flocculating agents (usually polymers) to adsorb suspended matters, colloid substances and other impurities in wastewater, finally forms flocculation floating on the water surface, and after a period of time, the flocculation floating is settled to the water bottom, and then judges whether flocculation is completed or not to determine whether the wastewater treatment process enters the next step. After flocculant is used in the wastewater in the industrial production process of acrylic emulsion, suspended matters in the wastewater are adsorbed by the flocculant to initially form a thinner milky-white tree-shaped diffusion-shaped preliminary flocculation area, the structure floating on the water surface is looser, more areas with incomplete flocculation on the water surface exist, more cavities exist, flocculation gradually converges after a period of time to form a larger thicker complete flocculation area, and the larger complete flocculation area is represented as a white area with dense and layered structure on the water surface.
Based on the state characteristics of wastewater flocculation on the water surface, the integral flocculation tank area is divided into a preliminary flocculation area and a complete flocculation area. Since the wastewater flocculation of the acrylic emulsion is white and the water surface area is relatively black, referring to fig. 2, fig. 2 is a schematic diagram of flocculation areas involved in an embodiment of the visual inspection method for wastewater in acrylic emulsion production according to the present invention, and based on fig. 2, the complete flocculation area and the preliminary flocculation area can be clearly seen. In this way, the degree of flocculation may be determined based on the difference between the complete flocculation zone and the preliminary flocculation zone.
Specifically, acquiring a binarized image of the target gray image based on an Ojin threshold method; constructing a pixel window with a preset size for the pixel points of the binarized image; counting the total number of pixel points and the number of pixel black points of each pixel window; and determining the ratio of the number of the pixel black points to the total number of the pixel points as the flocculation degree of the corresponding pixel window.
Image segmentation based on an Ojin threshold method is carried out on the target gray image, the foreground is a flocculation area, and the binary gray of the flocculation area is 0; the background is a water surface area, the binarization gray level of the water surface area is 1, a binarization image is obtained based on the binarization gray level of each pixel point, and the pixel black point with the gray level value of 0 in the binarization image is a flocculation area. Based on this, a pixel window with a preset size is constructed for each pixel, in this embodiment, the size of the pixel window is set to 15×15, the total number of pixels in the pixel window is counted, the total number of pixels is counted as N, the number of pixel black dots in the pixel window is counted, the number of pixel black dots is counted as M, and the flocculation degree is expressed as XD, and then:
wherein XD is flocculation degree, M is the number of black pixel points, and N is the total number of pixel points in each pixel window. When the flocculation degree XD is larger, the flocculation area in the pixel window is more, and flocculation near the pixel point is more; when the flocculation degree XD is smaller, the flocculation area in the pixel window is smaller, and flocculation near the pixel point is less; when the flocculation degree XD is 0, the area corresponding to all the pixel points in the pixel window is a water surface area, namely the area is not flocculated yet.
Step S103, obtaining the curvature of the edge pixel point of the target gray level image and the flocculation degree to determine flocculation confidence, and correcting the flocculation confidence to obtain a flocculation confidence correction value;
in order to enable the wastewater to fully react with the input flocculant, a water pumping device is usually added at the bottom or two ends of the flocculation tank, so that the wastewater at the bottom or two sides continuously and outwards gushes out, water waves surrounding the water pumping device are formed on the water surface, the water waves are similar to flocculation in images, the characteristics of white and messy edges are possessed, in order to remove the influence of the water waves, flocculation confidence is added based on flocculation degree XD, and a more accurate flocculation visual detection result is obtained.
Referring to fig. 3, fig. 3 is a schematic diagram of a refinement flow chart of an embodiment of a visual inspection method for acrylic emulsion production wastewater according to the present invention, as shown in fig. 3, the step S103 includes:
step S1031, performing edge detection on the target gray level image to obtain a plurality of edges, performing curve fitting on each edge, and determining flocculation confidence of a pixel window based on curvature of each pixel point on the edge and the flocculation degree;
specifically, firstly, edge detection is carried out on the target gray level image to obtain a plurality of edges, and an edge pixel point set of pixel points on the edges is established; in this embodiment, all the pixels on each edge are recorded as an edge pixel point set, and the edge pixel point set is denoted as S.
The flocculation is mainly carried out by reacting and adsorbing the flocculant with surrounding suspended matters, so that white floccules are gradually formed and finally flocculated, the water surface is gradually wrapped by the gradually accumulated floccules, and finally complete flocculation is formed, so that the edge in a flocculation area is more complex and more in number in the flocculation process, and the edge of water wave formed by the water gushing is smoother. Based on this, the distinction of the water wave edge from the flocculation edge can be made on the basis of the flatness of the edge.
Then, curve fitting is carried out on each edge, and a curve equation of each edge is obtained; and performing curve fitting on the edge based on the coordinates of the edge pixel point set. Four cubic curve equations for each edge are obtained.
Then, based on a curvature solving formula, the curvature of each pixel point on each edge is obtained, and the curvature average value of each edge is calculated; the curve fitting and curvature solving equations are well known techniques and will not be described in detail herein. The curvature average value is denoted as ki in this embodiment, where i=1, 2,..n, n is the number of pixels on the edge, that is, the number of elements in the pixel point set S corresponding to the edge.
Counting the number of edges contained in each pixel window, recording the number of edges as u, and indicating that the greater the degree of wrapping the water surface in the pixel window, the more the flocculated coagulation is, and the more likely the pixel points are located as flocculation areas, wherein the number of edges is greater; conversely, a larger average curvature but a smaller number of edges indicates that the smaller the level of water surface in the pixel window is packed, the more likely it is a non-flocculated area of water wave formation.
And finally, calculating the sum of curvature average values of all edges in the pixel window, and determining the product of the sum of the curvature average values and the flocculation degree of the pixel window as the flocculation confidence of the corresponding pixel window.
The flocculation confidence is expressed asThen:
wherein ,for flocculation confidence, XD is flocculation,u is the number of edges in the pixel window, which is the average curvature of the ith edge in the pixel window. When the flocculation degree XD in the pixel window is larger, and the sum of average curvatures of edges in the window is larger, the region corresponding to the pixel window is more likely to be a true flocculation region, and when the flocculation degree in the pixel window is smaller, the sum of average curvatures of edges in the window is smaller, the region corresponding to the pixel window is more likely to be a false flocculation region. When the flocculation degree is 0, the pixel window is a water surface area.
Step S1032, correcting the flocculation confidence based on the edge breakpoint compact index to obtain a flocculation confidence correction value.
To improve the accuracy of the flocculation confidence, the edges in the pixel window are further analyzed. The edge break point tightness index is predetermined: selecting edge break points from the edge pixel point set, wherein eight neighborhoods of the edge break points have and only have points on the same edge; calculating a first Euclidean distance between every two edge break points in the pixel window; and determining the edge breakpoint tightness index of the corresponding pixel window based on the total number of edge breakpoints in the pixel window and each first Euclidean distance.
Specifically, the pixels belonging to the same edge in the pixel window are divided into the same set, and the set of the pixels at the edge in the window is represented as Oo, where o=1, 2. For each pixel in the edge pixel set Oo in the window, if there is a pixel with only one point on the same edge in the eight adjacent areas, the pixel is recorded as an edge breakpoint of the edge, and the edge breakpoint of the edge is recorded to an edge breakpoint set OPp of the corresponding edge, where p=1, 2.
The flocculation generation process is mainly adsorption of suspended matters by the flocculant, so that a plurality of secondary edges generated by preliminary flocculation exist on the primary edges formed by flocculation, and the primary edges formed by water waves and the adjacent edges are in parallel diffusion shapes, and the secondary edges are basically not exist. The number of edge breakpoints on the main edge created by flocculation is greater than the number of edge breakpoints on the main edge created by the waves. Referring to fig. 4 and 5, fig. 4 is a schematic diagram of a water wave edge breakpoint according to an embodiment of the visual inspection method for acrylic emulsion production wastewater; FIG. 5 is a schematic diagram of flocculation edge break points involved in an embodiment of the visual inspection method of acrylic emulsion production wastewater, and it can be clearly seen from FIGS. 4-5 that flocculation edge break points are more than water wave edge break points.
For each edge in each pixel window, finding out edge break points of the edge in the pixel window, connecting the edge break points in pairs, solving a first Euclidean distance of every two edge break points, and expressing the first Euclidean distance as Dd, wherein d=1, 2. Calculating an edge break point compact index in the pixel window based on a first Euclidean distance between edge break points in the pixel window and the total number of break points in the pixel window, and representing the edge break point compact index of the pixel window as XF, wherein the XF is:
wherein XF is the edge break point compact index of the pixel window,for the first Euclidean distance between the edge break points of the ith edge in the pixel window, q is the total number of edge break points in the pixel window, and y is the edge in the pixel windowNumber of breakpoints. The larger the edge break point tightness index XF, the smaller the first euclidean distance mean between edge breaks on that edge, the more likely these edge breaks are secondary edge breaks on the flocculated primary edge; when the edge break point tightness index XF is smaller, the larger the distance mean between the edge break points on the edge segment, the more likely these edge break points are edge break points on the wave edge.
Based on edge breakpoint tightness index XF, confidence in flocculationAdding an influence factor to obtain a flocculation confidence correction value, and expressing the flocculation confidence correction value as XB, and then:
XB’
namely:
wherein XB is a flocculation confidence correction value,for flocculation confidence, XF is an edge break point tightness index, the greater the flocculation confidence correction value XB indicates a greater likelihood that the region is a flocculated region, and the lesser the value of XB indicates a lesser likelihood that the region is a non-flocculated region.
Thus, a flocculation confidence correction value XB is obtained, the flocculation area where true flocculation is located can be rapidly judged through the flocculation confidence correction value XB, and then the flocculation degree of the flocculation tank is further judged.
Step S104, determining flocculation block density of a pixel window based on the flocculation confidence correction value, the Euclidean distance of non-edge pixel points of the target gray level image and the size of the pixel window, calculating flocculation distances among the pixel points based on the flocculation block densities of adjacent flocculation blocks, and obtaining normalized flocculation distances of the flocculation distances;
specifically, performing corner detection on the target gray image to obtain a corner in the target gray image; acquiring non-edge pixel points in the corner points, and calculating a second Euclidean distance of every two non-edge pixel points; calculating a flocculation block density of the pixel window based on the pixel window size, the second euclidean distance, and the flocculation confidence correction value; and calculating flocculation distances among the pixel points based on flocculation block densities of adjacent flocculation blocks in the pixel window, and normalizing the flocculation distances to obtain normalized flocculation distances.
When the wastewater enters a flocculation stage, after a flocculating agent is added, a part area starts to generate preliminary flocculation, the rest area is an unflocculated area, after a period of time, the preliminary formed flocculation gradually becomes a thicker complete flocculation area, the initial flocculation area gradually becomes a preliminary flocculation area, and the rest area is a new unflocculated area. When the complete flocculation area in the flocculation tank reaches a certain threshold value, the flocculation degree of the flocculation tank can be judged to be complete, and the next wastewater treatment flow can be started.
And carrying out corner detection on the target gray image by using a Harris corner detection algorithm, and obtaining corners in the target gray image. For the flocculation tank, the primary flocculation area is in an initial coagulation state, so that the structure is loose, the primary flocculation area and the water surface are distributed in a phase-to-phase manner, and the corner points are more; whereas for the complete flocculation zone the water surface has been completely covered by a thick flocculation, there are fewer corner points relative to the preliminary flocculation zone. Because the edge of the white area formed by flocculation can detect more angular points relative to the water surface, in order to reduce the calculated amount and more accurately express the formation degree of flocculation, angular point selection is firstly carried out in a pixel window, the pixel points of the edge in a pixel point set S of the edge are removed from the obtained angular points, only non-edge pixel points in the angular points are reserved, the selected non-edge pixel points correspond to small flocculation blocks generated by preliminary flocculation on the water surface, the more the small flocculation blocks indicate that the flocculation degree in the area is preliminary flocculation, and then the second Euclidean distance between every two non-edge pixel points is calculated by connecting every two selected non-edge pixel points. The second euclidean distance is denoted db, where b=1, 2. Expressed as MX, the flocculation compactness is:
wherein MX is the tightness of the flocculation block,for the distance of the b-th corner point in the pixel window, m is the number of non-edge pixel points of the pixel window, N is the size of the pixel window, and XB is the flocculation confidence correction value. The more flocculation blocks the greater the degree of flocculation MX, the more likely the pixel window is a preliminary flocculation zone when the pixel window area is a flocculation zone, the less flocculation blocks the lower the degree of flocculation MX, the more likely the pixel window is a complete flocculation zone when the pixel window is a non-flocculation zone, the flocculation block tightness MX is equal to 0.
The flocculation block compactness corresponding to the pixel point g in the pixel window is represented as MXg, and the flocculation distance between the pixel points is represented as XMD, and then:
wherein MXg is the flocculation compactness corresponding to the g-th pixel point in the pixel window, and MXg +1 is the flocculation compactness corresponding to the g+1th pixel point in the pixel window. Normalizing the flocculation distance XDM to obtain a normalized flocculation distance, and expressing the normalized flocculation distance as FXMD:
FXMD is a value normalized by the flocculation distance XMD, and the value range is [0,1]. When the normalized flocculation distance FXMD is larger, the flocculation block compactness difference between the two pixel points is larger, and the flocculation degree difference between the two pixel points is larger; the smaller the normalized flocculation distance FXMD, the smaller the flocculation block tightness difference between the two pixels, and the more similar the flocculation degree between the two pixels.
Step S105, determining the membership degree of the pixel points based on the normalized flocculation distance from the pixel points in the pixel window to the clustering center by using the FCM algorithm, and determining the flocculation condition of the acrylic acid emulsion production wastewater flocculation tank based on the membership degree of each pixel point.
The FCM algorithm is short for fuzzy c-means, and is a fuzzy clustering method based on an objective function. The FCM algorithm divides the target data set into a plurality of classes, so that a plurality of class centers are correspondingly arranged, and finally, the membership degree of each data belonging to each class is obtained. The FCM algorithm iterates to obtain a new membership based on the euclidean distance from the data point to the cluster center, and in this embodiment, the membership is updated based on the normalized flocculation distance from the pixel point to the cluster center.
The membership degree from the pixel point e to the clustering center j is uej, and then:
wherein C is the number of the cluster centers, cj is the j-th cluster center, ck is the k-th cluster center, xe is the e-th pixel point, h is the number of the pixels in the target gray image, FXMD (xe, cj) represents the normalized flocculation distance from the e-th pixel point to the j-th cluster center, FXMD (xe, ck) represents the normalized flocculation distance from the e-th pixel point to the k-th cluster center, and m is the weight (the empirical value takes 2). When uej is larger, the membership degree from the e pixel point to the j cluster center is larger, and the probability that the e pixel point belongs to the j cluster center is larger; when uej is smaller, the smaller the membership degree from the e-th pixel point to the j-th cluster center is, the smaller the probability that the e-th pixel point belongs to the j-th cluster center is.
In the embodiment, an initialization membership degree is randomly selected, and classification is carried out based on the initialization membership degree to determine an initial clustering center; updating the initialization membership based on the initial clustering center and the normalized flocculation distance from the pixel point to the clustering center, determining the iteration end when a minimum target initial function is obtained, and storing the membership of each pixel point; smaller target initiation functions indicate better classification. The FCM algorithm in this embodiment updates the membership based on the normalized flocculation distance from the pixel point to the clustering center, and other calculations are known techniques, which are not described herein.
And screening out target pixel points belonging to the complete flocculation zone based on the membership degree, and determining the area of the complete flocculation zone based on the target pixel points. After the iteration is finished, the membership degree of the pixel points belonging to each class can be obtained, and the pixel points belong to the class corresponding to the clustering center with the largest membership degree. For example, if the membership degree of the pixel q to the cluster center corresponding to the complete flocculation area is the largest, the pixel q is divided into the complete flocculation area. After each pixel point is divided based on membership, dividing a target gray level image into a complete flocculation area, a preliminary flocculation area and a water surface, and determining that the acrylic emulsion production wastewater flocculation tank is completely flocculated when the area ratio of the complete flocculation area is greater than or equal to a threshold value. The empirical value of the threshold in this example was 95%.
Based on the scheme, the RGB image of the acrylic emulsion production wastewater flocculation tank is preprocessed to obtain a target gray image; counting the total number of pixel points and the number of pixel black points in a pixel window based on the binarized image of the target gray level image, and determining the flocculation degree of the corresponding pixel window based on the total number of pixel points and the number of pixel black points; obtaining curvature of edge pixel points of the target gray level image and the flocculation degree to determine flocculation confidence, and correcting the flocculation confidence to obtain a flocculation confidence correction value; determining flocculation block density of a pixel window based on the flocculation confidence correction value, the Euclidean distance of non-edge pixel points of the target gray level image and the size of the pixel window, calculating flocculation distances among the pixel points based on the flocculation block densities of adjacent flocculation blocks, and obtaining normalized flocculation distances of the flocculation distances; determining the membership degree of the pixel points based on the normalized flocculation distance from the pixel points in the pixel window to the clustering center by using the FCM algorithm, and determining the flocculation condition of the flocculation tank of the acrylic acid emulsion production wastewater based on the membership degree of each pixel point. Therefore, the edge and the pixel points are obtained from the gray level image of the flocculation tank are analyzed, FCM classification is carried out based on the normalized flocculation distance from the pixel points to the clustering center, and the membership degree of each pixel point belonging to each region is obtained, so that the accurate flocculation condition of the flocculation tank is obtained, and the accuracy of visual detection of the acrylic emulsion production wastewater is improved.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or modifications in the structures or processes described in the specification and drawings, or the direct or indirect application of the present invention to other related technical fields, are included in the scope of the present invention.