Method, device, equipment and medium for correcting width error of printing roller
By dividing the data matrix to be printed into multiple data units and performing feathering processing and mask template generation, and correcting with the printing width error coefficient, the problem of image width error of inkjet printing equipment on the roller is solved, and the printing quality and quality are improved .
Patent Information
- Application Number
- CN202111057743.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-07-16
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2038-07-16
AI Technical Summary
Existing inkjet printing equipment produces image width errors due to printing accuracy and drive motor errors when printing drums, resulting in image distortion and poor quality.
By dividing the data matrix to be printed into multiple data units, feathering processing and mask template generation, and correcting it with the printing width error coefficient, ensuring the uniformity and continuity of the image on the drum.
It effectively solves the image width error problem caused by drum printing equipment error, improves the quality and quality of the printed image, and ensures that there is no overlap or blank space at the head and tail junction.
Smart Images

Figure CN113703696B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application filed on July 16, 2018, with the invention name “Image processing method, device, equipment and storage medium for printing roller” and application number 201810780231.7. Technical Field
[0002] The present invention relates to the field of printing technology, and in particular to a method, device, equipment and medium for correcting the width error of a printing roller. Background Art
[0003] Inkjet printing equipment has good printing effects and flexible paper handling capabilities. In the selection of printing media, inkjet printing equipment also has certain advantages. For example, it can print ordinary media such as letter paper, as well as various films, photo paper, roll paper, T-transfer paper and rollers, etc., so it is widely used.
[0004] Among them, the inkjet printing device for printing rollers, because the shape of the printed carrier medium is not a common plane shape, but an irregular shape such as a cylinder, a cuboid, a cone or a truncated cone, such as printing a circle of patterns on a water cup, printing a circle of trademarks on a water pen, etc., is characterized by printing a circle of patterns around the outer circumference of the printing medium, and the length of the printed pattern is equal to the circumference of the printed carrier medium, so that the printed pattern is connected from beginning to end, and the start and end positions of the printing cannot be seen from the appearance. However, due to the printing accuracy of the roller printing device and the error of the driving motor, it is difficult to ensure that the distance of each paper feed when the printer is working is completely equal, resulting in overlapping or blank intervals in the images at the beginning and end of the printed pattern, which in turn leads to serious distortion of the printed image and poor quality of the printed image. Therefore, how to find an image processing method and roller printing device for printing rollers with good printing quality has become a technical problem that needs to be solved in this field. Summary of the invention
[0005] The technical problem solved by the present invention is to provide a width error correction method, device, equipment and medium for a printing roller, which can effectively solve the error of the printed image width caused by the error of the roller printing device.
[0006] In a first aspect, in order to solve the above technical problems, the present invention provides a method for correcting a width error of a printing roller, the method comprising:
[0007] Dividing the to-be-printed data matrix into at least two to-be-printed data matrix units according to the feathering length, wherein the at least two to-be-printed data matrix units include a first to-be-printed data matrix unit and a second to-be-printed data matrix unit;
[0008] Performing feathering processing on the first matrix unit of data to be printed to obtain a third matrix unit of data to be printed and a fourth matrix unit of data to be printed;
[0009] sequentially merging the third matrix unit of data to be printed, the second matrix unit of data to be printed, and the fourth matrix unit of data to be printed to form printing data;
[0010] Pre-printing is performed, and the width of the print data is corrected according to the print width error coefficient.
[0011] Preferably, the feathering process is performed on the first matrix unit of data to be printed to obtain a third matrix unit of data to be printed and a fourth matrix unit of data to be printed, comprising:
[0012] Generate a first mask template and a second mask template respectively according to the first matrix unit of data to be printed and the second matrix unit of data to be printed;
[0013] The first matrix unit of data to be printed is ANDed with the first mask template to obtain a third matrix unit of data to be printed, and the first matrix unit of data to be printed is ANDed with the second mask template to obtain a fourth matrix unit of data to be printed.
[0014] Preferably, the generating of a first mask template and a second mask template respectively according to the first matrix unit of data to be printed and the second matrix unit of data to be printed specifically includes:
[0015] Generate a grayscale image matrix according to the feathering length and the preset width, and convert the grayscale image matrix into a binary image matrix unit;
[0016] Comparing the width of the binary image matrix unit with the width of the first matrix unit of data to be printed, and generating a first mask template for the binary image matrix unit according to the comparison result, so that the width of the first mask template is equal to the width of the first matrix unit of data to be printed;
[0017] The second mask template is obtained by subtracting the first mask template from the all-ones matrix.
[0018] Preferably, generating a first mask template from the binary image matrix unit according to the comparison result specifically includes:
[0019] When the width of the first to-be-printed data matrix unit is greater than the width of the binary image matrix unit, a plurality of the binary image matrix units are combined to form the first mask template;
[0020] When the width of the first to-be-printed data matrix unit is equal to the width of the binary image matrix unit, the binary image matrix unit is used as the first mask template;
[0021] When the width of the first data matrix unit to be printed is smaller than the width of the binary image matrix unit, the binary image matrix unit is divided into several sub-binarized image matrix units, and one of the sub-binarized image matrix units is selected as the first mask template, and the length and width of the sub-binarized image matrix unit are respectively equal to the length and width of the first data matrix unit to be printed.
[0022] Preferably, when the width of the first to-be-printed data matrix unit is greater than the width of the binary image matrix unit, the first mask template is specifically obtained by the following formula:
[0023] D1=[B j , A mx ] B j =[A mn …A mn ] j x=c-jn
[0024]
[0025] Wherein, D1 represents the first mask template, B j represents j A mn The intermediate matrix formed by merging, A mn represents the binary image matrix unit, A mx represents the first x columns of the binary image matrix unit, and j represents the merged binary image matrix unit A mn The number of and is a positive integer, m represents the binary image matrix unit A mn The length is a positive integer, n represents the binary image matrix unit A mn The width is a positive integer, c represents the width of the first matrix unit of the data to be printed and is a positive integer, is the floor symbol, x represents The remainder after rounding down.
[0026] Preferably, the printing width error coefficient is obtained by the following steps:
[0027] Obtaining an error compensation calibration print file and an original width of the error compensation calibration print file;
[0028] Perform pre-printing according to the error compensation calibration print file to obtain a printed image;
[0029] measuring an actual print width of the printed image;
[0030] The printing width error coefficient is calculated based on the original width and the actual printing width.
[0031] Preferably, the print width error coefficient is calculated by the following formula:
[0032]
[0033] Wherein, e2 is the printing width error coefficient, t2 is the actual printing width of the printed image, and w is the original width of the error compensation calibration print file.
[0034] Preferably, the width of the corrected print data is calculated by the following formula:
[0035]
[0036] Wherein, W is the corrected width of the print data, and W1 is the original width of the print data.
[0037] In a second aspect, the present invention further provides a width error correction device for a printing roller, comprising:
[0038] A data matrix conversion module to be printed, used for dividing the data matrix to be printed into at least two data matrix units to be printed according to the feathering length, wherein the at least two data matrix units to be printed include a first data matrix unit to be printed and a second data matrix unit to be printed;
[0039] A feathering processing module, used for performing feathering processing on the first matrix unit of data to be printed to obtain a third matrix unit of data to be printed and a fourth matrix unit of data to be printed;
[0040] A synthesis module, used for sequentially combining the third matrix unit of data to be printed, the second matrix unit of data to be printed and the fourth matrix unit of data to be printed to form printing data;
[0041] The correction module is used for performing pre-printing and correcting the width of the printing data according to the printing width error coefficient.
[0042] In a third aspect, the present invention also provides a width error correction device for a printing roller, comprising: a memory, a processor, and computer program instructions stored in the memory and executable on the processor, wherein when the computer program instructions are executed by the processor, a method as described in any one of the above is implemented.
[0043] In a fourth aspect, the present invention further provides a computer-readable storage medium having computer program instructions stored thereon. Preferably, when the computer program instructions are executed by a processor, any of the methods described above is implemented.
[0044] In summary, the width error correction method, device, equipment and storage medium for a printing roller of the present invention divides a data matrix to be printed into at least two data matrix units to be printed according to a feathering length, wherein the at least two data matrix units to be printed include a first data matrix unit to be printed and a second data matrix unit to be printed, and performs feathering processing on the first data matrix unit to be printed, thereby dividing the print data of the first data matrix unit to be printed into a third data matrix unit to be printed and a fourth data matrix unit to be printed; before printing, pre-printing is performed, and the width of the print data is corrected according to the print width error coefficient, and during printing, the third data matrix unit to be printed is first printed in the first printing area of the roller, and then the second data matrix unit to be printed is printed in the second printing area, and finally the roller rotates one circle and continues to print the fourth data matrix unit to be printed in the first printing area, thereby compensating for the error in the width of the printed image caused by the error of the roller printing device, and diffusing the printing accuracy of the printing device and the error caused by the driving motor from the head and tail joint to the first printing area, thereby effectively solving the error problem of the width of the printed image caused by the error of the roller printing device, and then the printed image will not be seriously distorted, and the quality of the printed image is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a flow chart of a preferred embodiment of the image processing method for a printing roller of the present invention.
[0046] Figure 2 It is a schematic diagram of the image processing flow of the image processing method for a printing roller of the present invention.
[0047] Figure 3 It is a schematic diagram of the module structure of a preferred embodiment of the image processing for a printing roller of the present invention.
[0048] Figure 4 It is a schematic diagram of the hardware structure of a preferred embodiment of the image processing device for a printing roller of the present invention. DETAILED DESCRIPTION
[0049] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0050] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0051] Example 1
[0052] See also Figure 1 and Figure 2 The present invention provides an image processing method for a printing roller, the method comprising the following steps:
[0053] S1, obtaining the image matrix 1 to be printed and the feathering length;
[0054] In this embodiment, the roller includes a cylindrical object such as a circular cylinder, an elliptical cylinder, and a polygonal cylinder. The image length of the image matrix 1 to be printed is equal to the circumference of the outer surface of the roller. The feathering length is the error diffusion length required for mask processing when printing the image matrix 1 to be printed to the joint of the outer surface of the roller.
[0055] S2, converting the image matrix 1 to be printed into a data matrix 2 to be printed, and dividing the data matrix 2 to be printed into at least two data matrix units to be printed according to the feathering length, wherein the at least two data matrix units to be printed include a first data matrix unit 3 to be printed and a second data matrix unit 4 to be printed;
[0056] S3, generating a first mask template and a second mask template respectively according to the first matrix unit of data to be printed and the second matrix unit of data to be printed;
[0057] S4, performing AND operation on the first matrix unit 3 of data to be printed and the first mask template to obtain a third matrix unit 31 of data to be printed, and performing AND operation on the first matrix unit 3 of data to be printed and the second mask template to obtain a fourth matrix unit 32 of data to be printed;
[0058] S5 , sequentially merging the third matrix unit 31 of data to be printed, the second matrix unit 4 of data to be printed, and the fourth matrix unit 32 of data to be printed to form print data 5 .
[0059] Preferably, the conversion of the image matrix 1 to be printed into the data matrix 2 to be printed specifically includes: converting the image matrix 1 to be printed into the data matrix 2 to be printed by screening according to the properties of the printer recording nozzle through a halftone algorithm. Halftone technology refers to a technology that uses a small amount of color to quantize a continuous tone image (such as a grayscale image and a color image) into a binary image or a color image with only a few colors, and the visual effect of the quantized image at a certain distance is similar to the original image. The halftone algorithms used in halftone technology mainly include:
[0060] Dithering method: It is a typical algorithm of dot processing methods, which is mainly divided into two categories: random dithering and ordered dithering. Both algorithms require a template, also called a dithering matrix or a threshold matrix. The dithering matrix not only determines the order in which dots become black dots when the brightness or grayscale value decreases, but also determines the quality of the halftone image. Therefore, the key to the dithering algorithm is the construction of the dithering matrix. This algorithm is compared with the dithering matrix. The value range of each threshold in the matrix is between the maximum grayscale value and the minimum grayscale value of the image.
[0061] Error diffusion method: In the ordered dithering process, the pixel point is compared with the dithering matrix to determine whether to place a micro-dot at a position. It is essentially a dot processing process. In 1976, Floyd and Steinberg proposed the error diffusion algorithm, which transitioned halftone screening from "dot processing" to "neighborhood processing".
[0062] Iteration method: It is to find the best binary output by minimizing the error between the original image and the halftone image. The above three halftone algorithms are common existing technologies in the printing field and will not be described in detail here.
[0063] Preferably, the sum of the lengths of the first matrix unit 3 of data to be printed and the second matrix unit 4 of data to be printed is equal to the length of the matrix unit 2 of data to be printed, and the length of the first matrix unit 3 of data to be printed is equal to the feathering length. The width of the matrix unit 2 of data to be printed is equal to the widths of the first matrix unit 3 of data to be printed and the second matrix unit 4 of data to be printed.
[0064] In this embodiment, the data matrix 2 to be printed is G1, and the first data matrix unit 3 to be printed is E mc The second to-be-printed data matrix unit 4 is F yc , the length of the first data matrix unit 3 to be printed and the feathering length are both m, the width of the data matrix 2 to be printed and the width of the first data matrix unit 3 to be printed and the second data matrix unit 4 to be printed are both c, and the length of the second data matrix unit 4 to be printed is y; then G1, E mc and F yc The relational expression is:
[0065] G1=[E mc ; F yc ]
[0066] That is, when the to-be-printed data matrix 2G1 is input, the following operations are performed:
[0067]
[0068] The first matrix unit 3E can output the first data to be printed mc And the second to-be-printed data matrix unit 4F yc ; Specifically, the output data is as follows:
[0069]
[0070] Preferably, the generating of the first mask template and the second mask template specifically comprises the following steps:
[0071] Generate a grayscale image matrix according to the feathering length and the preset width, and convert the grayscale image matrix into a binary image matrix unit by screening through a 1bit halftone algorithm; wherein the length of the binary image matrix unit is equal to the length of the first to-be-printed data matrix unit 3;
[0072] Preferably, the grayscale image matrix is a gradient grayscale image, and the gradient grayscale ranges from 0-100%.
[0073] Comparing the width of the binary image matrix unit with the width of the first to-be-printed data matrix unit 3, and generating a first mask template from the binary image matrix unit according to the comparison result, so that the length and width of the first mask template are equal to the length and width of the first to-be-printed data matrix unit 3;
[0074] Since the two data matrices involved in the logic operation must be matrices of the same dimension, that is, the first data matrix unit 3 to be printed must be the same length and width as the first mask template, and usually the data of the first mask template in the width direction is the same, this embodiment first generates the grayscale image matrix with a width much smaller than the image matrix 1 to be printed, then converts the grayscale image matrix into the binary image matrix unit, and finally generates the first mask template with the same width as the first data matrix unit 3 to be printed by copying the binary image matrix unit. Therefore, the image processing method provided by the present invention has the advantage of fast processing speed.
[0075] The second mask template is obtained by subtracting the first mask template from an all-one matrix of the same dimension. The first mask template is complementary to the second mask template. Specifically, the all-one matrix refers to a matrix of the same dimension as the first mask template, and all elements in the matrix are 1.
[0076] Preferably, generating a first mask template from the binary image matrix unit according to the comparison result specifically comprises the following steps:
[0077] When the width of the first to-be-printed data matrix unit 3 is greater than the width of the binary image matrix unit, a plurality of the binary image matrix units are combined to form the first mask template;
[0078] When the width of the first to-be-printed data matrix unit 3 is equal to the width of the binary image matrix unit, the binary image matrix unit is directly used as the first mask template;
[0079] When the width of the first data matrix unit 3 to be printed is smaller than the width of the binary image matrix unit, the binary image matrix unit is divided into a plurality of sub-binarized image matrix units, and one of the sub-binarized image matrix units is selected as the first mask template, and the length and width of the sub-binarized image matrix unit are respectively equal to the length and width of the first data matrix unit 3 to be printed.
[0080] Preferably, when the width of the first to-be-printed data matrix unit 3 is greater than the width of the binary image matrix unit, the first mask template is specifically obtained by the following formula:
[0081] D1=[B j , A mx ] B j =[A mn …A mn ] j x=c-jn
[0082]
[0083] Wherein, D1 represents the first mask template, B j represents j A mn The intermediate matrix formed by merging, A mn represents the binary image matrix unit, A mx represents the first x columns of the binary image matrix unit, and j represents the merged binary image matrix unit A mn The number of and is a positive integer, m represents the binary image matrix unit A mn The length is a positive integer, n represents the binary image matrix unit A mn The width is a positive integer, c represents the width of the first to-be-printed data matrix unit 3 and is a positive integer, is the floor symbol, x represents The remainder after rounding down.
[0084] Preferably, the first matrix unit of data to be printed 3 and the first mask template are ANDed to obtain a third matrix unit of data to be printed 31, and the first matrix unit of data to be printed 3 and the second mask template are ANDed to obtain a fourth matrix unit of data to be printed 32; the third matrix unit of data to be printed and the fourth matrix unit of data to be printed 32 are specifically obtained by the following formulas:
[0085]
[0086] Wherein, H1 represents the third matrix unit 31 of data to be printed, H2 represents the fourth matrix unit 32 of data to be printed, and E mc represents the first to-be-printed data matrix unit 3, D1 represents the first mask template, and D2 represents the second mask template.
[0087] Preferably, the third to-be-printed data matrix unit 31, the second to-be-printed data matrix unit 4 and the fourth to-be-printed data matrix unit 32 are sequentially combined to form the printing data 5, and the printing data 5 is specifically obtained by the following formula:
[0088] G=[H1;F;H2]
[0089] Wherein, G represents the printing data 5 , H1 represents the third matrix unit 31 of data to be printed, F represents the second matrix unit 4 of data to be printed, and H2 represents the fourth matrix unit 32 of data to be printed.
[0090] In summary, the image processing method, device, equipment and storage medium for a printing roller of the present invention converts the image matrix 1 to be printed into the data matrix 2 to be printed, and then divides the data matrix 2 to be printed into a first data matrix unit 3 to be printed that needs to be feathered and a second data matrix unit 4 to be printed that does not need to be feathered according to the feathering length, and performs a logical AND operation on the first data matrix unit 3 to be printed and the complementary first mask template and the second mask template, respectively, so as to divide the printing data of the first data matrix unit 3 to be printed into a third data matrix unit 31 to be printed and a fourth data matrix unit 32 to be printed; when printing, the third data matrix unit 31 to be printed is first printed in the first printing area of the roller, and then the second data matrix unit 4 to be printed is printed in the second printing area, and finally the fourth data matrix unit 32 to be printed is continued to be printed in the first printing area after the roller rotates one circle. Thus, the error caused by the printing accuracy of the printing device and the driving motor is diffused from the head and tail joint to the first printing area, thereby effectively solving the problem of overlap or blank intervals in the printed image, and then the printed image will not be seriously distorted, and the quality of the printed image is guaranteed.
[0091] Example 2
[0092] This embodiment is similar to the method described in Embodiment 1, except that before officially starting printing, the method of this embodiment further includes the following steps:
[0093] Obtaining an error compensation calibration print file and an original width of the error compensation calibration print file;
[0094] When the user uses it, first use a print file as a print file for error compensation calibration, then measure the original width of the error compensation calibration print file with a tape measure or ruler or other tool, and input the error compensation calibration print file and the original width of the error compensation calibration print file into the printing device, so that the printing device obtains the error compensation calibration print file and the original width of the error compensation calibration print file.
[0095] In one embodiment, the error compensation calibration print file is photographed by a camera that communicates with the printing device, and the printing device calculates the image transmitted by the camera to obtain the error compensation calibration print file and the original width of the error compensation calibration print file, thereby improving efficiency.
[0096] printing an image according to the error compensation calibration print file;
[0097] After acquiring the error compensation calibration print file, the printing device prints an image according to the error compensation calibration print file.
[0098] measuring an actual print width of the printed image;
[0099] The actual print width of the printed image is measured by a tool such as a tape measure or a ruler. In one embodiment, the printed image is photographed by a camera that communicates with the printing device, and the printing device calculates the image transmitted by the camera to measure the actual print width of the printed image, thereby improving efficiency.
[0100] Calculating the error coefficient of the printing width respectively according to the original width and the actual printing width;
[0101] The error coefficient of the printing width is calculated by the following formula:
[0102] Wherein, e2 is the printing width error coefficient, t2 is the actual width, and w is the original width.
[0103] The width of the subsequent file to be printed is corrected according to the error coefficient of the printing width.
[0104] The width of the document to be printed after correction is calculated by the following formula:
[0105] Wherein, W is the width of the file to be printed after correction, and W1 is the width of the file to be printed.
[0106] When printing, the printing device performs printing according to the corrected width of the document to be printed, thereby reducing the error in the width of the image printed by the printing device.
[0107] Example 3
[0108] See also Figure 3 The present invention also provides an image processing device for a printing roller, which comprises:
[0109] The data acquisition module 11 is used to acquire the image matrix 1 to be printed and the feathering length;
[0110] The to-be-printed data matrix conversion module 12 is used to convert the to-be-printed image matrix 1 into a to-be-printed data matrix 2, and divide the to-be-printed data matrix 2 into to-be-printed data matrix units including at least a first to-be-printed data matrix unit 3 and a second to-be-printed data matrix unit 4 according to the feathering length;
[0111] A mask template generating module 13, used to generate a first mask template and a second mask template;
[0112] The operation module 14 is used for performing AND operation on the first matrix unit 3 of data to be printed and the first mask template to obtain a third matrix unit 31 of data to be printed, and performing AND operation on the first matrix unit 3 of data to be printed and the second mask template to obtain a fourth matrix unit 32 of data to be printed;
[0113] The synthesis module 15 is used to sequentially combine the third matrix unit 31 of data to be printed, the second matrix unit 4 of data to be printed and the fourth matrix unit 32 of data to be printed to form the printing data 5 .
[0114] Example 4
[0115] See also Figure 4 The present invention also provides an image processing device for a printing roller, which includes: a memory 402, a processor 401, a communication interface 403 for communicating with an external device, and a computer program instruction stored in the memory 402 and executable on the processor 401, and when the computer program instruction is executed by the processor 401, any of the above methods is implemented. The memory 402, the processor 401, and the communication interface 403 are electrically connected through a bus 410 and communicate with each other to facilitate the transmission of the computer program instruction.
[0116] The communication interface 403 is mainly used to implement the communication between the modules, devices, units and / or equipment in the embodiment of the present invention.
[0117] Example 5
[0118] The present invention further provides a computer-readable storage medium having computer program instructions stored thereon. Preferably, when the computer program instructions are executed by the processor 401, any of the above-mentioned methods is implemented.
[0119] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0120] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0121] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0122] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.
Claims
1. A method for correcting width error of a printing roller, characterized in that: The method comprises: Dividing the to-be-printed data matrix into at least two to-be-printed data matrix units according to the feathering length, wherein the at least two to-be-printed data matrix units include a first to-be-printed data matrix unit and a second to-be-printed data matrix unit; Performing feathering processing on the first matrix unit of data to be printed to obtain a third matrix unit of data to be printed and a fourth matrix unit of data to be printed; sequentially merging the third matrix unit of data to be printed, the second matrix unit of data to be printed, and the fourth matrix unit of data to be printed to form printing data; Perform pre-printing and correct the width of the print data according to the print width error coefficient; During printing, the third data matrix unit to be printed is first printed in the first printing area of the roller, and then the second data matrix unit to be printed is printed in the second printing area of the roller. Finally, after the roller rotates one circle, the fourth data matrix unit to be printed continues to be printed in the first printing area.
2. The method for correcting the width error of a printing roller according to claim 1, characterized in that: The feathering process is performed on the first matrix unit of data to be printed to obtain a third matrix unit of data to be printed and a fourth matrix unit of data to be printed, comprising: Generate a first mask template and a second mask template respectively according to the first matrix unit of data to be printed and the second matrix unit of data to be printed; The first matrix unit of data to be printed is ANDed with the first mask template to obtain a third matrix unit of data to be printed, and the first matrix unit of data to be printed is ANDed with the second mask template to obtain a fourth matrix unit of data to be printed.
3. The method for correcting the width error of a printing roller according to claim 2, characterized in that: The generating of a first mask template and a second mask template respectively according to the first matrix unit of data to be printed and the second matrix unit of data to be printed specifically includes: Generate a grayscale image matrix according to the feathering length and the preset width, and convert the grayscale image matrix into a binary image matrix unit; Comparing the width of the binary image matrix unit with the width of the first matrix unit of data to be printed, and generating a first mask template from the binary image matrix unit according to the comparison result, so that the width of the first mask template is equal to the width of the first matrix unit of data to be printed; The second mask template is obtained by subtracting the first mask template from the all-ones matrix.
4. The method for correcting the width error of a printing roller according to claim 3, characterized in that: The step of generating a first mask template from the binary image matrix unit according to the comparison result specifically includes: When the width of the first to-be-printed data matrix unit is greater than the width of the binary image matrix unit, a plurality of the binary image matrix units are combined to form the first mask template; When the width of the first to-be-printed data matrix unit is equal to the width of the binary image matrix unit, the binary image matrix unit is used as the first mask template; When the width of the first data matrix unit to be printed is smaller than the width of the binary image matrix unit, the binary image matrix unit is divided into several sub-binarized image matrix units, and one of the sub-binarized image matrix units is selected as the first mask template, and the length and width of the sub-binarized image matrix unit are respectively equal to the length and width of the first data matrix unit to be printed.
5. The method for correcting the width error of a printing roller according to claim 4, characterized in that: When the width of the first to-be-printed data matrix unit is greater than the width of the binary image matrix unit, the first mask template is specifically obtained by the following formula: Wherein, D1 represents the first mask template, B j represents j A mn The intermediate matrix formed by merging, A mn represents the binary image matrix unit, A mx represents the first x columns of the binary image matrix unit, and j represents the merged binary image matrix unit A mn The number of and is a positive integer, m represents the binary image matrix unit A mn The length is a positive integer, n represents the binary image matrix unit A mn The width is a positive integer, c represents the width of the first matrix unit of the data to be printed and is a positive integer, is the floor symbol, x represents The remainder after rounding down.
6. The method for correcting the width error of a printing roller according to any one of claims 1 to 5, characterized in that: The print width error coefficient is obtained by the following steps: Obtaining an error compensation calibration print file and an original width of the error compensation calibration print file; Perform pre-printing according to the error compensation calibration print file to obtain a printed image; measuring an actual print width of the printed image; The printing width error coefficient is calculated based on the original width and the actual printing width.
7. The method for correcting the width error of a printing roller according to claim 6, characterized in that: The print width error coefficient is calculated by the following formula: Wherein, e2 is the printing width error coefficient, t2 is the actual printing width of the printed image, and w is the original width of the error compensation calibration print file.
8. The method for correcting the width error of a printing roller according to claim 7, characterized in that: The width of the corrected print data is calculated by the following formula: Wherein, W is the corrected width of the print data, and W1 is the original width of the print data.
9. A width error correction device for a printing roller, characterized in that: include: A data matrix conversion module to be printed, used for dividing the data matrix to be printed into at least two data matrix units to be printed according to the feathering length, wherein the at least two data matrix units to be printed include a first data matrix unit to be printed and a second data matrix unit to be printed; A feathering processing module, used for performing feathering processing on the first matrix unit of data to be printed to obtain a third matrix unit of data to be printed and a fourth matrix unit of data to be printed; A synthesis module, used for sequentially combining the third matrix unit of data to be printed, the second matrix unit of data to be printed and the fourth matrix unit of data to be printed to form printing data; A correction module, used for performing pre-printing and correcting the width of the print data according to a print width error coefficient; During printing, the third data matrix unit to be printed is first printed in the first printing area of the roller, and then the second data matrix unit to be printed is printed in the second printing area of the roller. Finally, after the roller rotates one circle, the fourth data matrix unit to be printed continues to be printed in the first printing area.
10. A width error correction device for a printing roller, characterized in that: include: A memory, a processor, and computer program instructions stored in the memory and executable on the processor, wherein when the computer program instructions are executed by the processor, the method according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
