Thermal printing method and chip
By determining the heating parameters based on the color rendering status of the target and reference pixel points in the pixel image in the thermal printer, the problem of heating only and not heating in the operating state of the thermistor is solved, and more efficient and accurate thermistor heating is achieved Control to improve printing effect.
Patent Information
- Application Number
- CN202410980425.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-19
AI Technical Summary
The working state of the thermistor of existing thermal printers is only heated or not heated, which leads to excessive high or low temperatures, resulting in poor printing results and insufficient configuration efficiency and accuracy.
By determining the original image and converting it into a pixel image, heating parameters are determined according to the color development state of the target pixel point and the reference pixel point, and the heating state of the thermistor is adjusted to achieve more precise heating control.
It improves the configuration efficiency and accuracy of the thermistor heating state signal, improves the printing effect, and avoids the problem of too shallow or too deep printing caused by uneven temperature.
Smart Images

Figure CN118906683A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to but is not limited to a thermal printing method and chip. Background Art
[0002] Thermal printers print by heating the thermistor. The resistor heats up and leaves color on the printing paper. The higher the temperature, the darker the print, and the lower the temperature, the lighter the print.
[0003] The current thermistor working status of thermal printers is only heated and not heated. When the same resistor is heated for multiple rows in a row and the next row is not heated, it may cause tailing due to high temperature. When the same resistor is not heated for multiple rows in a row and then a row is suddenly heated, it may cause the printing to be too light due to low temperature.
[0004] Therefore, a thermal printing method is needed to improve the thermal printing effect and increase the configuration efficiency and accuracy of thermal printing. Summary of the invention
[0005] The present application provides a thermal printing method and a chip for improving the accuracy of the heating working state configuration of a thermistor.
[0006] In a first aspect, the present application provides a thermal printing method, the method comprising:
[0007] Determine the original image;
[0008] Determine a pixel image according to the original image;
[0009] Wherein, the pixel image includes a plurality of pixel points, and the color display state of the pixel point is used to indicate the printing status of the pixel point, including a printing status or an empty status;
[0010] determining a printing mode in at least one printing mode, and processing the pixel image according to the printing mode;
[0011] As an optional implementation manner, the at least one printing mode includes a first printing mode:
[0012] Determine the color development state of the pixel, and then determine the heating parameters of the target pixel;
[0013] Determining a heating parameter of the target pixel according to the color development states of the target pixel and the reference pixel, performing heating printing on the target pixel according to the heating parameter of the target pixel, and performing a printing operation on each pixel in the pixel image;
[0014] The reference pixel points include a first pixel point in the same column and a row as the target pixel point, and a second pixel point and a third pixel point adjacent to the first pixel point on the left and right sides;
[0015] The heating parameters of the target pixel point at least include a first state parameter, a second state parameter and a third state parameter;
[0016] The first state parameter, the second state parameter and the third state parameter are used to indicate the heating degree of the target pixel, and the heating degrees can be superimposed;
[0017] The first state parameter is confirmed by the color rendering state of the target pixel, the second state parameter is determined by the color rendering state of the target pixel and the color rendering state of the first pixel, and the third state parameter is determined by the color rendering state of the target pixel and the color rendering states of the second pixel and the third pixel.
[0018] As an optional implementation, the at least one printing mode includes a second printing mode:
[0019] The heating parameters of the target pixel point include at least a first state parameter and a second state parameter;
[0020] The reference pixel point includes a first pixel point;
[0021] The first state parameter is confirmed by the color development state of the target pixel, and the second state parameter is determined by the color development state of the target pixel and the color development state of the first pixel.
[0022] As an optional implementation manner, the at least one printing mode includes a third printing mode:
[0023] The heating parameters of the target pixel point at least include a first state parameter, a second state parameter, a third state parameter and a fourth state parameter;
[0024] The reference pixel points include the first pixel point and the fourth pixel point in the same column and the next row of the target pixel point;
[0025] The first state parameter is determined by the color rendering state of the target pixel, the second state parameter is determined by the color rendering state of the target pixel and the color rendering states of the first pixel and the fourth pixel, the third state parameter is determined by the color rendering state of the target pixel and the color rendering state of the first pixel, and the fourth state parameter is determined by the color rendering state of the target pixel and the color rendering state of the first pixel and the fourth pixel.
[0026] As an optional implementation manner, the at least one printing mode includes a fourth printing mode:
[0027] The heating parameters of the target pixel point at least include a first state parameter, a second state parameter, a third state parameter and a fourth state parameter;
[0028] The reference pixel points include a first pixel point, a second pixel point, a third pixel point, a fourth pixel point, and a fifth pixel point in two rows above the same column as the target pixel point;
[0029] The first state parameter is determined by the color rendering state of the target pixel, the second state parameter is determined by the color rendering state of the target pixel and the color rendering states of the first pixel and the fifth pixel, the third state parameter is determined by the color rendering state of the target pixel and the color rendering states of the first pixel and the fifth pixel, and the fourth state parameter is determined by the color rendering state of the target pixel and the color rendering states of the first pixel, the second pixel, the third pixel, the fourth pixel and the fifth pixel.
[0030] As an optional implementation manner, the at least one printing mode includes a fifth printing mode:
[0031] Determine the color display state of a pixel point of a row of the pixel image;
[0032] Count the number of pixels whose color display state is printing state;
[0033] Compare the number of pixels in the printing state with a threshold value of the number of pixels that can be printed in a row by the printing module to obtain the number of prints, and control the printing module to print according to the number of prints;
[0034] Wherein, the controlling printing module to print according to the printing times includes:
[0035] The number of pixels in the printing state is divided by the number threshold and rounded up to an integer, and the pixels in the printing state are divided into n times for printing;
[0036] In the first n-1 printings, the number of pixels in the printing state printed is equal to the number threshold;
[0037] In the nth printing, the pixels in the remaining printing state are printed;
[0038] In each of the n printings, the pixels in the printing state may be continuous or discontinuous.
[0039] As an optional implementation, the controlling the printing module to print according to the number of print times further includes:
[0040] The pixel points of a row of the pixel image are evenly divided into m groups in order, and the pixel points of the color display state in the pixel points of a row of the pixel image are set in corresponding groups according to their positions, where m is a preset number and can evenly divide the pixel points of the same row of the pixel image.
[0041] As an optional implementation, the at least one printing mode includes a sixth printing mode:
[0042] The printing status includes 2 N Grayscale state, the heating parameters include N state parameters;
[0043] The N state parameters are used to indicate N different heating levels;
[0044] By the 2 N The grayscale state determines the N state parameters, and the N different heating levels indicated by the N state parameters are superimposed to achieve 2 N Printing of grayscale status.
[0045] As an optional implementation, each pixel of the pixel image indicates the 2 N The grayscale state, each bit of the N-bit binary number is used to indicate the corresponding state parameter.
[0046] As an optional implementation,
[0047] The process of processing the pixel image according to the printing mode and sending the processed data to the printing module for printing includes:
[0048] According to the paper detection parameters continuously output by the analog-to-digital converter, a difference is calculated between the current paper detection parameters and the paper detection parameters before a preset time, and the difference is compared with a difference threshold;
[0049] When the difference is less than the difference threshold, confirming the corresponding position as a printable position of the paper;
[0050] When the difference is greater than the difference threshold, the corresponding position is confirmed as an unprintable position.
[0051] In a second aspect, the present application provides a chip, wherein the chip is used to implement the thermal printing method as described in the first aspect.
[0052] The thermal printing method and chip provided in the present application select a target pixel to be printed and determine a reference pixel according to a selected printing mode, determine a heating parameter of the target pixel according to a color status signal corresponding to the target pixel and the reference pixel, and print the target pixel according to the heating parameter, thereby achieving accurate configuration of the heating status signal, and can determine the heating status signal corresponding to the thermistor according to the distribution of the printed pixels, thereby improving the efficiency and effectiveness of the configuration of the thermistor heating status signal, thereby improving the printing effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0054] Figure 1 It is a schematic diagram of the effect of a thermal printing method disclosed in an embodiment of the present invention;
[0055] Figure 2 is a flow chart of a thermal printing method disclosed in an embodiment of the present invention;
[0056] Figure 3 It is a schematic diagram of the effect of another thermal printing method disclosed in an embodiment of the present invention;
[0057] Figure 4 It is a schematic diagram of the effect of another thermal printing method disclosed in an embodiment of the present invention;
[0058] Figure 5 It is a schematic diagram of the effect of another thermal printing method disclosed in an embodiment of the present invention;
[0059] Figure 6 It is a schematic diagram of the effect of another thermal printing method disclosed in an embodiment of the present invention;
[0060] Figure 7 It is a schematic diagram of the effect of another thermal printing method disclosed in an embodiment of the present invention;
[0061] Figure 8 It is a structural schematic diagram of a microprocessor chip disclosed in an embodiment of the present invention.
[0062] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0063] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0064] Thermal printers print by heating the thermistor. The resistor heats up and leaves color on the printing paper. The higher the temperature, the darker the print, and the lower the temperature, the lighter the print. When printing an image, the second line will be printed after the first line is printed, and so on.
[0065] The current working status of the resistor is either heated or not heated. If the same resistor is heated for multiple rows in a row but the next row is not heated, it may be tailing due to high temperature. If the same resistor is not heated for multiple rows in a row but one row is suddenly heated, it may be printed too lightly due to low temperature. You need to pay attention to the historical working status of the same resistor when printing to adjust the heating strategy.
[0066] In the current thermal printing method, the efficiency of configuring the historical working status of the thermistor is not high, and the accuracy is insufficient, resulting in poor printing results. In short, there are problems such as insufficient fineness of printing, insufficient efficiency and accuracy of the heating status signal configuration corresponding to the thermistor, and the existing technology mostly configures the heating status signal through software, resulting in a complicated configuration process. Therefore, a thermal printing method is needed to improve the efficiency and accuracy of the historical working status configuration of the thermistor, thereby improving the effectiveness of printing.
[0067] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of the effect of a thermal printing method disclosed in an embodiment of the present invention, and is used to illustrate the aforementioned method of determining a pixel image based on an original image. Figure 1 As shown, taking the letter Y as an example, after being pixelated, it can be converted into a pixel image represented by a digital quantity on the right, so that the thermistor can be controlled according to the value on the pixel image, thereby completing printing.
[0068] By determining the original image and converting it into a pixel image, and then through the printing conditions corresponding to each pixel on the pixel image and the reference pixel corresponding to each target pixel Q0, the heating parameters of the thermistor can be determined. The thermistor can be heated according to the heating parameters to complete the printing operation, and the printing conditions corresponding to the reference pixel can be used to indicate the historical working state of the thermistor within a certain period of time in the past and / or the expected working state within a certain period of time in the future. Therefore, based on the distribution of the printed pixels and the working state of the thermistor, the working parameters of the thermistor are determined, which improves the efficiency and effectiveness of the configuration of the thermistor working parameters, thereby improving the printing effect.
[0069] Embodiment 1
[0070] The present application provides a thermal printing method, the method comprising:
[0071] Determine the original image;
[0072] Determine a pixel image according to the original image;
[0073] Wherein, the pixel image includes a plurality of pixel points, and the color display state of the pixel point is used to indicate the printing status of the pixel point, including a printing status or an empty status;
[0074] determining a printing mode in at least one printing mode, and processing the pixel image according to the printing mode;
[0075] See also Figure 2 , Figure 2 is a thermal printing flow chart disclosed in an embodiment of the present invention, such as Figure 2 As shown, the present application method includes:
[0076] Step 101: Determine a pixel image according to an original image;
[0077] Step 102: Select a target pixel and determine a reference pixel according to the selected printing mode;
[0078] Step 103: determining a heating parameter of the target pixel according to the color development states of the target pixel and the reference pixel;
[0079] Step 104: Print the target pixel according to the heating parameters
[0080] By selecting different modes, you can adapt to the thermal printing needs in different situations, consider the impact of different reference pixels around the target pixel on the target pixel, and then adjust the heating parameters of the target pixel to improve the printing effect and increase the configuration efficiency of thermal printing.
[0081] As a feasible implementation manner, the at least one printing mode includes a first printing mode:
[0082] Determine the color development state of each pixel, and then determine the heating parameters of the target pixel Q0;
[0083] Performing heating printing on the target pixel point Q0 according to the heating parameter of the target pixel point Q0, and performing a printing operation on each pixel point in the pixel image;
[0084] Specifically, the heating parameter of the target pixel Q0 may be determined according to the color development states of the target pixel Q0 and the reference pixel;
[0085] The reference pixel points include a first pixel point Q1 in the same column and a row above the target pixel point Q0, and a second pixel point Q2 and a third pixel point Q3 adjacent to the first pixel point Q1 on the left and right sides;
[0086] The heating parameters of the target pixel Q0 at least include a first state parameter, a second state parameter and a third state parameter;
[0087] The first state parameter, the second state parameter and the third state parameter are used to indicate the heating degree of the target pixel Q0, and the heating degrees can be superimposed;
[0088] The first state parameter is confirmed by the color display state of the target pixel Q0, the second state parameter is determined by the color display state of the target pixel Q0 and the color display state of the first pixel Q1, and the third state parameter is determined by the color display state of the target pixel Q0 and the color display states of the second pixel Q2 and the third pixel Q3.
[0089] The printing mode can be selected through a configuration signal interactively input by the user. The user can select a preset printing mode according to the original image.
[0090] In the present application, the pixel points may include a target pixel point Q0 and a reference pixel point. The reference pixel points may include several pixel points around the target pixel point Q0. According to the color rendering state of the reference pixel point in the pixel image, the heating or preheating strategy of the thermistor can be determined, thereby improving the effectiveness of printing. The method of selecting the reference pixel point will be explained separately in each implementation manner.
[0091] As an achievable implementation, the at least one printing mode also includes a second printing mode, and the second printing mode is used to determine the reference pixel point, and the reference pixel point includes the first pixel point Q1 in the same column and row above the target pixel point Q0.
[0092] The at least one printing mode also includes a third printing mode, and the third printing mode is used to determine the reference pixel point, and the reference pixel point also includes a fourth pixel point Q4 in the same column and row below the target pixel point.
[0093] The printing mode includes a fourth printing mode, and the fourth printing mode is used to determine the reference pixel points, and the reference pixel points also include a first pixel point Q1 in the same column and a row above the target pixel point Q0, a second pixel point Q2 and a third pixel point Q3 on both sides of the first pixel point Q1, a fourth pixel point Q4 in the same column and a row below the target pixel point Q0, and a fifth pixel point Q5 two rows above the target pixel point Q0.
[0094] The aforementioned embodiments may be referred to in detail described below.
[0095] As an optional implementation, the printing mode includes a first printing mode, and the first printing mode is used to indicate a printing mode for determining heating parameters of each thermistor according to a target pixel Q0, a first pixel Q1 in a row and a column above the target pixel Q0, and a second pixel Q2 and a third pixel Q3 adjacent to the first pixel Q1 on the left and right sides;
[0096] And, the reference pixel points include a first pixel point Q1 in a row and a column above the target pixel point Q0, and a second pixel point Q2 and a third pixel point Q3 adjacent to the first pixel point Q1 on the left and right, and the heating parameters include a first state parameter, a second state parameter and a third state parameter;
[0097] The first state parameter is used to indicate the first state parameter, the second state parameter and the third state parameter are used to indicate the heating degree of the target pixel Q0, and the heating degrees can be superimposed;
[0098] According to the color display state of each target pixel Q0 and the corresponding reference pixel, the heating parameters of each thermistor are determined, including:
[0099] Determine a first state parameter according to the color display state of each target pixel point Q0;
[0100] Determine a second state parameter according to the color display state of each target pixel point Q0 and the corresponding first pixel point Q1;
[0101] Determine a third state parameter according to each target pixel Q0 and the corresponding first pixel Q1, second pixel Q2 and third pixel Q3;
[0102] A heating parameter of the thermistor corresponding to the target pixel Q0 is determined according to the first state parameter, the second state parameter and the third state parameter.
[0103] As shown in Table 1 below, a possible truth table may be:
[0104] Table 1
[0105]
[0106]
[0107] In the table, "0" represents that the printing status of the corresponding pixel is in an empty state; "1" represents that the printing status of the corresponding pixel is in a printed state; for simplicity, the data corresponding to "front row left and right Q2 / Q3" in the table is the result of the logical operation of the printing status of the second pixel Q2 and the printing status of the third pixel Q3; for convenience, it will not be repeated below.
[0108] Da in the table is the first state parameter, Db is the second state parameter, and Dc is the third state parameter. This implementation method requires less data to be calculated, and the color development state of the first pixel point Q1, the second pixel point Q2, and the third pixel point Q3 has a greater impact on the target pixel point Q0. The state parameters obtained by calculating the color development state of the first pixel point Q1, the second pixel point Q2, and the third pixel point Q3 have better printing effect.
[0109] The first state parameter, the second state parameter and the third state parameter can be determined by the color development state of the target pixel Q0 and the reference pixel. The first state parameter, the second state parameter and the third state parameter are used to indicate the heating degree of the target pixel Q0, thereby improving the accuracy of thermal printing.
[0110] As an optional implementation, the printing mode includes a second printing mode, and the second printing mode is used to indicate a printing mode for determining heating parameters of each thermistor according to a target pixel Q0 and a first pixel Q1 in a row and a column above the target pixel Q0;
[0111] Determine a second state parameter according to the color display state of each target pixel point Q0 and the corresponding first pixel point Q1;
[0112] As shown in Table 2 below, a possible truth table may be:
[0113] Table 2
[0114]
[0115] All status parameters of thermal printing can be confirmed through the target pixel Q0 and the first pixel Q1. The amount of data calculation is small, which is more efficient while ensuring the printing quality and has lower requirements on the equipment.
[0116] As an optional implementation, the printing mode includes a third printing mode, and the third printing mode is used to indicate a printing mode for determining heating parameters of each thermistor according to the target pixel Q0, the first pixel Q1, and the fourth pixel Q4 in the same column and row below the target pixel Q0;
[0117] And, the heating parameters also include a third state parameter and a fourth state parameter;
[0118] Determining heating parameters of each thermistor according to the color display state of each target pixel Q0 and the corresponding reference pixel, further comprising:
[0119] Determine a first state parameter according to the color display state of each target pixel point Q0;
[0120] Determine the second state parameter according to the color display state of each target pixel point Q0 and the corresponding first pixel point Q1 and fourth pixel point Q4;
[0121] Determine a third state parameter according to the color display state of each target pixel point Q0 and the corresponding first pixel point Q1;
[0122] Determine a fourth state parameter according to the color display states of each target pixel point Q0 and the corresponding first pixel point Q1 and fourth pixel point Q4;
[0123] A heating parameter of the thermistor corresponding to the target pixel Q0 is determined according to the first state parameter, the second state parameter, the third state parameter and the fourth state parameter.
[0124] As shown in Table 3 below, a possible truth table may be:
[0125] Table 3
[0126]
[0127] In the case of continuous non-heating, if the next line needs to be printed, the third state parameter Dd is required to indicate the preheating condition. Combined with the first state parameter Da, the second state parameters Db and Dc, the problem of uneven temperature caused by non-preheating can be avoided.
[0128] As a feasible implementation mode, the printing mode includes a fourth printing mode, and the fourth printing mode is used to indicate a printing mode for determining heating parameters of each thermistor according to the target pixel Q0 and the first pixel Q1, the second pixel Q2, the third pixel Q3, the fourth pixel Q4, and the fifth pixel Q5 in the same column and two rows before the target pixel Q0;
[0129] Determining heating parameters of each thermistor according to the color display state of each target pixel Q0 and the corresponding reference pixel, further comprising:
[0130] Determine a first state parameter according to the color display state of each target pixel point Q0;
[0131] Determine the second state parameter according to the color display state of each target pixel Q0 and the corresponding first pixel Q1 and fifth pixel Q5;
[0132] Determine a third state parameter according to the color display states of each target pixel point Q0 and the corresponding first pixel point Q1 and fifth pixel point Q5;
[0133] Determine a fourth state parameter according to the color display states of each target pixel Q0 and the corresponding first pixel Q1, second pixel Q2, third pixel Q3, fourth pixel Q4 and fifth pixel Q5;
[0134] A heating parameter of the thermistor corresponding to the target pixel Q0 is determined according to the first state parameter, the second state parameter, the third state parameter and the fourth state parameter.
[0135] As shown in Table 4 below, a possible truth table may be:
[0136] Table 4
[0137]
[0138]
[0139] Among them, the first state parameter Da is the main heating parameter, and Db and Dc are the second and third state parameters, which form a two-bit binary number, providing 4 heating levels for heating adjustment. The fourth state parameter Dd is used for preheating, and preheating is enabled when heating is required for the next line after a long-time cooling.
[0140] It should be noted that the above table is only an example, and more reference pixel points and state parameters can be added to further refine the heating levels and improve the printing effect.
[0141] As a feasible implementation manner, the printing mode includes a fifth printing mode, and the fifth printing mode includes:
[0142] Determine the color display state of the pixel points in a row of the pixel image and count the number of pixel points with the color display state being the printing state;
[0143] Compare the number of pixel points in the printing state with the threshold of the number of printable pixel points in a row of the printing module to obtain the number of printing times, specifically including:
[0144] Assume that the number of pixel points in the printing state is L, and the threshold of the number of printable pixel points in a row of the printing module is M. Print the pixel points in the printing state in n = L / M times, where n is an integer and is rounded up in the calculation;
[0145] When L > M, in the first n - 1 printings, each time M pixel points in the printing state are printed, and in the nth printing, the remaining pixel points in the printing state in a row are printed;
[0146] When L < M, obviously n = 1, and all the pixel points in the printing state in a row are printed;
[0147] Optionally, print the consecutive pixel points in the printing state in different printings;
[0148] It can avoid the mutual influence of adjacent pixel points in the printing state during heating and printing, resulting in changes in color depth;
[0149] Optionally, print the consecutive pixel points in the printing state in the same printing;
[0150] During the n printings, the printing paper is still moving. When printing the adjacent pixel points in the printing state in different printings, it may cause slight up and down fluctuations of the printed horizontal line due to the movement of the printing paper, and finally make the printing effect of the printed horizontal line thicker than expected. Printing the consecutive pixel points in the printing state in the same printing can avoid the slight up and down fluctuations.
[0151] Please refer to Figure 3 , Figure 3 is a schematic diagram of another thermal printing method disclosed in an embodiment of the present invention, and Figure 4 , Figure 4 It is a schematic diagram of the effect of another thermal printing method disclosed in an embodiment of the present invention, which is used to illustrate the corresponding implementation methods of discrete positions and continuous positions.
[0152] like Figure 3 As shown, Figure 3 A printing effect of discrete position printing is shown, where the pixels in the printing state are spaced apart in two printings to avoid the pixels in adjacent printing states being heated and printed at the same time, causing the temperature to be too high and the color to darken.
[0153] like Figure 3 As stated, Figure 3 A printing effect of continuous position printing is shown, where adjacent pixels in the printing state are printed in the same printing, avoiding up and down fluctuations in the position of the horizontal line.
[0154] Also, see Figure 5 , Figure 5 is a schematic diagram of another thermal printing method disclosed in an embodiment of the present invention, wherein the controlling printing module to print according to the number of prints also includes:
[0155] The pixel points of a row of the pixel image are evenly divided into m groups in order, and the pixel points of the color display state in the pixel points of a row of the pixel image are set in corresponding groups according to their positions, where m is a preset number and can evenly divide the pixel points of the same row of the pixel image.
[0156] Obviously, Figure 5 An application scenario is shown in which a row of 8 pixels is divided into 4 groups, and there are pixels in three color states in a row. The pixels in the color state can be divided in a row at an even interval so that they fall into corresponding groups, avoiding the influence between pixels and achieving load balancing.
[0157] As a feasible implementation manner, the heating status signal also includes information on the multiple heating of pixels in the printing state.
[0158] As an optional implementation, the printing mode includes a sixth printing mode, and the printing state includes 2 N Grayscale state, the heating parameters include N state parameters;
[0159] The N state parameters are used to indicate N different heating levels;
[0160] The sixth printing mode is used to determine the 2 N Grayscale.
[0161] In an application scenario, in order to avoid distortion, grayscale values are needed to represent the color depth of each point.
[0162] For example, the gray value of each dot can be 0-255. The larger the gray value, the darker the color. The combination of eight geometric pulses can be used to achieve differential printing of gray values of 0-255. For example, the eight geometric pulses are 1, 2, 4, 8, 16, 32, 64, and 128. The above numbers can represent the width of the pulse, and the width of the pulse can represent the heating time. Any gray value of 0-255 can be achieved through the unique combination of the above 8 numbers.
[0163] For example, in one example, the grayscale value is 88, 88=64+16+8. Specifically in the printing module, each point will be judged by 8 pulse heatings, and the grayscale value is combined according to the pulses.
[0164] Since 88=64+16+8, the following 8 pulse judgments are performed:
[0165] 128 pulses? No
[0166] 64 pulses? Yes
[0167] 32 pulses? No
[0168] 16 pulses? Yes
[0169] 8 pulses? Yes
[0170] 4 pulses? No
[0171] 2 pulses? No
[0172] 1 pulse? No
[0173] The grayscale value printing of each dot can reduce image distortion and simplify the printing control process through proportional pulses.
[0174] Also, see Figure 6 , Figure 6 1 is a schematic diagram of another thermal printing method disclosed in an embodiment of the present invention, which is used to illustrate an actual application scenario. The 8-bit binary number corresponding to the 8 state parameters is 00100101, and the 8 binary numbers also correspond to 8 different heating levels, namely 2 0 -2 7 When the corresponding bit of the binary number is 0, the heating levels are not superimposed. When the corresponding bit is 1, the heating levels are superimposed. In the figure, the heating level superposition is 32+4+1=37.
[0175] See also Figure 7 , Figure 7 It is a schematic diagram of the effect of another thermal printing method disclosed in an embodiment of the present invention;
[0176] As an optional implementation,
[0177] The process of processing the pixel image according to the printing mode and sending the processed data to the printing module for printing includes:
[0178] According to the paper detection parameters continuously output by the analog-to-digital converter, a difference is calculated between the current paper detection parameters and the paper detection parameters before a preset time, and the difference is compared with a difference threshold;
[0179] When the difference is less than the difference threshold, confirming the corresponding position as a printable position of the paper;
[0180] When the difference is greater than the difference threshold, the corresponding position is confirmed as an unprintable position.
[0181] During the printing process, the position of the paper needs to be identified, and the printing module needs to print on the printing paper to avoid printing on the base paper;
[0182] Compared with the prior art which uses the average value of ADC sampling as the threshold and judges whether it is the surface paper or the bottom paper based on whether the value is continuously above or below the threshold, judging whether it is the surface paper or the bottom paper by comparing the difference between the before and after values with the difference threshold can avoid the influence of the overall increase or decrease of the detection value on the detection result caused by changing paper or being disturbed by the environment.
[0183] Embodiment 2
[0184] See also Figure 8 , Figure 8 Schematic diagram of the structure of a microprocessor chip disclosed in an embodiment of the present invention. Figure 8 As shown, the chip includes a thermal printing method as in any embodiment.
[0185] The chip may be a micro central control chip, system-on-chip chip, thermal printing chip, etc., such as MCU, DSP, MPU, micro CPU, etc., which can process digital signals, analog signals, or perform signal control functions, instruction processing and calculation functions.
[0186] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0187] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A thermal printing method, characterized in that: The method comprises: Determine the original image; Determine a pixel image according to the original image; Wherein, the pixel image includes a plurality of pixel points, and the color display state of the pixel point is used to indicate the printing status of the pixel point, including a printing status or an empty status; Determine a printing mode in at least one printing mode, and process the pixel image according to the printing mode; the at least one printing mode includes a first printing mode: Determine the color development state of the pixel, and then determine the heating parameters of the target pixel; Determining a heating parameter of the target pixel according to the color development states of the target pixel and the reference pixel, performing heating printing on the target pixel according to the heating parameter of the target pixel, and performing a printing operation on each pixel in the pixel image; The reference pixel points include a first pixel point in the same column and a row as the target pixel point, and a second pixel point and a third pixel point adjacent to the first pixel point on the left and right sides; The heating parameters of the target pixel point at least include a first state parameter, a second state parameter and a third state parameter; The first state parameter, the second state parameter and the third state parameter are used to indicate the heating degree of the target pixel, and the heating degrees can be superimposed; The first state parameter is confirmed by the color rendering state of the target pixel, the second state parameter is determined by the color rendering state of the target pixel and the color rendering state of the first pixel, and the third state parameter is determined by the color rendering state of the target pixel and the color rendering states of the second pixel and the third pixel.
2. The method according to claim 1, characterized in that The at least one printing mode includes a second printing mode: The heating parameters of the target pixel point include at least a first state parameter and a second state parameter; The reference pixel point includes a first pixel point; The first state parameter is confirmed by the color development state of the target pixel, and the second state parameter is determined by the color development state of the target pixel and the color development state of the first pixel.
3. The method according to claim 1, characterized in that The at least one printing mode includes a third printing mode: The heating parameters of the target pixel point at least include a first state parameter, a second state parameter, a third state parameter and a fourth state parameter; The reference pixel points include the first pixel point and the fourth pixel point in the same column and the next row of the target pixel point; The first state parameter is determined by the color rendering state of the target pixel, the second state parameter is determined by the color rendering state of the target pixel and the color rendering states of the first pixel and the fourth pixel, the third state parameter is determined by the color rendering state of the target pixel and the color rendering state of the first pixel, and the fourth state parameter is determined by the color rendering state of the target pixel and the color rendering state of the first pixel and the fourth pixel.
4. The method according to claim 1, characterized in that: The at least one printing mode includes a fourth printing mode: The heating parameters of the target pixel point at least include a first state parameter, a second state parameter, a third state parameter and a fourth state parameter; The reference pixel points include a first pixel point, a second pixel point, a third pixel point, a fourth pixel point, and a fifth pixel point in two rows above the same column as the target pixel point; The first state parameter is determined by the color rendering state of the target pixel, the second state parameter is determined by the color rendering state of the target pixel and the color rendering states of the first pixel and the fifth pixel, the third state parameter is determined by the color rendering state of the target pixel and the color rendering states of the first pixel and the fifth pixel, and the fourth state parameter is determined by the color rendering state of the target pixel and the color rendering states of the first pixel, the second pixel, the third pixel, the fourth pixel and the fifth pixel.
5. The method according to claim 1, characterized in that The at least one printing mode includes a fifth printing mode: Determine the color display state of a pixel point of a row of the pixel image; Count the number of pixels whose color display state is printing state; Compare the number of pixels in the printing state with a threshold value of the number of pixels that can be printed in a row by the printing module to obtain the number of prints, and control the printing module to print according to the number of prints; Wherein, the controlling printing module to print according to the printing times includes: The number of pixels in the printing state is divided by the number threshold and rounded up to an integer, and the pixels in the printing state are divided into n times for printing; In the first n-1 printings, the number of pixels in the printing state printed is equal to the number threshold; In the nth printing, the pixels in the remaining printing state are printed; In each of the n printings, the pixels in the printing state may be continuous or discontinuous.
6. The method according to claim 5, characterized in that The controlling printing module to print according to the number of print times also includes: The pixel points of a row of the pixel image are evenly divided into m groups in order, and the pixel points of the color display state in the pixel points of a row of the pixel image are set in corresponding groups according to their positions, where m is a preset number and can evenly divide the pixel points of the same row of the pixel image.
7. The method according to claim 1, characterized in that The at least one printing mode includes a sixth printing mode: The printing status includes 2 N Grayscale state, the heating parameters include N state parameters; The N state parameters are used to indicate N different heating levels; By the 2 N The grayscale state determines the N state parameters, and the N different heating levels indicated by the N state parameters are superimposed to achieve 2 N Printing of grayscale status.
8. The method according to claim 7, characterized in that Each pixel of the pixel image is indicated by N bits of binary data. N The grayscale state, each bit of the N-bit binary number is used to indicate the corresponding state parameter.
9. The method according to any one of claims 1 to 8, characterized in that: The process of processing the pixel image according to the printing mode and sending the processed data to the printing module for printing includes: According to the paper detection parameters continuously output by the analog-to-digital converter, a difference is calculated between the current paper detection parameters and the paper detection parameters before a preset time, and the difference is compared with a difference threshold; When the difference is less than the difference threshold, confirming the corresponding position as a printable position of the paper; When the difference is greater than the difference threshold, the corresponding position is confirmed as an unprintable position.
10. A chip, characterized in that: The chip is used to implement the thermal printing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Printing method and device, printing equipment and storage medium
CN114872470A
Thermal printing method, micro-processing chip, system and equipment
CN118144451A
Multi-gradation heat sensitive recorder and its density correcting method
JP1996065516A
Thermal printer and image data processing method
JP2015104834A
Printing system, thermal printer, printing control method, and data storage medium
US20020126197A1
Cited By
Printhead heating control method and related device
WO2026124233A1
