Method and device for detecting spray head and spraying system
By detecting the shape properties of the liquid column output from the nozzle and needle, and using image acquisition and analysis technology, the problem of inconsistent nozzle flow rate was solved, ensuring the stability and consistency of the dyeing effect.
Patent Information
- Application Number
- CN202511010172.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-11-07
AI Technical Summary
The flow rate of dyeing liquid output from the nozzle does not match the predetermined flow rate, affecting the dyeing effect. This may be due to the pressure not meeting expectations or a defect in the nozzle.
By acquiring the shape attributes of the liquid column output by the nozzle needle, the target image is acquired using the image acquisition unit. The centerline and length of the liquid column are analyzed, and edge detection and least squares fitting are combined to determine whether the nozzle state meets expectations.
It enables accurate detection of the nozzle status, ensuring that the liquid flow rate and direction output by the nozzle meet the predetermined requirements, thereby improving the dyeing effect.
Smart Images

Figure CN120902430A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure generally relate to the field of spray printing technology, and more particularly to a method, apparatus and spray system for detecting a spray head. BACKGROUND
[0002] A spray device is used to spray a target object (e.g. cloth, object surface, etc.) with a dyeing liquid (e.g. ink). The spray device sprays the dyeing liquid via a spray head, thereby dyeing the target object.
[0003] In order to obtain a better spray effect, the spray head needs to continuously output the dyeing liquid at a predetermined flow rate. However, if the pressure of the dyeing liquid delivered to the spray head does not meet the expectation, or if the spray head has defects, the flow rate of the dyeing liquid output by the spray head will not match the predetermined flow rate, which will affect the spray effect. SUMMARY
[0004] To solve the above problems, the present disclosure provides a method, apparatus and spray system for detecting a spray head, which can detect the shape attribute of a liquid column formed by a target liquid output by a spray needle of the spray head, thereby determining whether the state of the spray head meets the expectation.
[0005] According to a first aspect of the present disclosure, there is provided a method for detecting a spray head, the spray head comprising a plurality of spray needles for outputting a plurality of liquid columns formed by a target liquid. The method comprises: obtaining a captured target image, the target image indicating at least one liquid column of the plurality of liquid columns; and determining a shape attribute of the at least one liquid column from the target image in order to determine a state of the spray head, the shape attribute comprising at least one of a liquid column length and a liquid column extension direction.
[0006] In some embodiments, determining the shape attribute of the at least one liquid column from the target image comprises: determining a center line of the at least one liquid column from the target image; and determining the shape attribute from the center line.
[0007] In some embodiments, determining the center line of the at least one liquid column from the target image comprises: separating the at least one liquid column in the target image from a background in the target image in order to determine a contour of the at least one liquid column, and determining the center line from the contour.
[0008] In some embodiments, determining the centerline of the at least one liquid column based on the target image includes: separating the at least one liquid column in the target image from the background in the target image based on an edge detection algorithm to determine the contour of the at least one liquid column; fitting the contour based on the least squares method to determine the slope and intercept of the linear equation corresponding to the centerline; determining the extension direction of the liquid column based on the slope, and determining the length of the liquid column based on the intercept.
[0009] In some embodiments, determining the centerline of the at least one liquid column based on the target image includes: performing illumination equalization processing on the target image based on a limited contrast adaptive histogram equalization algorithm; performing binarization processing on the illumination equalized target image; and determining the contour of the at least one liquid column based on the binarized target image so as to determine the centerline based on the contour.
[0010] In some embodiments, determining the shape properties of the at least one liquid column based on the target image includes: determining the pixel length of the at least one liquid column in the target image; and determining the liquid column length of the at least one liquid column based on the pixel length and the distance between the image acquisition unit and the at least one liquid column.
[0011] In some embodiments, determining the length of the at least one liquid column based on the pixel length and the distance between the image acquisition unit and the at least one liquid column includes: in response to determining that the current liquid column is outside the object-side focusing plane of the image acquisition unit, compensating the pixel length of the current liquid column in the target image according to a predetermined compensation coefficient; and determining the length of the current liquid column based on the compensated pixel length, wherein the predetermined compensation coefficient is related to a first distance between the current liquid column and the image acquisition unit and a second distance between the object-side focusing plane of the image acquisition unit and the image acquisition unit.
[0012] In some embodiments, the method further includes: controlling the driving unit to drive the image acquisition unit to move along the direction of the multiple nozzles and causing the driving image acquisition unit to sequentially acquire multiple target images, so that the multiple target images cover each of the multiple liquid columns; and determining the shape attributes of each of the multiple liquid columns based on the multiple target images.
[0013] In some embodiments, the method further includes: in response to determining that the shape properties of the at least one liquid column do not meet predetermined shape conditions, performing at least one of the following: controlling the liquid supply unit to adjust the flow rate of the target liquid supplied to the nozzle; and controlling the suction unit to suction the nozzle corresponding to the at least one liquid column.
[0014] According to a second aspect of the present disclosure, there is provided an apparatus for detecting a spray head, the spray head comprising a plurality of spray needles for outputting a plurality of liquid columns formed by a target liquid. The apparatus comprises: an image capturing unit configured to capture a target image, the target image being indicative of at least one liquid column of the plurality of liquid columns; and a control unit configured to perform the method according to the first aspect of the present disclosure.
[0015] In some embodiments, the apparatus further comprises: a background unit configured to provide a background in the target image, the background unit being disposed at a side of the spray head distal to the image capturing unit; a light source unit configured to provide illumination towards the plurality of liquid columns from a side where the image capturing unit is located, an illumination angle of the light source unit being configured to be adjustable; and a driving unit configured to, based on a control of the control unit, drive the image capturing unit to move along a direction in which the plurality of spray needles are arranged, so that the image capturing unit sequentially captures a plurality of target images, the plurality of target images covering each of the plurality of liquid columns.
[0016] In some embodiments, the apparatus further comprises: a liquid supply unit in communication with the spray head, the liquid supply unit being configured to supply the target liquid to the spray head based on a control of the control unit; and a suction unit.
[0017] According to a second aspect of the present disclosure, there is provided a spraying system. The spraying system comprises: a spray head comprising a plurality of spray needles for outputting a plurality of liquid columns formed by a target liquid; and an apparatus according to the second aspect of the present disclosure.
[0018] According to the technical solution of the present disclosure, a target image is acquired, the target image being indicative of at least one liquid column of the plurality of liquid columns; and a shape attribute of the at least one liquid column is determined based on the target image so as to determine a state of the spray head, the shape attribute comprising at least one of a liquid column length and a liquid column extension direction. The technical solution of the present disclosure can detect a shape attribute of a liquid column formed by a target liquid output by a spray needle of a spray head, so as to determine whether a state of the spray head is as expected.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of embodiments of the present disclosure or to limit the scope of the present disclosure. Other features of the present disclosure will become readily apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0020] The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent as various embodiments of the present disclosure are described in conjunction with the following drawings, in which like reference numerals refer to like elements, and in which:.
[0021] Figure 1 A schematic diagram showing a first perspective view of a spraying system of an embodiment of the present disclosure.
[0022] Figure 2 A schematic diagram showing a second view of a part of the apparatus for detecting a nozzle of an embodiment of the present disclosure.
[0023] Figure 3 A schematic diagram showing the imaging principle of the image acquisition unit of an embodiment of the present disclosure.
[0024] Figure 4 A schematic block diagram showing an example electronic device 400 that can be used to implement the method for detecting a nozzle of an embodiment of the present disclosure.
[0025] Figure 5 A flowchart showing a method for detecting a nozzle of an embodiment of the present disclosure.
[0026] Figure 6 A schematic diagram showing a target image of an embodiment of the present disclosure.
[0027] Figure 7 A schematic diagram showing a target image after illumination equalization processing of an embodiment of the present disclosure.
[0028] Figure 8 A schematic diagram showing a mask diagram of a liquid column of an embodiment of the present disclosure.
[0029] Figure 9 A schematic diagram showing a target image after profile separation of an embodiment of the present disclosure.
[0030] Figure 10 A schematic diagram showing a part of a nozzle of an embodiment of the present disclosure.
[0031] Figure 11 A schematic diagram showing determining a predetermined compensation coefficient of an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, in which various details of embodiments of the present disclosure are set forth to assist in understanding the present disclosure. It will be apparent to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the spirit and scope of the present disclosure. Thus, the present disclosure is not intended to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and features disclosed herein. Further, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
[0033] The term "includes," "including," and "have" and / or "has," as used herein, is used inclusively, that is, in a non-exclusive sense. The term "or" means "and / or" unless otherwise noted. The term "based on" means "based, at least in part, on." The term "one example embodiment" and "an example embodiment" means "at least one example embodiment." The term "another embodiment" means "at least one additional embodiment." The terms "a first," "a second," etc. can refer to different or the same objects. Other explicitly and implicitly recited definitions can also be found below.
[0034] As described previously, in order to obtain a better spraying effect, it is required that the spray head continuously outputs the dyeing liquid at a predetermined flow rate. However, if the pressure at which the dyeing liquid is delivered to the spray head does not meet the expectation, or if the spray head has defects, the flow rate of the dyeing liquid output by the spray head will not meet the predetermined flow rate, which will affect the spraying effect.
[0035] To at least partially solve one or more of the above problems and other potential problems, example embodiments of the present disclosure propose a scheme for detecting a spray head, in which a target image is acquired, the target image being indicative of at least one liquid column of the plurality of liquid columns; and a shape attribute of the at least one liquid column is determined based on the target image so as to determine a state of the spray head, the shape attribute including at least one of a liquid column length and a liquid column extension direction. The technical scheme of the present disclosure can detect the shape attribute of the liquid column formed by the target liquid and output by the spray needle of the spray head, so as to determine whether the state of the spray head meets the expectation.
[0036] Figure 1 A schematic diagram showing a first perspective view of a spraying system 100 of an embodiment of the present disclosure. Figure 2 A schematic diagram showing a second perspective view of a part of an apparatus 102 for detecting a spray head of an embodiment of the present disclosure. For ease of illustration, the positive directions of the X-axis, the Y-axis, and the Z-axis are shown by arrows in the figure. The spraying system 100 may, for example, implement an operation of spraying a target liquid on a target object. The target object may, for example, include a textile, a packaging film, etc., and the target liquid may, for example, include a dye, etc. The spraying system 100 may, for example, include the apparatus 102 for detecting a spray head, a spray head 104, and a liquid supply unit 106.
[0037] The liquid supply unit 106 includes, for example, a buffer cylinder 161, a proportional valve 162, a safety cylinder 163, and a pressure tank 164. The buffer cylinder 161, the proportional valve 162, the safety cylinder 163, and the pressure tank 164 are connected in sequence via a pipeline. The liquid supply unit 106 further includes, for example, a liquid supply pump 165, a flow sensor 166, and a liquid supply pipeline 167. The spray system 100 further includes a control unit 110, which can be implemented by, for example, a PLC (Programmable Logic Controller) or the like. The liquid supply unit 106 is connected to the spray head 104 via the liquid supply pipeline 167 to supply the target liquid to the spray head 104.
[0038] The liquid supply unit 106 can supply the target liquid to the spray head 104 with a stable flow rate, and the flow rate output by the liquid supply unit 106 can be adjusted in a large range. The liquid supply unit 106 can ensure that the flow rate of the target liquid output fluctuates within ±1% of the target flow rate, and the flow rate output by the liquid supply unit 106 can be adjusted, for example, in a range of 1 L / min to 10 L / min. The flow sensor 166 can detect the flow rate of the target liquid supplied by the liquid supply unit 106 to the spray head 104 in real time. The control unit 110 calculates the difference between the real-time flow rate detected by the flow sensor 166 and the target flow rate, and generates a control signal for controlling the proportional valve 162 according to the difference, so as to adjust the pressure supplied to the pressure tank 164 via the buffer cylinder 161, the proportional valve 162, and the safety cylinder 163. The pressure tank 164 has a gas layer on the upper side and a liquid layer on the lower side, and can buffer the fluctuation of the liquid itself. After the pressure tank 164 obtains the pressure, it outputs a value closer to the set flow rate. Through such continuous repetition of reducing the difference, when the flow rate tends to be the set value, the pressure tank 164 becomes a constant pressure source. In this way, the flow rate can be fluctuated within ±1% without the need for a high-precision, low-pulse pump.
[0039] In addition, the pressure tank 164 supplies the liquid through a servo magnetic pump 165. When the control unit 110 outputs a signal to the proportional valve 162, it also outputs a control signal to the servo magnetic pump 165, so that the flow rate of the target liquid pumped by the servo magnetic pump 165 substantially matches the set value. The displacement of the servo magnetic pump 165 is constant, and the flow rate of the servo magnetic pump 165 can be changed by controlling the rotation speed of the servo magnetic pump 165 to change from 1 L / min to 10 L / min. Because of these characteristics of the liquid supply unit 106, for a printhead with a resolution of 20 dpi and a width of 350 mm, the flow rate of the target liquid output by the printhead 104 through the spray needle is about 1 L / min; and for a printhead with a resolution of 40 dpi and a width of 1.8 meters, the flow rate of the target liquid output by the printhead 104 through the spray needle is about 10 L / min. For example, the flow rate in the range of 1 L / min to 10 L / min can cover a printhead with a resolution of 30 dpi, 40 dpi and 50 dpi, and a width of 350 mm, and a printhead with a resolution of 20 dpi, 30 dpi, and a width of 1.8 meters, and so on. It should be noted that the target liquid output by the printhead 104 through the spray needle is in the form of a liquid column. When the spray needle of the printhead 104 outputs the target liquid at a predetermined flow rate, the liquid column formed by the target liquid should meet the predetermined shape condition, for example, the liquid column length of the liquid column should meet the predetermined length and the predetermined direction. For example, the liquid column length of the liquid column should be greater than or equal to the predetermined lower limit of the length, and if the liquid column length of the liquid column is less than the predetermined lower limit of the length, it means that the flow rate of the target liquid output by the spray needle is less than the predetermined flow rate. The reason can be that the flow rate of the target liquid output by the liquid supply unit 106 to the printhead 104 is insufficient, or that the spray needle is defective (e.g., clogged). For example, the liquid column direction of the liquid column should meet the predetermined direction. If the liquid column direction of the liquid column does not meet the predetermined direction, it can be that the spray needle is defective, for example, the spray needle is clogged, or there is a liquid drop, an obstacle, etc. at the tip of the spray needle, so that the liquid column output by the spray needle deviates from the predetermined direction.
[0040] In order to detect the liquid column output by the spray needle of the printhead 104, the device 102 includes, for example, an image acquisition unit 121, a driving unit 122, a background unit 123, and a light source unit 124.
[0041] For example, the spraying system 100 further includes a printhead mounting bracket 108, which is provided with a printhead mounting hole for fixing the printhead 104 on both sides of the printhead 104. In addition, the printhead mounting bracket 108 can be installed in the form of a cantilever to fix two plates to both sides of the printhead 104, so as to ensure that the entire width range of the printhead 104 can be completely captured by the image acquisition unit 121 without interference. For printheads 104 with different widths, the printhead mounting bracket 108 can be fixed by loosening the bolts and moving along the aluminum profile groove to the appropriate position.
[0042] The image acquisition unit 121, for example, is a camera device, which is directed towards the nozzle 104, and can acquire a target image, which at least indicates at least one liquid column in the plurality of liquid columns output by the nozzle 104. The image acquisition unit 121, for example, can employ an industrial camera with high resolution, stable imaging, small distortion, large depth of field, and a subject distance of about 50 mm. It should be understood that the subject distance d of the image acquisition unit 121 is the distance between the subject plane of the image acquisition unit 121 and the image acquisition unit 121. For ease of understanding, Figure 3 A schematic diagram illustrating the imaging principle of the image acquisition unit 121 of the embodiment of the present disclosure. When the object being imaged is on the subject plane of the image acquisition unit 121, the object is focused by the lens of the image acquisition unit 121 (i.e., the focus point of the lens of the image acquisition unit 121 is on the object), and the object is clear in the image acquired of the object. It should be understood that for objects outside the subject plane of the image acquisition unit 121, the clarity of the object in the image acquired of the object varies due to the different distances between the object and the subject plane of the image acquisition unit 121.
[0043] When the object being imaged is on the subject plane of the image acquisition unit 121, the distance between the object being imaged and the image acquisition unit 121 (i.e., the distance between the object being imaged and the center line of the lens 1221 of the lens of the image acquisition unit 121) is the subject distance d, and at this time, the physical length (i.e., the actual length) L1 of the object being imaged (e.g., a liquid column) and the image length (i.e., the corresponding length in the image, or the "pixel length") L2 of the object being imaged (e.g., a liquid column) have a relationship defined as formula (1):
[0044] f = L1*d / L2 (1)
[0045] The image acquisition unit 121 is suspended on the support rod 1221 of the driving unit 122 by a support plate, and the shooting direction of the lens of the image acquisition unit 121 is perpendicular to the front of the nozzle 104. The light source unit 124 is disposed above the image acquisition unit 121, for example. The light source unit 124 can be a line light source, for example. The light source unit 124 can be a surface light source, for example. The light source unit 124 provides illumination from the side of the image acquisition unit towards the plurality of liquid columns. The illumination angle of the light source unit 124 is configured to be adjustable. The illumination brightness of the light source unit 124 is configured to be adjustable. The illumination provided by the light source unit 124 can improve the imaging quality of the target image, and the liquid column and the background can be more clearly distinguished in the target image by the illumination provided by the light source unit 124.
[0046] In some embodiments, the driving unit 122 further comprises a three-axis motion module 1222. The image acquisition unit 121 and the light source unit 124 are arranged on a support rod 1221, and the support rod 1221 is arranged on the three-axis motion module 1222. Through the three-axis motion module 1222, linkage along the X / Y / Z three directions can be realized, so that the image acquisition unit 121 can adjust the position in real time to adjust the shooting position, the focus position, and realize real-time and continuous detection on the liquid column.
[0047] In some embodiments, the spray needle of the spray head 104 outputs the target liquid, for example, along a vertically downward direction. The direction in which the image acquisition unit 121 is arranged is, for example, adapted to the direction in which the spray needle is arranged and the direction in which the target liquid is output, that is, in the target image acquired by the image acquisition unit 121, the direction in which the spray needle is arranged (for example, the X-axis direction) is the horizontal direction, and the direction in which the spray needle outputs the target liquid (for example, the Z-axis direction) is the vertical direction.
[0048] In some embodiments, a single target image acquired by the image acquisition unit 121 can cover all the liquid columns formed by all the spray needles of the spray head 104. In some cases, there can be distortion in the part close to the edge in the target image, and therefore, the control unit 110 can cut out a part of the target image for analysis to determine the shape attribute of the liquid column.
[0049] In some embodiments, the control unit 110 calculates a first physical distance corresponding to the range covered by the target image based on a visual algorithm, and transmits the calculated first physical distance to the three-axis motion module 1222, and controls the three-axis motion module 1222 to move a corresponding second physical distance according to the calculated first physical distance. In this way, through multiple shooting, calculation and movement, continuous detection is realized to determine the shape attribute of all the liquid columns output by the spray head 104. For example, the control unit 110 controls the three-axis motion module 1222 to drive the image acquisition unit 121 to move according to a predetermined step, and sequentially acquires a corresponding target image at each acquisition position, so that the plurality of target images acquired cover all the liquid columns output by the spray head 104.
[0050] Figure 5 A flowchart of a method 500 for detecting a spray head according to an embodiment of the present disclosure is shown. It should be understood that the method 500 can also include additional steps not shown and / or can omit steps shown, and the scope of the present disclosure is not limited in this respect. The method 500 can be executed by the control unit 110, or can be executed by the electronic device 400 as shown. Figure 4
[0051] At step 502, a target image acquired is obtained, and the target image at least indicates at least one liquid column in the plurality of liquid columns.
[0052] At step 504, a shape attribute of the at least one liquid column is determined from the target image in order to determine the state of the ejection head, the shape attribute comprising at least one of a liquid column length and a liquid column extension direction.
[0053] For example, at step 502, the control unit 110 receives, from the image capturing unit 121, a target image captured by the image capturing unit 121. The target image indicates at least one of the plurality of liquid columns. Figure 6 A schematic diagram of a target image 600 illustrating an embodiment of the present disclosure is shown. The target image 600 indicates a background 606 and a plurality of liquid columns 602. It should be appreciated that the liquid columns 602 are distinctly distinguished from the background 606 as they are illuminated by the light source unit 124. The fog-like region 604 below the liquid columns 602 is a region in which the target liquid forms a fog-like appearance and is not identified as a component of the liquid columns 602.
[0054] At step 604, determining the shape attribute of the at least one liquid column from the target image comprises determining a centerline of the at least one liquid column from the target image, and determining the shape attribute from the centerline.
[0055] In some embodiments, the control unit 110 separates the at least one liquid column 602 in the target image 600 from the background 606 in the target image in order to determine a contour of the at least one liquid column 602, and determines a centerline of the at least one liquid column 602 from the contour 602.
[0056] For example, determining the centerline of the at least one liquid column from the target image comprises separating the at least one liquid column 602 in the target image 600 from the background 606 in the target image based on an edge detection algorithm in order to determine a contour of the at least one liquid column, and fitting based on a least squares method from the contour in order to determine a slope and an intercept corresponding to a straight line equation corresponding to the centerline, and determining the liquid column extension direction from the slope and the liquid column length from the intercept.
[0057] In some embodiments, determining the centerline of the at least one liquid column from the target image comprises performing an illumination equalization process on the target image based on a limited contrast self-adaptive histogram equalization algorithm, performing a binarization process on the target image after the illumination equalization process, and determining a contour of the at least one liquid column from the target image after the binarization process in order to determine the centerline from the contour.
[0058] For example, in order to reduce the effects of noise and reflected light in the target image 600, the target image 600 can first be subjected to an illumination equalization process before further detection is performed on the target image 600.
[0059] The light equalization processing can be implemented by using a common histogram equalization algorithm. For the inkjet image of the nozzle 104 (e.g., the target image 600), there are regions with highlights (e.g., the region corresponding to the liquid column 602) and dark regions (e.g., the region corresponding to the background 606) in the target image 600. The goal of the light equalization processing is to highlight the contrast of the region corresponding to the liquid column 602 relative to the region corresponding to the background 606. Therefore, if the common histogram equalization is directly used, it is easy to cause the overall brightness of the target image 600 to be improved, thereby improving the overall contrast of the target image 600, but for the local inkjet region (e.g., the region corresponding to the liquid column 602), such brightness improvement is not conducive to subsequent detection.
[0060] To solve this problem, in some embodiments, a contrast-limited adaptive histogram equalization (CLAHE) algorithm is selected to perform light equalization processing on the target image 600, so as to improve the contrast.
[0061] CLAHE, on the one hand, performs partition processing on the target image 600 in a local response manner, ensuring that the background region (e.g., the region corresponding to the background 606) that should maintain low brightness in the target image 600 is not incremented; on the other hand, by contrast limiting, the core inkjet region (e.g., the region corresponding to the liquid column 602) is subjected to contrast enhancement and noise reduction. Figure 7 The schematic diagram of the target image after the light equalization processing of the embodiments of the present disclosure is shown. From the light equalization effect, it can be seen that the background region (e.g., the region corresponding to the background 606) of the target image 600 is not brightened, and the contrast of the inkjet region (e.g., the region corresponding to the liquid column 602) in the target image 600 is enhanced compared with the original target image.
[0062] Then, the target image 600 after the light equalization is subjected to binarization processing. In some embodiments, in order to eliminate small noise points in the image after the binarization processing, a 3x3 operation kernel is used to perform an open operation on the target image after the binarization to obtain a liquid column mask (or a mask of the inkjet effect of the cluster nozzle). Figure 8A schematic diagram of a mask image of a liquid column is shown. It should be understood that the 3x3 operation kernel is used in the field of image processing. For example, where "3x3" refers to the size of the template used in the image opening operation, it represents a 3x3 region centered on a certain pixel; the opening operation, for example, establishes a 3x3 region for each pixel in the image, and then the 3x3 operation kernel processes the pixel values in each 3x3 region, replacing the pixel value at the center of the region with the resulting value. The 3x3 operation kernel, for example, is a 3x3 convolution kernel, which can be used in image processing for feature extraction. Its core function is to perform local region operations on the image through a 3x3 matrix to capture the local features around the pixel. The 3x3 convolution kernel achieves local feature extraction by multiplying the corresponding elements of the 3x3 matrix and the 3x3 region in the image and summing the results.
[0063] After obtaining the mask image of all liquid columns 602 in the target image 600 after processing, in order to separately calculate the length and angle (i.e., direction) of the liquid column of each nozzle in the nozzle 104, it is also necessary to separate the mask image of the liquid column 602 of each nozzle. In machine vision, methods for separating independent parts of an image include edge detection algorithms and clustering algorithms. The former detects the edges of objects in the image, and the latter clusters pixels into regions based on color, texture, or spatial similarity, and iterates the clustering results until convergence.
[0064] Considering that clustering methods are generally suitable for image segmentation without obvious boundary features (such as separating the sky and mountains in a natural environment), and the boundary features of the current scene are clear, in some embodiments, the Canny edge detection algorithm is selected to separate the contours of the binary target image (or the mask image of the liquid column) in order to determine the contours of the liquid column 602. Figure 9 A schematic diagram of a target image after contour separation is shown.
[0065] After determining the contours of the liquid column 602, a series of non-overlapping contour points about the liquid column 602 can be obtained, and by sequentially selecting each group of contour points, the mask image of each liquid column 602 can be separated from the mask image containing multiple liquid columns 602. The control unit 110 calculates the length and angle for each individual mask image of the liquid column 602. For example, the control unit 110 fits the center line of the liquid column 602 based on the least squares method according to the contours of the liquid column 602, calculates the slope a and the intercept b in the straight line equation y = ax + b of the liquid column center line, and combines the starting point and the ending point of the mask image of the liquid column 602 to calculate the angle and length of the liquid column center line. The angle of the liquid column center line reflects the direction of the liquid column 602, and the length of the liquid column center line reflects the length of the liquid column 602.
[0066] In some embodiments, the length calculated according to the target image 600 is, for example, the pixel length of the liquid column 602 in the target image 600 (i.e. the length corresponding to the object (e.g. the liquid column 602) under the size of the target image). In order to reflect the actual size information (i.e. the physical length of the liquid column 602), it is necessary to calculate the actual liquid column length according to the vertical pixel resolution of the target image 600. It should be understood that no further calculation is required for the angle parameter.
[0067] According to formula (1), in the case of a 6mm lens focal length f and a 150mm object distance d, the field of view height of the image acquisition unit 121 is 135mm. Taking the vertical resolution of the image acquisition unit 121 as an example, which is 2048 (i.e. there are 2048 pixels in the vertical direction in the target image), the vertical resolution of the target image 600 is 0.066mm / Pixel (pixel). Multiplying the measured image length (i.e. pixel length) of the liquid column 602 by the vertical resolution can obtain the actual liquid column length.
[0068] Figure 10 A schematic diagram of a partial view of the nozzle 104 is shown. Referring to Figure 10 In some embodiments, the plurality of spray needles 141 of the nozzle 104 are configured as a plurality of rows of spray needles 141, which are arranged staggered with respect to each other. When the image acquisition unit 121 acquires the target image 600, for example, the liquid column 602 corresponding to one row of spray needles 141 (e.g. the first row of spray needles 141) of the nozzle 104 is on the object side focusing plane of the image acquisition unit 121, while the liquid columns 602 corresponding to the other rows of spray needles 141 are not on the object side focusing plane of the image acquisition unit 121.
[0069] It should be understood that the control unit 110 can determine the row of the spray needle 141 according to the arrangement of the spray needle 141 in the nozzle 104 and the position of the liquid column corresponding to the spray needle 141 in the target image, and whether the liquid column 602 corresponding to the spray needle 141 is on the object-side focusing plane. It should be understood that the control unit 110 can determine the plane in which the spray needle 141 is located (i.e., determine the row of the spray needle 141) and the distance between the plane in which the spray needle 141 is located and the image acquisition unit 121 according to the arrangement of the spray needle 141 in the nozzle 104 and the position of the liquid column corresponding to the spray needle 141 in the target image. The control unit 110 can distinguish the first plane corresponding to the current liquid column from other planes according to the arrangement order of the liquid column corresponding to the spray needle 141. For example, when the nozzle 104 has two rows of spray needles 141, it can be determined that the liquid column with odd number of the first, third, etc. comes from the first row of spray needles, and the liquid column with even number comes from the second row of spray needles. It should be understood that the same applies when there are more rows of spray needles. In image processing, the pixel length of the liquid column can be measured, and the actual length of the liquid column can be calculated by referring to the pixel scale and a predetermined compensation coefficient. If the control unit 110 determines that the current liquid column 602 is not on the object-side focusing plane of the image acquisition unit 121, the pixel length of the current liquid column 602 in the target image 600 in the target image is compensated according to a predetermined compensation coefficient P, wherein the predetermined compensation coefficient P is related to the first distance between the current liquid column and the image acquisition unit and the second distance between the object-side focusing plane of the image acquisition unit and the image acquisition unit. Figure 11 A schematic diagram for determining the predetermined compensation coefficient of an embodiment of the present disclosure is shown. For example, the liquid column 602 corresponding to the first row of spray needles (141-1) is on the object-side focusing plane of the image acquisition unit 121, and the liquid column 602 corresponding to the second row of spray needles (141-2) is not on the object-side focusing plane of the image acquisition unit 121. Therefore, the second distance between the object-side focusing plane of the image acquisition unit 121 and the image acquisition unit 121 is d, the first distance between the liquid column 602 corresponding to the second row of spray needles (141-2) and the image acquisition unit is d1, and accordingly, the predetermined compensation coefficient P = d1 / d, that is, when determining the liquid column length of the liquid column 602 not on the object-side focusing plane of the image acquisition unit 121, the pixel length of the liquid column 602 not on the object-side focusing plane of the image acquisition unit 121 needs to be multiplied by the predetermined compensation coefficient for compensation, and then the liquid column length of the liquid column 602 is determined according to the compensated pixel length. It should be noted that compensating the pixel length of the liquid column 602 not on the object-side focusing plane of the image acquisition unit 121 can make the determined liquid column length more accurate.
[0070] In some embodiments, the method 500 further comprises, for example: controlling the driving unit to drive the image capturing unit to move along the direction in which the plurality of ejection needles are arranged and to cause the image capturing unit to sequentially capture a plurality of target images so that the plurality of target images cover each of the plurality of liquid columns; and determining, according to the plurality of target images, the shape attribute of each of the plurality of liquid columns.
[0071] For example, the control unit 110 controls the driving unit to drive the image capturing unit to move along the direction in which the plurality of ejection needles are arranged by a predetermined step size and to cause the image capturing unit to sequentially capture a plurality of target images so that the plurality of target images cover each of the plurality of liquid columns.
[0072] In some embodiments, the method 500 further comprises, for example: in response to determining that the shape attribute of the at least one liquid column does not satisfy the predetermined shape condition, performing at least one of the following: controlling the liquid supply unit to adjust the flow rate of the target liquid provided to the ejection head; and controlling the suction unit to perform suction on the ejection needle corresponding to the at least one liquid column.
[0073] The apparatus 100 further comprises, for example, a suction unit (not shown in the figure). The suction unit is configured to perform a suction operation on the ejection head 104 for cleaning and maintenance. The suction unit comprises, for example, a suction nozzle, a negative pressure generating unit, and a conduit. The suction nozzle comprises, for example, a cavity enclosed by a plurality of side walls, and an opening portion that allows the cavity to communicate with the outside. The opening portion of the suction nozzle can be aligned with the ejection needle 141 to perform a suction operation on the ejection needle 141. The negative pressure generating unit is, for example, a pump. One end of the conduit is in communication with the cavity of the suction nozzle. The negative pressure generated by the negative pressure generating unit causes, for example, the liquid droplets on the outer surface of the target ejection needle 141 and the blockage inside the ejection needle 141 to be sucked into the cavity of the suction nozzle and then discharged through the conduit.
[0074] For example, when the control unit 110 determines that the shape attribute of the corresponding liquid column 602 in the target image 600 does not satisfy the predetermined shape condition, for example, when the control unit 110 determines that the liquid column extension direction of the corresponding liquid column 602 in the target image 600 does not satisfy the predetermined direction condition, the control unit 110 controls the suction unit to perform suction on the ejection needle 141 corresponding to the liquid column so as to remove the liquid droplets on the outer surface (e.g., the tip) of the ejection needle 141 and the blockage inside the ejection needle 141, so that the liquid column extension direction of the liquid column 602 output by the ejection needle 141 satisfies the predetermined direction condition.
[0075] For example, when the control unit 110 determines that the shape attribute of the corresponding liquid column 602 in the target image 600 does not satisfy the predetermined shape condition, for example, when the control unit 110 determines that the liquid column length of the corresponding liquid column 602 in the target image 600 does not satisfy the predetermined length condition (e.g., the liquid column length of the liquid column 602 is less than the predetermined length), the control unit 110 controls the suction unit to suck the corresponding nozzle 141 of the liquid column 602 so as to remove the liquid droplets on the outer surface (e.g., the tip) of the nozzle 141 and the blockage in the nozzle 141, so that the liquid column length of the liquid column 602 output by the nozzle 141 satisfies the predetermined length condition.
[0076] For example, when the control unit 110 determines that the shape attribute of the corresponding liquid column 602 in the target image 600 does not satisfy the predetermined shape condition, for example, when the control unit 110 determines that the liquid column length of the corresponding liquid column 602 in the target image 600 does not satisfy the predetermined length condition (e.g., the liquid column length of the liquid column 602 is less than the predetermined length), the control unit 110 controls the liquid supply unit to adjust the flow rate of the target liquid provided to the nozzle, for example, the control unit 110 controls the liquid supply unit to increase the flow rate of the target liquid provided to the nozzle, so that the liquid column length of the liquid column 602 output by the nozzle 141 satisfies the predetermined length condition.
[0077] For example, when the control unit 110 determines that the shape attribute of the corresponding liquid column 602 in the target image 600 does not satisfy the predetermined shape condition, for example, when the control unit 110 determines that the liquid column length of the corresponding liquid column 602 in the target image 600 does not satisfy the predetermined length condition (e.g., the liquid column length of the liquid column 602 is greater than the predetermined length), the control unit 110 controls the liquid supply unit to adjust the flow rate of the target liquid provided to the nozzle, for example, the control unit 110 controls the liquid supply unit to decrease the flow rate of the target liquid provided to the nozzle, so that the liquid column length of the liquid column 602 output by the nozzle 141 satisfies the predetermined length condition.
[0078] Figure 4 A schematic block diagram of an example electronic device 400 for detecting a nozzle that can be used to implement embodiments of the present disclosure is shown. As shown, the electronic device 400 includes a central processing unit (i.e., CPU 401) that can perform various appropriate actions and processes in accordance with computer program instructions stored in a read-only memory (i.e., ROM 402) or loaded from a storage unit 408 into a random access memory (i.e., RAM 403). Various programs and data required for operation of the electronic device 400 can also be stored in the RAM 403. The CPU 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An input / output interface (i.e., I / O interface 405) is also connected to the bus 404.
[0079] A plurality of components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, a microphone, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a magnetic disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0080] The various processes and processes described above, such as the method 500, can be performed by the CPU 401. For example, in some embodiments, the method 500 can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the CPU 401, one or more actions of the method 500 described above can be performed.
[0081] The present disclosure relates to methods, apparatuses, systems, electronic devices, computer-readable storage media, and / or computer program products. The computer program product can include computer readable program instructions for executing various aspects of the present disclosure.
[0082] In some embodiments, the above-described method 500 can be implemented as a computer program product. The computer program product can include a computer-readable storage medium having computer-readable program instructions loaded thereon for executing various aspects of the present disclosure.
[0083] Computer readable storage media can be tangible storage media which can retain and store instructions for use by an instruction execution device. Computer readable storage media can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer readable storage media include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
[0084] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.
[0085] Computer readable program instructions for carrying out operations of the present disclosure can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.
[0086] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0087] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0088] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0089] The flow diagrams and the block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams and the block diagrams can represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical functions (‘instructions’). In some alternative implementations, the functions noted in the block can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and
[0090] Embodiments of the present disclosure have been described above, and the description is intended to be illustrative of the embodiments of the present disclosure and not exhaustive, and is not limited to the embodiments disclosed. Numerous modifications and adaptations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The choice of words in the specification is intended to best explain the principles of the embodiments, practical application, or technical improvement in the art, or to enable others skilled in the art to understand the embodiments disclosed herein.
[0091] The above merely provides optional embodiments of the present disclosure, and is not intended to limit the present disclosure. The present disclosure can have various modifications and changes for those skilled in the art. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for detecting a showerhead, the showerhead comprising a plurality of needles for outputting a plurality of liquid columns formed by a target liquid, characterized in that, The method comprises: acquiring a target image collected, the target image indicating at least one liquid column of the plurality of liquid columns; and determining a shape attribute of the at least one liquid column according to the target image so as to determine a state of the ejection head, the shape attribute comprising at least one of a liquid column length and a liquid column extension direction.
2. The method of claim 1, wherein, Determining the shape attribute of the at least one liquid column according to the target image comprises: determining a center line of the at least one liquid column according to the target image; and determining the shape attribute according to the center line.
3. The method of claim 2, wherein, Determining the center line of the at least one liquid column according to the target image comprises: separating the at least one liquid column in the target image from a background in the target image so as to determine a contour of the at least one liquid column, and determining the center line according to the contour.
4. The method of claim 2, wherein, Determining the center line of the at least one liquid column according to the target image comprises: separating the at least one liquid column in the target image from a background in the target image based on an edge detection algorithm so as to determine a contour of the at least one liquid column; and fitting based on a least square method according to the contour so as to determine a slope and an intercept corresponding to a straight line equation corresponding to the center line; and determining the liquid column extension direction according to the slope, and determining the liquid column length according to the intercept.
5. The method of claim 2, wherein, Determining the center line of the at least one liquid column according to the target image comprises: performing an illumination equalization processing on the target image based on a limited contrast self-adaptive histogram equalization algorithm; performing a binarization processing on the target image after the illumination equalization processing; and determining a contour of the at least one liquid column according to the target image after the binarization processing so as to determine the center line according to the contour.
6. The method of claim 1, wherein, Determining the shape attribute of the at least one liquid column according to the target image comprises: determining a pixel length of the at least one liquid column in the target image; and determining a liquid column length of the at least one liquid column according to the pixel length and a distance between the image acquisition unit and the at least one liquid column.
7. The method of claim 6, wherein, Determining the liquid column length of the at least one liquid column according to the pixel length and the distance between the image acquisition unit and the at least one liquid column comprises: in response to determining that a current liquid column is outside a focus plane of an object of the image acquisition unit, compensating the pixel length of the current liquid column in the target image in the target image according to a predetermined compensation coefficient; and determining the liquid column length of the current liquid column according to the compensated pixel length, the predetermined compensation coefficient being related to a first distance between the current liquid column and the image acquisition unit and a second distance between the focus plane of the object of the image acquisition unit and the image acquisition unit.
8. The method of claim 1, wherein, Further comprising: controlling the driving unit to drive the image acquisition unit to move along a direction in which the plurality of ejection needles are arranged and to cause the image acquisition unit to sequentially acquire a plurality of target images so that the plurality of target images cover each of the plurality of liquid columns; and determining the shape attribute of each of the plurality of liquid columns according to the plurality of target images. Further comprising:
9. The method of claim 1, wherein, in response to determining that the shape attribute of the at least one liquid column does not satisfy a predetermined shape condition, performing at least one of the following: controlling the liquid supply unit to adjust a flow rate of the target liquid provided to the ejection head; and The control unit controls the suction unit to suck the ejection needle corresponding to the at least one liquid column.
10. A device for detecting a nozzle, the nozzle comprising a plurality of nozzle needles for outputting a plurality of liquid columns formed by a target liquid, characterized in that, The device comprises: an image acquisition unit configured to acquire a target image, the target image being indicative of at least one liquid column of the plurality of liquid columns; and a control unit configured to perform the method according to any one of claims 1 to 9.
11. The apparatus of claim 10, wherein, Further comprising: a background unit configured to provide a background in the target image, the background unit being disposed on a side of the ejection head away from the image acquisition unit; a light source unit configured to provide illumination from a side where the image acquisition unit is located towards the plurality of liquid columns, an illumination angle of the light source unit being configured to be adjustable; and a driving unit configured to drive the image acquisition unit to move along a direction in which the plurality of ejection needles are arranged based on control of the control unit, so that the image acquisition unit acquires a plurality of target images in sequence, the plurality of target images covering each of the plurality of liquid columns. Further comprising:
12. The apparatus of claim 10, wherein, a liquid supply unit in communication with the ejection head, the liquid supply unit being configured to supply the target liquid to the ejection head based on control of the control unit; and a suction unit. Comprising: an ejection head comprising a plurality of ejection needles, the plurality of ejection needles being used to output a plurality of liquid columns formed by the target liquid; and 13. A spray system characterized in that, the device according to any one of claims 10 to 12.