A system and method for identifying and monitoring alum flowers based on image processing
The image processing-based floc identification and monitoring system utilizes industrial cameras and floc monitoring models to automatically extract floc characteristic indicators from sedimentation tanks. This solves the problems of subjectivity and equipment complexity in traditional floc identification methods, enabling real-time monitoring and automated control of floc status and ensuring water purification effectiveness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG HENGYANG THERMAL POWER CO LTD
- Filing Date
- 2025-05-08
- Publication Date
- 2026-05-26
AI Technical Summary
Traditional methods for identifying floc in existing technologies rely on human experience, are highly subjective, require expensive equipment and are complex to maintain, and cannot accurately monitor and predict the state of floc, resulting in poor water purification effects, increased costs and impact on the normal use of equipment.
An image processing-based floc identification and monitoring system is adopted. By capturing images of the sedimentation tank with an industrial camera, a floc monitoring model is constructed, feature indicators are automatically extracted, and alarms are issued to achieve real-time monitoring and automated control of the floc status.
It enables automated monitoring of the floc state in the sedimentation tank, ensuring normal equipment operation and successful water purification, while reducing the risk of manual intervention and equipment failure.
Smart Images

Figure CN120544017B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of alum flower identification and monitoring technology, specifically an alum flower identification and monitoring system and method based on image processing. Background Technology
[0002] In the electrothermal industry, water treatment often requires the removal of impurities and salts to ensure water quality meets equipment standards. Common water treatment methods involve adding flocculants (such as aluminum sulfate, polyferric sulfate, and polyaluminum chloride) to create flocculent precipitates. Alum floc is a common type of flocculent precipitate. Traditional methods for identifying alum floc have limitations. For example, manual observation relies heavily on operator experience, is highly subjective, and cannot accurately identify alum floc; it also requires highly skilled operators. The Zeta potential method reflects the state of colloids in water but cannot directly assess the quality of alum floc, and the equipment is expensive and complex to maintain. The beaker test, using beakers to detect alum floc in water, requires a long testing time and is difficult to adapt to rapid changes in water quality.
[0003] With the continuous development of technology, image processing technology has been gradually applied to the identification and monitoring of alum floc. However, traditional image processing methods cannot effectively extract alum floc-related features from images, nor can they accurately predict the formation state of alum floc based on the current situation, thus failing to achieve real-time monitoring of alum floc status. Consequently, it is impossible to accurately determine the timing of alum floc release, which not only increases costs but also deteriorates the water purification effect, causing the equipment to operate in substandard water, affecting normal equipment use, and may even lead to equipment malfunction. Summary of the Invention
[0004] The purpose of this invention is to provide an image processing-based system and method for identifying and monitoring alum flowers, in order to solve the problems raised in the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for identifying and monitoring alum flowers based on image processing, the method comprising:
[0006] Step S100: Obtain historical floc images in the sedimentation tank, evaluate the presentation quality of the historical floc images on the flocs in the corresponding area, and obtain the target historical floc images in the area.
[0007] Step S200: Obtain the target historical alum floc image, extract the feature indicators of alum floc in the target historical alum floc image, obtain historical alum floc detection data in the region, evaluate the data correlation between the feature indicators in the target historical alum floc image and the detection indicators in the historical alum floc detection data, and obtain alum floc related data.
[0008] Step S300: Obtain floc-related data for different areas in the sedimentation tank during different historical periods of the historical cycle, and construct a floc monitoring model for the sedimentation tank;
[0009] Step S400: Use an industrial camera to photograph the sedimentation tank to obtain images of the alum floc in the sedimentation tank. Use an alum floc monitoring model to monitor the state of the alum floc in the sedimentation tank, and automatically issue an alarm to prompt the staff to take measures based on the monitored alum floc state.
[0010] Furthermore, step S100 includes:
[0011] Step S101: Divide the sedimentation tank into several areas and obtain the characteristic exposure time t = d′ / (v′·M) of the industrial camera, where v′ is the water flow velocity in the sedimentation tank and M is the optical magnification of the industrial camera.
[0012] Step S102: When flocculant is added to the sedimentation tank during the historical period, the exposure time of the industrial camera is set to the characteristic exposure time within each preset unit time, and the flocs in several areas of the sedimentation tank are photographed to obtain several historical floc images in several areas.
[0013] Step S103: Obtain the region to which the historical floc images in the sedimentation tank belong, evaluate the presentation quality of the historical floc images of the region, and obtain the quality evaluation value of the historical floc images. The specific evaluation process is as follows:
[0014] The historical alum flower image is converted to grayscale. Based on the historical alum flower image, a two-dimensional coordinate system is constructed, where the unit length in the coordinate system is the length of one pixel in the historical alum flower image.
[0015] Obtain the preset horizontal convolution kernel G′ x Vertical convolution kernel G′ y To obtain the pixel points with coordinates (x, y) in the two-dimensional coordinate system of the historical alum flower image, use the horizontal convolution kernel G′ respectively. x and vertical convolution kernel G′ y Convolve with the neighborhood of the pixel at coordinates (x, y) to obtain the horizontal gradient value G of the pixel at coordinates (x, y). x (x,y) and vertical gradient value G y (x,y);
[0016] Calculate the sharpness evaluation value M(x,y) of the pixel with coordinates (x,y):
[0017]
[0018] The sum of squares of the sharpness evaluation values of each pixel in the historical alum flower image is obtained to obtain the target sharpness evaluation value M′ of the historical alum flower image, and then normalized.
[0019] The feature blur value is obtained by convolving the pre-defined Laplacian kernel L′ with the neighborhood of the pixel at coordinates (x,y).
[0020] Step S104: Obtain the feature blur value of each pixel in the historical alum flower image, and obtain the variance B corresponding to the feature blur value of the pixel in the historical alum flower image. △ And perform normalization processing;
[0021] Calculate the quality evaluation value A of historical alum flower images: A = γ1 × M′ + γ2 × B △ Where γ1 and γ2 are the preset first evaluation coefficient and second evaluation coefficient, respectively, γ1+γ2=1, γ1>0, γ2>0;
[0022] Step S105: Obtain the maximum value of the quality evaluation value of several historical alum floc images within a certain unit time period of the historical period of the region, and record the historical alum floc image corresponding to the maximum value as the target historical alum floc image of the region;
[0023] In the above steps, different images of alum floc will be obtained by taking pictures of the area in the sedimentation tank. However, the image quality of different alum floc images is not the same. Therefore, it is necessary to calculate the quality evaluation value of different alum floc images and select the maximum value of the quality evaluation value, which is the target historical alum floc image. By obtaining the target historical alum floc image, the characteristic indicators of alum floc can be extracted better, and the monitoring accuracy of the model can be further improved.
[0024] Furthermore, step S200 includes:
[0025] Step S201: Obtain the target historical alum floc image in the region, perform Gaussian filtering on the target historical alum floc image, extract the feature indicators of the alum floc in the target historical alum floc image, and obtain the feature indicator set. The feature indicators are the equivalent diameter, color, and equivalent area of the alum floc. The specific evaluation process is as follows:
[0026] The target historical alum flower image is converted to HSV space using a color conversion tool to obtain the hue (H), saturation (S), and brightness (V) of the pixels in the target historical alum flower image. A two-dimensional coordinate system is then established based on the target historical alum flower image.
[0027] Step S202: Use the Canny algorithm to locate the region where the alum flowers are located in the target historical alum flower image, obtain the image region where the alum flowers are located in the target historical alum flower image, and record it as the target image region;
[0028] Calculate the average values H′, S′, and V′ of the hue, saturation, and brightness of the pixels in the target image region, and record them as follows: combine them to obtain the color Q = {H′, S′, V′} in the target historical alum flower image.
[0029] Step S203: Obtain the total number of pixels E in the target image region. sum Divide the length of the region by the pixel length of the target historical alum flower image to obtain the scaling factor k, where the pixel length is the total number of pixels corresponding to the length in the target historical alum flower image. Calculate the equivalent area F = E of the alum flowers in the target historical alum flower image. sum ×k 2 ;
[0030] Calculate the equivalent diameter R of the alum flocs in the target historical alum floc image:
[0031]
[0032] The equivalent diameter R, color Q, and equivalent area F of the target historical alum flower image are collected to obtain the feature index set of the target historical alum flower image;
[0033] Step S204: Obtain the historical time period of the target historical alum flower image, and obtain the historical alum flower detection data of the area within the historical time period. The duration of the historical time period is the same as the unit duration. The detection indicators in the historical alum flower detection data are the alum flower concentration and alum flower type of the area obtained through experimental testing.
[0034] The evaluation process involves assessing the correlation between various feature indicators in the target historical hemp flower images and the detection indicators in historical hemp flower detection data. The specific evaluation process is as follows:
[0035] Obtain the data corresponding to each detection indicator in the historical alum floc detection data of the region, and determine the data correlation between each characteristic indicator in the characteristic indicator set and each detection indicator in the historical alum floc detection data.
[0036] By combining the feature index set with historical alum floc detection data, regional alum floc-related data are obtained.
[0037] Furthermore, step S300 includes:
[0038] Step S301: Obtain alum floc related data for each area in the sedimentation tank during each historical period of each historical cycle, and extract the data corresponding to each detection index and the values of each characteristic index from the alum floc related data;
[0039] Step S302: A floc monitoring model for the sedimentation tank is constructed using machine learning algorithms. The specific construction process is as follows:
[0040] According to the preset ratio, each historical period is divided into a training set and a test set. The normalized values of various feature indicators in the alum flower-related data are used as the input data of the alum flower monitoring model, and the data corresponding to various detection indicators in the alum flower-related data are used as the target output data.
[0041] The training set is used to train the alum flower monitoring model, and the test set is used to obtain the mean square error of the alum flower concentration in the alum flower monitoring model and the accuracy of the alum flower type in the alum flower monitoring model.
[0042] When both the mean square error and the accuracy are greater than the preset thresholds, the construction of the alum flower monitoring model is considered complete.
[0043] Furthermore, step S400 includes:
[0044] Step S401: During the current cycle, use an industrial camera to take pictures of each area in the sedimentation tank to obtain floc images of each area, and obtain the maximum value of the quality evaluation value of different floc images in the area. Then, take the floc image corresponding to the maximum value of the quality evaluation value as the target floc image of the area and obtain the target floc images of each area.
[0045] Step S402: Extract the feature indicators of alum flowers in the target alum flower images in each region and input them into the alum flower monitoring model to obtain the data corresponding to the detection indicators of alum flowers in each region output by the alum flower monitoring model. Feedback is provided in real time on the user interface of the staff. When the concentration of alum flowers in a certain region exceeds the preset concentration threshold, an alarm is automatically issued and the staff is prompted to take corresponding measures.
[0046] To better implement the above method, an image processing-based alum flower identification and monitoring system is proposed, which includes a quality assessment module, a data correlation assessment module, a model building module, and an alum flower monitoring module.
[0047] The quality assessment module is used to evaluate the rendering quality of historical alum floc images for alum flocs within their respective regions, and to obtain target historical alum floc images for the regions.
[0048] The data correlation evaluation module is used to evaluate the data correlation between the feature indicators in the target historical alum flower images and the detection indicators in the historical alum flower detection data, and to obtain alum flower correlation data.
[0049] The model building module is used to acquire data related to floc in different areas of the sedimentation tank and to build a floc monitoring model in the sedimentation tank.
[0050] The floc monitoring module is used to acquire images of flocs in the sedimentation tank, monitor the floc status in the sedimentation tank using the floc monitoring model, and automatically issue alarms based on the monitored floc status to prompt staff to take appropriate measures.
[0051] Furthermore, the quality assessment module includes a quality evaluation value unit and a quality assessment unit;
[0052] The quality evaluation value unit is used to calculate the quality evaluation value of historical floc images in the sedimentation tank;
[0053] The quality assessment unit is used to evaluate the presentation quality of historical alum flower images of the alum flower in the area based on the quality evaluation value, and to obtain the target historical alum flower image of the area.
[0054] Furthermore, the data-related assessment module includes a feature index extraction unit and a data-related assessment unit;
[0055] The feature index extraction unit is used to extract the feature indexes of alum flowers in the target historical alum flower image to obtain the feature index set of the target historical alum flower image;
[0056] The data correlation evaluation unit is used to evaluate the data correlation between the feature indicators in the feature indicator set and the feature indicators in the historical alum flower detection data based on the feature indicator set of the target historical alum flower image and in combination with the historical alum flower detection data in the region, so as to obtain alum flower correlation data.
[0057] Furthermore, the model building module includes model building units;
[0058] The model building unit is used to acquire data related to floc in different areas of the sedimentation tank and build a floc monitoring model for the sedimentation tank.
[0059] Furthermore, the alum flower monitoring module includes an alum flower monitoring unit;
[0060] The floc monitoring unit is used to acquire floc images of the sedimentation tank and to monitor the floc status in the sedimentation tank using the floc monitoring model.
[0061] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention achieves automated monitoring of the floc state in a sedimentation tank based on floc images, evaluates the presentation quality of floc in several historical floc images of a region in the sedimentation tank, selects the historical floc image with the highest quality and records it as the target historical floc image, and constructs a floc detection model based on the data correlation between the feature indicators in the target historical floc image and the detection indicators in the historical floc detection data of the target historical floc image. Subsequently, it is only necessary to photograph the floc in the sedimentation tank and use the floc monitoring model to automatically obtain the floc concentration and type in the sedimentation tank, thereby providing a basis for subsequent operations by staff. This not only ensures the normal operation of the equipment in the sedimentation tank but also guarantees the smooth completion of water purification. Attached Figure Description
[0062] Figure 1 This is a flowchart of a method for identifying and monitoring alum flowers based on image processing according to the present invention;
[0063] Figure 2 This is a schematic diagram of a module of an image processing-based alum flower identification and monitoring system according to the present invention. Detailed Implementation
[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] Example: Figures 1-2 As shown, the present invention provides a technical solution, a method for identifying and monitoring alum flowers based on image processing, the method comprising:
[0066] Step S100: Obtain historical floc images in the sedimentation tank, evaluate the presentation quality of the historical floc images on the flocs in the corresponding area, and obtain the target historical floc images in the area.
[0067] Step S100 includes:
[0068] Step S101: Divide the sedimentation tank into several areas and obtain the characteristic exposure time t = d′ / (v′·M) of the industrial camera, where v′ is the water flow velocity in the sedimentation tank and M is the optical magnification of the industrial camera.
[0069] Step S102: When flocculant is added to the sedimentation tank during the historical period, the exposure time of the industrial camera is set to the characteristic exposure time within each preset unit time, and the flocs in several areas of the sedimentation tank are photographed to obtain several historical floc images in several areas.
[0070] Step S103: Obtain the region to which the historical floc images in the sedimentation tank belong, evaluate the presentation quality of the historical floc images of the region, and obtain the quality evaluation value of the historical floc images. The specific evaluation process is as follows:
[0071] The historical alum flower image is converted to grayscale. Based on the historical alum flower image, a two-dimensional coordinate system is constructed, where the unit length in the coordinate system is the length of one pixel in the historical alum flower image.
[0072] Obtain the preset horizontal convolution kernel G′ x Vertical convolution kernel G′ y To obtain the pixel points with coordinates (x, y) in the two-dimensional coordinate system of the historical alum flower image, use the horizontal convolution kernel G′ respectively. x and vertical convolution kernel G′ y Convolve with the neighborhood of the pixel at coordinates (x, y) to obtain the horizontal gradient value G of the pixel at coordinates (x, y). x (x,y) and vertical gradient value G y (x,y);
[0073] Calculate the sharpness evaluation value M(x,y) of the pixel with coordinates (x,y):
[0074]
[0075] The sum of squares of the sharpness evaluation values of each pixel in the historical alum flower image is obtained to obtain the target sharpness evaluation value M′ of the historical alum flower image, and then normalized.
[0076] The feature blur value is obtained by convolving the pre-defined Laplacian kernel L′ with the neighborhood of the pixel at coordinates (x,y).
[0077] For example, in step S103, the horizontal gradient value G is calculated. x (x,y), vertical gradient value G y (x,y) and feature fuzzy value The specific calculation formulas include:
[0078]
[0079] Among them, G′ x (i+1,j+1) represents the horizontal convolution kernel G′ xThe value corresponding to the coordinate point (i+1,j+1) in the middle; I(x+1,y+1) is the gray value corresponding to the pixel point with coordinates (x+i,y+j) in the historical alum flower image;
[0080]
[0081] Among them, G′ y (i+1,j+1) is the vertical convolution kernel G′ y The coordinate point is the value corresponding to (i+1, j+1);
[0082]
[0083] Where L′(i+1,j+1) is the value corresponding to the coordinate point (i+1,j+1) in the Laplacian convolution kernel L′;
[0084] Step S104: Obtain the feature blur value of each pixel in the historical alum flower image, and obtain the variance B corresponding to the feature blur value of the pixel in the historical alum flower image. △ And perform normalization processing;
[0085] Calculate the quality evaluation value A of historical alum flower images: A = γ1 × M′ + γ2 × B △ Where γ1 and γ2 are the preset first evaluation coefficient and second evaluation coefficient, respectively, γ1+γ2=1, γ1>0, γ2>0;
[0086] Step S105: Obtain the maximum value of the quality evaluation value of several historical alum floc images within a certain unit time period of the historical period of the region, and record the historical alum floc image corresponding to the maximum value as the target historical alum floc image of the region;
[0087] Step S200: Obtain the target historical alum floc image, extract the feature indicators of alum floc in the target historical alum floc image, obtain historical alum floc detection data in the region, evaluate the data correlation between the feature indicators in the target historical alum floc image and the detection indicators in the historical alum floc detection data, and obtain alum floc related data.
[0088] Step S200 includes:
[0089] Step S201: Obtain the target historical alum floc image in the region, perform Gaussian filtering on the target historical alum floc image, extract the feature indicators of the alum floc in the target historical alum floc image, and obtain the feature indicator set. The feature indicators are the equivalent diameter, color, and equivalent area of the alum floc. The specific evaluation process is as follows:
[0090] The target historical alum flower image is converted to HSV space using a color conversion tool to obtain the hue (H), saturation (S), and brightness (V) of the pixels in the target historical alum flower image. A two-dimensional coordinate system is then established based on the target historical alum flower image.
[0091] For example, color conversion tools include OpenCV (Python / C++ / Java), PIL / Pillow (Python), Adobe Photoshop, and GIMP;
[0092] Step S202: Use the Canny algorithm to locate the region where the alum flowers are located in the target historical alum flower image, obtain the image region where the alum flowers are located in the target historical alum flower image, and record it as the target image region;
[0093] For example, the specific process of using the Canny algorithm to locate the region of alum flowers in a target historical alum flower image and obtaining the image region where the alum flowers are located in the target historical alum flower image includes:
[0094] The gradient of the image is calculated using the Sobel operator to obtain the intensity and direction of the edges;
[0095] Non-maximum suppression: Applying non-maximum suppression to gradient magnitude images preserves local maxima to accurately identify edges;
[0096] Hysteresis threshold processing: Based on the set high and low thresholds, edge tracking is performed by connecting edges to ensure the connection between strong and weak edges;
[0097] Use OpenCV's findContours function to extract contours from the image and find the edges related to the alum flowers;
[0098] Filtering contours: Based on the characteristics of the contours (such as area, shape, length, etc.), contours that do not meet the conditions are filtered out, while retaining possible alum flower areas;
[0099] Calculate the average values H′, S′, and V′ of the hue, saturation, and brightness of the pixels in the target image region, and record them as follows: combine them to obtain the color Q = {H′, S′, V′} in the target historical alum flower image.
[0100] Step S203: Obtain the total number of pixels E in the target image region. sum Divide the length of the region by the pixel length of the target historical alum flower image to obtain the scaling factor k, where the pixel length is the total number of pixels corresponding to the length in the target historical alum flower image. Calculate the equivalent area F = E of the alum flowers in the target historical alum flower image. sum ×k 2 ;
[0101] Calculate the equivalent diameter R of the alum flocs in the target historical alum floc image:
[0102]
[0103] For example, the scaling factor k = 0.05 mm / pixel, E sum =500 pixels, calculate the equivalent area F of the alum flowers in the target historical alum flower image F = 500 × (0.05) 2 =1.25mm 2 ;
[0104] Calculate the equivalent diameter R of the alum flocs in the target historical alum floc image:
[0105]
[0106] The equivalent diameter R, color Q, and equivalent area F of the target historical alum flower image are collected to obtain the feature index set of the target historical alum flower image;
[0107] Step S204: Obtain the historical time period of the target historical alum flower image, and obtain the historical alum flower detection data of the area within the historical time period. The duration of the historical time period is the same as the unit duration. The detection indicators in the historical alum flower detection data are the alum flower concentration and alum flower type of the area obtained through experimental testing.
[0108] The evaluation process involves assessing the correlation between various feature indicators in the target historical hemp flower images and the detection indicators in historical hemp flower detection data. The specific evaluation process is as follows:
[0109] Obtain the data corresponding to each detection indicator in the historical alum floc detection data of the region, and determine the data correlation between each characteristic indicator in the characteristic indicator set and each detection indicator in the historical alum floc detection data.
[0110] By combining the feature index set with historical alum flower detection data, regional alum flower-related data are obtained;
[0111] Step S300: Obtain floc-related data for different areas in the sedimentation tank during different historical periods of the historical cycle, and construct a floc monitoring model for the sedimentation tank;
[0112] Step S300 includes:
[0113] Step S301: Obtain alum floc related data for each area in the sedimentation tank during each historical period of each historical cycle, and extract the data corresponding to each detection index and the values of each characteristic index from the alum floc related data;
[0114] Step S302: A floc monitoring model for the sedimentation tank is constructed using machine learning algorithms. The specific construction process is as follows:
[0115] For example, machine learning algorithms include vector machines, convolutional neural networks, etc.
[0116] For example, using convolutional neural network algorithms to build a hemp flower monitoring model;
[0117] The floc monitoring model is divided into two objectives: prediction of floc concentration and floc type in a sedimentation tank area;
[0118] The alum flower monitoring model is a multi-task hybrid input convolutional neural network model. The input data in the alum flower monitoring model consists of the values of various feature indicators within each element of the training set. Specifically, the output vector of the shared hidden layer in the alum flower monitoring model is H = ReLU(W). shared ·V combined +b shared ReLU is a non-linear activation function: f(x) = max(0,x), V combined W is the vector formed by concatenating various feature indicators. shared For the weight matrix of the shared hidden layer, b shared These are the bias vectors shared in the hidden layer;
[0119] Prediction (regression) of alum flower concentration in the alum flower monitoring model: y concentration =W r ·H+b r W r b r These are the weight matrix and bias vector in the regression output layer, respectively;
[0120] Prediction (classification) of alum flower type in the alum flower monitoring model: z class =W c ·H+b c W c b c These are the weight matrix and bias vector in the classification output layer, respectively;
[0121] The model for monitoring *Hemiberlesia lataniae* is trained using the training set to obtain the model parameters (including the weight matrix and bias vector) and complete the initial construction of the model.
[0122] According to the preset ratio, each historical period is divided into a training set and a test set. The normalized values of various feature indicators in the alum flower-related data are used as the input data of the alum flower monitoring model, and the data corresponding to various detection indicators in the alum flower-related data are used as the target output data.
[0123] The training set is used to train the alum flower monitoring model, and the test set is used to obtain the mean square error of the alum flower concentration in the alum flower monitoring model and the accuracy of the alum flower type in the alum flower monitoring model.
[0124] For example, the mean square error ζ of alum flower concentration in the alum flower monitoring model. MSE The calculation formula is:
[0125]
[0126] Where N is the total number of elements in the test set; C z C′ represents the concentration of flocculent material in the z-th element of the test set. z The output of the z-th element in the alum flower monitoring model is the alum flower concentration.
[0127] For example, the formula for calculating the accuracy G of the alum flower type in the alum flower monitoring model is:
[0128]
[0129] Where, α sum The total number of elements correctly classified as alum flower types in the test set by the alum flower monitoring model;
[0130] When both the mean square error and the accuracy are greater than the preset thresholds, the construction of the alum flower monitoring model is considered complete.
[0131] Step S400: Use an industrial camera to take pictures of the sedimentation tank to obtain images of the alum floc in the sedimentation tank. Use an alum floc monitoring model to monitor the state of the alum floc in the sedimentation tank and automatically issue an alarm to prompt the staff to take measures based on the monitored alum floc state.
[0132] Step S400 includes:
[0133] Step S401: During the current cycle, use an industrial camera to take pictures of each area in the sedimentation tank to obtain floc images of each area, and obtain the maximum value of the quality evaluation value of different floc images in the area. Then, take the floc image corresponding to the maximum value of the quality evaluation value as the target floc image of the area and obtain the target floc images of each area.
[0134] Step S402: Extract the feature indicators of alum flowers in the target alum flower images in each region and input them into the alum flower monitoring model to obtain the data corresponding to the detection indicators of alum flowers in each region output by the alum flower monitoring model, and provide feedback in real time on the user interface of the staff. When the concentration of alum flowers in a certain region exceeds the preset concentration threshold, an alarm is automatically issued and the staff is prompted to take corresponding measures.
[0135] To better implement the above method, an image processing-based alum flower identification and monitoring system is proposed, which includes a quality assessment module, a data correlation assessment module, a model building module, and an alum flower monitoring module.
[0136] The quality assessment module is used to evaluate the rendering quality of historical alum floc images for alum flocs within their respective regions, and to obtain target historical alum floc images for the regions.
[0137] The data correlation evaluation module is used to evaluate the data correlation between the feature indicators in the target historical alum flower images and the detection indicators in the historical alum flower detection data, and to obtain alum flower correlation data.
[0138] The model building module is used to acquire data related to floc in different areas of the sedimentation tank and to build a floc monitoring model in the sedimentation tank.
[0139] The floc monitoring module is used to acquire images of flocs in the sedimentation tank, and to monitor the floc status in the sedimentation tank using the floc monitoring model. Based on the monitored floc status, it will automatically issue an alarm to prompt staff to take appropriate measures.
[0140] The quality assessment module includes a quality evaluation value unit and a quality assessment unit.
[0141] The quality evaluation value unit is used to calculate the quality evaluation value of historical floc images in the sedimentation tank;
[0142] The quality assessment unit is used to evaluate the presentation quality of historical alum floc images of a region based on the quality evaluation value, and to obtain the target historical alum floc image of the region.
[0143] The data-related evaluation module includes a feature index extraction unit and a data-related evaluation unit.
[0144] The feature index extraction unit is used to extract the feature indexes of alum flowers in the target historical alum flower image to obtain the feature index set of the target historical alum flower image;
[0145] The data correlation evaluation unit is used to evaluate the data correlation between the feature indicators in the feature indicator set and the feature indicators in the historical alum flower detection data based on the feature indicator set of the target historical alum flower image and in combination with the historical alum flower detection data in the region, so as to obtain alum flower correlation data.
[0146] The model building module includes model building units;
[0147] The model building unit is used to acquire data related to floc in different areas of the sedimentation tank and build a floc monitoring model for the sedimentation tank.
[0148] The alum flower monitoring module includes an alum flower monitoring unit;
[0149] The floc monitoring unit is used to acquire floc images of the sedimentation tank and to monitor the floc status in the sedimentation tank using the floc monitoring model.
[0150] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A method for identifying and monitoring alum flowers based on image processing, characterized in that, The method includes: Step S100: Obtain historical floc images in the sedimentation tank, evaluate the presentation quality of the historical floc images for the flocs in the area to which they belong, and obtain the target historical floc images for the area. Step S200: Obtain the target historical alum flower image, extract the feature indicators of alum flowers in the target historical alum flower image, obtain historical alum flower detection data in the region, evaluate the data correlation between the feature indicators in the target historical alum flower image and the detection indicators in the historical alum flower detection data, and obtain alum flower related data; Step S300: Obtain alum floc related data for different areas in the sedimentation tank during different historical periods of the historical cycle, and construct an alum floc monitoring model for the sedimentation tank; Step S400: Use an industrial camera to take pictures of the sedimentation tank to obtain images of the alum floc in the sedimentation tank. Use the alum floc monitoring model to monitor the state of the alum floc in the sedimentation tank, and automatically issue an alarm to prompt the staff to take measures based on the monitored alum floc state. Step S100 includes: Step S101: Divide the sedimentation tank into several regions and obtain the characteristic exposure time t=d´ / (v´·M) of the industrial camera, where v´ is the water flow velocity of the sedimentation tank and M is the optical magnification of the industrial camera; Step S102: When flocculant is added to the sedimentation tank during the historical period, the exposure time of the industrial camera is set to the characteristic exposure time within each preset unit time period, and the flocs in the several areas of the sedimentation tank are photographed to obtain several historical floc images in the several areas. Step S103: Obtain the region to which the historical floc images in the sedimentation tank belong, evaluate the presentation quality of the historical floc images of the flocs in the region, and obtain the quality evaluation value of the historical floc images. The specific evaluation process is as follows: The historical alum flower image is converted to grayscale, and a two-dimensional coordinate system is constructed based on the historical alum flower image, wherein the unit length in the coordinate system is the length of one pixel in the historical alum flower image; Get the preset horizontal convolution kernel G' x Vertical convolution kernel G' y The pixel points with coordinates (x, y) in the historical alum flower image are obtained in a two-dimensional coordinate system, and the horizontal convolution kernel G' is applied to each pixel. x and the vertical convolution kernel G' y Convolve with the neighborhood of the pixel at coordinates (x, y) to obtain the horizontal gradient value G of the pixel at coordinates (x, y). x (x,y) and vertical gradient value G y (x,y); Calculate the sharpness evaluation value M(x,y) of the pixel at coordinates (x,y): ; The sum of the squares of the sharpness evaluation values of each pixel in the historical alum flower image is obtained to obtain the target sharpness evaluation value M´ of the historical alum flower image, and then normalized. The feature blur value ▽ is obtained by convolving the pixel at coordinates (x, y) with a preset Laplacian kernel L´. 2 I(x,y); Step S104: Obtain the feature blur value of each pixel in the historical alum flower image, and obtain the variance B corresponding to the feature blur value of the pixel in the historical alum flower image. △ And perform normalization processing; Calculate the quality evaluation value A of the historical alum flower image as follows: A = γ1 × M´ + γ2 × B △ Where γ1 and γ2 are the preset first evaluation coefficient and second evaluation coefficient, respectively, γ1+γ2=1, γ1>0, γ2>0; Step S105: Obtain the maximum value of the quality evaluation value of several historical alum floc images within a certain unit time period in the historical period of the region, and record the historical alum floc image corresponding to the maximum value as the target historical alum floc image of the region.
2. The image processing-based method for identifying and monitoring alum flowers according to claim 1, characterized in that, Step S200 includes: Step S201: Obtain the target historical alum floc image in the region, perform Gaussian filtering on the target historical alum floc image, extract the feature indicators of the alum floc in the target historical alum floc image, and obtain a feature indicator set. The feature indicators are the equivalent diameter, color, and equivalent area of the alum floc. The specific evaluation process is as follows: The target historical alum flower image is converted to HSV space using a color conversion tool to obtain the hue H, saturation S, and brightness V of the pixels in the target historical alum flower image. A two-dimensional coordinate system is then established based on the target historical alum flower image. Step S202: Use the Canny algorithm to locate the region where the alum flowers are located in the target historical alum flower image, obtain the image region where the alum flowers are located in the target historical alum flower image, and record it as the target image region; The average values H´, S´, and V´ of the hue, saturation, and brightness of the pixels in the target image region are calculated respectively and denoted as , and then aggregated to obtain the color Q={H´, S´, V´} in the target historical alum flower image; Step S203: Obtain the total number E of pixels in the target image region. sum Divide the length of the region by the pixel length of the target historical alum flower image to obtain the scaling factor k, where the pixel length is the total number of pixels corresponding to the length in the target historical alum flower image. Calculate the equivalent area F=E of the alum flowers in the target historical alum flower image. sum ×k 2 ; Calculate the equivalent diameter R of the alum flowers in the target historical alum flower image: ; The equivalent diameter R, color Q, and equivalent area F of the target historical alum flower image are combined to obtain the feature index set of the target historical alum flower image; Step S204: Obtain the historical time period of the target historical alum flower image, and obtain the historical alum flower detection data of the region within the historical time period, wherein the duration of the historical time period is the same as the unit duration, and the detection index in the historical alum flower detection data is the alum flower concentration and alum flower type of the region obtained through experimental testing; The evaluation process involves assessing the correlation between various feature indicators in the target historical alum flower image and the detection indicators in the historical alum flower detection data. Obtain the data corresponding to each detection index in the historical alum floc detection data of the region, and determine that there is a data correlation between each feature index in the feature index set and each detection index in the historical alum floc detection data; The feature index set is combined with the historical alum flower detection data to obtain alum flower-related data for the region.
3. The image processing-based method for identifying and monitoring alum flowers according to claim 2, characterized in that, Step S300 includes: Step S301: Obtain alum floc related data for each area in the sedimentation tank during each historical period of each historical cycle, and extract the data corresponding to each detection index and the value of each characteristic index from the alum floc related data; Step S302: A machine learning algorithm is used to construct a floc monitoring model for the sedimentation tank. The specific construction process is as follows: According to a preset ratio, the historical periods are divided into training sets and test sets. The normalized values of the various feature indicators in the alum flower-related data are used as the input data of the alum flower monitoring model, and the data corresponding to the various detection indicators in the alum flower-related data are used as the target output data. The training set is used to train the alum flower monitoring model, and the test set is used to obtain the mean square error of the alum flower concentration in the alum flower monitoring model and the accuracy of the alum flower type in the alum flower monitoring model. When both the mean square error and the accuracy are greater than the preset thresholds, the construction of the alum flower monitoring model is determined to be complete.
4. The image processing-based method for identifying and monitoring alum flowers according to claim 3, characterized in that, Step S400 includes: Step S401: During the current cycle, use an industrial camera to take pictures of each area in the sedimentation tank to obtain alum floc images of each area, and obtain the maximum value of the quality evaluation value of different alum floc images in the area, and take the alum floc image corresponding to the maximum value of the quality evaluation value as the target alum floc image of the area, and obtain the target alum floc images of each area. Step S402: Extract the feature indicators of alum flowers in the target alum flower images in each region and input them into the alum flower monitoring model to obtain the data corresponding to the detection indicators of alum flowers in each region output by the alum flower monitoring model. Feedback is provided in real time on the user interface of the staff. When the concentration of alum flowers in a certain region exceeds the preset concentration threshold, an alarm is automatically issued and the staff is prompted to take corresponding measures.
5. An image processing-based hemp flower identification and monitoring system, used to execute the image processing-based hemp flower identification and monitoring method according to any one of claims 1-4, characterized in that, The system includes a quality assessment module, a data-related assessment module, a model building module, and a flocculent plant monitoring module. The quality assessment module is used to assess the presentation quality of the historical alum flower image for the alum flowers in the region to which it belongs, and to obtain the target historical alum flower image in the region. The data correlation evaluation module is used to evaluate the data correlation between the feature indicators in the target historical alum flower image and the detection indicators in the historical alum flower detection data, and to obtain alum flower correlation data. The model building module is used to acquire alum floc-related data in different areas of the sedimentation tank and to build alum floc monitoring model in the sedimentation tank. The alum floc monitoring module is used to acquire images of alum floc in the sedimentation tank, use the alum floc monitoring model in the sedimentation tank to monitor the state of alum floc in the sedimentation tank, and automatically issue an alarm based on the monitored alum floc state to prompt staff to take appropriate measures.
6. The image processing-based alum flower identification and monitoring system according to claim 5, characterized in that, The quality assessment module includes a quality evaluation value unit and a quality assessment unit; The quality evaluation value unit is used to calculate the quality evaluation value of the historical floc images in the sedimentation tank; The quality assessment unit is used to evaluate the presentation quality of the historical alum flower image on the alum flower in the region according to the quality evaluation value, and obtain the target historical alum flower image in the region.
7. The image processing-based alum flower identification and monitoring system according to claim 5, characterized in that, The data-related evaluation module includes a feature index extraction unit and a data-related evaluation unit; The feature index extraction unit is used to extract the feature indexes of the alum flowers in the target historical alum flower image to obtain the feature index set of the target historical alum flower image; The data correlation evaluation unit is used to evaluate the data correlation between the feature indicators in the feature indicator set and the feature indicators in the historical alum flower detection data based on the feature indicator set of the target historical alum flower image and in combination with the historical alum flower detection data in the region, so as to obtain alum flower related data.
8. The image processing-based alum flower identification and monitoring system according to claim 5, characterized in that, The model building module includes model building units; The model building unit is used to acquire alum floc-related data in different areas of the sedimentation tank and build an alum floc monitoring model for the sedimentation tank.
9. The image processing-based alum flower identification and monitoring system according to claim 5, characterized in that, The alum flower monitoring module includes an alum flower monitoring unit; The floc monitoring unit is used to acquire floc images of the sedimentation tank and to monitor the floc status in the sedimentation tank using the floc monitoring model.