Remote control method and system for ink-jet printing wastewater
Through K-means algorithm clustering and fuzzy matching technology, the problem of inaccurate precipitant dosage in inkjet printing wastewater treatment was solved, and efficient remote control and treatment effect of inkjet printing wastewater was achieved.
Patent Information
- Application Number
- CN202511166289.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-09-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing inkjet printing wastewater treatment, traditional monitoring methods are unable to accurately track the dynamic changes in water patterns, resulting in reduced accuracy in precipitant addition and excessive effluent color.
The K-means algorithm is used to cluster and construct the water ripple monitoring area. The optimal placement point of the precipitation agent is determined through fuzzy matching and water surface velocity complexity calculation. A remote control system is built to achieve precise control.
It improves the utilization rate of precipitation agents and wastewater treatment effect, reduces the risk of excessive chromaticity of effluent, and improves the management efficiency of inkjet printing wastewater treatment.
Smart Images

Figure CN120681860A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and more particularly to a remote control method and system for inkjet printing wastewater. Background Art
[0002] Inkjet printing technology is widely used in the textile industry due to its high precision and flexibility. However, the wastewater it produces is complex (including multiple types of dyes, such as reactive, disperse, and acid dyes), characterized by pulsed discharge, high chroma, and toxic decomposition products. Direct discharge can lead to reduced water transmittance, ecological damage, and carcinogenic risks. Traditional inkjet printing wastewater treatment relies on manual inspections and fixed dosing strategies, which are subject to response lag, redundant reagents, and the limitations of single-point monitoring.
[0003] Existing remote monitoring methods are limited to single-point water quality probes or single-frame snapshots of visible light cameras, and lack the ability to track and fuzzy match the water ripple monitoring area in continuous RGB (Red, Green, Blue) image sequences at high frequencies. Water ripples may split, diffuse, or merge with other water ripples in adjacent frames, causing traditional template matching or color threshold segmentation algorithms to fail, making it impossible to accurately establish cross-frame correspondences and quantify flow velocity complexity. The direct consequence of this is that the precipitant placement position cannot dynamically migrate with the "fastest water flow change zone", resulting in uneven agent diffusion, reduced flocculation efficiency, and a significantly increased risk of effluent chromaticity exceeding the standard. Summary of the Invention
[0004] In order to solve the technical problem that the above-mentioned existing monitoring methods are unable to track dynamic water ripple changes, resulting in reduced accuracy of precipitant injection and excessive chromaticity of the effluent water, the present invention provides solutions in the following aspects.
[0005] In a first aspect, a remote control method for inkjet printing wastewater comprises: Collect continuous frame images of the inkjet printing wastewater surface and use clustering to construct the water ripple monitoring area; Select any frame image as the target image, and the next frame of the target image as the reference image. Perform fuzzy matching on the target image and the reference image. During the matching process, calculate the matching probability between the watermark monitoring areas in the target image and the reference image. If the matching probability of any pair of watermark monitoring areas in the target image and the reference image is the largest, then the watermark monitoring area in the target image is used as the matching monitoring area of the corresponding watermark monitoring area in the reference image, and then obtain the matching source of each watermark monitoring area in the reference image. The water surface velocity complexity of the water ripple monitoring area in the target image is calculated according to the matching source, and the geometric center of the water ripple monitoring area with the highest water surface velocity complexity is used as the optimal placement point of the precipitation agent, and a remote control system is built to achieve remote control.
[0006] Preferably, the clustering adopts the K-means algorithm.
[0007] Preferably, the method of constructing a watermark monitoring area by clustering includes: Use the K-means algorithm to iteratively cluster consecutive frame images. In each iteration, the Euclidean distance from each pixel to the center of each cluster and the degree of membership of each pixel to each cluster are calculated. The cluster with the largest degree of membership is selected as the cluster to which the corresponding pixel belongs. After each iteration, the cluster evaluation is calculated based on the distance from the pixel in the cluster to the central pixel. When the cluster evaluation drops for the first time, the iteration operation is stopped. That is, each cluster currently obtained corresponds to a watermark monitoring area.
[0008] Preferably, before fuzzy matching the target image and the reference image, a watermark monitoring area for matching is selected from the target image. The selection principle is: The water ripple monitoring area in the reference image is projected into the target image, and the water ripple monitoring area with the largest pixel intersection is found and marked, as well as the area adjacent to the water ripple monitoring area. All marked water ripple monitoring areas are selected as water ripple monitoring areas for matching.
[0009] Preferably, the process of obtaining the matching probability is: Calculate the mean pixel values of all pixels in any water ripple monitoring area in the reference image on the three channels of red, green and blue, and combine them into a reference color mean vector; calculate the mean pixel values of all pixels in any water ripple monitoring area selected in the target image on the three channels of red, green and blue, and combine them into a target color mean vector; The cosine similarity between the reference color mean vector and the target color mean vector is calculated to obtain the matching probability.
[0010] Preferably, the total number of pixels in all matched water ripple monitoring areas in the reference image of any water ripple monitoring area in the target image is obtained as the first parameter; the number of all matched water ripple monitoring areas in the reference image of the water ripple monitoring area in the target image is counted as the second parameter; the number of pixels in the water ripple monitoring area in the target image is obtained as the third parameter; and the product of the ratio of the first parameter to the third parameter and the difference between 1 and the reciprocal of the second parameter is taken as the water surface flow velocity complexity of the water ripple monitoring area in the target image.
[0011] Preferably, the process of obtaining the membership degree includes: Calculate the ratio of the Euclidean distance from any pixel to the center of any cluster to the sum of the Euclidean distances from the pixel to the centers of all other clusters; Calculate the cosine similarity between the RGB vector of the pixel and the RGB vector of any cluster center; The membership is obtained by multiplying the ratio by the cosine similarity.
[0012] In a second aspect, a remote control system for inkjet printing wastewater is provided, comprising: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, any one of the remote control methods for inkjet printing wastewater is implemented.
[0013] The beneficial effects of the present invention are: 1. In inkjet printing wastewater images, the K-means algorithm can cluster pixels based on features such as color and position. Water ripples in different regions exhibit different color and texture characteristics due to differences in water flow speed, direction, and wastewater composition distribution. The algorithm captures these differences by calculating the Euclidean distance from the pixel to the cluster center, clustering water ripple pixels with similar characteristics to form a water ripple monitoring area. In the early stages of iteration, clusters are continuously adjusted, improving both clustering effectiveness and evaluation. When the cluster evaluation begins to decline, iteration is stopped to avoid over-segmentation or unreasonable merging of clusters, thereby ensuring that the clustering results reasonably distinguish water ripple areas and are not overly complex, thereby improving the rationality and stability of the water ripple monitoring area.
[0014] 2. The watermark monitoring area with the largest pixel intersection and its adjacent areas are selected as matching targets. This takes into account the spatial continuity of watermarks and the correlation between changes in adjacent areas. This approach captures dynamic changes and improves matching accuracy. The matching probability is then quantified using the color mean vector and cosine similarity, mathematically expressing the watermark color characteristics. Calculating the color mean vector comprehensively reflects color distribution, while cosine similarity accurately measures vector similarity, providing a reliable quantitative indicator for matching.
[0015] 3. The calculation formula for water surface velocity complexity comprehensively considers multiple factors, including the total number of pixels in the matched water ripple monitoring area, the number of matched water ripple monitoring areas, and the number of pixels in the water ripple monitoring area in the target image. These factors reflect the changes in water ripples in different images from different perspectives. For example, the total number of pixels reflects the diffusion range of water ripples, and the number of matched water ripple monitoring areas reflects the frequency of water ripple changes. Accurately calculating water surface velocity complexity is of great guiding significance for the placement of precipitation agents. In areas with high water surface velocity complexity, water flow is intense, and precipitation agents need to diffuse and mix faster to achieve a good precipitation effect. By using the geometric center of the water ripple monitoring area with the highest water surface velocity complexity as the optimal placement point for precipitation agents, the utilization rate of the agent and the treatment effect can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a method flow chart of steps S1 to S3 in a remote control method for inkjet printing wastewater according to an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, but not all of the embodiments.
[0018] Reference Figure 1 A remote control method for inkjet printing wastewater includes steps S1 to S3, which are specifically as follows: S1: Collect continuous frame images of the inkjet printing wastewater surface and use clustering to construct the water ripple monitoring area.
[0019] In one embodiment, multiple image acquisition devices are installed above the water flow channel of inkjet printing wastewater. The installation of these devices must follow the principle of covering the entire path of the inkjet printing wastewater, and the acquisition height and angle of all devices from the water surface must be consistent, so as to obtain a continuous frame RGB image sequence of the complete water flow channel.
[0020] Since most of the inkjet printing wastewater is colored wastewater, color gathering areas will form on the water surface, so it is necessary to construct a water ripple monitoring area for each frame image in the RGB image sequence.
[0021] The above construction process is as follows: First, the RGB image sequence is clustered using a K-means clustering algorithm, with the initial k value set to 1, that is, initially assuming that all pixels in the image belong to the same cluster; and iterative clustering is performed.
[0022] When constructing water ripple monitoring areas based on the K-means clustering algorithm, to more accurately handle blurred boundaries and complex colors in images, we calculate not only the spatial distance between pixels and cluster centers but also color similarity, combining these two to define the degree of membership. This degree of membership determines the degree to which pixels belong to each cluster center, leading to a more reasonable division of water ripple areas.
[0023] In one embodiment, the cluster radius is set to: Where, is the first Pixels to The Euclidean distance between cluster centers, is the first The position of the pixel, For the The location of the cluster center.
[0024] In one embodiment, the membership is set to: Where, is the first Pixel pair The membership degree of the cluster centers, is the first Pixels to The Euclidean distance between cluster centers, is the first Pixels to Cluster centers (excluding the clusters), To exclude The total number of clusters other than clusters, For the A vector of RGB three-channel values of pixels, For the The vector of RGB three-channel values of the cluster centers, Represents cosine similarity.
[0025] During the iterative process of K-means clustering, the membership degree provides a quantitative indicator of each pixel's association with each cluster center. Unlike traditional K-means algorithms, which simply assign pixels to the cluster with the closest cluster center, this algorithm considers both spatial distance and color similarity. For example, if a pixel is spatially far from a cluster center but closely resembles that center in color, the membership degree may be assigned a higher value, ensuring a certain probability of belonging to that cluster. This makes the clustering process more flexible and avoids incorrect classifications caused by distance alone.
[0026] Then calculate the degree of subordination of the pixel to all cluster centers, and select the cluster with the largest degree of subordination as the cluster to which the pixel belongs.
[0027] When k = 1, a clustering operation is completed, and then a cluster evaluation is calculated. After that, the k value is increased by 1 and clustering is performed again. This cycle is repeated, and the k value is continuously increased and clustering and cluster evaluation are calculated.
[0028] The above cluster evaluation is set as: Where, For cluster evaluation, is the number of clusters, For the The minimum distance between all pixels in a cluster and the central pixel. For the The maximum distance value from all pixels in a cluster to the central pixel, Represents the exponential function with the natural base e as the base.
[0029] The above clustering evaluation combines the number of clusters and the density of pixel distribution within each cluster to measure the clustering effect. When the number of clusters increases to a certain level, the distribution of pixels within each cluster will become more and more dense (that is, the difference in distance from the pixels within the cluster to the center becomes smaller, increases), while However, when the number of clusters increases to a certain critical value, continuing to increase the number of clusters may cause the number of pixels in each cluster to decrease to a certain extent, making the distance difference between the pixels in the cluster and the center unchanged or even larger (for example, there are only a few pixels in the cluster, and they may be distributed in different directions from the center, resulting in becomes smaller), at this time Reduce, while The increase in may not be able to offset this decrease, resulting in a decrease in the value of cluster evaluation.
[0030] When the clustering evaluation shows a decrease for the first time, it means that increasing the number of clusters can no longer make the clustering effect better reflect the effective division of the data. At this time, clustering is stopped and the number of clusters at this time is considered to be the most appropriate. Each cluster obtained at this time corresponds to a watermark monitoring area.
[0031] S2: Select any frame image as the target image, take the next frame of the target image as the reference image, perform fuzzy matching on the target image and the reference image, calculate the matching probability between the target image and the watermark monitoring area in the reference image during the matching process, if the matching probability of any pair of watermark monitoring areas in the target image and the reference image is the largest, then the watermark monitoring area in the target image is used as the matching monitoring area of the corresponding watermark monitoring area in the reference image, and then obtain the matching source of each watermark monitoring area in the reference image.
[0032] It is important to consider that the water ripple monitoring area may split or diffuse under the influence of water flow. Splitting refers to the splitting of a water ripple monitoring area in the previous frame into multiple smaller ones in the next frame; diffusion refers to the spreading of a water ripple monitoring area in the previous frame into a larger one in the next frame.
[0033] This change destroys the integrity of the original watermark monitoring area, making it difficult to directly match the watermark monitoring areas in two adjacent frames. Therefore, it is necessary to perform fuzzy matching on the watermark monitoring areas of two consecutive frames to determine which watermark monitoring area (or areas) in the previous frame the watermark monitoring area in the latter frame originates from.
[0034] In one embodiment, based on the water ripple monitoring area obtained in S1 above, and selecting any frame image as the target image, the next frame image of the target image is used as the reference image, and the matching probability of any water ripple monitoring area in the reference image and each water ripple monitoring area in the target image is calculated.
[0035] Among them, the selection principle of the watermark monitoring area in the target image is: Project (e.g., translate) all pixel points of any watermark monitoring in the reference image to the target image, find and mark the watermark monitoring area with the largest intersection with these moved pixel points in the reference image, and mark the watermark monitoring area adjacent to the watermark monitoring area with the largest intersection. These marked watermark monitoring areas are the watermark monitoring areas selected in the target image for matching.
[0036] Furthermore, the cosine similarity of the RGB channel average vector of any watermark monitoring area in the reference image and any watermark monitoring area selected in the target image is calculated to determine the matching probability, that is, the relationship is satisfied: Where, Indicates the reference image The watermark monitoring area is selected from the target image. The matching probability of the watermark monitoring area is 、 and Respectively The pixel mean of all pixels in the watermark monitoring area in the red, green and blue channels, 、 and Respectively The pixel mean of all pixels in the watermark monitoring area in the red, green and blue channels, Represents cosine similarity. 、 and Combined into the target color mean vector, similarly, 、 and Combined into the reference color mean vector.
[0037] According to the above matching probability calculation formula, the matching probability of all watermark monitoring areas selected in the target image and the first watermark monitoring area in the reference image is calculated. The matching probability of the watermark monitoring area is the largest among any pair of watermark monitoring areas in the target image and the reference image, and the watermark monitoring area in the target image is used as the matching monitoring area of the corresponding watermark monitoring area in the reference image. The watermark monitoring area is derived from the matched watermark monitoring area in the target image.
[0038] To sum up, the core task of matching waterripple monitoring areas is to determine the corresponding area of each waterripple monitoring area selected in the previous frame RGB image in the subsequent frame RGB image; the matching relationship is: taking the waterripple monitoring area in the previous frame RGB image as the benchmark, calculate the matching probability of each waterripple monitoring area in the subsequent frame and each waterripple monitoring area selected in the previous frame, and find the most likely corresponding relationship; the output result is: obtain which waterripple monitoring area (or areas) in the previous frame each waterripple monitoring area in the subsequent frame matches, as well as related matching information (such as the number of matched pixels, the number of matched waterripple monitoring areas, etc.).
[0039] Through the above steps, the corresponding water ripple monitoring areas matched to all water ripple monitoring areas in each subsequent frame image in the previous frame image can be obtained, thereby clarifying the corresponding relationship between the water ripple monitoring areas in two adjacent frame images.
[0040] For example, the water ripple monitoring area X in the subsequent frame may match the water ripple monitoring area A in the previous frame, or may be one of multiple water ripple monitoring areas split from the water ripple monitoring area A in the previous frame, or may be a new water ripple monitoring area formed by merging multiple water ripple monitoring areas in the previous frame.
[0041] S3: Calculate the water surface velocity complexity of the water ripple monitoring area in the target image based on the matching source, take the geometric center of the water ripple monitoring area with the highest water surface velocity complexity as the optimal placement point of the precipitation agent, and build a remote control system to achieve remote control.
[0042] At the end of S2 above, the correspondence between the water ripple monitoring areas in two adjacent frames of images is determined by fuzzy matching, and the matching source of each water ripple monitoring area in the subsequent frame and the relevant matching parameter information (such as the number of pixels in the matching monitoring area and the number of matching monitoring areas, etc.) are obtained.
[0043] However, this matching relationship alone is not sufficient to directly reflect the dynamic characteristics of water flow. If the water flow changes slowly, the changes in the water ripple monitoring area may not be obvious. If the water flow changes drastically, the water ripple monitoring area may split into multiple small areas or spread into a larger area.
[0044] Therefore, the information obtained by matching in the above S2 is used to calculate the water surface flow velocity complexity of each water ripple monitoring area to evaluate the speed and complexity of water flow changes and quantify them into a specific value.
[0045] In one embodiment, the total number of pixels in all matched waterripple monitoring areas in the reference image for any waterripple monitoring area in the target image is obtained as a first parameter. The first parameter reflects the change in size of the area in the subsequent frame image related to the waterripple monitoring area in the previous frame. If the first parameter is larger, it means that the matched area in the subsequent frame contains more pixels, which may mean that the waterripple monitoring area in the target image has undergone changes such as diffusion. The number of all matched waterripple monitoring areas in the reference image for the waterripple monitoring area in the target image is counted as a second parameter. The second parameter reflects the situation that a waterripple monitoring area in the previous frame is split into multiple small areas in the subsequent frame. If the second parameter is larger, it means that multiple small waterripple monitoring areas are matched in the reference image, that is, the waterripple monitoring area in the target image has undergone cracking.
[0046] In addition, the number of pixels in the water ripple monitoring area in the target image is synchronously obtained as a third parameter, which represents the size of the water ripple monitoring area in the initial state; Furthermore, the product of the ratio of the first parameter to the third parameter and the difference between 1 and the reciprocal of the second parameter is used as the water surface flow velocity complexity of the water ripple monitoring area of the target image.
[0047] The water surface velocity complexity is calculated for each water ripple monitoring area in each frame according to the above formula. In this way, the degree of change of each water ripple monitoring area between different frames can be quantified, thus reflecting the change of water flow in this area.
[0048] After calculating the water surface velocity complexity of each water ripple monitoring zone in each image frame, the water ripple monitoring zone with the highest complexity is identified. The geometric center of this water ripple monitoring zone is then calculated and determined as the optimal placement point for the precipitant. Because this point represents the location where the water flow changes most rapidly and the water ripple monitoring zone experiences the greatest change, placing the precipitant there maximizes its effectiveness. Once placed, the precipitant quickly reacts with impurities such as suspended particles and dye molecules in the wastewater, forming larger flocs. These flocs are more likely to collide and aggregate under the influence of the fast-flowing water, accelerating the sedimentation process, improving sedimentation efficiency, and reducing the amount of pollutants in the wastewater.
[0049] For example, after determining the optimal discharge point for inkjet printing wastewater, remote control can be achieved by building a remote control system. Specifically, a PLC-based remote monitoring system can be used, connecting the wastewater treatment equipment via a PLC (Programmable Logic Controller). Using a remote gateway, data can be uploaded to a monitoring platform, enabling remote start and stop of the equipment, parameter setting, and other functions. This allows for remote control of inkjet printing wastewater treatment, improving management efficiency and treatment effectiveness.
[0050] The system includes a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, the remote control method for inkjet printing wastewater according to the first aspect of the present invention is implemented.
[0051] The system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and therefore will not be described in detail here.
[0052] It should be noted that those skilled in the art may make various modifications and improvements without departing from the scope of the present invention, and these modifications and improvements fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be based on the appended claims.
Claims
1. A remote control method for inkjet printing wastewater, characterized in that: include: Collect continuous frame images of the inkjet printing wastewater surface and use clustering to construct the water ripple monitoring area; Select any frame image as the target image, and the next frame of the target image as the reference image. Perform fuzzy matching on the target image and the reference image. During the matching process, calculate the matching probability between the watermark monitoring areas in the target image and the reference image. If the matching probability of any pair of watermark monitoring areas in the target image and the reference image is the largest, then the watermark monitoring area in the target image is used as the matching monitoring area of the corresponding watermark monitoring area in the reference image, and then obtain the matching source of each watermark monitoring area in the reference image. The water surface velocity complexity of the water ripple monitoring area in the target image is calculated according to the matching source, and the geometric center of the water ripple monitoring area with the highest water surface velocity complexity is used as the optimal placement point of the precipitation agent, and a remote control system is built to achieve remote control.
2. The remote control method for inkjet printing wastewater according to claim 1, characterized in that: The K-means algorithm is used for clustering.
3. The remote control method for inkjet printing wastewater according to claim 2, characterized in that: The method of constructing a watermark monitoring area by clustering includes: Use the K-means algorithm to iteratively cluster consecutive frame images. In each iteration, the Euclidean distance from each pixel to the center of each cluster and the degree of membership of each pixel to each cluster are calculated. The cluster with the largest degree of membership is selected as the cluster to which the corresponding pixel belongs. After each iteration, the cluster evaluation is calculated based on the distance from the pixel in the cluster to the central pixel. When the cluster evaluation drops for the first time, the iteration operation is stopped. That is, each cluster currently obtained corresponds to a watermark monitoring area.
4. The remote control method for inkjet printing wastewater according to claim 1, characterized in that: Before fuzzy matching the target image and the reference image, the watermark monitoring area for matching is selected in the target image. The selection principle is: The water ripple monitoring area in the reference image is projected into the target image, and the water ripple monitoring area with the largest pixel intersection is found and marked, as well as the area adjacent to the water ripple monitoring area. All marked water ripple monitoring areas are selected as water ripple monitoring areas for matching.
5. The remote control method for inkjet printing wastewater according to claim 4, characterized in that: The process of obtaining the matching probability is as follows: Calculate the mean pixel values of all pixels in any water ripple monitoring area in the reference image on the three channels of red, green and blue, and combine them into a reference color mean vector; calculate the mean pixel values of all pixels in any water ripple monitoring area selected in the target image on the three channels of red, green and blue, and combine them into a target color mean vector; The cosine similarity between the reference color mean vector and the target color mean vector is calculated to obtain the matching probability.
6. The remote control method for inkjet printing wastewater according to claim 1, characterized in that: The total number of pixels in all matched water ripple monitoring areas in the reference image of any water ripple monitoring area in the target image is obtained as the first parameter; the number of all matched water ripple monitoring areas in the reference image of the water ripple monitoring area in the target image is counted as the second parameter; the number of pixels in the water ripple monitoring area in the target image is obtained as the third parameter; and the product of the ratio of the first parameter to the third parameter and the difference between 1 and the reciprocal of the second parameter is used as the water surface flow velocity complexity of the water ripple monitoring area in the target image.
7. The remote control method for inkjet printing wastewater according to claim 3, characterized in that: The process of obtaining the membership degree includes: Calculate the ratio of the Euclidean distance from any pixel to the center of any cluster to the sum of the Euclidean distances from the pixel to the centers of all other clusters; Calculate the cosine similarity between the RGB vector of the pixel and the RGB vector of any cluster center; The membership is obtained by multiplying the ratio by the cosine similarity.
8. A remote control system for inkjet printing wastewater, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the remote control method for inkjet printing wastewater according to any one of claims 1 to 7 is implemented.