Method for determining heating pulses and printing chip
By converting grayscale values to binary values and optimizing the heating pulse combination, the problems of excessive pulse quantity or long heating time in thermal printing are solved, thereby improving printing speed and reducing current pressure.
Patent Information
- Application Number
- CN202411667656.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2044-11-20
AI Technical Summary
In existing thermal printing technologies, excessive pulse counts or prolonged heating times limit printing speed and require large currents, affecting the lifespan of the printhead.
The grayscale value is converted into a binary value and divided into a first significant bit and a second significant bit. The first heating pulse with the same pulse width and the second heating pulse with a different pulse width are matched to optimize the heating pulse combination, reduce the maximum pulse width and reduce the number of pulses.
It increases printing speed, reduces current pressure, avoids excessive pulse count, and improves printing efficiency.
Smart Images

Figure CN119489628B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of gray scale printing, and in particular to a method for determining heating pulses and a printing chip. BACKGROUND
[0002] At present, gray scale printing can be realized by thermal printing, which is a printing technology for generating images or characters by heating. Thermal printing mainly controls the heating time according to the size of the gray scale value.
[0003] At present, the corresponding gray scale value can be heated by a plurality of heating pulses with the same pulse width through the number of heating pulses, or by a plurality of heating pulses with different pulse widths through the combination of heating pulses.
[0004] However, either the number of pulses is too large, or the heating time is too long, which requires a large current, and all of them will affect the printing speed. SUMMARY
[0005] The embodiments of the present application provide a method for determining heating pulses and a printing chip to improve the printing speed.
[0006] In a first aspect, the embodiments of the present application provide a method for determining heating pulses, comprising:
[0007] Obtaining the gray scale value of a pixel point in a gray scale image, converting the gray scale value into a binary value, and the binary value includes a first significant bit and a second significant bit;
[0008] Matching the first heating pulse to the first significant bit, and the pulse width of the first heating pulse is the same;
[0009] Matching the second heating pulse to each bit in the second significant bit.
[0010] In a possible implementation, the method further comprises:
[0011] Determining the heating pulse combination of the pixel point based on the heating pulses corresponding to the first significant bit and the second significant bit in the binary value to realize the heating corresponding to the gray scale value of the pixel point.
[0012] In the present embodiment, the first heating pulse with the same pulse width is matched to each bit in the first significant bit, and the second heating pulse with different pulse widths is matched to each bit in the second significant bit. After determining the heating pulse combination of the pixel point based on the heating pulses corresponding to the first significant bit and the second significant bit in the binary value, the heating corresponding to the gray scale value of the pixel point can be realized, the highest pulse width can be reduced, the current pressure can be reduced, and the number of pulses can be reduced to improve the printing speed.
[0013] In a possible implementation, the matching the second pulse width for each bit in the second significant bits comprises:
[0014] The second heating pulse with gradually increasing pulse width is matched for each bit in the second significant bits in order from low bit to high bit; and the pulse width of the first heating pulse is greater than the maximum pulse width of the second heating pulse corresponding to the second significant bits.
[0015] In the embodiment, the second heating pulse with gradually increasing pulse width is matched for each bit in the second significant bits in order from low bit to high bit, so that each bit in the second significant bits corresponds to the second heating pulse with different pulse width, so that the representation of different gray scales can be realized. And the pulse width of the first heating pulse can be twice the maximum pulse width of the second heating pulse corresponding to the second significant bits, so that the maximum pulse width can be reduced.
[0016] In a possible implementation, the method further comprises:
[0017] The binary value is divided into first significant bits and second significant bits according to the width of the print head.
[0018] In the embodiment, the binary value is divided into first significant bits and second significant bits according to the width of the print head, so that the printing speed can be improved while meeting the printing requirements of the print head.
[0019] In a possible implementation, when the width of the print head is within a preset width range, the number of the first significant bits is equal to the number of the second significant bits.
[0020] When the width of the print head is greater than the maximum value of the preset width range, the number of the first significant bits is greater than the number of the second significant bits.
[0021] When the width of the print head is less than the minimum value of the preset width range, the number of the first significant bits is less than the number of the second significant bits.
[0022] In the embodiment, when the width of the print head is within a preset width range, the number of the first significant bits is equal to the number of the second significant bits, when the width of the print head is greater than the maximum value of the preset width range, the number of the first significant bits is greater than the number of the second significant bits, and when the width of the print head is less than the minimum value of the preset width range, the number of the first significant bits is less than the number of the second significant bits, so that the printing requirements can be met.
[0023] In a possible implementation, before the matching the second pulse width for each bit in the second significant bits, the method further comprises:
[0024] Removing part of the low bits in the second significant bits.
[0025] In the embodiment, before the binary value is divided into the first significant bit and the second significant bit, part of the low bits in the second significant bit is removed, so that the printing speed is improved by discarding binary data with low weight.
[0026] In a possible implementation, after the heating pulse combination of the pixel point is determined based on the heating pulses corresponding to the first significant bit and the second significant bit of the binary value, the method further includes:
[0027] According to the heat dissipation effect of the print head, the heating sequence of each heating pulse in the heating pulse combination is determined.
[0028] In the embodiment, according to the heat dissipation effect of the print head, the heating sequence of each pulse in the heating pulse combination is determined, and the printing effect is improved.
[0029] In a possible implementation, the heating sequence of each heating pulse in the heating pulse combination is determined according to the heat dissipation effect of the print head, and includes:
[0030] When the heat dissipation efficiency of the print head is greater than a preset threshold interval, the heating pulse corresponding to the first significant bit is output to the print head first, and then the heating pulse corresponding to the second significant bit is output to the print head.
[0031] When the heat dissipation efficiency of the print head is less than a preset threshold interval, the heating pulse corresponding to the first significant bit and the heating pulse corresponding to the second significant bit are alternately output to the print head.
[0032] In the embodiment, when the heat dissipation efficiency of the print head is greater than a preset threshold interval, the heating pulse corresponding to the first significant bit is output to the print head first, and then the heating pulse corresponding to the second significant bit is output to the print head; when the heat dissipation efficiency of the print head is less than a preset threshold interval, the heating pulse corresponding to the first significant bit and the heating pulse corresponding to the second significant bit are alternately output to the print head, so as to improve the printing effect.
[0033] In a possible implementation, the method further includes:
[0034] When the heat dissipation efficiency of the print head is less than a preset threshold interval, a preheating operation is performed on the print head before each heating pulse is output.
[0035] When the heat dissipation efficiency of the print head is greater than or equal to a preset threshold interval, the cooling time between two heating pulses is prolonged.
[0036] In the embodiment, according to the heat dissipation performance of the print head, the preheating or cooling is increased, the heat accumulation or heat dissipation effect is improved, and the printing effect is further improved.
[0037] In a second aspect, the present application provides a printing chip for performing the first aspect and / or various possible implementation manners of the first aspect.
[0038] In a third aspect, the present application provides an electronic device, comprising: a memory, a processor;
[0039] The memory stores computer-executable instructions.
[0040] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the first aspect and / or various possible implementation manners of the first aspect.
[0041] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect.
[0042] In a fifth aspect, the present application provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect.
[0043] The determination method of heating pulse and the printing chip provided by the present application can reduce the highest pulse width, reduce the current pressure, avoid too many pulse numbers, and improve the printing speed by converting the gray value of the pixel point into a binary value, matching the first heating pulse with the same pulse width for each bit of the first effective bit, and matching the second heating pulse for each bit in the second effective bit. BRIEF DESCRIPTION OF DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.
[0045] Figure 1 A schematic diagram of a gray-scale printing;
[0046] Figure 2 A schematic diagram of another gray-scale printing;
[0047] Figure 3 A flowchart of a determination method of heating pulse provided by the present application;
[0048] Figure 4 A flowchart of another determination method of heating pulse provided by the present application;
[0049] Figure 5 A schematic diagram of a gray-scale printing method provided by the present application;
[0050] Figure 6 The structural schematic diagram of the electronic device provided in the present application is shown.
[0051] The specific embodiments of the present application have been shown by the above-mentioned drawings, and will be described in more detail hereinafter. These drawings and the written description are not intended to limit the scope of the present application concept in any way, but to illustrate the present application concept to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0052] The exemplary embodiments will be described in detail herein with reference to the accompanying drawings. In the following description, the same numbers refer to the same elements throughout the drawings, unless otherwise represented. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application. Rather, they are merely examples of devices and methods consistent with some aspects of the present application.
[0053] Gray scale printing is a printing technology that uses different shades of gray to represent image details. It does not use color ink, but produces different gray levels by adjusting the concentration or dot density of black ink. Gray scale printing can show the subtle details and gradations of an image, and uses less ink or color, reducing printing costs, and is suitable for document printing, black and white photography, engineering drawings, medical images, etc.
[0054] Currently, gray scale printing can be achieved by thermal printing, which is a printing technology that produces images or text by heating. Thermal printing can adopt the following methods:
[0055] S1: receiving an original image;
[0056] S2: extracting the gray value of each point in the original image;
[0057] S3: according to the size of the gray value of each point, controlling the heating time of the corresponding point, the larger the gray value, the longer the heating time, the darker the color, the smaller the gray value, the shorter the heating time, the lighter the gray value.
[0058] Among them, step S3 can be realized by the following two ways:
[0059] Method one: there are multiple heating pulses with the same pulse width, and the number of heating pulses is used to realize the heating of the corresponding gray value, as shown in Figure 1 The larger the gray value, the more the number of heating pulses, and the smaller the gray value, the fewer the number of heating pulses;
[0060] Method two: there are multiple heating pulses with different pulse widths, and the combination of heating pulses is used to realize the heating of the corresponding gray value, as shown inFigure 2 As shown, the multiple heating pulses with different pulse widths can include eight pulses of T1, T2, T4, T8, T16, T32, T64, and T128, where T1=T, T2=2T, T4=4T, T8=8T, T16=16T, T32=32T, T64=64T, and T128=128T, representing the gray scale of 0-255.
[0061] However, for the first mode, the number of pulses can be too large, since each pulse corresponds to the activation of the print head, frequent pulse activation can cause the print head to generate more heat, in order to avoid overheating, it can be necessary to reduce the printing speed or increase the cooling time, thereby affecting the overall printing speed.
[0062] For the second mode, when the heating time is long (for example, corresponding to T128), the required current increases, when the heating time is long and a large current is required, the thermal load of the print head increases, in order to prevent overheating, it can be necessary to limit the number of simultaneously activated print points to reduce the total heat generation, resulting in a reduction in printing speed, and even possible damage to the print head.
[0063] Therefore, the present application provides a method for determining heating pulses, which converts the gray scale value of a pixel into a binary value, the binary value including a first significant bit and a second significant bit, and matches each bit in the first significant bit with a first heating pulse having the same pulse width, thereby reducing the highest pulse width, reducing the current pressure, and avoiding too many pulses, and improving the printing speed.
[0064] The technical solutions of the present application and how the technical solutions solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in detail in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0065] Figure 3 The flowchart of the method for determining heating pulses provided by an embodiment of the present application is shown in FIG. 1. Figure 3 As shown, the method provided by the embodiment of the present application can include:
[0066] S101, obtaining the gray scale value of a pixel in a gray scale image, and converting the gray scale value into a binary value, the binary value including a first significant bit and a second significant bit.
[0067] In a grayscale image, each pixel point has a corresponding grayscale value. The grayscale value represents the brightness of the pixel, usually in the range of 0 to 255, where 0 represents black, 255 represents white, and values between the two represent different degrees of gray. Since the grayscale image is single-channel, it means that each pixel only needs one numerical value to represent its brightness.
[0068] In this step, after obtaining the grayscale value of the pixel point in the grayscale image, the grayscale value of the pixel point is converted into a multi-bit binary value, so that subsequent different pixel points can be determined based on the binary value corresponding to different gray levels.
[0069] In some embodiments, considering that 8-bit binary is sufficient to represent the values from 0 to 255, and no additional bits are needed to represent these values, in order to simplify the operation, the grayscale value of the pixel point is converted into an eight-bit binary value. For example, when the grayscale value is 163, the corresponding eight-bit binary value is 10100011, and when the grayscale value is 255, the corresponding eight-bit binary value is 11111111. In other embodiments, the grayscale value can also be converted into other bit binary values, which can be determined according to the actual situation.
[0070] It should be noted that the first significant bit has a greater impact on the value, representing the part of the value with a larger weight, i.e. the more forward bits in the binary value. For example, when the grayscale value is converted to an eight-bit binary value, the first significant bit is the first two bits, three bits, four bits, etc. The second significant bit has a smaller impact on the value, representing the part of the value with a smaller weight, i.e. the more backward bits in the binary value. The number of first significant bits and the number of second significant bits correspond to the total number of bits in the binary value.
[0071] For example, when the grayscale value is converted to an eight-bit binary value, the first significant bit is the first four bits, and the second significant bit is the last four bits. The sum of the number of first significant bits and the number of second significant bits is equal to eight.
[0072] For example, when the grayscale value is converted to an eight-bit binary value, the first significant bit is the first three bits, and the second significant bit is the last five bits. The sum of the number of first significant bits and the number of second significant bits is equal to eight.
[0073] In some embodiments, the binary value is divided into the first significant bits and the second significant bits according to the width of the print head, so that the printing speed can be improved while meeting the printing requirements of the print head. For example, when the width of the print head is large, more dots can be printed at the same time, and the maximum pulse width needs to be small, so the number of the first significant bits can be large and the number of the second significant bits can be small; when the width of the print head is small, fewer dots can be printed at the same time, and the maximum pulse width can be large, so the number of the first significant bits can be small and the number of the second significant bits can be large. The number of the first significant bits and the number of the second significant bits can be determined according to the specific width of the print head.
[0074] As an implementation manner, when the width of the print head is within a preset width range, the number of the first significant bits is equal to the number of the second significant bits; when the width of the print head is greater than the maximum value of the preset width range, the number of the first significant bits is greater than the number of the second significant bits; and when the width of the print head is less than the minimum value of the preset width range, the number of the first significant bits is less than the number of the second significant bits, so as to meet the printing requirements. The preset width range can be determined according to actual conditions.
[0075] S102, match the first heating pulses for each bit in the first significant bits, and the pulse widths of the first heating pulses are the same.
[0076] In this step, in order to reduce the maximum pulse width and reduce the current pressure, the first heating pulses with the same pulse width are matched for each bit in the first significant bits, so that the number of the first heating pulses can be used to represent different gray scales.
[0077] S103, match the second heating pulses for each bit in the second significant bits.
[0078] In this step, in order to be able to match the corresponding heating pulses for smaller gray scales, the second heating pulses with different pulse widths are matched for each bit in the second significant bits, so that the number of the pulses can be avoided to be too large and the printing speed can be improved.
[0079] In some embodiments, the pulse width of the first heating pulse is greater than the pulse width of each second heating pulse, each bit in the second significant bits is matched with the second heating pulse with the gradually increasing pulse width in the order from the low bit to the high bit, and each bit in the second significant bits corresponds to the second heating pulse with the different pulse width, so that the representation of different gray scales can be realized.
[0080] For example, each bit in the second significant bits can be matched with the second heating pulse with the gradually increasing pulse width in the order from the low bit to the high bit in the form of a geometric progression. The common ratio of the geometric progression can be 2.
[0081] The pulse width of the first heating pulse can be twice the maximum pulse width in the second heating pulse corresponding to the second significant bit, so as to reduce the maximum pulse width. For example, the maximum pulse width in the second significant bit is 8T, and the pulse width of the first heating pulse is 16T.
[0082] For example, taking an eight-bit binary value as an example, for the convenience of description, the eight-bit binary value is represented as Bit7, Bit6, Bit5, Bit4, Bit3, Bit2, Bit1 and Bit0 in the order from high bit to low bit. The eight-bit binary value is divided into a first significant bit including Bit7, Bit6, Bit5 and Bit4, and a second significant bit including Bit3, Bit2, Bit1 and Bit0. And for Bit3, Bit2, Bit1 and Bit0 in the second significant bit, they can correspond to T, 2T, 4T and 8T in the order from low bit to high bit, that is, Bit0=T, Bit1=2T, Bit2=4T and Bit3=8T. For Bit7, Bit6, Bit5 and Bit4 in the first significant bit, they can all correspond to 16T. Wherein, T represents a basic pulse width.
[0083] In some examples, before dividing the binary value into the first significant bit and the second significant bit, part of the low bits in the second significant bit is removed, so as to improve the printing speed by discarding binary data with lower weight.
[0084] For example, Bit0 corresponds to T and Bit1 corresponds to 2T, both of which are smaller pulse widths and have less impact on the image of the gray scale printing. In order to improve the printing speed, the heating pulse with lower weight is discarded, such as performing gray scale of only Bit2-Bit7, and accordingly, Bit2-Bit7 can be formed into second heating pulses with different pulse widths in the form of a geometric progression in the order from low to high, such as Bit2=T, Bit3=2T, Bit4=4T, Bit5=8T, Bit6=16T and Bit7=16T.
[0085] The determination method of the heating pulse provided in the application converts the gray scale value of the pixel point into a binary value, the binary value includes a first significant bit and a second significant bit, a first heating pulse with the same pulse width is matched for each bit in the first significant bit, and a second heating pulse with different pulse widths is matched for each bit in the second significant bit, so as to reduce the highest pulse width, avoid too many pulse numbers, and improve the printing speed.
[0086] Figure 4 The flowchart of the determination method of the heating pulse combination provided in another embodiment of the application is shown in FIG. 3. Figure 4 After step S103, the method provided in the embodiment of the application can further include:
[0087] S104, determine the heating pulse combination of the pixel point based on the heating pulse corresponding to the first significant bit and the second significant bit of the binary value, so as to realize the heating corresponding to the gray value of the pixel point.
[0088] For example, the heating pulse combination of the pixel point can be determined based on the heating pulse combination corresponding to the first significant bit in the binary value and the heating pulse combination corresponding to the second significant bit in the binary value. The heating pulse combination corresponding to the first significant bit can be determined according to the matching of the corresponding number of heating pulses according to the first significant bit. For example, the first significant bit is 1010, the corresponding number of first heating pulses is 10, and the heating pulse combination corresponding to the first significant bit is 10 first heating pulses. The second heating pulse corresponding to the second significant bit can be determined according to the bit of each bit in the second significant bit.
[0089] In some embodiments, the number of heating pulses corresponding to the first significant bit can be determined according to the decimal data corresponding to the first significant bit, the heating pulse combination corresponding to the first significant bit is determined based on the number of heating pulses corresponding to the first significant bit and the first heating pulse; the heating pulse combination corresponding to the second significant bit is determined according to the second heating pulse corresponding to the second significant bit. Then, the heating pulse combination of the pixel point is determined based on the heating pulse combination corresponding to the first significant bit and the heating pulse combination corresponding to the second significant bit, so that when each pixel point is heated based on the heating pulse combination of each pixel point, the highest pulse width can be reduced, the current pressure can be reduced, and at the same time, the number of pulses can not be too large, and the printing speed can be improved.
[0090] For example, as shown in Figure 5 , taking the conversion of the gray value into an eight-bit binary value as an example, the first significant bit is the first four bits, and the second significant bit is the last four bits.
[0091] When the gray value is 0, the eight-bit binary value is represented as 00000000, at this time, no heating is performed, and therefore the heating pulse combination is 0;
[0092] When the gray value is 1, the eight-bit binary value is represented as 00000001, at this time, the number of pulses corresponding to the first significant bit is 0000 (2) = 0 (10) , the number of pulses corresponding to the first significant bit is 0, the heating pulse combination corresponding to the first significant bit is 0, and the heating pulse combination corresponding to the second significant bit is 1T, therefore, the heating pulse combination corresponding to the gray value of 1 is 1T;
[0093] When the gray value is 2, an eight-bit binary value is used to represent 00000010, at this time, the first significant bit corresponds to the pulse number 0000 (2) = 0 (10) Therefore, the first significant bit corresponds to the pulse number 0, the first significant bit corresponds to the heating pulse combination 0, and the second significant bit corresponds to the heating pulse combination 2T. Therefore, the heating pulse combination corresponding to the gray value 2 is 2T.
[0094] When the gray value is 3, an eight-bit binary value is used to represent 00000011, at this time, the first significant bit corresponds to the pulse number 0000 (2) = 0 (10) Therefore, the first significant bit corresponds to the pulse number 0, the first significant bit corresponds to the heating pulse combination 0, and the second significant bit corresponds to the heating pulse combination 1T, 2T. Therefore, the heating pulse combination corresponding to the gray value 3 is 1T, 2T.
[0095] When the gray value is 4, an eight-bit binary value is used to represent 00000100, at this time, the first significant bit corresponds to the pulse number 0000 (2) = 0 (10) Therefore, the first significant bit corresponds to the pulse number 0, the first significant bit corresponds to the heating pulse combination 0, and the second significant bit corresponds to the heating pulse combination 4T. Therefore, the heating pulse combination corresponding to the gray value 4 is 4T.
[0096] When the gray value is 5, an eight-bit binary value is used to represent 00000101, at this time, the first significant bit corresponds to the pulse number 0000 (2) = 0 (10) Therefore, the first significant bit corresponds to the pulse number 0, the first significant bit corresponds to the heating pulse combination 0, and the second significant bit corresponds to the heating pulse combination 1T, 4T. Therefore, the heating pulse combination corresponding to the gray value 5 is 1T, 4T.
[0097] By analogy, when the gray value is 15, an eight-bit binary value is used to represent 00001111, at this time, the first significant bit corresponds to the pulse number 0000 (2) = 0 (10) Therefore, the first significant bit corresponds to the pulse number 0, the first significant bit corresponds to the heating pulse combination 0, and the second significant bit corresponds to the heating pulse combination 1T, 2T, 4T, 8T. Therefore, the heating pulse combination corresponding to the gray value 15 is 1T, 2T, 4T, 8T.
[0098] When the gray value is 16, an eight-bit binary value is used to represent 00010000, at this time, the first significant bit corresponds to the pulse number 0001 (2) = 1 (10), the first effective bit corresponds to the pulse number 1, the first effective bit corresponds to the heating pulse combination 16T, and the second effective bit corresponds to the heating pulse combination 0. Therefore, the heating pulse combination corresponding to the gray value of 16 is 16T.
[0099] When the gray value is 17, the eight-bit binary value is represented as 00010001. At this time, the first effective bit corresponds to the pulse number 0001 (2) = 1 (10) , the first effective bit corresponds to the pulse number 1, the first effective bit corresponds to the heating pulse combination 16T, and the second effective bit corresponds to the heating pulse combination 1T. Therefore, the heating pulse combination corresponding to the gray value of 17 is 1T, 16T.
[0100] By analogy, when the gray value is 253, the eight-bit binary value is represented as 11111101. At this time, the first effective bit corresponds to the pulse number 1111 (2) = 15 (10) , the first effective bit corresponds to the pulse number 15, the first effective bit corresponds to the heating pulse combination 15 16T, and the second effective bit corresponds to the heating pulse combination 1T, 4T, 8T. Therefore, the heating pulse combination corresponding to the gray value of 253 is 1T, 4T, 8T, 15 16T.
[0101] When the gray value is 254, the eight-bit binary value is represented as 11111110. At this time, the first effective bit corresponds to the pulse number 1111 (2) = 15 (10) , the first effective bit corresponds to the pulse number 15, the first effective bit corresponds to the heating pulse combination 15 16T, and the second effective bit corresponds to the heating pulse combination 2T, 4T, 8T. Therefore, the heating pulse combination corresponding to the gray value of 254 is 2T, 4T, 8T, 15 16T.
[0102] When the gray value is 255, the eight-bit binary value is represented as 11111111. At this time, the first effective bit corresponds to the pulse number 1111 (2) = 15 (10) , the first effective bit corresponds to the pulse number 15, the first effective bit corresponds to the heating pulse combination 15 16T, and the second effective bit corresponds to the heating pulse combination 1T, 2T, 4T, 8T. Therefore, the heating pulse combination corresponding to the gray value of 255 is 1T, 2T, 4T, 8T, 15 16T.
[0103] In some examples, the heating time of each pixel point can also be determined based on the heating pulse combination of each pixel point. Although the pulse combination determines the preliminary heating mode, the fine adjustment of the heating time can ensure that each pixel reaches the required gray level, thereby improving the printing quality of the gray image.
[0104] For example, when the gray value is 1, the corresponding heating pulse combination is 1T, and the heating time when the gray value is 1 is 1T; when the gray value is 2, the corresponding heating pulse combination is 2T, and the heating time when the gray value is 2 is 2T; when the gray value is 3, the corresponding heating pulse combination is 1T and 2T, and the heating time when the gray value is 3 is 3T; when the gray value is 4, the corresponding heating pulse combination is 4T, and the heating time when the gray value is 4 is 4T; when the gray value is 5, the corresponding heating pulse combination is 1T and 4T, and the heating time when the gray value is 5 is 5T; and so on, when the gray value is 15, the corresponding heating pulse combination is 1T, 2T, 4T and 8T, and the heating time when the gray value is 15 is 15T; when the gray value is 16, the corresponding heating pulse combination is 16T, and the heating time when the gray value is 16 is 16T; when the gray value is 17, the corresponding heating pulse combination is 1T and 16T, and the heating time when the gray value is 17 is 17T; and so on, when the gray value is 253, the corresponding heating pulse combination is 1T, 4T, 8T, 15 16T, and the heating time when the gray value is 253 is 253T; when the gray value is 254, the corresponding heating pulse combination is 2T, 4T, 8T, 15 16T, and the heating time when the gray value is 254 is 254T; when the gray value is 255, the corresponding heating pulse combination is 1T, 2T, 4T, 8T, 15 16T, and the heating time when the gray value is 255 is 255T.
[0105] In some examples, after determining the heating pulse combination, the corresponding pulse can be output to the heating element in the print head based on the heating pulse combination. The heating element in the print head will quickly heat up when receiving the pulse signal, and will transfer heat to the printing paper in contact with it. When the layer on the printing paper is subjected to heat, a chemical reaction occurs and the color changes, thereby forming a printed picture or text.
[0106] In some embodiments, the heating order of each pulse in the heating pulse combination can be determined according to the heat dissipation effect of the print head, thereby improving the printing effect.
[0107] It should be noted that the pulse is not to continuously increase the temperature, but to keep the temperature within a certain range. If the temperature is too high, the print head or the printing paper may be damaged. For a print head with good heat dissipation effect, the first heating pulse corresponding to the first significant bit can be transmitted first, and then the second heating pulse corresponding to the second significant bit can be transmitted in turn, for example, the second heating pulse corresponding to the second significant bit can be transmitted in descending order. For a print head with poor heat dissipation effect, the first heating pulse corresponding to the first significant bit and the second heating pulse corresponding to the second significant bit can be transmitted alternately. There can be other pulse transmission orders, which are not limited here.
[0108] Therefore, in some examples, when the heat dissipation efficiency of the print head is greater than the preset threshold interval, the first effective bit corresponding heating pulse is output to the print head first, and then the second effective bit corresponding heating pulse is output to the print head; when the heat dissipation efficiency of the print head is less than the preset threshold interval, the first effective bit corresponding heating pulse and the second effective bit corresponding heating pulse are alternately output to the print head, so as to improve the printing effect. The preset time can be determined according to the actual situation. The preset threshold interval can be determined according to the actual situation.
[0109] In some examples, according to the heat dissipation performance of the print head, preheating or cooling can be increased, the heat accumulation or heat dissipation effect can be improved, and the printing effect can be further improved. Specifically, when the heat dissipation efficiency of the print head is less than the preset threshold interval, the print head can be preheated before each heating pulse is output, so as to improve the heat accumulation. For example, a preheating command can be sent to the heating element in the print head, so that the heating element reaches a certain temperature. When the heat dissipation efficiency of the print head is greater than or equal to the preset threshold interval, the cooling time between two heating pulses can be prolonged, so as to improve the heat dissipation effect. The prolonged cooling time can be determined according to the heat dissipation time of the print head.
[0110] The determination method of the heating pulse provided in the embodiment matches the first effective bit with the first heating pulse with the same pulse width, and matches each bit in the second effective bit with the second heating pulse with different pulse widths. Therefore, after the heating pulse combination of the pixel point is determined according to the heating pulse corresponding to the first effective bit and the second effective bit of the binary value, the heating corresponding to the gray value of the pixel point can be realized, the highest pulse width can be reduced, the current pressure can be reduced, and the number of excessive pulses can be avoided, and the printing speed can be improved.
[0111] The embodiment of the present application also provides a printing chip for executing the determination method of the heating pulse.
[0112] For example, the printing chip can be a micro processing chip, which can be an MCU (Micro Controller Unit), a DSP (Digital Signal Processing), an MPU (Micro Processor Unit), a micro CPU (Central Processing Unit), etc. which can process digital signals, analog signals, or perform functions such as signal function, instruction processing and operation.
[0113] Figure 6 The structure diagram of the electronic device provided in the present application is shown in the figure. Figure 5As shown, the electronic device 50 provided by the embodiment includes at least one processor 501 and a memory 502. Optionally, the device 50 further includes a communication component 503. Wherein, the processor 501, the memory 502 and the communication component 503 are connected through a bus 504.
[0114] In the process of implementation, the at least one processor 501 executes the computer execution instructions stored in the memory 502, so that the at least one processor 501 executes the above-mentioned method.
[0115] The specific implementation process of the processor 501 can refer to the above-mentioned method embodiment, which has similar implementation principles and technical effects, and will not be described here in detail.
[0116] In the above-mentioned embodiment, it should be understood that the processor can be a central processing unit (English: Central Processing Unit, for short: CPU), and can also be other general-purpose processors, digital signal processors (English: Digital Signal Processor, for short: DSP), application specific integrated circuits (English: Application Specific Integrated Circuit, for short: ASIC) and the like. The general-purpose processor can be a microprocessor, or the processor can be any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly embodied as the execution of the hardware processor, or executed by the combination of hardware and software modules in the processor.
[0117] The memory can contain a random access memory (Random Access Memory, RAM), and can also include a non-volatile memory (Non-volatile Memory, NVM), for example, at least one disk memory.
[0118] The bus can be an industry standard architecture (Industry Standard Architecture, ISA) bus, a peripheral component (Peripheral Component, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of the present application does not limit only one bus or one type of bus.
[0119] The present application also provides a computer program product, including a computer program, which is executed by the processor to realize the above-mentioned method.
[0120] The application further provides a computer readable storage medium, and the computer readable storage medium stores computer execution instructions.
[0121] The readable storage medium can be implemented by any type of volatile or nonvolatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0122] An exemplary readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the device.
[0123] The division of units is only a logical function division, and in actual implementation, there can be another division mode, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0124] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiment.
[0125] In addition, the functional units in each embodiment of the application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.
[0126] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0127] It can be understood by those skilled in the art that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware. The aforementioned program can be stored in a computer readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, and various media that can store program codes.
[0128] Finally, it should be noted that: those skilled in the art will easily think of other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application that follow the general principles of the present application and include common knowledge or conventional technical means in the art that are not disclosed in the present application, and is not limited to the precise structure described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present application is only limited by the appended claims.
Claims
1. A method of determining heating pulses, characterized by, The method comprises: acquiring a gray value of a pixel point in a gray image, and converting the gray value into a binary value, the binary value comprising a first significant bit and a second significant bit; matching a first heating pulse to the first significant bit, the first heating pulse having a same pulse width; matching a second heating pulse to each bit in the second significant bit; The method further comprises: determining a heating pulse combination of the pixel point based on the heating pulses corresponding to the first significant bit and the second significant bit in the binary value, so as to realize heating corresponding to the gray value of the pixel point; The matching of the second heating pulse to each bit in the second significant bit comprises: matching the second heating pulse with gradually increasing pulse width to each bit in the second significant bit in the order from low bit to high bit; the pulse width of the first heating pulse is greater than the maximum pulse width of the second heating pulse corresponding to the second significant bit.
2. The method of claim 1, wherein, The method further comprises: dividing the binary value into the first significant bit and the second significant bit according to the width of the print head.
3. The method of claim 2, wherein, When the width of the print head is within a preset width range, the number of the first significant bits is equal to the number of the second significant bits; When the width of the print head is greater than the maximum value of the preset width range, the number of the first significant bits is greater than the number of the second significant bits; When the width of the print head is less than the minimum value of the preset width range, the number of the first significant bits is less than the number of the second significant bits.
4. The method according to any one of claims 1 to 3, characterized in that, Before the matching of the second heating pulse to each bit in the second significant bit, the method further comprises: removing part of the low bits in the second significant bit.
5. The method of claim 1, wherein, After the determination of the heating pulse combination of the pixel point based on the heating pulses corresponding to the first significant bit and the second significant bit in the binary value, the method further comprises: determining a heating order of each heating pulse in the heating pulse combination according to the heat dissipation effect of the print head.
6. The method of claim 5, wherein, The determination of the heating order of each heating pulse in the heating pulse combination according to the heat dissipation effect of the print head comprises: when the heat dissipation efficiency of the print head is greater than a preset threshold interval, outputting the heating pulse corresponding to the first significant bit to the print head first, and then outputting the heating pulse corresponding to the second significant bit to the print head; when the heat dissipation efficiency of the print head is less than the preset threshold interval, alternately outputting the heating pulse corresponding to the first significant bit and the heating pulse corresponding to the second significant bit to the print head.
7. The method of claim 6, wherein, The method further comprises: when the heat dissipation efficiency of the print head is less than the preset threshold interval, performing a preheating operation on the print head before outputting each heating pulse; when the heat dissipation efficiency of the print head is greater than or equal to the preset threshold interval, lengthening the cooling time between two heating pulses.
8. A print chip, characterized by A device for performing the method of any one of claims 1-7.
Citation Information
Patent Citations
Gray level print control method and device
CN101549591A
Print image output method and device and electronic equipment
CN113821182A