CN116985538A - Calibration method, system and storage medium for thermal print head resistance - Google Patents

Calibration method, system and storage medium for thermal print head resistance Download PDF

Info

Publication number
CN116985538A
CN116985538A CN202311117052.2A CN202311117052A CN116985538A CN 116985538 A CN116985538 A CN 116985538A CN 202311117052 A CN202311117052 A CN 202311117052A CN 116985538 A CN116985538 A CN 116985538A
Authority
CN
China
Prior art keywords
image
calibration
dimensional array
thermal
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311117052.2A
Other languages
Chinese (zh)
Inventor
许统辉
张斌
蓝菊芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanyang Clear Technology Co Ltd
Original Assignee
Nanyang Clear Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanyang Clear Technology Co Ltd filed Critical Nanyang Clear Technology Co Ltd
Priority to CN202311117052.2A priority Critical patent/CN116985538A/en
Publication of CN116985538A publication Critical patent/CN116985538A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • G06T7/337Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving reference images or patches
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J2/00Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed
    • B41J2/315Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed characterised by selective application of heat to a heat sensitive printing or impression-transfer material
    • B41J2/32Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed characterised by selective application of heat to a heat sensitive printing or impression-transfer material using thermal heads
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/38Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
    • B41J29/393Devices for controlling or analysing the entire machine ; Controlling or analysing mechanical parameters involving printing of test patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Electronic Switches (AREA)

Abstract

The application discloses a method, a system and a storage medium for calibrating the resistance value of a thermal printing head, wherein the method comprises the following steps: printing a first calibration image and a second calibration image by a thermal printer based on different preset printing positions of the thermal print head, scanning by a scanner and transmitting to a PC; performing image processing and conversion processing on the first calibration image and the second calibration image through a PC, respectively generating a first one-dimensional array and a second one-dimensional array, replacing a reference area of the first one-dimensional array according to the second one-dimensional array, taking the replaced first one-dimensional array as a target one-dimensional array, calculating the calibrated resistance of the thermal printing head according to preset resistance data of the thermal printing head and the target one-dimensional array, and storing the calibrated resistance into a thermal printer; the method can reduce the actual gray error of printing and improve the image quality under the condition that each heating element on the thermal printing head prints the same gray.

Description

Calibration method, system and storage medium for thermal print head resistance
Technical Field
The present application relates to the field of thermal printing technologies, and in particular, to a method and a system for calibrating a resistance value of a thermal printing head, and a storage medium.
Background
Thermal printheads are composed of a row of heating elements, the resistances of which are theoretically the same, but in practice, the resistances deviate due to process reasons, the elements of the thermal printhead are densely arranged, the elements rapidly generate high temperature phenomenon after passing current, and when the elements are encountered by a coating in a medium, the temperature rises in a short time, then chemical phenomena occur, colors are generated, and finally an image is formed.
Because the heating element on the thermal printer printing head has errors with the reference heating element, the error range is +/-15%, so that each heating element on the existing thermal printer head has errors in the actual gray level when the same gray level is printed, and the image quality is affected.
Disclosure of Invention
The application provides a method and a system for calibrating the resistance of a thermal printing head, which solve the technical problem that the actual gray level printed by each heating element on the existing thermal printing head has errors and influences the image quality under the condition of printing the same gray level.
The application provides a calibration method of a thermal print head resistance, which relates to a thermal printer, a scanner and a PC, and comprises the following steps:
printing a first calibration image and a second calibration image by the thermal printer based on different preset printing positions of the thermal printer head in the thermal printer;
scanning the first calibration image and the second calibration image by the scanner and transmitting to the PC;
performing image processing on the first calibration image and the second calibration image by the PC to generate a first image and a second image;
converting the first two-dimensional image data of the first image and the second two-dimensional image data of the second image by the PC to generate a first one-dimensional array and a second one-dimensional array respectively;
replacing the reference area of the first one-dimensional array according to the second one-dimensional array by the PC, and taking the replaced first one-dimensional array as a target one-dimensional array;
and calculating the calibrated resistance of the thermal printing head by the PC according to the preset resistance data of the thermal printing head and the target one-dimensional array, and storing the calibrated resistance of the thermal printing head into the thermal printer.
Optionally, the method further comprises:
and when the quality of the calibrated image printed by the thermal printer according to the calibrated resistance value of the thermal print head is poor, skipping to execute the step of printing a first calibrated image and a second calibrated image by the thermal printer based on different preset printing positions of the thermal print head in the thermal printer.
Optionally, the step of generating the first image and the second image by performing image processing on the first calibration image and the second calibration image by the PC includes:
intercepting and scaling the first calibration image and the second calibration image respectively through the PC to generate a first calibration area image and a second calibration area image;
and performing image conversion on the first calibration area image and the second calibration area image, and storing the first calibration area image and the second calibration area image as a first image and a second image in a raw format.
Optionally, the step of generating the first calibration area image and the second calibration area image by performing the clipping and scaling operations on the first calibration image and the second calibration image by the PC, respectively, includes:
intercepting, by the PC, calibration areas within the first calibration image and the second calibration image, respectively;
and scaling the calibration area according to the preset point number of the thermal print head to generate a corresponding first calibration area image and a corresponding second calibration area image.
Optionally, the step of replacing, by the PC, the reference area of the first one-dimensional array according to the second one-dimensional array, and taking the replaced first one-dimensional array as the target one-dimensional array includes:
determining the area data with the same position as the reference area of the first one-dimensional array in the second one-dimensional array through the PC;
and replacing the data of the reference area of the first one-dimensional array with area data, and taking the replaced first one-dimensional array as a target one-dimensional array.
The application also provides a calibration system of the resistance value of the thermal printing head, which comprises a thermal printer, a scanner and a PC;
the thermal printer is used for printing a first calibration image and a second calibration image based on different preset printing positions of a thermal printing head in the thermal printer;
the scanner is used for scanning the first calibration image and the second calibration image and sending the first calibration image and the second calibration image to the PC;
the PC includes:
the image processing unit is used for performing image processing on the first calibration image and the second calibration image to generate a first image and a second image;
the conversion processing unit is used for converting the first two-dimensional image data of the first image and the second two-dimensional image data of the second image to generate a first one-dimensional array and a second one-dimensional array respectively;
the replacing unit is used for replacing the reference area of the first one-dimensional array according to the second one-dimensional array, and taking the replaced first one-dimensional array as a target one-dimensional array;
and the calibration calculation unit is used for calculating the calibrated resistance of the thermal print head according to the preset resistance data of the thermal print head and the target one-dimensional array, and storing the calibrated resistance of the thermal print head into the thermal printer.
Optionally, the calibration system further comprises:
and the judging unit is used for jumping to the thermal printer when the quality of the calibrated image printed by the thermal printer according to the calibrated resistance value of the thermal printer is poor.
Optionally, the image processing unit includes:
an image operation subunit, configured to perform a clipping operation and a scaling operation on the first calibration image and the second calibration image, respectively, to generate a first calibration area image and a second calibration area image;
and the format conversion subunit is used for carrying out image conversion on the first calibration area image and the second calibration area image and storing the first calibration area image and the second calibration area image into a first image and a second image in a raw format.
Optionally, the replacing unit includes:
a determining subunit, configured to determine area data in the second one-dimensional array, where the area data is the same as the reference area of the first one-dimensional array;
and the replacing subunit is used for replacing the data of the reference area of the first one-dimensional array with the area data and taking the replaced first one-dimensional array as a target one-dimensional array.
The application also provides a storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor performs a method as described in any of the above.
From the above technical scheme, the application has the following advantages:
the application provides a calibration method, a system and a storage medium for a resistance value of a thermal printing head, wherein the method relates to a thermal printer, a scanner and a PC, and a first calibration image and a second calibration image are printed by the thermal printer based on different preset printing positions of the thermal printing head in the thermal printer; scanning the first calibration image and the second calibration image by a scanner and transmitting to the PC; performing image processing on the first calibration image and the second calibration image by a PC to generate a first image and a second image; converting the first two-dimensional image data of the first image and the second two-dimensional image data of the second image by a PC to respectively generate a first one-dimensional array and a second one-dimensional array; replacing the reference area of the first one-dimensional array according to the second one-dimensional array by using a PC, and taking the replaced first one-dimensional array as a target one-dimensional array; and calculating the calibrated resistance of the thermal printing head according to the preset resistance data of the thermal printing head and the target one-dimensional array through the PC, and storing the calibrated resistance of the thermal printing head into the thermal printer. The method solves the technical problem that the error exists in the actual gray level printed out by each heating element on the existing thermal printing head under the condition of printing the same gray level, and the image quality is affected.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained from these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flow chart of the calibration method of thermal printhead resistance according to embodiment 1 of the present application;
FIG. 2 is a flowchart illustrating steps of a method for calibrating a thermal printhead resistance according to embodiment 2 of the present application;
fig. 3 is a schematic diagram of a first calibration image according to embodiment 2 of the present application.
Fig. 4 is a schematic diagram of a second calibration image according to embodiment 2 of the present application.
Fig. 5 is a frame diagram of a calibration system for thermal printhead resistance according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a method, a system and a storage medium for calibrating the resistance value of a thermal printing head, which are used for solving the technical problem that the actual gray level printed out has errors and influences the image quality under the condition of printing the same gray level of each heating element on the existing thermal printing head.
In order to make the objects, features and advantages of the present application more comprehensible, the technical solutions in the embodiments of the present application are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Thermal printer: the printer is a printer type which performs printing by using a thermal action mode, and the printer is characterized by high printing speed, low noise, low cost and the like by controlling the thermistor in the printing head to generate heat and then enabling the thermistor to contact the photosensitive material or the pigment layer on the thermal paper so as to generate chemical reaction to form images or characters.
A scanner: the scanner is a third large computer input device behind the mouse and keyboard, which can convert the image into a digital format that can be displayed, edited, stored and output by the computer, and is an input device with very strong functions.
PC: the personal computer can be a smart phone, a tablet personal computer, a notebook personal computer, a desktop personal computer and the like.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a calibration method of thermal printhead resistance according to embodiment 1 of the present application.
The application provides a calibration method of a thermal print head resistance, which relates to a thermal printer, a scanner and a PC, and comprises the following steps:
step 101, printing a first calibration image and a second calibration image by the thermal printer based on different preset printing positions of the thermal printer head.
It should be noted that, based on the preset resistance data and the printing position of the thermal print head, a calibration image is printed.
Step 102, scanning the first calibration image and the second calibration image by a scanner and transmitting to the PC.
Step 103, performing image processing on the first calibration image and the second calibration image by the PC to generate a first image and a second image.
Step 104, converting the first two-dimensional image data of the first image and the second two-dimensional image data of the second image by the PC to generate a first one-dimensional array and a second one-dimensional array respectively.
And 105, replacing the reference area of the first one-dimensional array according to the second one-dimensional array by the PC, and taking the replaced first one-dimensional array as a target one-dimensional array.
And 106, calculating the calibrated resistance of the thermal printing head according to the preset resistance data of the thermal printing head and the target one-dimensional array through the PC, and storing the calibrated resistance of the thermal printing head into the thermal printer.
The embodiment of the application provides a method for calibrating the resistance of a thermal printing head, which comprises the following steps: printing a first calibration image and a second calibration image by the thermal printer based on different preset printing positions of the thermal printer head; scanning the first calibration image and the second calibration image by a scanner and transmitting to the PC; performing image processing on the first calibration image and the second calibration image by a PC to generate a first image and a second image; converting the first two-dimensional image data of the first image and the second two-dimensional image data of the second image by a PC to respectively generate a first one-dimensional array and a second one-dimensional array; replacing the reference area of the first one-dimensional array according to the second one-dimensional array by using a PC, and taking the replaced first one-dimensional array as a target one-dimensional array; and calculating the calibrated resistance of the thermal printing head according to the preset resistance data of the thermal printing head and the target one-dimensional array through the PC, and storing the calibrated resistance of the thermal printing head into the thermal printer.
According to the method, the first calibration image and the second calibration image are printed by using the thermal printer, the calibration images are scanned by the scanner, the PC is used for image processing, the calibrated resistance of the thermal printing head is calculated by combining with the preset resistance data of the thermal printing head, and the calibrated resistance of the thermal printing head is stored in the thermal printer, so that under the condition that each heating element on the thermal printing head prints the same gray, the actual gray error of printing is reduced, and the image quality is improved.
Referring to fig. 2, fig. 2 is a calibration method of thermal printhead resistance according to embodiment 2 of the present application.
The application provides a calibration method of a thermal print head resistance, which relates to a thermal printer, a scanner and a PC, and comprises the following steps:
in step 201, a first calibration image and a second calibration image are printed by a thermal printer based on different preset printing positions of the thermal print head in the thermal printer.
It should be noted that the preset printing position specifically includes: a first calibration image is printed by the thermal printer based on the initial position of the heating element in the thermal print head, and a second calibration image is printed by the thermal printer based on the end position of the heating element in the thermal print head;
fig. 3 is a schematic diagram of a first calibration image, specifically, a white portion is a thermal printing paper 1, a portion other than white is a first calibration image 2, a black gray portion is a non-calibration area 3, light gray and black areas are calibration areas 4, the calibration areas are areas of a thermal printing head for printing an image, a black area at the leftmost side of the calibration areas is a reference area 5, and the reference area is used for searching a starting point of the thermal printing head for printing the image;
fig. 4 is a schematic diagram of a second calibration image, specifically, a white portion is a thermal printing paper 1, a portion other than white is a second calibration image 2, a black gray portion is a non-calibration area 3, light gray and black areas are calibration areas 4, the calibration areas are areas of the thermal printing head for printing an image, a black area on the rightmost side of the calibration areas is a reference area 5, and the reference area is used for searching for an end point of the thermal printing head for printing the image;
in particular, the reference area belongs to a full black area and cannot be calibrated by adopting an algorithm, so that the first calibration image cannot be independently calibrated.
Step 202, scanning the first calibration image and the second calibration image by a scanner and transmitting to a PC.
The scanner is used as a peripheral device of the PC, and is capable of scanning the first calibration image and the second calibration image and transmitting them to the PC for image processing.
Step 203, performing clipping and scaling operations on the first calibration image and the second calibration image by the PC, respectively, to generate a first calibration area image and a second calibration area image.
In embodiment 2 of the present application, the PC intercepts calibration areas within the first calibration image and the second calibration image, respectively, using an interception software tool; scaling the calibration area according to the preset number of points of the thermal print head to generate a corresponding first calibration area image and a corresponding second calibration area image;
since the number of dots scanned by the scanner is set to be greater than the number of dots of the thermal head (generally, 2 times or more), the calibration area image needs to be scaled to the size of the number of dots of the thermal head.
And 204, performing image conversion on the first calibration area image and the second calibration area image, and storing the first calibration area image and the second calibration area image as a first image and a second image in a raw format.
After the first calibration area image and the second calibration area image are obtained, image conversion is needed, such as zooming, filling, clipping and the like, and after the first calibration area image and the second calibration area image are subjected to image conversion, raw format which is the same as the format of the image printed by the thermal printer is needed to be saved, so that the first image and the second image are generated.
In step 205, the PC performs conversion processing on the first two-dimensional image data of the first image and the second two-dimensional image data of the second image, so as to generate a first one-dimensional array and a second one-dimensional array respectively.
It should be noted that, the thermal print head is a row of heating elements, the resistance data of the thermal print head is one-dimensional data, and raw corresponds to two-dimensional image data, and the first two-dimensional image data of the first image and the second two-dimensional image data of the second image can be converted based on a mean value class algorithm to generate a first one-dimensional array and a second one-dimensional array respectively; the mean value algorithm can be a simple average method, a weighted average method, a square average method and the like;
assuming that the number of printing resistance points of the thermal print head is 7104, the corresponding array is printData [7104]; the image data of the intercepted area has 7104 x 800 points, and the corresponding array is imageArea [7104] [800]; converting a two-dimensional array imageArea [7104] [800] into a one-dimensional array imageData [7104] through a mean value class algorithm;
taking a simple average method as an example, imageData [0] = (imageArea [0] [0] +imagearea [0] [1 ].+ imageArea [0] [799 ])/800, so on, imageData [7103] = (imageArea [7103] [0] + imageArea [7103] [1] + … + imageArea [7103] [799 ])/800, thereby converting the two-dimensional array imageArea [7104] [800] into a one-dimensional array imageData [7104].
And 206, replacing the reference area of the first one-dimensional array according to the second one-dimensional array by the PC, and taking the replaced first one-dimensional array as a target one-dimensional array.
In the embodiment 2 of the application, the reference area is black, the corresponding gray value is 0, and in order to avoid deviation of placement of the thermal printing paper in the scanner and to cause deviation of the image of the reference area, the application determines the area data with the same position as the reference area of the first one-dimensional array in the second one-dimensional array through the PC, replaces the data of the reference area of the first one-dimensional array with the area data, and takes the replaced first one-dimensional array as the target one-dimensional array; the above steps can replace the data having the gradation value of 0 in the reference area of the first one-dimensional array with the value of normal printing gray.
Specifically, the width of the reference area is larger than or equal to 10 points, and then in the first one-dimensional array imageData1[7104], the points of the n previous reference areas are replaced by the points corresponding to the second one-dimensional array imageData2[7104], and n is the width of the reference area; further, assuming that the reference area width is 10 points, the first 10 data in the first one-dimensional array imageData1[7104] is replaced with the first 10 data in the second one-dimensional array imageData2[7104], and the replaced first one-dimensional array is used as the target one-dimensional array.
Step 207, calculating the calibrated resistance of the thermal print head according to the preset resistance data of the thermal print head and the target one-dimensional array by the PC, and storing the calibrated resistance of the thermal print head into the thermal printer.
It should be noted that, the calibrated resistance value of the thermal print head can be calculated according to the preset resistance value data of the thermal print head and the target one-dimensional array through a preset algorithm model.
Step 208, when the quality of the calibrated image printed by the thermal printer according to the calibrated resistance value of the thermal print head is poor, the step of jumping to execute the step of printing the first calibrated image and the second calibrated image by the thermal printer based on different preset printing positions of the thermal print head in the thermal printer.
It should be noted that, there is a deviation in the resistance value of the heating element of the thermal print head, after the thermal print head prints for a period of time, the deviation of the resistance value of a part of the heating element may be greater than 15% of the error range, even if the thermal print head prints a calibration image according to the calibrated resistance value of the thermal print head, the calibration image still has vertical lines, and at this time, the calibration needs to be continued.
The embodiment 2 of the application provides a method for calibrating the resistance of a thermal printing head, which comprises the following steps: printing a first calibration image and a second calibration image by the thermal printer based on different preset printing positions of the thermal printer head; scanning the first calibration image and the second calibration image by a scanner and transmitting to the PC; intercepting and scaling the first calibration image and the second calibration image respectively through a PC to generate a first calibration area image and a second calibration area image; performing image conversion on the first calibration area image and the second calibration area image, and storing the first calibration area image and the second calibration area image as a first image and a second image in a raw format; converting the first two-dimensional image data of the first image and the second two-dimensional image data of the second image by a PC to respectively generate a first one-dimensional array and a second one-dimensional array; replacing the reference area of the first one-dimensional array according to the second one-dimensional array by using a PC, and taking the replaced first one-dimensional array as a target one-dimensional array; calculating the calibrated resistance of the thermal printing head according to the preset resistance data of the thermal printing head and the target one-dimensional array through the PC, and storing the calibrated resistance of the thermal printing head into the thermal printer; when the quality of the calibrated image printed by the thermal printer according to the calibrated resistance value of the thermal print head is poor, the step of jumping to execute the first calibrated image and the second calibrated image printed by the thermal printer based on different preset printing positions of the thermal print head in the thermal printer.
The method is suitable for printing all heating points in the thermal printing head, and can reduce the actual gray error of printing and improve the image quality under the condition that each heating element on the thermal printing head prints the same gray.
Referring to fig. 5, fig. 5 is a frame diagram of a thermal printhead resistance calibration system according to an embodiment of the application.
The application provides a noise-based thermal print head resistance calibration system, which comprises: the calibration system comprises a thermal printer, a scanner and a PC;
the thermal printer is used for printing a first calibration image and a second calibration image based on different preset printing positions of the thermal printing head in the thermal printer;
a scanner for scanning the first calibration image and the second calibration image and transmitting to the PC;
the PC includes:
the image processing unit is used for performing image processing on the first calibration image and the second calibration image to generate a first image and a second image;
the conversion processing unit is used for carrying out conversion processing on the first two-dimensional image data of the first image and the second two-dimensional image data of the second image to generate a first one-dimensional array and a second one-dimensional array respectively;
the replacing unit is used for replacing the reference area of the first one-dimensional array according to the second one-dimensional array, and taking the replaced first one-dimensional array as a target one-dimensional array;
and the calibration calculation unit is used for calculating the calibrated resistance of the thermal printing head according to the preset resistance data of the thermal printing head and the target one-dimensional array, and storing the calibrated resistance of the thermal printing head into the thermal printer.
The calibration system further comprises:
and the judging unit is used for jumping to the thermal printer when the quality of the calibrated image printed by the thermal printer according to the calibrated resistance value of the thermal printer is poor.
The image processing unit includes:
an image operation subunit, configured to perform a clipping operation and a zooming operation on the first calibration image and the second calibration image, respectively, to generate a first calibration area image and a second calibration area image;
the format conversion subunit is used for carrying out image conversion on the first calibration area image and the second calibration area image and saving the first calibration area image and the second calibration area image as a first image and a second image in a raw format.
The replacement unit includes:
a determining subunit, configured to determine area data in the second one-dimensional array, where the area data is the same as the reference area of the first one-dimensional array;
and the replacing subunit is used for replacing the data of the reference area of the first one-dimensional array with the area data and taking the replaced first one-dimensional array as a target one-dimensional array.
The image operation subunit is specifically configured to intercept calibration areas in the first calibration image and the second calibration image respectively through the PC; and scaling the calibration area according to the preset number of points of the thermal print head, and generating a corresponding first calibration area image and a corresponding second calibration area image.
The application also provides a storage medium, on which a computer program is stored, which when executed by the processor runs the method for calibrating the resistance value of the thermal printing head in the embodiment of the method.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A calibration method of the resistance of a thermal print head is characterized by involving a thermal printer, a scanner and a PC; the method comprises the following steps:
printing a first calibration image and a second calibration image by the thermal printer based on different preset printing positions of the thermal printer head in the thermal printer;
scanning the first calibration image and the second calibration image by the scanner and transmitting to the PC;
performing image processing on the first calibration image and the second calibration image by the PC to generate a first image and a second image;
converting the first two-dimensional image data of the first image and the second two-dimensional image data of the second image by the PC to generate a first one-dimensional array and a second one-dimensional array respectively;
replacing the reference area of the first one-dimensional array according to the second one-dimensional array by the PC, and taking the replaced first one-dimensional array as a target one-dimensional array;
and calculating the calibrated resistance of the thermal printing head by the PC according to the preset resistance data of the thermal printing head and the target one-dimensional array, and storing the calibrated resistance of the thermal printing head into the thermal printer.
2. The method of calibrating according to claim 1, wherein the method further comprises:
and when the quality of the calibrated image printed by the thermal printer according to the calibrated resistance value of the thermal print head is poor, skipping to execute the step of printing a first calibrated image and a second calibrated image by the thermal printer based on different preset printing positions of the thermal print head in the thermal printer.
3. The method of calibrating according to claim 1, wherein the step of generating a first image and a second image by image processing the first calibration image and the second calibration image by the PC comprises:
intercepting and scaling the first calibration image and the second calibration image respectively through the PC to generate a first calibration area image and a second calibration area image;
and performing image conversion on the first calibration area image and the second calibration area image, and storing the first calibration area image and the second calibration area image as a first image and a second image in a raw format.
4. A calibration method according to claim 3, wherein the step of generating a first calibration area image and a second calibration area image by performing the operations of clipping and scaling the first calibration image and the second calibration image, respectively, by the PC includes:
intercepting, by the PC, calibration areas within the first calibration image and the second calibration image, respectively;
and scaling the calibration area according to the preset point number of the thermal print head to generate a corresponding first calibration area image and a corresponding second calibration area image.
5. The method according to claim 1, wherein the step of replacing, by the PC, the reference area of the first one-dimensional array based on the second one-dimensional array, and taking the replaced first one-dimensional array as the target one-dimensional array, comprises:
determining the area data with the same position as the reference area of the first one-dimensional array in the second one-dimensional array through the PC;
and replacing the data of the reference area of the first one-dimensional array with area data, and taking the replaced first one-dimensional array as a target one-dimensional array.
6. A calibration system for thermal print head resistance, wherein the calibration system comprises a thermal printer, a scanner and a PC;
the thermal printer is used for printing a first calibration image and a second calibration image based on different preset printing positions of a thermal printing head in the thermal printer;
the scanner is used for scanning the first calibration image and the second calibration image and sending the first calibration image and the second calibration image to the PC;
the PC includes:
the image processing unit is used for performing image processing on the first calibration image and the second calibration image to generate a first image and a second image;
the conversion processing unit is used for converting the first two-dimensional image data of the first image and the second two-dimensional image data of the second image to generate a first one-dimensional array and a second one-dimensional array respectively;
the replacing unit is used for replacing the reference area of the first one-dimensional array according to the second one-dimensional array, and taking the replaced first one-dimensional array as a target one-dimensional array;
and the calibration calculation unit is used for calculating the calibrated resistance of the thermal print head according to the preset resistance data of the thermal print head and the target one-dimensional array, and storing the calibrated resistance of the thermal print head into the thermal printer.
7. The calibration system of claim 6, wherein the calibration system further comprises:
and the judging unit is used for jumping to the thermal printer when the quality of the calibrated image printed by the thermal printer according to the calibrated resistance value of the thermal printer is poor.
8. The calibration system of claim 6, wherein the image processing unit comprises:
an image operation subunit, configured to perform a clipping operation and a scaling operation on the first calibration image and the second calibration image, respectively, to generate a first calibration area image and a second calibration area image;
and the format conversion subunit is used for carrying out image conversion on the first calibration area image and the second calibration area image and storing the first calibration area image and the second calibration area image into a first image and a second image in a raw format.
9. The calibration system of claim 6, wherein the replacement unit comprises:
a determining subunit, configured to determine area data in the second one-dimensional array, where the area data is the same as the reference area of the first one-dimensional array;
and the replacing subunit is used for replacing the data of the reference area of the first one-dimensional array with the area data and taking the replaced first one-dimensional array as a target one-dimensional array.
10. A storage medium having stored thereon a computer program which when executed by a processor performs the method of any of claims 1-5.
CN202311117052.2A 2023-08-31 2023-08-31 Calibration method, system and storage medium for thermal print head resistance Pending CN116985538A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311117052.2A CN116985538A (en) 2023-08-31 2023-08-31 Calibration method, system and storage medium for thermal print head resistance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311117052.2A CN116985538A (en) 2023-08-31 2023-08-31 Calibration method, system and storage medium for thermal print head resistance

Publications (1)

Publication Number Publication Date
CN116985538A true CN116985538A (en) 2023-11-03

Family

ID=88528453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311117052.2A Pending CN116985538A (en) 2023-08-31 2023-08-31 Calibration method, system and storage medium for thermal print head resistance

Country Status (1)

Country Link
CN (1) CN116985538A (en)

Similar Documents

Publication Publication Date Title
US11477343B2 (en) Dynamic printing system compensation mechanism
EP3209010B1 (en) Halftone calibration mechanism
US11182113B2 (en) Ink deposition monitoring mechanism
US20190270304A1 (en) Ink deposition curve computation mechanism
US10723133B2 (en) Ink estimation mechanism
EP3873079B1 (en) Direct deposit ink estimation mechanism
JP7004028B2 (en) Ink estimation adjustment mechanism
US10902304B1 (en) Optical density monitoring mechanism
JP2003039713A (en) Method for correcting input digital image
US11283936B1 (en) Ink usage estimation for each drop size based on histogram and calibrated drop fraction
CN111857611A (en) Print preview method, device, equipment and storage medium
US9681022B2 (en) Image processing apparatus, image processing method, and recording medium
CN116985538A (en) Calibration method, system and storage medium for thermal print head resistance
JP2014049774A (en) Image processing apparatus, image processing method, image recording apparatus, and program
CN116901590A (en) Calibration method, system and storage medium for thermal print head resistance
WO2023078304A1 (en) Spray head compensation method based on binary image
JP2007001166A (en) Image processing method, image processing apparatus and program
US11155099B2 (en) Printer density control mechanism
EP2884730A1 (en) Binary periodic to multibit aperiodic halftone and resolution conversion
US11057541B2 (en) Image processing apparatus, printing system, and image processing method
US20210268794A1 (en) Uncalibrated ink deposition generation mechanism
US10516809B2 (en) Optimizing number of grid points in multi-dimensional color lookup table
US20200004481A1 (en) Image processing apparatus and non-transitory computer readable medium
CN114274692A (en) Gray scale printing method of thermal printer
JP2000203098A (en) N-dimensional code printing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination