Improved gray scale printing control method for thermal printer

By optimizing the grayscale printing control method of thermal printers, and through segmented processing and gating time compensation, the problems of slow grayscale printing speed and unsatisfactory results have been solved, achieving an improvement in grayscale printing speed and a finer level of detail in the layer changes.

CN117644725BActive Publication Date: 2026-11-27XIAMEN RONGTA TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311691616.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2026-11-27
Estimated Expiration
2043-12-11

AI Technical Summary

Technical Problem

Existing thermal printers have slow grayscale printing speeds and unsatisfactory grayscale effects, especially with poor consistency in grayscale printing speed under high and low print rates, making it impossible to achieve subtle tonal variations.

Method used

By acquiring the grayscale levels of each row of data, the number of heating points with a grayscale value greater than 0 is calculated. Combined with the thermal printhead manual and voltage and current distribution, segmented processing is performed to calculate the gating time of the actual effective number of heating points, reduce the number of data group transmissions, and perform gating time compensation to optimize the grayscale printing control method.

Benefits of technology

It improved grayscale printing speed, achieved consistency in grayscale printing speed under different printing rates, and enhanced the fineness of grayscale effect and level changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117644725B_ABST
    Figure CN117644725B_ABST
Patent Text Reader

Abstract

The application provides an improved thermal printer gray scale printing control method, comprising: obtaining each point row data, determining a gray scale level; calculating the number of heating points with a gray scale greater than 0; segmenting the points with a gray scale greater than 0 in all point data of each point row; forming a data group by the binary values of the same bits of all points; calculating the actual effective heating point number under each gray scale level of each data group; calculating the gating time of each gray scale level under different heating point numbers by the actual effective heating point number under each gray scale level and the gating time of each gray scale level; sending each data group data to a thermal print head at the corresponding gating time; and the thermal print head receiving specific data to make the corresponding heating body heat. The application reduces the data group sending frequency by segmenting, improves the gray scale printing speed, and compensates the gating time of the effective heating point number, which makes the gating time more delicate, so that the gray scale effect and the more delicate level change are better realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of printing control, and in particular to an improved grayscale printing control method for thermal printers. Background Technology

[0002] Common laser printers, thermal printers, and dot matrix printers cannot print in color. To print color images, these printers need to convert the color image to black and white before printing. The resulting binary image exhibits noticeable pixelation, significant loss of detail, jagged text, poor image quality, and difficulty in perfectly achieving tonal variations and gradations. Based on these shortcomings, those skilled in the art invented grayscale printing technology. Grayscale printing, also known as grayscale printing, refers to a printing technique that uses varying shades of gray, from light to dark, to represent color content.

[0003] Before grayscale printing, the grayscale level of each pixel in each row needs to be determined. This grayscale level is then converted into n-bit binary data. The binary data of the same bits from all points in a row are then grouped into n data groups. In practical applications, to conform to the characteristics of thermal printheads and ensure grayscale printing quality, the data of all points in a row needs to be divided into m segments. This requires sending m times (m x n) of the data to complete the transmission of all data for a row, resulting in slow speed. The grayscale gating time for each grayscale level in the n data groups is fixed at T1, T2, T4, T8, ..., T2n-1, without corresponding compensation based on the actual number of effective heated points, leading to less than ideal grayscale effects and layer variations. Furthermore, existing grayscale printing methods suffer from a consistent grayscale printing speed regardless of whether the print rate is high or low.

[0004] In view of this, the inventor has specifically designed an improved grayscale printing control method for thermal printers, which leads to this invention. Summary of the Invention

[0005] To solve the above problems, the technical solution of the present invention is as follows:

[0006] An improved grayscale printing control method for thermal printers includes:

[0007] S1. Obtain all data for each row and determine the grayscale level of each point in each row;

[0008] S2. Calculate the number of heating points Dt with a gray level greater than 0 in all data points of each row;

[0009] S3. Based on the thermal printhead manual and voltage and current distribution, segment the points with a gray level greater than 0 in all data of each row.

[0010] S4. Combine the binary values ​​of the same bits of all points in the segmented row data into a data group;

[0011] S5. Calculate the actual number of effective heating points Dv of the thermal printhead at each gray level of each data group;

[0012] S6. Calculate the gating time of each gray level under different numbers of heating points by using the actual effective number of heating points Dv of the thermal printhead and the gating time of each gray level.

[0013] S7. Send the data of each data group to the thermal print head at the corresponding gating time;

[0014] S8. The thermal printhead receives specific data, causing the corresponding heating element to heat up.

[0015] Preferably, the segmentation method in step S3 is as follows:

[0016] S31. Determine the maximum number of segments m by referring to the thermal printhead manual and voltage / current distribution. Max ;

[0017] S32, Based on the maximum number of segments m Max The number of points Dh that the thermal printhead can heat simultaneously is calculated using the Number of Heat Elements parameter of the thermal printhead.

[0018] S33. Based on Dh, segment the points in each row of data with a gray level greater than 0 to obtain the effective number of segments m.

[0019] Preferably, the effective number of segments m ≤ m Max .

[0020] Preferably, in step S4, the data group is composed as follows:

[0021] S41. Locate the effective heating points of the thermal printhead in a predetermined order, and combine the binary values ​​of the same bits of all points in each m segment row of data into a group of data, forming m×n data groups.

[0022] Preferably, in step S6, the gating time for each grayscale level under different numbers of heating points is calculated as follows:

[0023] S61. Calculate the effective number of heating points Dv for each data group, and determine the gating times T1, T2, T4, T8, and Th based on the actual effective number of heating points Dh for each grayscale level. 16 ... And the actual effective number of heating points at each gray level: Dv1, Dv2, Dv3, Dv4, Dv5, ..., Dv n Based on the correspondence, the actual effective heating points Dv1, Dv2, Dv3, Dv4, Dv5, ..., Dv at each gray level are calculated. nGating times TT1, TT2, TT4, TT8, TT 16 ...

[0024] in:

[0025]

[0026] Preferably, in step S6, the actual effective number of heating points for each grayscale level is the gating time of Dh. The calculation can be performed according to the formula provided in the thermal printhead specification sheet. The formula is as follows:

[0027]

[0028]

[0029] R ave =R res +R lead Aerage resistance (Ex.)80(Ω);

[0030] (R res Heater resistance);

[0031] (R leαd Lead resistance);

[0032] N:Number of dots firing at same time (Ex)64(dots);

[0033] R com :Common resistance (Ex.)0.08(Ω);

[0034] R ic :Driver saturated resistance (Ex.)9(Ω);

[0035] Among them, T on That is

[0036] Preferably, the relationship between the effective number of segments m and the number of heating points Dt with a gray level greater than 0 is as follows:

[0037] The larger the number of pixels (Dt) with a gray level greater than 0, the higher the printing rate and the larger the effective number of segments (m).

[0038] Preferably, the specific data is 0 or 1.

[0039] This invention determines the grayscale level of all data points in each row and calculates the number of points with a grayscale level greater than 0. Combined with the thermal printhead manual and voltage and current distribution, it performs segmented processing to reduce the number of data group transmissions, thereby improving the grayscale printing speed. At the same time, it solves the problem of consistent grayscale printing speed for images with high and low grayscale printing rates.

[0040] Furthermore, this invention uses the gating times T1, T2, T4, T8, and Th, where the actual effective number of heating points at each grayscale level is Dh. 16 ... And the actual effective number of heating points at each gray level: Dv1, Dv2, Dv3, Dv4, Dv5, ..., Dv n Based on the correspondence, the actual effective heating points Dv1, Dv2, Dv3, Dv4, Dv5, ..., Dv at each gray level are calculated. n Gating times TT1, TT2, TT4, TT8, TT 16 ... This involves compensating for the gating time of the actual effective heating points, and processing the gating time more finely to achieve better grayscale effects and more subtle layer changes. Attached Figure Description

[0041] The accompanying drawings, which are provided to further illustrate the invention and constitute a part of this invention, are illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention.

[0042] in:

[0043] Figure 1 This is a diagram illustrating the paper characteristics involved in this invention;

[0044] Figure 2 This is a flowchart of the grayscale printing control method of the present invention;

[0045] Figure 3 This is part of the thermal printhead manual;

[0046] Figure 4 This is a segmented schematic diagram of the printing control method of the present invention;

[0047] Figure 5 This is a chart showing the correspondence between grayscale levels, gating time, data groups, and the actual number of effective heating points (Dv) in the grayscale printing control method of thermal printers.

[0048] Label Explanation:

[0049] S1, Step 1; S2, Step 2; S3, Step 3; S4, Step 4; S5, Step 5; S6, Step 6; S7, Step 7; S8, Step 8. Detailed Implementation

[0050] To make the technical problems, solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of the invention.

[0051] Please see Figures 1 to 5 This is an improved grayscale printing control method for thermal printers, which is the preferred embodiment of the present invention.

[0052] This example uses 16 levels of grayscale. First, select a suitable grayscale paper (paper characteristics such as...). Figure 1 As shown in the figure, the gray concentration range is 0 to 1.42 for levels 0 to 15.

[0053] Figure 2 This is a flowchart illustrating an improved grayscale printing control method for a thermal printer, as provided in the first embodiment of the present invention.

[0054] S1. Obtain all point data for each row and determine the grayscale level of each point in each row.

[0055] S2. Calculate the number of points Dt with a gray level greater than 0 in all data of each row.

[0056] Points with a gray level greater than 0 indicate that the point needs to be heated. The specific heating time needs to be further confirmed based on the gray level of the point. The number of points with a gray level greater than 0, Dt, in all data of each point row is counted and used to calculate the effective number of segments m of each point row.

[0057] S3. Determine the maximum number of segments m based on the thermal printhead manual, voltage and current distribution, and practical applications. Max Based on the maximum number of segments m Max The number of points Dh that the thermal printhead can heat simultaneously is calculated using the Number of Heat Elements parameter of the thermal printhead.

[0058] For specific examples, such as Figure 3 The image shown is a portion of the thermal printhead manual. Assuming the thermal printhead is battery-powered with the following battery parameters: battery voltage 4.2V, battery capacity 2000mAh, discharge rate 3C, the calculated maximum battery output power is 25.2W, and the maximum number of points that can be heated simultaneously is 157.5. Therefore, the maximum number of segments (m) is... Max The requirement is that the value must be greater than or equal to 4.

[0059] The main purpose of the above two segmented processing steps is to reduce the number of segments, thereby reducing the number of subsequent data groups sent and improving the grayscale printing speed.

[0060] Figure 4 This is a schematic diagram illustrating an improved grayscale printing control method for thermal printers, showing the printing of segments with a maximum number of segments m. Max Taking 8 as an example, the 576 heating points of the thermal printhead are divided into segments of 72 heating points each, as shown below, for subsequent point finding and segmentation:

[0061] M1{A1,A2,A3,A4,A5,A6,......,A65,A66,A67,A68,A69,A70,A71,A72} represents the heating points of the head section.

[0062] M2{B1,B2,B3,B4,B5,B6,......,B65,B66,B67,B68,B69,B70,B71,B72} represents the heating points of the head section.

[0063] M3{C1,C2,C3,C4,C5,C6,......,C65,C66,C67,C68,C69,C70,C71,C72} represents the heating points of the head section.

[0064] M4{D1,D2,D3,D4,D5,D6,......,D65,D66,D67,D68,D69,D70,D71,D72} represents the heating points for the head section.

[0065] M5{E1,E2,E3,E4,E5,E6,......,E65,E66,E67,E68,E69,E70,E71,E72} are the heating points for the head section.

[0066] M6{F1,F2,F3,F4,F5,F6,......,F65,F66,F67,F68,F69,F70,F71,F72} represents the heating points for the head section.

[0067] M7{G1,G2,G3,G4,G5,G6,......,G65,G66,G67,G68,G69,G70,G71,G72} are the heating points for the head section.

[0068] M8{H1,H2,H3,H4,H5,H6,......,H65,H66,H67,H68,H69,H70,H71,H72} are the heating points for the head section.

[0069] Following the array S{M2,M4,M6,M8,M1,M3,M5,M7} (which can be arbitrarily specified), we first search for effective heating points of the thermal printhead, i.e., heating points with a gray level greater than 0, starting from point B1 of M2. This continues until the actual number of effective heating points reaches segment Dh of 1. We record the current position and then continue searching for the heating point of the next segment until we find point G72 of M7. Once all heating points of the thermal printhead have been found, segmentation m is complete, and the number of effective segments m is obtained.

[0070] The number of effective segments m is related to the number of points Dt with gray levels greater than 0. The larger the number of points Dt with gray levels greater than 0, that is, the higher the printing rate, the larger the number of effective segments m.

[0071] S4. Obtain the point row data of each m segment, and combine the binary values ​​of the same bit of all points in the point row data of each m segment into a group of data, forming (m×n) data groups.

[0072] The above (m×n) data sets are used to calculate the actual number of effective heating points Dv1, Dv2, Dv3, Dv4, Dv5, ..., Dv in each of the n data sets under the m segments by traversing the data. n This is used for subsequent calculations of the actual effective heating points Dv1, Dv2, Dv3, Dv4, Dv5, ..., Dv at each grayscale level. n The gating time.

[0073] Figure 5 This describes an improved grayscale printing control method for thermal printers, outlining the correspondence between grayscale level, gating time, data group, and actual effective heating point count (Dv).

[0074] At this point, the actual effective number of heating points for grayscale level 1 is Dh, with a gating time T1; for grayscale level 2, the actual effective number of heating points is Dh, with a gating time T2; for grayscale level 4, the actual effective number of heating points is Dh, with a gating time T4; for grayscale level 8, the actual effective number of heating points is Dh, with a gating time T8; and for grayscale level 16, the actual effective number of heating points is Dh, with a gating time T... 16 Similarly, the actual effective number of heating points for (2n-1) levels of grayscale is the gating time of Dh.

[0075] The gating time for the above-mentioned 3-level grayscale with an actual effective number of heating points of Dh can be decomposed into T2+T1, the gating time for the 5-level grayscale with an actual effective number of heating points of Dh can be decomposed into T4+T1, and so on. The gating time for each grayscale level with an actual effective number of heating points of Dh can be decomposed into 1, 2, 4, 8, ..., 2... n-1 The sum of the basic gray levels at each level.

[0076] S5. Calculate the actual effective number of heating points Dv of the thermal printhead at the corresponding gray level for each data group by traversing the data.

[0077] At this point, the actual number of effective heating points in data group 1 is Dv1, in data group 2 it is Dv2, in data group 3 it is Dv3, in data group 4 it is Dv4, in data group 5 it is Dv5, and so on, with the actual number of effective heating points in data group n being Dv1. n .

[0078] S6. The gating times T1, T2, T4, T8, and T6 for each gray level with an actual effective number of heating points Dh are set. 16 ... And the actual effective number of heating points at each gray level: Dv1, Dv2, Dv3, Dv4, Dv5, ..., Dv n Based on the correspondence, the actual effective heating points Dv1, Dv2, Dv3, Dv4, Dv5, ..., Dv at each gray level are calculated. n Gating times TT1, TT2, TT4, TT8, TT 16 ...

[0079] at this time

[0080] S7. Gating the data from each data group at the corresponding gating times TT1, TT2, TT4, TT8, TT... 16 ... It is sent to the thermal printhead.

[0081] S8. After the thermal printhead receives the data set, it initiates the corresponding gating times TT1, TT2, TT4, TT8, and TT9. 16 ... During the gating time, heating is performed if the received data has a specific value (1 or 0); otherwise, heating is not performed.

[0082] In this way, after the thermal printhead has received all the data sets, it can print the corresponding grayscale image data on the consumable.

[0083] Furthermore, in step S6, the actual effective number of heating points for each grayscale level is the gating time T1, T2, T4, T8, T... 16 ... The calculation can be performed according to the formula provided in the thermal printhead specification sheet. The formula is as follows:

[0084]

[0085]

[0086] Rave = R res +R lead Average resistance (Ex.)80(Ω)

[0087] (R res Heater resistance)

[0088] (R lead Lead resistance)

[0089] N:Number of dotsfiring at same time (Ex.)64(dots)

[0090] R com :Common resistance (Ex.)0.08(Ω)

[0091] R ic :Driver saturated resistance (Ex.)9(Ω)

[0092] Among them, T on That is E0 is given in the thermal printhead manual.

[0093] This method determines the grayscale level of all data points in each row, calculates the number of points with a grayscale level greater than 0, and performs segmented processing based on the thermal printhead manual and voltage / current distribution to reduce the number of data group transmissions, thereby improving grayscale printing speed. It also solves the problem of consistent grayscale printing speed for images with high and low grayscale printing rates.

[0094] Furthermore, this invention uses the gating times T1, T2, T4, T8, and Th, where the actual effective number of heating points at each grayscale level is Dh. 16 ... And the actual effective number of heating points at each gray level: Dv1, Dv2, Dv3, Dv4, Dv5, ..., Dv n Based on the correspondence, the actual effective heating points Dv1, Dv2, Dv3, Dv4, Dv5, ..., Dv at each gray level are calculated. n Gating times TT1, TT2, TT4, TT8, TT 16 ... This involves compensating for the gating time of the actual effective heating points, and processing the gating time more finely to achieve better grayscale effects and more subtle layer changes.

[0095] The present invention has been described above by way of example with reference to the accompanying drawings. Obviously, the specific implementation of the present invention is not limited to the above-described manner. Any non-substantial improvements made using the inventive concept and technical solution of the present invention, or the direct application of the inventive concept and technical solution of the present invention to other occasions without modification, are all within the protection scope of the present invention.

Claims

1. An improved grayscale printing control method for a thermal printer, characterized in that, include: S1. Obtain all data for each row and determine the grayscale level of each point in each row; S2. Calculate the number of heating points Dt with a gray level greater than 0 in all data points of each row; S3. Based on the thermal printhead manual and voltage and current distribution, segment the points with a gray level greater than 0 in all data of each row. S4. Combine the binary values ​​of the same bits of all points in the segmented row data into a data group; S5. Calculate the actual number of effective heating points Dv of the thermal printhead at each gray level of each data group; S6. Calculate the gating time of each gray level under different numbers of heating points by using the actual effective number of heating points Dv of the thermal printhead and the gating time of each gray level. S7. Send the data of each data group to the thermal print head at the corresponding gating time; S8. The thermal printhead receives specific data, causing the corresponding heating element to heat up; The segmentation method in step S3 is as follows: S31. Determine the maximum number of segments by referring to the thermal printhead manual and voltage / current distribution. ; S32. Based on the maximum number of segments and thermal printhead The parameters are used to calculate the number of points Dh that the thermal printhead can heat simultaneously; S33. Based on Dh, segment the points with a gray level greater than 0 in each row of data to obtain the effective number of segments m; In step S4, the data group is composed as follows: S41. Locate the effective heating points of the thermal printhead in the predetermined order, and... The segmented data consists of a set of data formed by the binary values ​​of the same bit at all points. One data set; In step S6, the gating time for each grayscale level under different numbers of heating points is calculated as follows: S61. Calculate the actual effective number of heating points Dv for each data group, and determine the gating time based on the actual effective number of heating points Dh for each grayscale level. and the actual number of effective heating points at each gray level Based on the correspondence, the actual number of effective heating points for each gray level was calculated. gating time ; in: 。 2. The improved thermal printer grayscale printing control method according to claim 1, characterized in that, Effective number of segments .

3. The improved grayscale printing control method for a thermal printer according to claim 1, characterized in that, In step S6, the actual effective number of heating points for each grayscale level is the gating time of Dh. The calculation can be performed according to the formula provided in the thermal printhead specification sheet. The formula is as follows: ; in, That is .

4. The improved grayscale printing control method for a thermal printer according to claim 1, characterized in that, Effective number of segments The relationship between the number of heating points Dt with a gray level greater than 0 is as follows: The higher the Dt value (number of pixels with a gray level greater than 0), the higher the printing rate and the more effective the number of segments. The larger the value.

5. An improved grayscale printing control method for a thermal printer according to claim 1, characterized in that, The specific data is 0 or 1.

Citation Information

Patent Citations

  • Thermal printer sectional drive printing method and system

    CN101357543A

  • Gray level print control method and device

    CN101549591A

  • Thermal printer and printing method thereof

    CN1104586A