A method, apparatus, device and storage medium for measuring volume of flying ink drops

By combining filtering and gradient calculation with the bounding rectangle algorithm to segment the ink droplet region, the accuracy and real-time issues of flying ink droplet volume recognition are solved. This method is applicable to inkjet printing, spraying and other fields, and reduces data annotation and computation costs.

CN119810061BActive Publication Date: 2025-11-18JIHUA LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411883154.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-11-18
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify and measure the volume of flying ink droplets, especially in fields such as inkjet printing and spraying. Traditional image processing methods cannot effectively address issues such as changes in droplet shape and uneven grayscale, while deep learning methods suffer from high computational demands, poor real-time performance, and difficulty in interpretation.

Method used

Ink droplet images are obtained through filtering. The ink droplet volume is calculated by gradient calculation and edge feature extraction, combined with the bounding rectangle algorithm and adaptive threshold segmentation, which reduces hardware requirements and adapts to complex environments.

Benefits of technology

It improves the accuracy and real-time performance of flying ink droplet detection, reduces the need for labeled data and computational load, and is suitable for industrial production scenarios with high real-time requirements, thereby improving production efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810061B_ABST
    Figure CN119810061B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of ink drop volume measurement, and in particular to a flying ink drop volume measurement method, device, equipment and storage medium; the gradient is calculated after filtering the ink drop image, noise interference is reduced, the accuracy of edge feature extraction is improved, and misjudgment and missed judgment are avoided; the region is divided based on the edge feature, the actual situation of the ink drop is considered, and the ink drop affected by small volume, large shape change and light is effectively detected; the flying ink drop region is obtained by dividing the image through the circumscribed rectangle algorithm, which can cope with the shape and gray scale problems of the ink drop; compared with the deep learning method, a large number of labeled data are not required, the cost is saved, the calculation is simple, it is suitable for real-time scenes, and the black box problem is avoided. Overall, the detection accuracy, adaptability and real-time performance are improved, and reliable technical support is provided for industrial production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ink droplet volume measurement technology, specifically to a method, apparatus, device, and storage medium for measuring the volume of flying ink droplets. Background Technology

[0002] In modern industrial production, the detection and measurement of flying ink droplets is crucial, especially in inkjet printing, spraying, and atomization, where precise control directly impacts production quality and results. However, flying ink droplet detection faces numerous challenges. Due to their small size, highly variable shape, and susceptibility to factors such as illumination and speed, they are difficult to effectively distinguish in image processing. Traditional image processing techniques, such as threshold-based image segmentation, struggle to handle these variations and uncertainties. Ink droplet volume and shape recognition is a critical step in automated production lines; accurate droplet volume identification improves production efficiency and ensures output quality. Current threshold segmentation techniques cannot effectively address droplet shape variations and uneven grayscale, resulting in poor recognition performance in high dynamic range images. While deep learning technology has emerged and shows potential in image segmentation, automatically learning droplet features and avoiding the hassle of manually setting thresholds, it also faces challenges. For example, training requires a large amount of labeled data, placing high demands on droplet image acquisition and labeling; the training and inference processes are computationally intensive, requiring high-performance hardware and making them unsuitable for scenarios with high real-time requirements; and the black-box nature of the model makes it difficult to explain the decision-making process in actual deployment, posing challenges for subsequent debugging and optimization. Summary of the Invention

[0003] To address the shortcomings of the prior art, this invention proposes a method, apparatus, device, and storage medium for measuring the volume of flying ink droplets.

[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0005] A method for measuring the volume of flying ink droplets includes: acquiring an ink droplet image from a camera and filtering the ink droplet image to obtain a filtered image; calculating the gradient of the filtered image based on a preset gradient calculation formula to obtain a gradient image; extracting edge features from the gradient image; dividing the gradient image into regions based on the edge features to obtain two outer edge regions; performing a segmentation operation on the gradient image based on a preset bounding rectangle algorithm, a preset adjustment function, and the two outer edge regions to obtain two flying ink droplet regions; calculating the ink droplet volume in the two outer edge regions based on the two outer edge regions, the edge features, the two flying ink droplet regions, and the gradient image; and calculating the average of the two ink droplet volumes to obtain the flying ink droplet volume. After filtering the ink droplet image, the gradient image is calculated, which effectively reduces noise interference in the image, improves the accuracy of subsequent edge feature extraction, and avoids misjudgment and missed judgment caused by noise and other factors, thereby improving the accuracy of the detection results. Based on edge features, two outer edge regions are obtained through region division, taking into account various actual situations of ink droplets. For flying ink droplets that are small in size, have large shape variations, and are affected by factors such as illumination and speed, this method can more effectively detect and measure them. The flying ink droplet region is obtained by segmenting the gradient image using the bounding rectangle algorithm, adjustment function, and two outer edge regions. This method effectively addresses the problems of ink droplet shape variations and uneven grayscale. Through innovative segmentation methods, this scheme can more accurately identify ink droplets with different shapes and grayscale distributions, providing a more accurate detection method for ink droplets. This solution provides strong support for the recognition of ink droplet volume and shape in automated production lines, thereby improving production efficiency and ensuring output quality. Compared with deep learning methods, this solution does not require a large amount of labeled data for model training, reducing the requirements for ink droplet image acquisition and labeling, and saving time and labor costs. The calculation process is relatively simple, without the huge computational load in the training and inference process of deep learning models, and has lower hardware requirements, making it more suitable for application scenarios with high real-time requirements. It also avoids the problems of difficult-to-explain decision-making processes and debugging and optimization difficulties caused by the black-box nature of deep learning models. In summary, this solution can effectively improve the accuracy, adaptability and real-time performance of flying ink droplet detection, providing more reliable ink droplet detection technology support for inkjet printing, spraying, and atomization in industrial production.

[0006] Furthermore, the step of segmenting the gradient image based on a preset bounding rectangle algorithm, a preset adjustment function, and two outer edge regions to obtain two flying ink droplet regions includes: analyzing the two outer edge regions using the bounding rectangle algorithm to obtain two ink droplet rectangles; calculating a first set of lines and a second set of lines based on the two outer edge regions and the two ink droplet rectangles; setting an adaptive threshold for each first line in the first set of lines based on the two ink droplet rectangles, the preset adjustment function, and the second set of lines; and segmenting the gradient image based on the two outer edge regions and each adaptive threshold to obtain two flying ink droplet regions. Obtaining the ink droplet rectangles using the bounding rectangle algorithm accurately defines the ink droplet range; calculating the first and second set of lines and setting the adaptive threshold better adapts to different ink droplet conditions in practical applications, effectively addressing the diversity of ink droplets; segmenting the gradient image based on the outer edge regions and adaptive thresholds to obtain flying ink droplet regions improves detection accuracy and adaptability; compared to traditional methods, this embodiment better adapts to complex situations, such as changes in illumination and ink droplet shape, providing more reliable ink droplet detection technology support for inkjet printing and other fields in industrial production.

[0007] Furthermore, the step of analyzing the two outer edge regions using a preset circumscribed rectangle algorithm to obtain two ink droplet bounding boxes includes: extracting the outer boundary features of the two outer edge regions; and analyzing the outer boundary features using the circumscribed rectangle algorithm to obtain the two ink droplet bounding boxes. First, extracting the outer boundary features of the outer edge regions allows for accurate understanding of the ink droplet's edge characteristics; then, using the circumscribed rectangle algorithm to obtain the ink droplet bounding boxes accurately defines the ink droplet's range, providing an accurate foundation for subsequent ink droplet detection and analysis, and improving detection accuracy and efficiency.

[0008] Further, the step of calculating the first set of connecting lines and the second set of connecting lines based on the two outer edge regions and the two ink droplet rectangles includes: obtaining the coordinates of the four vertices of the two ink droplet rectangles to obtain a first coordinate set; calculating the center point of the two ink droplet rectangles based on the first coordinate set and the bounding rectangle algorithm; obtaining all edge pixels of the two outer edge regions to obtain an edge pixel set; calculating the line connecting each edge pixel in the edge pixel set to its corresponding center point to obtain a first set of connecting lines; dividing the two outer edge regions into regions based on edge features to obtain two inner boundary regions; calculating the intersection point of each first connecting line in the first set with its corresponding inner boundary region to obtain an intersection point set; and calculating the second set of connecting lines based on the edge pixel set, the intersection point set, and the first set of connecting lines. By obtaining the coordinates of the four vertices of the ink droplet rectangle and calculating the center point, key reference points are provided for subsequent analysis. Next, the set of edge pixels is obtained and the lines connecting them to the center point are calculated, accurately reflecting the relationship between the edge pixels and the center point. Dividing the two outer edge regions into inner boundary regions helps to analyze ink droplet features more precisely. Calculating the intersection of the first line with the inner boundary region and obtaining the second set of lines further enriches the description of the ink droplet. Overall, this method can more comprehensively and accurately analyze the morphology and characteristics of ink droplets, providing more reliable data support for flying ink droplet detection, improving the accuracy and adaptability of detection, and making it suitable for various complex industrial production scenarios, such as inkjet printing and spraying.

[0009] Further, the step of setting the adaptive threshold for each first connection in the first connection set based on the two ink droplet rectangles, the preset adjustment function, and the second connection set includes: calculating the line connecting the center points of the two ink droplet rectangles to obtain the third connection; calculating the angle between all the first connections and the third connection in the first connection set to obtain the angle set; obtaining the pixel set of all the second connections in the second connection set; sorting and counting each pixel set to obtain the grayscale value sequence set; calculating the median of each grayscale value sequence in the grayscale value sequence set to obtain the basic threshold set; and calculating the adaptive threshold for each first connection based on the basic threshold set, the angle set, and the adjustment function. By calculating the line connecting the center points of two ink droplet rectangles, a third connecting line is obtained. The angle between the first and third connecting lines is then calculated, providing angular information for subsequent analysis. The pixel set of the second connecting line is obtained and sorted to obtain a grayscale value sequence set. The median is then calculated to obtain a basic threshold set. Combining the angle set and an adjustment function, an adaptive threshold for each first connecting line is calculated. This method can dynamically adjust the threshold based on the specific characteristics of the ink droplet. Compared to traditional fixed threshold methods, it better adapts to complex situations such as different ink droplet shapes, sizes, and lighting conditions, improving the accuracy and adaptability of flying ink droplet detection. This provides more reliable technical support for inkjet printing, spraying, and other fields in industrial production, helping to improve production quality and efficiency.

[0010] Furthermore, the step of segmenting the gradient image based on two outer edge regions and each adaptive threshold to obtain two flying ink droplet regions includes: acquiring the grayscale value of each pixel in the two outer edge regions and comparing each grayscale value with the adaptive threshold of its corresponding first connecting line to obtain a comparison result; analyzing the comparison result; if the comparison result shows that there is a grayscale value greater than the adaptive threshold of its corresponding first connecting line, then the pixel with the grayscale value greater than the adaptive threshold of its corresponding first connecting line is set as an ink droplet pixel to obtain an ink droplet pixel set; otherwise, the pixel with the grayscale value less than the adaptive threshold of its corresponding first connecting line is set as a background pixel to obtain a background pixel set; and segmenting the gradient image based on the ink droplet pixel set and the background pixel set to obtain two flying ink droplet regions. By acquiring the grayscale value of each pixel in the outer edge region and comparing it with the corresponding adaptive threshold of the first connecting line, accurate classification of pixels is achieved; this method can dynamically adjust the judgment criteria according to the actual situation of the ink droplets, effectively dealing with the changes of different ink droplets under complex conditions such as illumination and shape. When the grayscale value is greater than the adaptive threshold, it is identified as an ink droplet pixel; otherwise, it is identified as a background pixel. This accurately distinguishes ink droplets from the background and improves the accuracy of segmentation. The two resulting flying ink droplet regions provide accurate basic data for subsequent ink droplet detection and analysis. This method has significant application value in industrial production fields such as inkjet printing and spraying, and can improve production quality and efficiency, adapt to various complex production environments, and provide a reliable and efficient method for flying ink droplet detection.

[0011] Further, the step of calculating the ink droplet volume in the two outer edge regions based on the two outer edge regions, edge features, two flying ink droplet regions, and gradient images includes: calculating the depth information of all pixels in the two outer edge regions based on a preset stereo matching algorithm to obtain a depth information set; analyzing the gradient image based on the stereo matching algorithm to obtain the resolution of the gradient image; acquiring its intrinsic and extrinsic parameters from the camera, and converting each depth information in the depth information set into three-dimensional coordinates according to the intrinsic and extrinsic parameters and resolution to obtain a three-dimensional coordinate set; recognizing the gradient image based on the two flying ink droplet regions and edge features to obtain the contours of the two ink droplets; and calculating the volume of the two ink droplet contours based on a preset approximate geometric model and the three-dimensional coordinate set to obtain the ink droplet volume in the two outer edge regions. By utilizing a pre-defined stereo matching algorithm to obtain pixel depth information, and combining it with camera intrinsic and extrinsic parameters and resolution to convert it into three-dimensional coordinates, an effective expansion from two-dimensional to three-dimensional analysis is achieved, making ink droplet analysis more closely aligned with actual spatial conditions. Ink droplet contours are obtained through gradient image recognition, and then the ink droplet volume is calculated using an approximate geometric model and a set of three-dimensional coordinates, resulting in more accurate volume calculations. Overall, the system fully considers the spatial characteristics and edge properties of ink droplets, improving the accuracy of ink droplet volume calculations and providing reliable and valuable data support for ink droplet detection and other related processes in industrial production.

[0012] Furthermore, a flying ink droplet volume measurement device includes: a filtered image calculation module for acquiring ink droplet images from a camera and filtering the ink droplet images to obtain a filtered image; a gradient image calculation module for performing gradient calculation on the filtered image based on a preset gradient calculation formula to obtain a gradient image; a feature extraction module for extracting edge features from the gradient image; an outer edge region segmentation module for segmenting the gradient image based on the edge features to obtain two outer edge regions; a segmentation operation module for performing segmentation operation on the gradient image based on a preset circumscribed rectangle algorithm, a preset adjustment function, and the two outer edge regions to obtain two flying ink droplet regions; an ink droplet volume calculation module for calculating the ink droplet volume in the two outer edge regions based on the two outer edge regions, edge features, the two flying ink droplet regions, and the gradient image; and a flying ink droplet volume calculation module for calculating the average value of the two ink droplet volumes to obtain the flying ink droplet volume. After filtering the ink droplet image, gradient calculation reduces noise interference, improves the accuracy of edge feature extraction, and avoids false positives and false negatives. Region segmentation based on edge features, considering the actual situation of ink droplets, effectively detects small, shape-variable, and light-affected droplets. Image segmentation using bounding rectangle algorithms obtains the flying ink droplet region, addressing issues related to droplet shape and grayscale. Compared to deep learning methods, it requires no large amount of labeled data, saving costs, is computationally simple, suitable for real-time scenarios, and avoids the black-box problem. Overall, it improves detection accuracy, adaptability, and real-time performance, providing reliable technical support for industrial production.

[0013] Furthermore, a flying ink droplet volume measuring device includes: a memory and at least one processor, the memory storing instructions; at least one processor invokes the instructions in the memory to cause the flying ink droplet volume measuring device to perform the steps of a flying ink droplet volume measuring method as described in any of the preceding claims.

[0014] Furthermore, a computer-readable storage medium storing instructions, characterized in that, when executed by a processor, the instructions implement the steps of a flying ink droplet volume measurement method as described in any of the preceding claims.

[0015] The beneficial effects of the flying ink droplet volume measurement method of the present invention are as follows:

[0016] After filtering the ink droplet image, the gradient image is calculated, which effectively reduces noise interference in the image, improves the accuracy of subsequent edge feature extraction, and avoids misjudgment and missed judgment caused by noise and other factors, thereby improving the accuracy of the detection results. Based on edge features, two outer edge regions are obtained through region division, taking into account various actual situations of ink droplets. For flying ink droplets that are small in size, have large shape variations, and are affected by factors such as illumination and speed, this method can more effectively detect and measure them. The flying ink droplet region is obtained by segmenting the gradient image using the bounding rectangle algorithm, adjustment function, and two outer edge regions. This method effectively addresses the problems of ink droplet shape variations and uneven grayscale. Through innovative segmentation methods, this scheme can more accurately identify ink droplets with different shapes and grayscale distributions, providing a more accurate detection method for ink droplets. This solution provides strong support for the recognition of ink droplet volume and shape in automated production lines, thereby improving production efficiency and ensuring output quality. Compared with deep learning methods, this solution does not require a large amount of labeled data for model training, reducing the requirements for ink droplet image acquisition and labeling, and saving time and labor costs. The calculation process is relatively simple, without the huge computational load in the training and inference process of deep learning models, and has lower hardware requirements, making it more suitable for application scenarios with high real-time requirements. It also avoids the problems of difficult-to-explain decision-making processes and debugging and optimization difficulties caused by the black-box nature of deep learning models. In summary, this solution can effectively improve the accuracy, adaptability and real-time performance of flying ink droplet detection, providing more reliable ink droplet detection technology support for inkjet printing, spraying, and atomization in industrial production. Attached Figure Description

[0017] Figure 1 This is a first flowchart of a method for measuring the volume of a flying ink droplet provided in an embodiment of the present invention;

[0018] Figure 2This is a second flowchart of a method for measuring the volume of flying ink droplets provided in an embodiment of the present invention;

[0019] Figure 3 This is a third flowchart of a method for measuring the volume of flying ink droplets provided in an embodiment of the present invention;

[0020] Figure 4 This is a fourth flowchart of a method for measuring the volume of flying ink droplets provided in an embodiment of the present invention;

[0021] Figure 5 A fifth flowchart of a method for measuring the volume of a flying ink droplet provided in an embodiment of the present invention;

[0022] Figure 6 A sixth flowchart of a method for measuring the volume of a flying ink droplet provided in an embodiment of the present invention;

[0023] Figure 7 A seventh flowchart of a method for measuring the volume of a flying ink droplet provided in an embodiment of the present invention;

[0024] Figure 8 This is a schematic diagram of a flying ink droplet volume measuring device provided in an embodiment of the present invention;

[0025] Figure 9 This is a schematic diagram of a flying ink droplet volume measurement device provided in an embodiment of the present invention. Detailed Implementation

[0026] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.

[0027] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0028] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the method for measuring the volume of flying ink droplets in this invention includes:

[0029] 101. Acquire ink droplet images from the camera and filter the ink droplet images to obtain filtered images;

[0030] In this embodiment, firstly, multi-angle images are acquired from the binocular camera. Then, Gaussian filtering is applied to these images to smooth noise and enhance the outline of the ink droplets. This embodiment only involves processing one image; the processing operations for the remaining images are the same and will not be described further. Assuming the input image is I(x,y), the image after Gaussian filtering is Ismooth(x,y), whose expression is:

[0031] Where G(i,j) is the Gaussian kernel function, and k is the radius of the filtering window. The filtered image can remove background noise and improve the contrast of the ink droplet area.

[0032] 102. Calculate the gradient of the filtered image based on the preset gradient calculation formula to obtain the gradient image;

[0033] In this embodiment, the Sobel operator is used to calculate the gradient of the image, thereby obtaining the edge information of the image. The formula for gradient calculation is: in, For image pixels, and These represent the x and y directions of the pixel, respectively; the formula for calculating the image gradient magnitude is:

[0034] Gradient images can clearly show the edges and contours of ink droplets, where Gx is the gradient of a pixel in the x-direction and Gy is the gradient of a pixel in the y-direction.

[0035] 103. Extract edge features from gradient images;

[0036] In this embodiment, the same ink droplet at different times will appear in an image, denoted as I1 and I2. The outer and inner edges of I1 and I2 can be determined by gradient images. The edges of the ink droplets can be located based on the changes in values ​​in the gradient images.

[0037] 104. Divide the gradient image into regions based on edge features to obtain two outer edge regions;

[0038] In this embodiment, it is assumed that the edge features of the ink droplet region have been extracted through gradient image, and the outer edge regions of I1 and I2 are denoted as E1 and E2, respectively.

[0039] 105. Based on the preset bounding rectangle algorithm, preset adjustment function, and two outer edge regions, the gradient image is segmented to obtain two flying ink droplet regions;

[0040] 106. The ink droplet volume in the two outer edge regions is calculated based on the two outer edge regions, edge features, two flying ink droplet regions, and gradient image;

[0041] 107. Calculate the average volume of the two ink droplets to obtain the volume of the flying ink droplet.

[0042] In this embodiment, the gradient image is obtained by filtering the ink droplet image, which effectively reduces noise interference in the image, improves the accuracy of subsequent edge feature extraction, and avoids misjudgment and missed judgment caused by noise and other factors, thereby improving the accuracy of the detection results. Two outer edge regions are obtained by dividing the region based on edge features, taking into account various actual situations of ink droplets. For flying ink droplets that are small in size, have large shape variations, and are affected by factors such as illumination and speed, it can be detected and measured more effectively. The flying ink droplet region is obtained by segmenting the gradient image using the bounding rectangle algorithm, adjustment function, and two outer edge regions. This effectively addresses the problems of ink droplet shape variations and uneven grayscale. This scheme, through innovative segmentation methods, can more accurately identify ink droplets with different shapes and grayscale distributions. This solution provides strong support for the identification of ink droplet volume and shape in automated production lines, thereby improving production efficiency and ensuring output quality. Compared with deep learning methods, this solution does not require a large amount of labeled data for model training, reducing the requirements for ink droplet image acquisition and labeling, and saving time and labor costs. The calculation process is relatively simple, without the huge amount of computation in the training and inference process of deep learning models, and has lower hardware requirements, making it more suitable for application scenarios with high real-time requirements. It also avoids the problems of difficult-to-explain decision-making processes and debugging and optimization difficulties caused by the black box nature of deep learning models. In summary, this solution can effectively improve the accuracy, adaptability and real-time performance of flying ink droplet detection, providing more reliable ink droplet detection technology support for inkjet printing, spraying, and atomization in industrial production.

[0043] Please see Figure 2 A second embodiment of the method for measuring the volume of flying ink droplets in this invention includes:

[0044] 201. Use the circumscribed rectangle algorithm to analyze the two outer edge regions to obtain two ink droplet rectangles;

[0045] 202. Based on the two outer edge regions and the two ink droplet rectangles, calculate the first set of connecting lines and the second set of connecting lines;

[0046] 203. Based on the two ink droplet rectangles, the preset adjustment function, and the second set of lines, set the adaptive threshold for each first line in the first set of lines;

[0047] 204. The gradient image is segmented based on the two outer edge regions and each adaptive threshold to obtain two flying ink droplet regions.

[0048] In this embodiment, the ink droplet bounding box is obtained through the circumscribed rectangle algorithm, which can accurately define the range of the ink droplet. The first and second connection sets are calculated and an adaptive threshold is set, which can better adapt to different ink droplet conditions in practical applications and effectively cope with the diversity of ink droplets. The flying ink droplet region is obtained by segmenting the gradient image based on the outer edge region and the adaptive threshold, which improves the detection accuracy and adaptability. Compared with traditional methods, this embodiment can better adapt to complex situations, such as changes in illumination and changes in ink droplet shape, and provides more reliable ink droplet detection technology support for inkjet and other fields in industrial production.

[0049] Please see Figure 3 A third embodiment of the method for measuring the volume of flying ink droplets in this invention includes:

[0050] 303. Extract the outer boundary features of the two outer edge regions;

[0051] 304. The outer boundary features are analyzed using the circumscribed rectangle algorithm to obtain two ink droplet rectangles.

[0052] In this embodiment, for the two outer edge regions E1 and E2, the circumscribed rectangle algorithm is used to process and obtain the minimum rectangular frame surrounding the ink droplet. By analyzing the outer boundary features of the two outer edge regions, the minimum rectangular frame surrounding the ink droplet is calculated, which is the ink droplet rectangular frame in step 302.

[0053] First, the outer boundary features of the outer edge region are extracted to accurately grasp the edge situation of the ink droplet; then, the bounding rectangle algorithm is used to obtain the ink droplet rectangle, which can accurately define the range of the ink droplet, providing an accurate basis for subsequent ink droplet detection and analysis, and improving detection accuracy and efficiency.

[0054] Please see Figure 4 A fourth embodiment of a method for measuring the volume of flying ink droplets in this invention includes:

[0055] 401. Obtain the coordinates of the four vertices of the two ink droplet rectangles to obtain the first coordinate set;

[0056] 402. The center points of the two ink droplet rectangles are calculated based on the first coordinate set and the bounding rectangle algorithm;

[0057] In this embodiment, assuming the center points of the two ink droplet rectangles are center point O1 and center point O2, then center points O1 and O2 represent the positions of the ink droplets in the two images. Center points O1 and O2 can be calculated using the following formula.

[0058]

[0059] Where x1,x2,y1,y2 and x3,x4,y3,y4 are the coordinates of the vertices on any diagonal of the two ink droplet rectangles, respectively.

[0060] 403. Obtain all edge pixels in the two outer edge regions to obtain the edge pixel set;

[0061] In this embodiment, the two outer edge regions E1 and E2 of the ink droplet can be used to obtain all edge pixels in these two outer edge regions to obtain the complete set of edge pixels;

[0062] 404. Calculate the line connecting each edge pixel in the edge pixel set to its corresponding center point to obtain the first set of connecting lines;

[0063] In this embodiment, assuming that the center points of the two ink droplet rectangles are O1 and O2 respectively, by connecting each edge pixel S with its corresponding center point O1 or O2 of the ink droplet rectangle, the set of all edge pixels and their corresponding center points O1 or O2 can be obtained, which is the first connection line set obtained in step 404.

[0064] 405. Divide the two outer edge regions into two inner boundary regions based on their edge features.

[0065] In this embodiment, it is assumed that the two outer edge regions E1 and E2 are divided into inner edge regions I1 and I2 based on edge features, and these two inner edge regions are denoted as F1 and F2 respectively.

[0066] 406. Calculate the intersection points of each first connecting line in the first connecting line set with its corresponding inner boundary region to obtain the intersection point set;

[0067] In this embodiment, it is assumed that there is a first connecting line O1S or O2S, which can intersect with the edge of its corresponding inner edge region F1 or F2 to obtain the intersection point P1.

[0068] 407. Calculate the second set of connecting lines based on the set of edge pixels, the set of intersection points, and the set of the first connecting lines;

[0069] In this embodiment, the first set of connecting lines includes a second set of connecting lines, a set of edge pixels, and a set of intersection points. Each second connecting line, edge pixel, and intersection point in the first set of connecting lines has a one-to-one correspondence. Therefore, the second set of connecting lines can be calculated from the set of edge pixels, the set of intersection points, and the first set of connecting lines. The second set of connecting lines is the line connecting each edge pixel in the edge pixel set S to its corresponding intersection point. By obtaining the coordinates of the four vertices of the ink droplet rectangle and calculating the center point, key reference points are provided for subsequent analysis. Next, obtaining the set of edge pixels and calculating the line connecting it to the center point accurately reflects the relationship between the edge pixels and the center point. Dividing the two outer edge regions into inner boundary regions helps to analyze ink droplet features more precisely. Calculating the intersection points of the first connecting lines with the inner boundary regions and obtaining the second set of connecting lines further enriches the description of the ink droplet. Overall, it can more comprehensively and accurately analyze the morphology and characteristics of the ink droplet, providing more reliable data support for flying ink droplet detection, improving the accuracy and adaptability of detection, and is applicable to various complex industrial production scenarios, such as inkjet printing and spraying.

[0070] Please see Figure 5 The fifth embodiment of a method for measuring the volume of flying ink droplets in this invention includes:

[0071] 501. Calculate the line connecting the center points of the two ink droplet rectangles to obtain the third connecting line;

[0072] 502. Calculate the angles between all first and third lines in the first set of lines to obtain the set of angles;

[0073] 503. Obtain the set of pixels of all second connecting lines in the second connecting line set;

[0074] 504. Sort and count the data for each set of pixels to obtain a set of grayscale value sequences;

[0075] In this embodiment, it is assumed that there exists a second connection SP1. By counting each pixel on SP1 and arranging all pixels on SP1 from largest to smallest, we denote them as {g1, g2, ... g...} n}, to obtain the grayscale value sequence.

[0076] 505. Calculate the median of each gray value sequence in the set of gray value sequences to obtain the basic threshold set;

[0077] 506. Calculate the adaptive threshold for each first connection line based on the basic threshold set, the included angle set, and the adjustment function.

[0078] In this embodiment, an adaptive threshold can be set for the first connecting line of each outer edge region. The adaptive threshold of the first connecting line at different positions can be dynamically adjusted according to its corresponding basic threshold, corresponding angle, and adjustment function. Assuming there is a first connecting line O1S and a third connecting line O1O2, the angle α between O1S and O1O2 can be calculated, and an adaptive threshold can be set for the first connecting line O1S based on the angle α. The calculation formula for the adaptive threshold of the first connecting line O1S includes: Ta = T0·f(a), where T0 is the basic threshold of the first connecting line, which is the gray value sequence {g1, g2, ... g...} corresponding to the first connecting line. n The median of}, f(a) is an adjustment function of angle a. Thus, as the included angle α increases, the threshold T... a It will also increase;

[0079] In another embodiment, besides the adaptive threshold segmentation method, the following alternatives can be considered:

[0080] Morphologically-based segmentation: The target region is enhanced through morphological operations such as dilation and erosion, and then the ink droplets are segmented through region analysis;

[0081] Image clustering-based segmentation methods: Using clustering algorithms (such as k-means) to group images, thereby distinguishing ink droplets from the background.

[0082] By calculating the line connecting the center points of two ink droplet rectangles, a third connecting line is obtained. The angle between the first and third connecting lines is then calculated, providing angular information for subsequent analysis. The pixel set of the second connecting line is obtained and sorted to obtain a grayscale value sequence set. The median is then calculated to obtain a basic threshold set. Combining the angle set and an adjustment function, an adaptive threshold for each first connecting line is calculated. This method can dynamically adjust the threshold based on the specific characteristics of the ink droplet. Compared to traditional fixed threshold methods, it better adapts to complex situations such as different ink droplet shapes, sizes, and lighting conditions, improving the accuracy and adaptability of flying ink droplet detection. This provides more reliable technical support for inkjet printing, spraying, and other fields in industrial production, helping to improve production quality and efficiency.

[0083] Please see Figure 6 The sixth embodiment of a method for measuring the volume of flying ink droplets in this invention includes:

[0084] 601. Obtain the grayscale value of each pixel in the two outer edge regions, and compare each grayscale value with the size of the adaptive threshold of the corresponding first connecting line to obtain the comparison result;

[0085] 602. Analyze the comparison results;

[0086] 603. When the comparison result shows that there is a gray value greater than the adaptive threshold of the corresponding first connection line, the pixel with the gray value greater than the adaptive threshold of the corresponding first connection line is set as an ink droplet pixel to obtain the ink droplet pixel set.

[0087] 604. Conversely, pixels with gray values ​​less than the adaptive threshold of their corresponding first connection line are set as background pixels to obtain a set of background pixels.

[0088] In this embodiment, in each outer edge region, a comparison result can be obtained by comparing the gray value of each pixel with the size of the adaptive threshold of the corresponding first connecting line; then, based on the comparison result, each pixel is determined to be an ink droplet pixel or a background pixel;

[0089] 605. Segment the gradient image based on the set of ink droplet pixels and the set of background pixels to obtain two flying ink droplet regions.

[0090] By acquiring the grayscale value of each pixel in the outer edge region and comparing it with the corresponding adaptive threshold of the first connecting line, accurate pixel classification is achieved. This method can dynamically adjust the judgment criteria according to the actual situation of the ink droplets, effectively dealing with the changes of different ink droplets under complex conditions such as lighting and shape. When the grayscale value is greater than the adaptive threshold, it is identified as an ink droplet pixel; otherwise, it is identified as a background pixel, accurately distinguishing ink droplets from the background and improving the accuracy of segmentation. The two flying ink droplet regions obtained at the end provide accurate basic data for subsequent ink droplet detection and analysis. This method has important application value in inkjet printing, spraying, and other fields in industrial production, improving production quality and efficiency, adapting to various complex production environments, and providing a reliable and efficient method for flying ink droplet detection.

[0091] Please see Figure 7 The seventh embodiment of a method for measuring the volume of flying ink droplets in this invention includes:

[0092] 701. Calculate the depth information of all pixels in the two outer edge regions based on the preset stereo matching algorithm to obtain the depth information set;

[0093] 702. Analyze the gradient image based on the stereo matching algorithm to obtain the resolution of the gradient image;

[0094] 703. Obtain the intrinsic and extrinsic parameters from the camera, and convert each depth information in the depth information set into three-dimensional coordinates based on the intrinsic and extrinsic parameters and resolution to obtain a three-dimensional coordinate set;

[0095] 704. Gradient image recognition is performed based on the two flying ink droplet regions and edge features to obtain the outlines of the two ink droplets;

[0096] In this embodiment, the contours of ink droplets in the gradient image are identified using the results of edge detection and region segmentation.

[0097] 705. Based on a preset approximate geometric model and a set of three-dimensional coordinates, the volume of the two ink droplet profiles is calculated to obtain the volume of the ink droplets in the two outer edge regions.

[0098] In this embodiment, the volume of the ink droplet can be estimated by using an approximate geometric model, such as an ellipsoidal model or an irregularly shaped three-dimensional mesh.

[0099] In this embodiment, the process of 3D reconstruction of ink droplet volume in gradient images captured by a binocular camera is described. A preset stereo matching algorithm is used to obtain pixel depth information, which is then converted into 3D coordinates based on camera intrinsic and extrinsic parameters and resolution. This effectively extends the analysis from 2D to 3D, making ink droplet analysis more closely reflect real-world spatial conditions. The ink droplet contour is obtained by recognizing the gradient image, and the volume is calculated using an approximate geometric model and a set of 3D coordinates, resulting in more accurate volume calculations. Overall, this method fully considers the spatial characteristics and edge properties of ink droplets, improving the accuracy of ink droplet volume calculations and providing reliable and valuable data support for ink droplet detection and other related industrial production processes.

[0100] The above describes a method for measuring the volume of flying ink droplets according to an embodiment of the present invention. The following describes a device for measuring the volume of flying ink droplets according to an embodiment of the present invention. Please refer to [link / reference]. Figure 8 One embodiment of the flying ink droplet volume measuring device of the present invention includes:

[0101] A device for measuring the volume of flying ink droplets, comprising:

[0102] The filtered image calculation module 1 is used to acquire ink droplet images from the camera and perform filtering processing on the ink droplet images to obtain filtered images;

[0103] The gradient image calculation module 2 is used to perform gradient calculation on the filtered image based on a preset gradient calculation formula to obtain a gradient image;

[0104] Feature extraction module 3 is used to extract edge features from the gradient image;

[0105] The outer edge region segmentation module 4 is used to segment the gradient image based on edge features to obtain two outer edge regions;

[0106] The segmentation module 5 is used to segment the gradient image based on a preset bounding rectangle algorithm, a preset adjustment function, and two outer edge regions to obtain two flying ink droplet regions.

[0107] The ink droplet volume calculation module 6 is used to calculate the ink droplet volume in the two outer edge regions based on the two outer edge regions, edge features, two flying ink droplet regions, and gradient image.

[0108] The flying ink droplet volume calculation module 7 is used to calculate the average of the volumes of two ink drops to obtain the flying ink droplet volume.

[0109] In this embodiment, the gradient is calculated after filtering the ink droplet image to reduce noise interference, improve the accuracy of edge feature extraction, and avoid false positives and false negatives. Regions are divided based on edge features, taking into account the actual situation of ink droplets, effectively detecting small, shape-varying, and light-affected droplets. The image is segmented using algorithms such as the bounding rectangle algorithm to obtain the flying ink droplet region, addressing issues related to droplet shape and grayscale. Compared to deep learning methods, it requires no large amount of labeled data, saving costs, is computationally simple, suitable for real-time scenarios, and avoids the black-box problem. Overall, it improves detection accuracy, adaptability, and real-time performance, providing reliable technical support for industrial production.

[0110] Figure 9 This is a schematic diagram of the structure of a flying ink droplet volume measurement device 800 provided in an embodiment of the present invention. The flying ink droplet volume measurement device 800 can vary considerably due to different configurations or performance. It may include one or more central processing units (CPUs) 813 (e.g., one or more processors) and a memory 820, and one or more storage media 830 (e.g., one or more mass storage devices) storing application programs 833 or data 832. The memory 820 and storage media 830 can be temporary or persistent storage. The program stored in the storage media 830 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the flying ink droplet volume measurement device 800. Furthermore, the processor 610 may be configured to communicate with the storage media 830 and execute the series of instruction operations in the storage media 830 on the flying ink droplet volume measurement device 800 to implement the steps of the flying ink droplet volume measurement method provided in the above-described method embodiments.

[0111] The flying ink droplet volume measurement device 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input / output interfaces 860, and / or one or more operating systems 831, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 9 The illustrated structure of the flying ink droplet volume measurement device does not constitute a limitation on a flying ink droplet volume measurement device, and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0112] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the flying ink droplet volume measurement method.

[0113] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for measuring the volume of a flying ink droplet, characterized in that, include: The ink droplet image is acquired from the camera and then filtered to obtain the filtered image. The gradient of the filtered image is calculated based on a preset gradient calculation formula to obtain the gradient image. Extracting edge features from gradient images; The gradient image is divided into regions based on edge features to obtain two outer edge regions; The gradient image is segmented based on a preset bounding rectangle algorithm, a preset adjustment function, and two outer edge regions to obtain two flying ink droplet regions. The circumscribed rectangle algorithm is used to analyze the two outer edge regions to obtain two ink droplet rectangles; Based on the two outer edge regions and the two ink droplet rectangles, the first set of connecting lines and the second set of connecting lines are calculated; Based on two ink droplet rectangles, a preset adjustment function, and a second set of lines, set an adaptive threshold for each first line in the first set of lines; Calculate the line connecting the center points of the two ink droplet rectangles to obtain the third line; Calculate the angles between all first and third lines in the first set of lines to obtain the set of angles; Get the set of pixels of all second connection lines in the second connection set; Sort and count the data for each set of pixels to obtain a set of grayscale value sequences; Calculate the median of each grayscale value sequence in the set of grayscale value sequences to obtain the basic threshold set; The adaptive threshold for each first connection is calculated based on the basic threshold set, the included angle set, and the adjustment function; The gradient image is segmented based on two outer edge regions and each adaptive threshold to obtain two flying ink droplet regions; The ink droplet volume in the two outer edge regions is calculated based on the two outer edge regions, edge features, two flying ink droplet regions, and gradient image. Calculate the average volume of the two ink droplets to obtain the volume of the flying ink droplet; Obtain the coordinates of the four vertices of the two ink droplet rectangles to obtain the first coordinate set; The center points of the two ink droplet rectangles are calculated based on the first coordinate set and the bounding rectangle algorithm. Obtain all edge pixels in the two outer edge regions to obtain the edge pixel set; Calculate the line connecting each edge pixel in the edge pixel set to its corresponding center point to obtain the first set of lines; The two outer edge regions are divided into two inner boundary regions based on their edge features. Calculate the intersection points of each first line in the first set of lines with its corresponding inner boundary region to obtain the intersection point set; The second set of connections is calculated based on the set of edge pixels, the set of intersection points, and the set of first connections.

2. The method for measuring the volume of a flying ink droplet as described in claim 1, characterized in that, The method of analyzing the two outer edge regions using a preset bounding rectangle algorithm to obtain two ink droplet rectangles includes: Extract the outer boundary features of the two outer edge regions; The outer boundary features are analyzed using the bounding rectangle algorithm to obtain two ink droplet rectangles.

3. The method for measuring the volume of a flying ink droplet as described in claim 1, characterized in that, The gradient image segmentation operation based on two outer edge regions and each adaptive threshold to obtain two flying ink droplet regions includes: The grayscale value of each pixel in the two outer edge regions is obtained, and the grayscale value is compared with the size of the adaptive threshold of the corresponding first connecting line to obtain the comparison result. Perform results analysis on the comparison results; If the comparison result shows that there is a gray value greater than the adaptive threshold of the corresponding first connection line, then the pixel with the gray value greater than the adaptive threshold of the corresponding first connection line is set as an ink droplet pixel to obtain the ink droplet pixel set. Conversely, pixels with gray values ​​less than the adaptive threshold of their corresponding first connection line are set as background pixels to obtain a set of background pixels. The gradient image is segmented based on the set of ink droplet pixels and the set of background pixels to obtain two flying ink droplet regions.

4. The method for measuring the volume of a flying ink droplet as described in claim 1, characterized in that, The calculation of droplet volumes in the two outer edge regions based on two outer edge regions, edge features, two flying ink droplet regions, and gradient images includes: The depth information of all pixels in the two outer edge regions is calculated based on a preset stereo matching algorithm to obtain a depth information set. The gradient image is analyzed based on the stereo matching algorithm to obtain the resolution of the gradient image; The intrinsic and extrinsic parameters of the camera are obtained, and each depth information in the depth information set is converted into three-dimensional coordinates based on the intrinsic and extrinsic parameters and resolution to obtain a three-dimensional coordinate set. Gradient images are identified based on the two flying ink droplet regions and edge features to obtain the outlines of the two ink droplets; Based on a pre-defined approximate geometric model and a set of three-dimensional coordinates, the volume of the two ink droplet profiles is calculated to obtain the volume of the ink droplets in the two outer edge regions.

5. A device for measuring the volume of flying ink droplets, characterized in that, include: The filtered image calculation module is used to acquire ink droplet images from the camera and filter the ink droplet images to obtain filtered images. The gradient image calculation module is used to calculate the gradient of the filtered image based on a preset gradient calculation formula to obtain the gradient image. The feature extraction module is used to extract edge features from the gradient image; The outer edge region segmentation module is used to segment the gradient image into regions based on edge features to obtain two outer edge regions; The segmentation module is used to segment the gradient image based on a preset bounding rectangle algorithm, a preset adjustment function, and two outer edge regions to obtain two flying ink droplet regions. Specifically, it includes: The circumscribed rectangle algorithm is used to analyze the two outer edge regions to obtain two ink droplet rectangles; Based on the two outer edge regions and the two ink droplet rectangles, the first set of connecting lines and the second set of connecting lines are calculated; Based on two ink droplet rectangles, a preset adjustment function, and a second set of lines, set an adaptive threshold for each first line in the first set of lines; Calculate the line connecting the center points of the two ink droplet rectangles to obtain the third line; Calculate the angles between all first and third lines in the first set of lines to obtain the set of angles; Get the set of pixels of all second connection lines in the second connection set; Sort and count the data for each set of pixels to obtain a set of grayscale value sequences; Calculate the median of each grayscale value sequence in the set of grayscale value sequences to obtain the basic threshold set; The adaptive threshold for each first connection is calculated based on the basic threshold set, the included angle set, and the adjustment function; The gradient image is segmented based on two outer edge regions and each adaptive threshold to obtain two flying ink droplet regions; The ink droplet volume calculation module is used to calculate the ink droplet volume in the two outer edge regions based on the two outer edge regions, edge features, two flying ink droplet regions, and gradient image. The flying ink droplet volume calculation module is used to calculate the average of the volumes of two ink droplets to obtain the flying ink droplet volume. Specifically, it includes: Obtain the coordinates of the four vertices of the two ink droplet rectangles to obtain the first coordinate set; The center points of the two ink droplet rectangles are calculated based on the first coordinate set and the bounding rectangle algorithm. Obtain all edge pixels in the two outer edge regions to obtain the edge pixel set; Calculate the line connecting each edge pixel in the edge pixel set to its corresponding center point to obtain the first set of lines; The two outer edge regions are divided into two inner boundary regions based on their edge features. Calculate the intersection points of each first line in the first set of lines with its corresponding inner boundary region to obtain the intersection point set; The second set of connections is calculated based on the set of edge pixels, the set of intersection points, and the set of first connections.

6. A device for measuring the volume of flying ink droplets, characterized in that, The flying ink droplet volume measurement device includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the flying ink droplet volume measurement device to perform the steps of the flying ink droplet volume measurement method as claimed in any one of claims 1-4.

7. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the flying ink droplet volume measurement method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Image deblurring method for flying ink droplets

    CN117437155A

  • Monocular vision-based deformation monitoring method, apparatus and device, and storage medium

    CN118602968A