Data processing method for rotary ink-jet printing
By using the center of the printing area as the center of rotation in rotational printing technology, intercepting and organizing graphic data along the first axial direction, the problem of uneven boundaries and information loss during rotational printing is solved, and smoothness and smoothness of graphics at any angle are achieved. Stable printing effect.
Patent Information
- Application Number
- CN202410658376.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-10
AI Technical Summary
The existing rotational printing technology has a smooth border when the graphics is rotated to 0 degrees, 90 degrees, 180 degrees and 270 degrees, but scatter points appear at other angles, resulting in an uneven border, and a large difference in the distribution of scatter points at the same position, which affects Graphic stability.
By obtaining the original image, taking the center of the printing area as the rotation center, intercepting the graphic data of the preset pixel row along the first axial direction, gradually rotating and organizing the data and sending it to the printing terminal to ensure that each row of printing data is complete in the pixel row direction. sex and smoothness.
It achieves the smoothness and stability of graphics edges at any angle, reduces information loss and deformation, and ensures the integrity and consistency of printed data.
Smart Images

Figure CN118626028A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a data processing method for rotary inkjet printing. Background Art
[0002] The applicant submitted an application number of "CN201910888684.6" on September 19, 2019 for "A Method for Slicing an Image", which discloses a method for slicing a rotated printed image. The method employs binarization of the original image and then slicing the binarized image by rotating and traversing the image. The invention with application number "CN201910888684.6" solves the problem of slicing rotated printed images, but there are also some problems. The boundaries of the graphics printed by the invention with application number "CN201910888684.6" are relatively smooth when the graphics are rotated to the slicing positions of 0 degrees, 90 degrees, 180 degrees and 270 degrees. The graphics printed at other angles will have certain scattered points, resulting in uneven boundaries of the graphics at other angles. Moreover, after the graphics are rotated by a certain angle, the distribution of scattered points at the same position has a certain degree of difference, which has become a technical problem to be urgently solved by technical personnel in this field. Summary of the invention
[0003] The present invention provides a data processing method for rotary inkjet printing, which can solve the problems existing in the prior art. The technical solution of the present invention to solve the above technical problems is as follows: a data processing method for rotary inkjet printing is provided, the method comprising:
[0004] Get the original image;
[0005] Create a printing area, introduce the original image into the printing area, with the horizontal direction passing through the center of the printing area as a first axis, and with the direction passing through the center of the printing area and perpendicular to the first axis as a second axis;
[0006] Acquire the zeroth line of printing data, and intercept a graphic of a preset pixel row extending from the center of the printing area to the first axial positive direction boundary of the printing area along the first axial direction as the zeroth line of printing data;
[0007] Acquire the first line of printing data, rotate the original image by an angle α with the center of the printing area as the rotation center to form a first rotated image, and intercept a graphic of a preset pixel row along the first axial direction from the center of the printing area to the first axial positive direction boundary of the printing area as the first line of printing data, α=360° / N, where N is the maximum number of inkjet times of the outermost nozzle holes in one rotation printing;
[0008] And so on.
[0009] Obtain the nth line of printing data, rotate the original image by an angle of n*α with the center of the printing area as the rotation center to form the nth rotated image, and intercept a graphic of a preset pixel row along the first axial direction from the center of the printing area to the first axial positive direction boundary of the printing area as the nth line of printing data, where n is an integer in the range of 0 to (N-1);
[0010] All N lines of print data are sorted, and the N lines of print data are sent to a print terminal.
[0011] Preferably, the printing area is a circular printing area.
[0012] Preferably, when N is an even number, the value range of n is an integer in the range of 0 to ((N / 2)-1), and while obtaining the nth line of print data, a graphic of a preset pixel row along the first axial direction from the center of the print area to the first axial opposite direction boundary of the print area is intercepted as the mth line of print data, wherein m=N / 2+n.
[0013] Preferably, when N is a multiple of 4, the value range of n is an integer in the range of 0 to ((N / 4)-1), and the step of obtaining the n-th line of print data also includes:
[0014] intercepting a pattern of a preset pixel row along the second axial direction from the center of the printing area to the second axial positive direction boundary of the printing area as the qth row of printing data, where q=(N / 4)+n;
[0015] intercepting a pattern of a preset pixel row along the first axial direction from the center of the printing area to the first axial opposite direction boundary of the printing area as the mth row of printing data, wherein m=N / 2+n;
[0016] A graphic of a preset pixel row along the second axial direction from the center of the printing area to the boundary of the printing area in the opposite direction of the second axial direction is intercepted as the pth row of printing data, wherein p=(N*3 / 4)+n.
[0017] Preferably, N=1024*x, where x is a positive integer.
[0018] Preferably, N=2048 or N=4096.
[0019] Preferably, the step of obtaining the zeroth line of print data further includes:
[0020] Before intercepting the zeroth line of print data, the original image is first binarized.
[0021] Preferably, the step of obtaining the nth line of print data further includes:
[0022] Before intercepting the nth line of print data, the nth rotated image is first binarized.
[0023] The beneficial effects of the present invention are as follows: the printing data of the present invention is obtained by rotating the original image, and then intercepting the graphics of the preset pixel rows in the horizontal direction of the first axis from the center of the printing area to the positive direction boundary of the first axis of the printing area as each line of printing data. The first axis of the present invention is the horizontal direction of the center of the printing area, that is, it is consistent with the direction of the pixel rows of the printing area, and the deformation and information loss of the image in the direction of the pixel rows are minimal. Each line of printing data of the present invention is intercepted in the direction of the pixel rows. Each line of printing data of the present invention has more complete pixel information, and the edges of the graphics are smoother when rotating printing is performed. Since each line of printing data of the present invention is obtained after rotation, the same printing data can be generated when the original image is at any angle, and deformation will not occur due to different angles of the original image during the printing process, and the printed graphics are more stable. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0025] Figure 1 A flowchart of a data processing method for rotary inkjet printing according to an embodiment;
[0026] Figure 2 A schematic diagram of a data processing method for rotary inkjet printing in a first axial direction and a second axial direction of a printing area in an embodiment;
[0027] Figure 3 It is a schematic diagram of an ellipse with a grid after binarization in the prior art;
[0028] Figure 4 for Figure 3 A partial enlarged view of point a in the middle;
[0029] Figure 5 A schematic diagram of an ellipse with a grid after each line of printing data generated by a data processing method for rotary inkjet printing of this embodiment is sequentially spliced;
[0030] Figure 6 for Figure 5 A partial enlarged view of point b in the middle;
[0031] Figure 7 It is a schematic diagram of an ellipse without a grid after binarization in the prior art;
[0032] Figure 8 for Figure 7 A partial enlarged view of the middle A;
[0033] Fig. 9 for Figure 7 A partial enlarged view of point B in the middle;
[0034] Fig.10 It is a schematic diagram of an ellipse without a grid after each line of printing data generated by a data processing method for rotary inkjet printing of this embodiment is spliced in sequence;
[0035] Fig.11 for Fig.10 A partial enlarged view of point C in the middle;
[0036] Fig.12 for Fig.10 A partial enlarged view of point D in the middle;
[0037] Fig.13 A comparison diagram of the upper right corner of a square generated by the prior art rotated at different angles;
[0038] Fig.14 It is a comparison diagram of the upper right corner in the positive direction after being rotated at different angles after each line of printing data is spliced in sequence obtained by a data processing method for rotary inkjet printing of this embodiment.
[0039] Description of reference numerals:
[0040] o-the center point of the printing area; x1-the positive direction of the first axis; x0-the negative direction of the first axis; y1-the positive direction of the second axis; y0-the negative direction of the second axis; 110-the boundary of the printing area;
[0041] 101 - the acquisition position of the print data in the positive direction of the first axis;
[0042] 102 - the acquisition position of the imprint data in the positive direction of the second axis;
[0043] 103 - a position for acquiring printing data in the reverse direction of the first axis;
[0044] 104 - a position for obtaining printing data in the reverse direction of the second axis;
[0045] 200-Graphic rotation direction. DETAILED DESCRIPTION
[0046] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0047] See also Figure 1, this embodiment provides a data processing method for rotary inkjet printing, the method comprising:
[0048] Get the original image;
[0049] Create a printing area, introduce the original image into the printing area, with the horizontal direction passing through the center of the printing area as the first axis, and the direction passing through the center of the printing area perpendicular to the first axis as the second axis, such as Figure 2 As shown, the printing area in this embodiment is a circular printing area, and the horizontal direction described in this embodiment is parallel to the direction of the horizontal pixel rows in the computer graphics system, that is, the first axis is the horizontal direction of the pixel rows, and the second axis is the longitudinal direction of the pixel rows;
[0050] The zeroth line of print data is obtained, and a graphic of a preset pixel row extending from the center of the print area to the first axial positive direction boundary of the print area is intercepted as the zeroth line of print data, such as Figure 2 As shown, the position 101 in the printing area is the acquisition position of the zeroth line of print data; the preset pixel row is set according to the size of the pixel range that the ink droplets ejected from the nozzle of the printing terminal need to cover, for example, when an ink droplet can cover a 3*3 pixel range, the preset pixel row is set to 3 rows, and when an ink droplet can cover a 1*1 pixel range, the preset pixel row is set to 1 row;
[0051] In some preferred embodiments, the obtaining of the zeroth line of print data further includes: binarizing the original image before intercepting the zeroth line of print data. This is a preferred embodiment.
[0052] Acquire the first line of printing data, rotate the original image by an angle α with the center of the printing area as the rotation center to form a first rotated image, and intercept a graphic of a preset pixel row along the first axial direction from the center of the printing area to the first axial positive direction boundary of the printing area as the first line of printing data, α=360° / N, where N is the maximum number of inkjet times of the outermost nozzle holes in one rotation printing;
[0053] Similarly, the nth printing data is obtained, the center of the printing area is used as the rotation center, the original image is rotated by an angle of n*α to form the nth rotated image, and a graphic of a preset pixel row along the first axial square from the center of the printing area to the first axial positive direction boundary of the printing area is intercepted as the nth line of printing data, where n is an integer in the range of 0 to (N-1);
[0054] Until the (N-1)th row of print data is obtained;
[0055] All N lines of print data are sorted, and the N lines of print data are sent to a print terminal.
[0056] Specific instructions, such as Figure 3 and Figure 4 As shown, Figure 3 In the existing computer graphics system, an ellipse is set in the printing selection. The existing computer graphics are composed of horizontal and vertical rows of pixels. In the printing process of the graphics, some pixels whose grayscale values do not reach the threshold will be filtered out, resulting in uneven printed graphics. It can be known that the pixel information loss in the horizontal and vertical directions of the existing computer graphics system is the least. Therefore, in the computer graphics system of the prior art, the pixel points at the positions where the curve is not at the angle between the positive and negative directions of the two axes will lose some information in the binarization process, resulting in uneven edges of the curve when the rotation printing is performed; Figure 5 and Figure 6 The accompanying drawing is a schematic diagram of an ellipse formed by splicing the print data obtained by the method of this embodiment, Figure 6 It can be seen that each line of print data of the graphics generated by this embodiment is acquired in the horizontal direction, so each line of print data of this embodiment will not lose too much pixel information during the binarization process compared with the prior art.
[0057] See also Figures 7 to 12 As shown, Figure 7-9 For the ellipse image after binary printing in the printing area by the prior art, Fig. 9 It can be seen that the jaggedness and deformation of some parts of the ellipse after binarization are obvious, which will cause the edges of the printed image to be uneven; Figure 10-12 It can be seen that through the method of this embodiment, the graphic is rotated at a preset angle and then intercepted in the axial direction. Each line of print data obtained is relatively stable, less information is lost on the edge of the image, and the edge of the printed graphic is relatively smooth.
[0058] See also Fig.13 and Fig.14 , Fig.13 This is an enlarged image of a square structure set in the preset printing area with the upper right corner rotated to different angles. Fig.13 From the comparison diagrams of 0 degree rotation, 15 degree rotation, 30 degree rotation, 45 degree rotation, 60 degree rotation and 75 degree rotation, it can be seen that the edges of existing computer graphics will change significantly during the rotation process. This change will cause a certain deviation when selecting the inkjet nozzle after the graphics are sliced, resulting in uneven edges of the graphics. Fig.14 This is an enlarged view of the upper right corner in the positive direction obtained by splicing each line of print data obtained by the method of this embodiment. Fig.14As can be seen from the comparison diagrams of 0 degree rotation, 15 degree rotation, 30 degree rotation, 45 degree rotation, 60 degree rotation and 75 degree rotation, the printing data generated by the method of this embodiment has good stability in any direction, and the printing data will not change due to the direction of the original image, and the graphics will not be deformed. Moreover, each line of printing data is intercepted in the direction of the pixel row, and the selection of the nozzle can be determined during the rotation printing process. In addition, although Fig.14 The edge of the image has a jagged shape, but Fig.14 The aliasing is only visible when the image is magnified to the point where the pixels can be seen. In the actual printing process, the ink droplet size is calculated in pL, and the edges of the actual printed graphics will be smoother when observed by the naked eye.
[0059] In some preferred embodiments, when N is an even number, the value range of n is an integer in the range of 0 to ((N / 2)-1), and while obtaining the nth line of print data, a graphic of a preset pixel row along the first axial direction from the center of the print area to the first axial opposite direction boundary of the print area is intercepted as the mth line of print data, where m=N / 2+n; in some embodiments, N=1024*x, where x is a positive integer.
[0060] Specifically, when N is an even number, that is, the number of lines of print data is an even number, the print data of the original image can be divided into two parts, an upper part and an lower part, along the first axis. When intercepting the print data, by simultaneously intercepting two lines of print data in the positive direction of the first axis and the reverse direction of the first axis, the number of general graphic rotations can be reduced, thereby reducing the workload of the system.
[0061] In some preferred embodiments, when N is a multiple of 4, especially when N=2048 or N=4096, the value range of n is an integer in the range of 0 to ((N / 4)-1), and the step of obtaining the nth line of print data also includes:
[0062] intercepting a pattern of a preset pixel row along the second axial direction from the center of the printing area to the second axial positive direction boundary of the printing area as the qth row of printing data, where q=(N / 4)+n;
[0063] intercepting a pattern of a preset pixel row along the first axial direction from the center of the printing area to the first axial opposite direction boundary of the printing area as the mth row of printing data, wherein m=N / 2+n;
[0064] intercepting a pattern of a preset pixel row along the second axial direction from the center of the printing area to the boundary of the printing area in the opposite direction of the second axial direction as the pth row of printing data, wherein p=(N*3 / 4)+n;
[0065] In some embodiments, before intercepting the print data, the rotated image is first binarized.
[0066] Specifically, this preferred embodiment has the same effect as the previous embodiment. Figure 2 As shown, the first axis and the second axis are regarded as a coordinate system. When N is a multiple of 4, it is only necessary to obtain the data of each row of the original image in the four quadrants of the coordinate system. That is, after rotating the image, the printing data can be intercepted simultaneously at four positions: the direction ox1 of the first axis, the positive direction oy1 of the second axis, the reverse direction ox0 of the first axis, and the reverse direction oy0 of the second axis. Because the four directions belong to the horizontal or vertical direction of the pixel row, the pixel rows intercepted in the other three directions have the same characteristics as the pixel rows intercepted in the positive direction of the first axis. According to this embodiment, it is only necessary to rotate the image by 90 degrees in total to complete the acquisition of all rows of printing data, which can effectively reduce the waste of system resources. In this embodiment, the value of N depends on the printing accuracy. When N is equal to 2048, it is suitable for inkjet printing with a printing accuracy of 300dpi. When N is equal to 2048, the length of the nozzle is one inch, and the nozzle rotates by an angle α, the movement distance of the outermost nozzle is close to the spacing between the nozzle holes, which can just print out the picture completely. When N is equal to 4096, it is also the same, which is suitable for inkjet printing with a printing accuracy of 600dpi. That is, the value of N has a certain relationship with the printing accuracy.
[0067] In the description of this specification, the description with reference to the terms "embodiment" or "preferred embodiment" etc. means that the specific method or feature described in conjunction with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, methods, devices or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0068] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A data processing method for rotary inkjet printing, characterized in that: The method comprises: Get the original image; Create a printing area, introduce the original image into the printing area, with the horizontal direction passing through the center of the printing area as a first axis, and with the direction passing through the center of the printing area and perpendicular to the first axis as a second axis; Acquire the zeroth line of printing data, and intercept a graphic of a preset pixel row extending from the center of the printing area to the first axial positive direction boundary of the printing area along the first axial direction as the zeroth line of printing data; Acquire the first line of printing data, rotate the original image by an angle α with the center of the printing area as the rotation center to form a first rotated image, and intercept a graphic of a preset pixel row along the first axial direction from the center of the printing area to the first axial positive direction boundary of the printing area as the first line of printing data, α=360° / N, where N is the maximum number of inkjet times of the outermost nozzle holes in one rotation printing; And so on. Obtain the nth line of printing data, rotate the original image by an angle of n*α with the center of the printing area as the rotation center to form the nth rotated image, and intercept a graphic of a preset pixel row along the first axial direction from the center of the printing area to the first axial positive direction boundary of the printing area as the nth line of printing data, where n is an integer in the range of 0 to (N-1); All N lines of print data are sorted, and the N lines of print data are sent to a print terminal.
2. A data processing method for rotary inkjet printing according to claim 1, characterized in that: The printing area is a circular printing area.
3. The data processing method for rotary inkjet printing according to claim 1, characterized in that: When N is an even number, the value range of n is an integer in the range of 0 to ((N / 2)-1), and while obtaining the nth line of print data, a graphic of a preset pixel row along the first axial direction from the center of the print area to the first axial opposite direction boundary of the print area is intercepted as the mth line of print data, where m=N / 2+n.
4. A data processing method for rotary inkjet printing according to claim 3, characterized in that: When N is a multiple of 4, the value range of n is an integer in the range of 0 to ((N / 4)-1), and the method of obtaining the nth line of print data also includes: intercepting a pattern of a preset pixel row along the second axial direction from the center of the printing area to the second axial positive direction boundary of the printing area as the qth row of printing data, where q=(N / 4)+n; intercepting a pattern of a preset pixel row along the first axial direction from the center of the printing area to the first axial opposite direction boundary of the printing area as the mth row of printing data, wherein m=N / 2+n; A graphic of a preset pixel row along the second axial direction from the center of the printing area to the boundary of the printing area in the opposite direction of the second axial direction is intercepted as the pth row of printing data, wherein p=(N*3 / 4)+n.
5. A data processing method for rotary inkjet printing according to claim 3 or 4, characterized in that: N=1024*x, where x is a positive integer.
6. A data processing method for rotary inkjet printing according to claim 3 or 4, characterized in that: N=2048 or N=4096.
7. A data processing method for rotary inkjet printing according to claim 1, 3 or 4, characterized in that: The step of obtaining the zeroth line of print data further includes: Before intercepting the zeroth line of print data, the original image is first binarized.
8. A data processing method for rotary inkjet printing according to claim 1, 3 or 4, characterized in that: The step of obtaining the nth line of print data further includes: Before intercepting the nth line of print data, the nth rotated image is first binarized.
