Weaving printing method based on image processing, printing system and related equipment
By collecting motion parameters during weaving printing to calculate the miscut angle and construct an affine transformation matrix, the problems of image distortion and heavy ink dots caused by the combined motion of nozzle scanning and media transportation are solved, achieving high-quality image restoration and efficiency improvement.
Patent Information
- Application Number
- CN202511041653.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-09-12
AI Technical Summary
In the weaving printing method, the geometric distortion of the image and the problem of heavy ink dots caused by the combined motion of the reciprocating scanning of the nozzle and the continuous conveying of the printing medium affect the printing quality.
By collecting printing motion parameters, calculating the miscut angle and constructing the affine transformation matrix, the printed image is geometrically corrected, the forward and inverse affine transformation matrices are used to compensate for image stretching and deformation, and the printing execution logic is optimized to avoid double ink dots.
It effectively eliminates the image stretching deformation and heavy ink dot problems during the woven printing process, improves printing quality and efficiency, and ensures the geometric accuracy and uniformity of the image.
Smart Images

Figure CN120620900A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of weaving printing, and in particular to a weaving printing method, a printing system and related equipment based on image processing. Background Art
[0002] Currently, the mainstream printing output technologies are mainly divided into two solutions: scanning multi-pass printing and one-pass continuous printing. There is an inherent contradiction between the two in terms of printing quality and efficiency.
[0003] One-pass continuous printing utilizes a continuous conveying system for the print media, significantly reducing the interaction between the media and the conveying mechanism. It also achieves high-speed output by covering the print area with a nozzle array. However, this method has several significant drawbacks: First, it requires a nozzle array that covers the entire print width, resulting in high hardware costs and extremely low nozzle utilization. Second, it is extremely sensitive to nozzle status and quality issues, such as nozzle blockage. For example, a single nozzle blockage can cause vertical white lines across the entire print. Furthermore, this output method lacks the ink overlay process of multi-pass printing, significantly reducing the color reproduction and uniformity of the output image.
[0004] Scanning multi-pass printing improves image color reproduction and output quality by stacking multiple passes of ink, significantly increasing printhead utilization. However, this printing method inherently suffers from intermittent motion, which leads to issues with pass and printing efficiency. Pass refers to the frequent start and stop cycles (print → pause → feed → print) during multi-pass printing. This intermittent motion of the print media causes misalignment between passes, resulting in vertical streaks. Furthermore, the intermittent feeding of the print media significantly impacts the efficiency of scanning multi-pass printing.
[0005] In response to the shortcomings of the above two printing methods, a printing method with interwoven output of ink dot trajectories (i.e., a weaving printing method) has emerged. This weaving printing method can control the print head to move back and forth left and right in the X-axis direction while the print medium is continuously transported forward in the Y-axis direction, printing ink onto the print medium in an interwoven trajectory to complete the print output. Its innovative advantages are particularly reflected in the following aspects: the print medium is transported continuously, saving PASS connection time and improving printing efficiency; the direction of nozzle movement is inclined with the ink dot trajectory, effectively shielding the nozzle blockage / oblique spraying defects; the nozzle inkjet trajectory is non-orthogonal to the X and Y axes, reducing the need for feathering and significantly improving the printing speed.
[0006] However, using this weaving printing method introduces two new problems:
[0007] 1. The combined movement of the printing medium and the nozzle causes the image to stretch and deform (such as a circle becoming an ellipse);
[0008] 2. Repeated inkjet printing creates heavy ink spots at the intersection of the nozzle bidirectional tracks, resulting in easily noticeable weaving patterns (see Appendix Figure 2 ).
[0009] There is currently no effective technical solution to the above problems. Summary of the Invention
[0010] The purpose of the present invention is to provide a weaving printing method, printing system and related equipment based on image processing, aiming to solve the problem of image geometric distortion caused by the combined motion of reciprocating scanning of the nozzle and continuous conveying of the printing medium in the weaving printing method, effectively correct the printed image, and achieve higher printing quality.
[0011] In a first aspect, the present invention provides a weaving printing method based on image processing, comprising the following steps:
[0012] S1. Before printing, the printing motion parameters are collected; the printing motion parameters include the scanning motion speed of the printer nozzle and the continuous delivery speed of the print medium;
[0013] S2. Calculating the staggered angle formed by the relative motion between the printer nozzle and the print medium according to the scanning speed and the continuous conveying speed;
[0014] S3. Calculate the affine transformation matrix according to the miscut angle;
[0015] S4. Perform geometric correction on the image to be printed according to the affine transformation matrix, and execute printing.
[0016] The image processing-based weaving printing method provided by the present invention uses shear transformation to perform geometric correction on the image, and accurately describes the inverse compensation process of the parallelogram stretching deformation through a specific affine transformation matrix, which can effectively avoid the stretching deformation problem in the weaving printing process and ensure the restoration of the printed output image.
[0017] In a second aspect, the present invention provides a printing system, comprising a first processor and a controller communicatively connected to each other, wherein the first processor is configured to perform the following steps:
[0018] S1. Before printing, the printing motion parameters are collected; the printing motion parameters include the scanning motion speed of the printer nozzle and the continuous delivery speed of the print medium;
[0019] S2. Calculate the staggered angle formed by the relative motion between the printer nozzle and the print medium according to the scanning speed and the continuous conveying speed;
[0020] S3. Calculate the affine transformation matrix according to the miscut angle;
[0021] S4. Perform geometric correction on the image to be printed according to the affine transformation matrix, and control the controller to execute printing.
[0022] In a third aspect, the present invention provides a printing device, comprising:
[0023] An acquisition module, configured to acquire printing motion parameters before printing is executed; the printing motion parameters include the scanning motion speed of the printer nozzle and the continuous conveying speed of the printing medium;
[0024] a first calculation module, configured to calculate a shear angle formed by relative movement between the printer nozzle and the printing medium according to the scanning speed and the continuous conveying speed;
[0025] A second calculation module is used to calculate an affine transformation matrix according to the mis-shear angle;
[0026] The correction printing module is used to perform geometric correction on the image to be printed according to the affine transformation matrix and execute printing.
[0027] In a fourth aspect, the present invention provides an electronic device comprising a second processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the second processor, the steps of the image processing-based weaving printing method provided in the first aspect are executed.
[0028] In a fifth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a second processor, the steps of the image processing-based weaving printing method provided in the first aspect are executed.
[0029] From the above, it can be seen that the knitting printing method based on image processing provided by the present invention has the following advantages:
[0030] 1. The vertical streaks (pass paths) caused by the misalignment between multiple passes in traditional scanning and printing due to the intermittent movement of the media are completely eliminated;
[0031] 2. Printing media no longer needs to be frequently started, stopped, or waited for, significantly improving printing efficiency;
[0032] 3. The Fourier spectrum energy of horizontal and vertical defects is concentrated in the low-frequency region, which is sensitive to the human visual system, while tilt defects appear as higher-frequency characteristics that are difficult for the human eye to detect, further optimizing the output image quality.
[0033] 4. The tilted motion trajectory of the printhead is more irregular than that of traditional multi-pass printing, which can easily cover up defects and errors in the inkjet process, greatly improving the fault tolerance for nozzle blockage and oblique spraying.
[0034] 5. Image preprocessing uses a shear transformation algorithm based on motion parameters to inversely compensate for the geometric distortion caused by the weaving and printing motion trajectory.
[0035] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the embodiments of the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A flow chart of a knitting printing method based on image processing provided by an embodiment of the present invention.
[0037] Figure 2 Schematic diagram of heavy ink dots generated by repeated inkjet at the intersection of the bidirectional trajectories of the nozzle holes.
[0038] Figure 3 FIG. 4 is a schematic diagram of correcting image pixels using a forward affine transformation matrix in this embodiment.
[0039] Figure 4 FIG. 4 is a schematic diagram of correcting image pixels using an inverse affine transformation matrix in this embodiment.
[0040] Figure 5 A schematic structural diagram of a knitting printing system based on image processing provided by an embodiment of the present invention.
[0041] Figure 6 A structural schematic diagram of a weaving printing device based on image processing provided by an embodiment of the present invention.
[0042] Figure 7 A schematic structural diagram of an electronic device provided by an embodiment of the present invention.
[0043] Description of labels:
[0044] 100, first processor; 200, controller; 300, acquisition module; 400, first calculation module; 500, second calculation module; 600, correction printing module; 13, electronic device; 1301, second processor; 1302, memory; 1303, communication bus. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0046] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are used only to distinguish the description and should not be understood as indicating or implying relative importance.
[0047] It should be noted that the detailed explanation for "the repeated ink jetting at the intersection of the bidirectional tracks of the nozzles produces heavy ink spots, resulting in the formation of easily noticeable weaving patterns" is as follows: In weaving printing, after the nozzle completes a forward pass (left to right scan) and a reverse pass (right to left scan), the physical overlap area formed by the two inclined tracks on the medium plane is the intersection. Since the bidirectional tracks are not parallel, an intersection will appear after superposition. Refer to the attached Figure 2 The red and green frame areas in the figure are part of the ink dot trajectories intercepted in the bidirectional pass. The dark ink dots are the areas where the left and right passes will spray ink at the same time. Obviously, there are areas and ink dots with repeated ink spraying.
[0048] Reference Attachment Figure 1 The present invention provides a weaving printing method based on image processing, comprising the following steps:
[0049] S1. Before printing, collect printing motion parameters; printing motion parameters include the scanning speed of the printer nozzle and the continuous delivery speed of the print medium;
[0050] S2. Calculate the shear angle resulting from the relative motion between the printer nozzle and the print medium based on the scanning speed and the continuous conveying speed. (To account for deformation caused by the combined motion of the nozzle and the medium, the original input image is preprocessed using shearing. Shearing is an affine transformation, which is an important and widely used transformation in two-dimensional planes.)
[0051] S3. Calculate the affine transformation matrix based on the shear angle;
[0052] S4. Perform geometric correction on the image to be printed based on the affine transformation matrix, and execute printing (the core of the above method is to preprocess the input image data to solve the problem of image geometric distortion caused by the combined motion of the reciprocating scanning of the nozzle and the continuous conveying of the printing medium in the weaving printing method).
[0053] Acquiring printing motion parameters refers to obtaining physical quantities that influence relative motion during the printing process. This can be accomplished through sensor readings or system configuration acquisition, such as speed measurement via encoders or printer driver parameter readings. Its primary purpose is to obtain raw data that causes image deformation. Printing motion parameters include the scanning speed of the printer nozzle and the continuous feed speed of the print media. These speeds are the direct factors that contribute to relative motion and cause deformation. Calculating the shear angle refers to quantifying the degree of geometric offset caused by the relative motion between the print head and the media based on the printing motion parameters. This can be achieved using mathematical formulas, such as the inverse tangent function based on the speed ratio. Its primary purpose is to convert physical motion into manageable geometric parameters. Calculating the affine transformation matrix refers to constructing a mathematical model for image geometric transformation based on the shear angle. This can be achieved through matrix operations, such as generating a corresponding transformation matrix based on the shear angle. Its primary purpose is to provide a mathematical tool for precise image correction. Geometric correction of the image to be printed refers to applying the calculated affine transformation to the original image data before printing. This can be achieved using image processing algorithms, such as pixel coordinate transformation, to pre-compensate for deformation that will occur during the printing process. Printing refers to transferring geometrically corrected image data to a printing medium through a print head, which can be achieved by controlling inkjet printing and media movement, and is mainly for outputting a final image.
[0054] The core innovation of this application lies in that, before executing printing, the printing motion parameters are collected and the miscut angle formed by the relative motion is calculated based on these parameters, and then the affine transformation matrix used to compensate for the miscut angle is calculated. The matrix is used to perform geometric correction on the image to be printed, thereby effectively offsetting the image geometric distortion caused by the combined motion of the nozzle scanning motion and the continuous conveying of the printing medium during the printing process, thereby achieving the effect of solving the problem of image stretching and deformation.
[0055] First, before actually starting printing, the system collects the scanning speed of the printer nozzle and the continuous conveying speed of the printing medium. These speed parameters directly determine the relative motion trajectory between the nozzle and the medium during the printing process. Then, based on the collected scanning speed and continuous conveying speed, the system calculates the offset angle of the ink dot trajectory formed by this relative motion on the printing medium relative to the ideal vertical or horizontal direction, that is, the shear angle. This shear angle accurately quantifies the degree of geometric deformation caused by the compound motion. Then, based on the calculated shear angle, the system constructs a corresponding affine transformation matrix. This matrix is a mathematical tool that can describe and implement geometric transformations of images in the opposite direction of the shear deformation. The affine transformation of a two-dimensional image can be expressed in the following form:
[0056]
[0057] Wherein, x′ is the horizontal coordinate of the pixel point of the image to be printed after correction, y′ is the vertical coordinate of the pixel point of the image to be printed after correction, x is the horizontal coordinate of the pixel point of the image to be printed, y is the vertical coordinate of the pixel point of the image to be printed, R 00 、R 01 、R 10 and R 11 is the linear transformation of the printed image, and its combination can be expressed as the transformation effects of scaling, rotating, and shearing the image. x and T y It is the translation transformation of the image to be printed, used to describe the translation of the image.
[0058] Finally, using the calculated affine transformation matrix, the system geometrically corrects the original image data to be printed. This correction process effectively involves a pre-process, reverse geometric deformation of the image. The corrected image data is then sent to the print actuator. As the printer head moves at its scanning speed and the print medium moves at its continuous feed speed, this combined motion creates a staggered ink dot trajectory on the medium. However, because the image to be printed has already undergone reverse geometric correction, the positive shear deformation that occurs during printing offsets the pre-processed correction. The resulting image on the print medium is geometrically correct, thus avoiding stretching.
[0059] As a preferred embodiment, the solution of the present application is specifically implemented as follows: Before a print task begins, the currently set print head scanning speed (e.g., in pixels per second) and media feed speed (e.g., in pixels per second) are obtained by reading configuration parameters from the printer control system or through real-time monitoring by sensors. These speed values are input into a processing unit, which calculates the inverse tangent of the mis-tangent angle based on the speed ratio to obtain the mis-tangent angle. Subsequently, the processing unit constructs a 3x3 affine transformation matrix based on the calculated mis-tangent angle according to the mathematical principles of affine transformation. For example, for forward scanning, the matrix can include non-zero off-diagonal elements related to the tangent of the mis-tangent angle. Next, the processing unit uses this affine transformation matrix to transform the coordinates of each pixel in the original image to be printed to obtain corrected pixel coordinates. The corrected image data is stored in memory and, according to the printer's control timing, when the print head performs scanning motion and ejects ink, the corrected image data corresponding to the current physical position is sent to the nozzle driver circuit, thereby achieving geometrically corrected image printout.
[0060] Through the above-mentioned solution, this application effectively solves the problem of geometric image distortion caused by the combined motion of the printer nozzle scanning and the continuous feeding of the print medium in the weaving printing method. By performing an affine transformation correction on the image before printing based on motion parameters, the shearing deformation that inevitably occurs during the printing process is compensated, ensuring the geometric accuracy of the final printed output image, avoiding image stretching and deformation, and improving print quality.
[0061] In some embodiments, the specific steps in step S2 include:
[0062] S21. Calculate the shear angle using the following formula:
[0063]
[0064] Where θ is the shear angle, v y is the continuous conveying speed, v x is the scanning speed.
[0065] The weaving printing method of the present application collects the scanning speed of the printer nozzle and the continuous conveying speed of the printing medium, and uses a specific mathematical relationship to calculate the misalignment angle formed by the relative movement between the nozzle and the medium. Specifically, before printing is performed, the printing motion parameters, including the scanning speed of the printer nozzle and the continuous conveying speed of the printing medium, are collected. Then, according to the collected v x and v y, using this formula to calculate the mis-shearing angle θ. This calculation process converts physical motion parameters into geometric angle parameters, providing a key input for subsequent image geometric correction. The calculated mis-shearing angle θ is used to calculate the affine transformation matrix, which can describe and compensate for the image deformation caused by the mis-shearing angle. Finally, the image to be printed is geometrically corrected according to the calculated affine transformation matrix, and printing is executed. In this way, the actual printing motion parameters are precisely linked to the geometric transformation in image processing, so that the pre-processing of the image can accurately reflect and offset the deformation caused by physical motion, thereby ensuring the geometric accuracy of the printed output image.
[0066] Reference Attachment Figure 3 and attached Figure 4 In some embodiments, the specific steps in step S3 include:
[0067] S31. Calculate the affine transformation matrix according to the following formula:
[0068]
[0069] Among them, M lr is the affine transformation matrix when the printer nozzle performs forward scanning motion, denoted as the forward affine transformation matrix; M rl The affine transformation matrix when the printer nozzle performs reverse scanning motion is recorded as the reverse affine transformation matrix.
[0070] In this solution, the steps for calculating the affine transformation matrix based on the shear angle are further refined. The concept of distinguishing between forward and reverse scanning motions of the printer head is introduced, and the corresponding affine transformation matrix is calculated for each scanning direction. Here, the forward and reverse affine transformation matrices are calculated using specific mathematical formulas based on the calculated shear angle θ. These formulas are derived from affine transformation theory and are used to describe the image shear deformation caused by the reciprocating scanning motion of the print head while the print medium is continuously transported. lr The -tanθ term and M rl The tanθ term in
[15] reflects the relative vertical offset of the pixel points under different scanning directions. This method of distinguishing different scanning directions and calculating the corresponding affine transformation matrix can more accurately capture and quantify the deformation caused by complex motion during the weaving printing process, providing a more accurate mathematical model for subsequent geometric correction.
[0071] The present application provides a weaving printing method based on image processing. The method first collects printing motion parameters before executing printing, including the scanning motion speed of the printer nozzle and the continuous conveying speed of the printing medium. Then, the misalignment angle formed by the relative motion between the printer nozzle and the printing medium is calculated based on these speed parameters. The misalignment angle quantifies the degree of deformation caused by the composite motion. On this basis, the present solution further calculates an affine transformation matrix based on the misalignment angle. Unlike simply calculating a general affine transformation matrix, the present solution takes into account that the printer nozzle performs reciprocating scanning during weaving printing, that is, there are two motion directions: forward scanning and reverse scanning. Since the printing medium is continuously conveyed, the relative motion direction of the nozzle with the medium is different during forward scanning and reverse scanning, and the resulting image deformation direction is also different. In order to accurately describe these two different deformations, the present solution calculates two different affine transformation matrices: one for forward scanning motion (forward affine transformation matrix) and the other for reverse scanning motion (reverse affine transformation matrix). In the calculation formulas of these two matrices, the terms related to the miscut angle (-tanθ and tanθ) have opposite signs, which is precisely to reflect and compensate for the deformation differences under different scanning directions. In this way, this solution provides a targeted transformation matrix for the subsequent geometric correction of the image, ensuring that the correct correction parameters can be applied regardless of whether the nozzle is scanning forward or backward, thereby effectively solving the problem of image stretching deformation caused by compound motion. This technical means of distinguishing different scanning directions and calculating the corresponding affine transformation matrix, combined with the basic step of calculating the miscut angle based on speed, forms a more complete deformation modeling process, laying the foundation for achieving high-precision weaving printing.
[0072] By calculating the corresponding affine transformation matrix based on the different scanning motion directions (forward and reverse) of the printer's nozzle, this solution accurately describes and compensates for the image shearing deformation in different directions caused by the combined motion of the continuous print medium and the reciprocating scanning motion of the nozzle during the weaving printing process. This provides accurate transformation parameters for subsequent geometric correction, effectively resolving the problem of image stretching and deformation during weaving printing and improving the geometric accuracy of the printed output image.
[0073] In some embodiments, the specific steps in step S4 include:
[0074] S41. When the printer nozzle performs forward scanning motion, geometric correction is performed on the image to be printed according to the following formula:
[0075]
[0076] S42. When the printer nozzle performs reverse scanning motion, geometric correction is performed on the image to be printed according to the following formula:
[0077]
[0078] Wherein, x′ is the horizontal coordinate of the pixel point of the image to be printed after correction, y′ is the vertical coordinate of the pixel point of the image to be printed after correction, x is the horizontal coordinate of the pixel point of the image to be printed, and y is the vertical coordinate of the pixel point of the image to be printed;
[0079] The above two matrices accurately describe the inverse compensation process of the parallelogram stretching deformation, which can effectively avoid the stretching deformation problem during the weaving printing process and ensure the restoration of the printed output image.
[0080] This solution provides a specific implementation for geometric correction of the printed image in a weaving printing method, aiming to accurately compensate for image stretching and deformation caused by the combined motion of the print head and print medium. The core of this solution lies in transforming the pixel coordinates of the printed image using an affine transformation matrix, determined by the shear angle calculated from the printing motion parameters in the previous step. Specifically, two affine transformation formulas are provided, corresponding to forward and reverse scanning motions of the printer head, respectively. Each formula employs matrix multiplication, multiplying the homogeneous coordinates of a pixel point (x, y) in the original printed image by a specific affine transformation matrix to obtain the homogeneous coordinates of the pixel point (x', y') in the corrected image. When the printer head is in forward scanning motion, the affine transformation matrix used is the forward affine transformation matrix determined by the shear angle θ calculated in the previous step. Multiplying the original pixel coordinates by this matrix effectively performs a downward shear transformation, with the shear amount related to -tanθ. When the printer head performs a reverse scanning motion, the affine transformation matrix used is the inverse affine transformation matrix determined based on the shear angle θ calculated in the previous step. Multiplying the original pixel coordinates by this matrix effectively performs an upward shear transformation, with the shear amount related to tanθ. These two affine transformation matrices accurately describe the inverse compensation process, in the opposite direction of the parallelogram stretching deformation that occurs during the actual printing process. By pre-processing the image to be printed with this pre-processed geometric deformation, the actual deformation caused by the combined motion of the printhead and the media during printing precisely offsets the pre-processed deformation. For example, if the actual printing process results in a downward tilt and stretching of the image, the image is sheared upward before printing; if the actual printing process results in an upward tilt and stretching of the image, the image is sheared downward before printing. This precise inverse compensation mechanism effectively avoids stretching deformation during weaving printing, ensuring that the printed output image accurately restores the geometric shape and proportions of the original image. Based on the shear angle and affine transformation matrix accurately calculated in the previous step, this step applies precise transformation formulas to pre-correct the image to be printed. This combination of calculation based on actual motion parameters and correction based on the calculated results forms a complete image distortion compensation process, ensuring that the printed output image highly reproduces the geometric features of the original image.
[0081] By applying geometric correction to the image to be printed using an affine transformation formula based on the scanning motion of the printer's nozzle, the image can be pre-deformed. This pre-deformation is in the opposite direction and matches the actual deformation caused by the combined motion of the nozzle and the medium during printing. As a result, the actual deformation during printout offsets the pre-deformation. This approach effectively compensates for image stretching in weaving printing methods, ensuring that the printed image accurately reproduces the original image's geometry and proportions, ensuring the fidelity of the printed image.
[0082] In some embodiments, the specific steps in step S4 further include:
[0083] S43. Dividing a plurality of complete pixel columns arranged along the transport direction of the print medium in the image to be printed into at least two non-overlapping data groups;
[0084] S44. For a portion of the data group, geometric correction is performed on the pixel columns of the portion of the data group using a forward affine transformation matrix, and printing is performed when the printer nozzle makes a forward scanning motion;
[0085] S45. For another part of the data grouping, the pixel columns of the data grouping are geometrically corrected using the inverse affine transformation matrix, and printing is performed when the printer nozzle performs reverse scanning motion; this group printing rule optimizes the printing execution logic, ensuring that in the overlapping area of the physical tracks formed by the nozzle scanning in two different directions, the ink ejected by the nozzle comes from different column data in the image, thereby fundamentally avoiding the problem of forming heavy ink dots due to two ink jets at the same physical position, and further avoiding the repeated ink jetting at the intersection of the two-way tracks to form a weaving pattern.
[0086] Multiple complete pixel columns in the image to be printed refer to a set of pixels in the vertical direction that constitute the image to be printed. These can be obtained by segmenting the image data in the column direction. At least two non-overlapping data groupings refer to grouping the pixel columns into two or more sets that have no common pixel columns according to a certain rule. This can be achieved by grouping odd-numbered columns into one group and even-numbered columns into another group, or by grouping several consecutive columns into one group. A forward affine transformation matrix refers to a transformation matrix used to compensate for image deformation caused by the forward scanning motion of the printer head. This can be calculated based on printing motion parameters. A reverse affine transformation matrix refers to a transformation matrix used to compensate for image deformation caused by the reverse scanning motion of the printer head. This can be calculated based on printing motion parameters. Forward scanning motion refers to movement of the printer head in a specific direction (e.g., from left to right). Reverse scanning motion refers to movement of the printer head in a direction opposite to the forward scanning motion (e.g., from right to left). Printing refers to controlling the printer head to eject ink onto the print medium based on the geometrically corrected image data.
[0087] This solution further refines the printing execution method based on geometric correction of the image to be printed. By dividing the pixel columns of the image to be printed into at least two non-overlapping data groups, it lays the foundation for applying different processing and printing strategies based on different scanning directions. During forward scanning, the forward affine transformation matrix is applied to only a portion of the data groups for geometric correction, and only this portion of the corrected data is printed. This means that when the printhead moves in one direction, only data from a specific column of the image is processed and ejected. Similarly, during reverse scanning, the inverse affine transformation matrix is applied to only another portion of the data groups for geometric correction, and only this portion of the corrected data is printed. This means that when the printhead moves in the opposite direction, only data from the remaining columns of the image is processed and ejected. This strategy of grouping image data and selectively correcting and printing based on scanning direction ensures that, in the overlapping areas of the physical trajectory formed by the bidirectional scanning of the printhead, ink dots ejected during forward scanning originate from data from one column of the image, while ink dots ejected during reverse scanning originate from data from another column of the image. Therefore, even in overlapping areas, the same physical location will not be sprayed with ink in both scans, thus avoiding the generation of heavy ink spots. This solution is combined with the aforementioned method of calculating the miscut angle and affine transformation matrix based on the printing motion parameters and performing geometric correction. The aforementioned method solves the problem of overall geometric distortion of the image caused by the combined motion of the nozzle and the medium. This solution builds on this problem and solves the problem of local heavy ink spots in the overlapping areas of bidirectional scanning by refining the data allocation and correction of bidirectional printing. The combined effect of these two methods enables the weaving printing method to effectively eliminate weaving patterns while ensuring accurate restoration of the image shape, thereby improving print quality.
[0088] For example, the pixel columns of an image to be printed can be divided into a set of odd columns and a set of even columns. During forward scanning, the forward affine transformation matrix is applied only to the pixel columns in the odd column set for geometric correction, and the printer head is controlled to eject ink based on the corrected odd column data. During reverse scanning, the reverse affine transformation matrix is applied only to the pixel columns in the even column set for geometric correction, and the printer head is controlled to eject ink based on the corrected even column data. In this way, only ink dots corresponding to odd columns are printed during forward scanning, and only ink dots corresponding to even columns are printed during reverse scanning. In the overlapping area of bidirectional scanning by the printer head, any physical location receives ink dots from either odd columns (forward scanning) or even columns (reverse scanning), and does not receive ink dots from both odd and even columns simultaneously, thus avoiding duplicate ink ejection. In practical applications, the image data, after the aforementioned shearing and grouping process, is output to a raster image processor (RIP). The RIP system receives the pre-processed image data and grouping rule information, performs color management and color separation (such as CMYK+white ink) according to the conventional process, and generates binary inkjet control instructions by hanging the screen. When generating inkjet instructions, the RIP needs to synchronously receive the real-time movement direction signal of the nozzle (forward or reverse), and according to the grouping rules, only activate the pixel data of the corresponding group to convert it into inkjet action instructions, and send it to the nozzle driver to execute printing. Through the synergistic effect of the above-mentioned image miscutting processing and the selective output mechanism of pixel data grouped by scanning direction, the present invention can effectively eliminate image distortion and periodic weaving pattern defects in woven printing.
[0089] By dividing the pixel columns of the image to be printed into at least two non-overlapping data groups and applying corresponding affine transformation matrices to each group based on the scanning direction of the printer's printheads for geometric correction and printing, it is possible to ensure that in areas where the physical tracks formed by bidirectional scanning overlap, the ink ejected by the printheads originates from different columns of data in the image. This fundamentally avoids the problem of duplicate ink dots being formed by ink jetting twice at the same physical location, effectively preventing the weave pattern caused by repeated ink jetting at the intersection of bidirectional tracks, and improving the image quality and uniformity of weave prints.
[0090] Reference Attachment Figure 5 The present invention provides a printing system, comprising a first processor 100 and a controller 200 communicatively connected to each other, wherein the first processor 100 is configured to perform the following steps:
[0091] S1. Before printing, collect printing motion parameters; printing motion parameters include the scanning speed of the printer nozzle and the continuous delivery speed of the print medium;
[0092] S2. Calculate the offset angle formed by the relative motion between the printer nozzle and the print medium based on the scanning speed and the continuous conveying speed;
[0093] S3. Calculate the affine transformation matrix based on the shear angle;
[0094] S4. Perform geometric correction on the image to be printed according to the affine transformation matrix, and control the controller 200 to perform printing.
[0095] In some embodiments, when the first processor 100 is used to calculate the misalignment angle formed by the relative movement between the printer nozzle and the print medium based on the scanning motion speed and the continuous conveying speed, the first processor 100 executes:
[0096] S21. Calculate the shear angle using the following formula:
[0097]
[0098] Where θ is the shear angle, v y is the continuous conveying speed, v x is the scanning speed.
[0099] In some embodiments, when the first processor 100 is used to calculate the affine transformation matrix according to the shear angle, it performs:
[0100] S31. Calculate the affine transformation matrix according to the following formula:
[0101]
[0102]
[0103] Among them, M lr is the affine transformation matrix when the printer nozzle performs forward scanning motion, denoted as the forward affine transformation matrix; M rl The affine transformation matrix when the printer nozzle performs reverse scanning motion is recorded as the reverse affine transformation matrix.
[0104] In some embodiments, when the first processor 100 is configured to perform geometric correction on the image to be printed according to the affine transformation matrix and control the controller 200 to perform printing, the first processor 100 executes:
[0105] S41. When the printer nozzle performs forward scanning motion, geometric correction is performed on the image to be printed according to the following formula:
[0106]
[0107] S42. When the printer nozzle performs reverse scanning motion, geometric correction is performed on the image to be printed according to the following formula:
[0108]
[0109] Wherein, x′ is the horizontal coordinate of the pixel point of the image to be printed after correction, y′ is the vertical coordinate of the pixel point of the image to be printed after correction, x is the horizontal coordinate of the pixel point of the image to be printed, and y is the vertical coordinate of the pixel point of the image to be printed.
[0110] In some embodiments, when the first processor 100 is used to perform geometric correction on the image to be printed according to the affine transformation matrix and control the controller 200 to perform printing, the first processor 100 performs the following operations:
[0111] S43. Dividing a plurality of complete pixel columns arranged along the transport direction of the print medium in the image to be printed into at least two non-overlapping data groups;
[0112] S44. For a portion of the data group, the pixel columns of the portion of the data group are geometrically corrected using the forward affine transformation matrix in the affine transformation matrix, and the controller 200 is controlled to perform printing when the printer nozzle performs forward scanning motion;
[0113] S45. For another part of the data group, use the inverse affine transformation matrix in the affine transformation matrix to perform geometric correction on the pixel columns of the part of the data group, and control the controller 200 to perform printing when the printer nozzle performs reverse scanning motion.
[0114] Please refer to Figure 6 , Figure 6 A printing device in some embodiments of the present invention is integrated into a back-end control device in the form of a computer program, including:
[0115] The acquisition module 300 is used to acquire printing motion parameters before printing; the printing motion parameters include the scanning motion speed of the printer nozzle and the continuous conveying speed of the printing medium;
[0116] A first calculation module 400 is used to calculate the staggered angle formed by the relative movement between the printer nozzle and the printing medium based on the scanning movement speed and the continuous conveying speed;
[0117] A second calculation module 500 is used to calculate an affine transformation matrix according to the shear angle;
[0118] The correction printing module 600 is used to perform geometric correction on the image to be printed according to the affine transformation matrix and execute printing.
[0119] In some embodiments, the first calculation module 400, when used to calculate the misalignment angle formed by the relative movement between the printer nozzle and the print medium based on the scanning motion speed and the continuous conveying speed, performs the following:
[0120] S21. Calculate the shear angle using the following formula:
[0121]
[0122] Where θ is the shear angle, v y is the continuous conveying speed, v x is the scanning speed.
[0123] In some embodiments, the second calculation module 500 performs the following when calculating the affine transformation matrix according to the shear angle:
[0124] S31. Calculate the affine transformation matrix according to the following formula:
[0125]
[0126] Among them, M lr is the affine transformation matrix when the printer nozzle performs forward scanning motion, denoted as the forward affine transformation matrix; M rl The affine transformation matrix when the printer nozzle performs reverse scanning motion is recorded as the reverse affine transformation matrix.
[0127] In some embodiments, the correction printing module 600 performs the following operations when performing geometric correction on the image to be printed according to the affine transformation matrix and performing printing:
[0128] S41. When the printer nozzle performs forward scanning motion, geometric correction is performed on the image to be printed according to the following formula:
[0129]
[0130] S42. When the printer nozzle performs reverse scanning motion, geometric correction is performed on the image to be printed according to the following formula:
[0131]
[0132] Wherein, x′ is the horizontal coordinate of the pixel point of the image to be printed after correction, y′ is the vertical coordinate of the pixel point of the image to be printed after correction, x is the horizontal coordinate of the pixel point of the image to be printed, and y is the vertical coordinate of the pixel point of the image to be printed.
[0133] In some embodiments, when the correction printing module 600 is used to perform geometric correction on the image to be printed according to the affine transformation matrix and execute printing, it further performs:
[0134] S43. Dividing a plurality of complete pixel columns arranged along the transport direction of the print medium in the image to be printed into at least two non-overlapping data groups;
[0135] S44. For a portion of the data group, geometric correction is performed on the pixel columns of the portion of the data group using a forward affine transformation matrix, and printing is performed when the printer nozzle makes a forward scanning motion;
[0136] S45. For another part of the data group, use the inverse affine transformation matrix to perform geometric correction on the pixel columns of this part of the data group, and perform printing when the printer nozzle performs reverse scanning motion.
[0137] Please refer to Figure 7 , Figure 7 This is a structural diagram of an electronic device provided in an embodiment of the present invention. The present invention provides an electronic device 13, including: a second processor 1301 and a memory 1302. The second processor 1301 and the memory 1302 are interconnected and communicate with each other via a communication bus 1303 and / or other forms of connection mechanisms (not shown). The memory 1302 stores computer-readable instructions executable by the second processor 1301. When the electronic device is running, the second processor 1301 executes the computer-readable instructions to execute the image processing-based weaving printing method in any optional implementation of the above-mentioned embodiment to achieve the following functions: before printing, collecting printing motion parameters; the printing motion parameters include the scanning motion speed of the printer nozzle and the continuous conveying speed of the printing medium; according to the scanning motion speed and the continuous conveying speed, calculating the misalignment angle formed by the relative motion between the printer nozzle and the printing medium; according to the misalignment angle, calculating the affine transformation matrix; according to the affine transformation matrix, geometrically correcting the image to be printed, and executing printing.
[0138] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a second processor, the image processing-based weaving printing method in any optional implementation of the above-mentioned embodiment is executed to achieve the following functions: before printing is performed, printing motion parameters are collected; the printing motion parameters include the scanning motion speed of the printer nozzle and the continuous conveying speed of the printing medium; based on the scanning motion speed and the continuous conveying speed, the misalignment angle formed by the relative motion between the printer nozzle and the printing medium is calculated; based on the misalignment angle, an affine transformation matrix is calculated; based on the affine transformation matrix, the image to be printed is geometrically corrected, and printing is performed.
[0139] Among them, the computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0140] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, the indirect coupling or communication connection of the device or unit may be electrical, mechanical or other forms.
[0141] In addition, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0142] Furthermore, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0143] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.
[0144] The foregoing description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Those skilled in the art will readily appreciate that the present invention is susceptible to various modifications and variations. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A weaving printing method based on image processing, characterized in that, The following steps are involved: S1. Before printing, the printing motion parameters are collected; the printing motion parameters include the scanning motion speed of the printer nozzle and the continuous delivery speed of the print medium; S2. Calculate the staggered angle formed by the relative motion between the printer nozzle and the print medium according to the scanning speed and the continuous conveying speed; S3. Calculate the affine transformation matrix according to the miscut angle; S4. Perform geometric correction on the image to be printed according to the affine transformation matrix, and execute printing.
2. The weaving printing method based on image processing according to claim 1, characterized in that: The specific steps in step S2 include: S21. Calculate the miscut angle according to the following formula: Wherein, θ is the misalignment angle, v y is the continuous conveying speed, v x is the scanning motion speed.
3. The weaving printing method based on image processing according to claim 2, characterized in that: The specific steps in step S3 include: S31. Calculate the affine transformation matrix according to the following formula: Among them, M lr is the affine transformation matrix when the printer nozzle performs forward scanning motion, denoted as the forward affine transformation matrix; M rl is the affine transformation matrix when the printer nozzle performs reverse scanning motion, which is recorded as the reverse affine transformation matrix.
4. The weaving printing method based on image processing according to claim 3, characterized in that: The specific steps in step S4 include: S41. When the printer nozzle performs forward scanning motion, geometric correction is performed on the image to be printed according to the following formula: S42. When the printer nozzle performs reverse scanning motion, geometric correction is performed on the image to be printed according to the following formula: Among them, x ′ is the horizontal coordinate of the pixel point of the corrected image to be printed, y ′ is the corrected vertical coordinate of the pixel point of the image to be printed, x is the horizontal coordinate of the pixel point of the image to be printed, and y is the vertical coordinate of the pixel point of the image to be printed.
5. The weaving printing method based on image processing according to claim 4, characterized in that: The specific steps in step S4 also include: S43. Dividing a plurality of complete pixel columns arranged along the transport direction of the print medium in the image to be printed into at least two non-overlapping data groups; S44. For a portion of the data groups, geometrically correct the pixel columns of the portion of the data groups using the forward affine transformation matrix, and perform printing when the printer nozzle performs forward scanning motion; S45. For another part of the data group, use the inverse affine transformation matrix to perform geometric correction on the pixel columns of the part of the data group, and perform printing when the printer nozzle performs reverse scanning motion.
6. A printing system, characterized in that: The system includes a first processor and a controller communicatively connected to each other, wherein the first processor is configured to perform the following steps: S1. Before printing, the printing motion parameters are collected; the printing motion parameters include the scanning motion speed of the printer nozzle and the continuous delivery speed of the print medium; S2. Calculate the staggered angle formed by the relative motion between the printer nozzle and the print medium according to the scanning speed and the continuous conveying speed; S3. Calculate the affine transformation matrix according to the miscut angle; S4. Perform geometric correction on the image to be printed according to the affine transformation matrix, and control the controller to execute printing.
7. The printing system according to claim 6, wherein: When the first processor is used to perform geometric correction on the image to be printed according to the affine transformation matrix and control the controller to perform printing, the first processor performs: S43. Dividing the plurality of complete pixel columns in the image to be printed into at least two non-overlapping data groups; S44. For a portion of the data groups, geometrically correct the pixel columns of the portion of the data groups using the forward affine transformation matrix in the affine transformation matrix, and control the controller to perform printing when the printer nozzle performs forward scanning motion; S45. For another part of the data group, use the inverse affine transformation matrix in the affine transformation matrix to perform geometric correction on the pixel columns of the part of the data group, and control the controller to perform printing when the printer nozzle performs reverse scanning motion.
8. A printing device, characterized in that: include: An acquisition module is used to acquire printing motion parameters before printing is executed; the printing motion parameters include the scanning motion speed of the printer nozzle and the continuous conveying speed of the printing medium; a first calculation module, configured to calculate a shear angle formed by relative movement between the printer nozzle and the printing medium according to the scanning speed and the continuous conveying speed; A second calculation module is used to calculate an affine transformation matrix according to the mis-shear angle; The correction printing module is used to perform geometric correction on the image to be printed according to the affine transformation matrix and execute printing.
9. An electronic device, characterized in that: The invention comprises a second processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the second processor, the steps of the weaving printing method based on image processing according to any one of claims 1 to 5 are executed.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the second processor, the steps of the weaving printing method based on image processing according to any one of claims 1 to 5 are executed.
