Calibration method of printing equipment, electronic equipment, printing system and storage medium

By extracting the line features in the calibration image of the printing equipment and generating a feature set, the problem of large errors in the manual recognition method is solved, and efficient and accurate calibration of the nozzle of the printing equipment is achieved.

CN119396353APending Publication Date: 2025-02-07SHENZHEN MAKER WORKS TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411532053.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In the prior art, the manual identification method has large errors, inaccurateness and low efficiency, resulting in low nozzle calibration efficiency of printing equipment.

Method used

By obtaining the calibration image corresponding to the calibration pattern printed by the print head, the line features of the lines corresponding to the sub-pattern are extracted, the line features sets are generated, and the calibration value is determined based on the line feature sets.

Benefits of technology

Accurate and rapid determination of calibration values ​​is achieved, reducing human intervention and errors, and improving calibration accuracy and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396353A_ABST
    Figure CN119396353A_ABST
Patent Text Reader

Abstract

The invention discloses a calibration method of a printing device, an electronic device, a printing system and a storage medium, and relates to the technical field of general printing devices.The calibration method of the printing device comprises the steps that at least one calibration image corresponding to a calibration pattern printed by a printing head is obtained; extracting line features of lines corresponding to the sub-patterns in the calibration images, and generating a line feature set; and determining a calibration value according to the line feature set. The technical problem of low nozzle calibration efficiency of printing equipment caused by large error, inaccuracy and low efficiency of a manual identification mode in the related technology is solved. The technical effects that the calibration value is accurately and rapidly determined, human intervention and errors are reduced, and the calibration accuracy and consistency are improved are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of printing device control, and in particular to a printing device calibration method, electronic device, printing system and storage medium. Background Art

[0002] During the installation process of inkjet printing equipment, the nozzles are manually installed and fixed, which leads to large installation errors and is prone to problems such as nozzle tilt and inaccurate installation distance.

[0003] In the related art, after the printing device is installed, a calibration pattern is first printed, and then the calibration parameters are obtained through manual recognition, and then the calibration is manually performed according to the calibration parameters. However, this calibration pattern is relatively complex and requires many parameters to be set. At the same time, the manual recognition method has large errors, is inaccurate, and is inefficient, which leads to low efficiency in the calibration of the nozzles of the printing device. Summary of the invention

[0004] The main purpose of the present application is to provide a calibration method for a printing device, an electronic device, a printing system and a storage medium, aiming to solve the technical problem that manual recognition methods have large errors, inaccuracies and low efficiency, which in turn leads to low efficiency in the calibration of the nozzles of the printing device.

[0005] To achieve the above object, the present application provides a calibration method for a printing device, the calibration method for a printing device comprising:

[0006] Acquire at least one calibration image corresponding to a calibration pattern printed by a print head, wherein the calibration pattern includes a plurality of sub-patterns, and each of the sub-patterns includes at least one line;

[0007] Extracting line features of lines corresponding to each of the sub-patterns in the at least one calibration image to obtain a line feature set;

[0008] A calibration value is determined based on the set of line features.

[0009] In one embodiment, the step of obtaining at least one calibration image corresponding to the calibration pattern printed by the print head includes:

[0010] Controlling the print head to print the plurality of sub-patterns in sequence along a preset direction;

[0011] The image acquisition module is moved along a preset direction, and the image acquisition module is controlled to continuously acquire images of the calibration pattern to obtain the at least one calibration image, each of which includes at least one sub-pattern.

[0012] In one embodiment, the step of extracting line features of lines corresponding to each of the sub-patterns in the at least one calibration image to obtain a line feature set includes:

[0013] Extracting a target area in the calibration image and a serial number value of the target area, wherein the target area includes one of the sub-patterns;

[0014] Extracting the line features in each of the target areas, determining the line feature values ​​of each of the target areas, and making correspondence between the line feature values ​​of each of the target areas and each of the number values;

[0015] If the extraction of each calibration image is completed, the line feature set is generated based on the line feature values ​​and the number values ​​of all target areas.

[0016] In one embodiment, the step of extracting the target area in the calibration image and the number value of the target area includes:

[0017] identifying sub-pattern labels in the calibration image;

[0018] Extracting the target area from the calibration image based on a preset detection frame and calibration type;

[0019] Based on the position information of the target area and the sub-pattern number, each of the target areas is matched with each of the sub-pattern numbers to obtain the number value corresponding to each of the target areas.

[0020] In one embodiment, before the step of matching each of the target areas with each of the sub-pattern labels based on the position information of the target area and the sub-pattern label to obtain the number value corresponding to each of the target areas, the step of extracting the target area and the number value of the target area in the calibration image further includes:

[0021] Based on preset prior knowledge, identify and remove abnormal target areas; and / or,

[0022] If an abnormal sub-pattern label is identified, the abnormal sub-pattern label is corrected according to the sub-pattern label preceding the abnormal sub-pattern label and / or the sub-pattern label following the abnormal sub-pattern label.

[0023] In one embodiment, the step of extracting the line features in each of the target areas and determining the line feature values ​​of each of the target areas includes:

[0024] Separating the target subject and the background in the target area;

[0025] Extracting a target bounding rectangular frame based on the target subject;

[0026] Partitioning the target area based on the target enclosing rectangular frame to obtain a plurality of sub-target areas, and extracting the line features in each of the sub-target areas;

[0027] The line feature value of the target area is calculated based on the line feature differences in each of the sub-target areas.

[0028] In one embodiment, the step of determining the calibration value according to the line feature set comprises:

[0029] Determine the evaluation strategy based on the calibration type;

[0030] Each of the line features in the line feature set is evaluated according to the evaluation strategy to obtain a calibration value.

[0031] In one embodiment, before the step of obtaining at least one calibration image corresponding to the calibration pattern printed by the print head, the method further includes:

[0032] determining a calibration type based on the received calibration signal;

[0033] The print head is controlled to print the calibration pattern based on the calibration type, and the calibration patterns corresponding to different calibration types are different.

[0034] In addition, to achieve the above-mentioned purpose, the present application also provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the calibration method of the printing device as described above.

[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a printing system, which includes a host computer and a printing device; the host computer is used to send a calibration signal to the printing device, and receive a calibration image sent by the printing device, the calibration pattern includes multiple sub-patterns, and each sub-pattern includes at least one line; extract the line features of the lines corresponding to each of the sub-patterns in the at least one calibration image to obtain a line feature set; determine a calibration value based on the line feature set; send the calibration value to the printing device; the printing device is used to receive the calibration signal sent by the host computer, and determine the calibration type based on the received calibration signal; control the print head to print the calibration pattern based on the calibration type, different calibration types correspond to different calibration patterns, obtain at least one calibration image corresponding to the calibration pattern printed by the print head, and send the calibration image to the host computer; receive the calibration value sent by the host computer, and calibrate the printing device according to the calibration value.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and the computer-readable storage medium stores a program for implementing the calibration method of the printing device, and the program for implementing the calibration method of the printing device is executed by a processor to implement the steps of the calibration method of the printing device as described above.

[0037] The present application provides a calibration method for a printing device. The present application first obtains at least one calibration image corresponding to a calibration pattern printed by a print head, wherein the calibration pattern includes multiple sub-patterns, and each sub-pattern includes at least one line; extracts line features of lines corresponding to each of the sub-patterns in the at least one calibration image to obtain a line feature set; and determines a calibration value according to the line feature set. The method achieves the technical effect of accurately and quickly determining calibration values, reducing human intervention and errors, and improving the accuracy and consistency of calibration, and solves the technical problem in the related art that the manual recognition method has large errors, is imprecise, and is inefficient, which in turn leads to low efficiency in nozzle calibration of the printing device. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0040] Figure 1 A schematic diagram of the system involved in the printing system for this application;

[0041] Figure 2 This is a schematic diagram of the structure of the printing device involved in this application;

[0042] Figure 3 This is a flow chart of steps S10-S40 in a possible embodiment of the calibration method of the printing device of the present application;

[0043] Figure 4 A calibration pattern for step calibration in a possible embodiment of the calibration method for the printing device of the present application;

[0044] Figure 5 A schematic diagram of a calibration image captured by step calibration in a possible embodiment of a calibration method for a printing device of the present application;

[0045] Figure 6A schematic diagram of extracting a target area by stepping calibration in a possible embodiment of a calibration method for a printing device of the present application;

[0046] Figure 7 A schematic diagram of extracting line feature values ​​by stepping calibration in a possible embodiment of a calibration method for a printing device of the present application;

[0047] Figure 8 A schematic diagram of determining a calibration value by step calibration in a possible embodiment of a calibration method for a printing device of the present application;

[0048] Fig. 9 This is a flow chart of steps S21-S23 in a possible embodiment of the calibration method of the printing device of the present application;

[0049] Fig.10 A calibration pattern for bidirectional calibration in a possible embodiment of the calibration method for the printing device of the present application;

[0050] Fig.11 A calibration pattern for color calibration in a possible embodiment of the calibration method for the printing device of the present application;

[0051] Fig.12 A calibration pattern for dual print head calibration in a possible embodiment of the calibration method for the printing device of the present application;

[0052] Fig.13 A calibration pattern for broken hole detection in a possible embodiment of a calibration method for a printing device of the present application;

[0053] Fig.14 An example diagram of calibration values ​​corresponding to broken hole detection in a possible embodiment of a calibration method for a printing device of the present application;

[0054] Fig.15 A schematic diagram of a brief process involved in a possible embodiment of a calibration method for a printing device of the present application;

[0055] Fig.16 This is a schematic diagram of the hardware structure of the electronic device involved in this application.

[0056] Description of Figure Numbers:

[0057] 1000. Printing equipment;

[0058] 100, print head; 200, print table; 700, housing; 71a, first opening; 71b, first cover plate; 75, material outlet; 900, material discharging bracket; 91, bracket; 18, image acquisition module.

[0059] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0060] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0061] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0062] At present, in the field of inkjet printing technology, the installation and fixation of nozzles are all done manually, which leads to large installation errors, and often causes problems such as nozzle installation tilt and inaccurate installation distance. In the prior art, calibration parameters are often obtained by printing a calibration chart and then manually recognizing them, and then calibrating them manually. However, this calibration chart is relatively complex, and many parameters need to be set. In addition, the manual recognition method has large errors, is inaccurate, and has low efficiency. Moreover, the calibration pattern used for manual recognition is generally relatively large, and when multiple or multiple types of calibration are required, a lot of materials are consumed.

[0063] The main solution of the present application is: obtaining at least one calibration image corresponding to the calibration pattern printed by the print head, the calibration pattern includes multiple sub-patterns, each of the sub-patterns includes at least one line; extracting the line features of the lines corresponding to each of the sub-patterns in the at least one calibration image to obtain a line feature set; determining the calibration value according to the line feature set. The technical effect of accurately and quickly determining the calibration value, reducing human intervention and errors, and improving the accuracy and consistency of calibration is achieved.

[0064] Based on this, in a possible embodiment of the present application, a printing system is proposed, see Figure 1 The printing system 2000 includes a host computer 1100 and a printing device 1000, and the host computer 1100 can be connected to the printing device 1000 in communication. The host computer 1100 can be installed with printing software, and the printing software is provided with an interactive interface. The user operates through the interactive interface to create a printing task, call a calibration function, set printing parameters, etc. The host computer 1100 can send a printing task to the printing device 1000, and the printing device 1000 can start printing after receiving the printing task. Among them, the host computer 1100 can be a computer, a mobile phone, a tablet and other devices, which are not listed here one by one.

[0065] In one embodiment, when calibrating the printing device 1000, the user can input a calibration instruction through the host computer 1100, and the host computer 1100 determines to execute the calibration function according to the click information received on the interactive interface, and then generates a calibration signal, and sends the calibration signal to the printing device 1000, and receives the calibration image sent by the printing device 1000, the calibration pattern includes a calibration pattern, the calibration pattern includes multiple sub-patterns, and each sub-pattern includes at least one line; extracts the line features of the lines corresponding to each sub-pattern in at least one calibration image to obtain a line feature set; determines the calibration value according to the line feature set; sends the calibration value to the printing device; the printing device 1000 can receive the calibration signal sent by the host computer 1100, and determines the calibration type according to the received calibration signal; controls the print head to print the calibration pattern based on the calibration type, different calibration types correspond to different calibration patterns, obtains at least one calibration image corresponding to the calibration pattern printed by the print head, and sends the calibration image to the host computer 1100; receives the calibration value sent by the host computer 1100, and calibrates the printing device 1000 according to the calibration value. This enables automated calibration of the printing device 1000 , improves calibration efficiency, and reduces calibration errors.

[0066] Based on this, in a possible embodiment of the present application, a printing device is proposed, referring to Figure 2 It should be noted that the printing device 1000 proposed in the present application can be a thermal inkjet printer, a piezoelectric inkjet printer, or a white ink heat transfer printer ("Direct to Film DTF" printer), a white ink direct jet printer ("Direct to Garment" DTG printer), etc., as long as it is a device used for jetting ink for printing operations. The printing device 1000 may include a print head 100, and the print head 100 may be used to print patterns.

[0067] In one embodiment, the printing device 1000 further includes a housing 700, a processing space is formed in the housing 700, and the print head 100 and the printing table 200 are disposed in the processing space. In some embodiments of the present application, the housing 700 is provided with a first opening 71a and a first cover plate 71b communicating with the processing space, and the first cover plate 71b can open or cover the first opening 71a.

[0068] In one embodiment, the printing device 1000 further includes a discharge bracket 900, which is disposed on the discharge side of the printing table 200. For example, the discharge bracket 900 can be disposed at the material outlet 75b of the housing 700. The discharge bracket 900 can include at least two support plates 91, and at least two support plates 91 can be extended or overlapped. The print head 100 further includes an image acquisition module 18. By arranging the image acquisition module 18 on the print head 100, the pattern printed by the print head 100 can be photographed, for example, the calibration pattern printed by the print head 100 can be captured, and then the calibration image can be obtained. The image acquisition module 18 can be a camera.

[0069] Based on this, in a possible embodiment of the present application, a calibration method for a printing device is proposed, please refer to Figure 3 The calibration method of the printing device includes steps S10 to S40:

[0070] Step S10, obtaining at least one calibration image corresponding to a calibration pattern printed by a print head, wherein the calibration pattern includes a plurality of sub-patterns, and each sub-pattern includes at least one line.

[0071] It should be noted that the execution subject of this embodiment can be a printing device, or it can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device that can realize the above functions, etc., and this embodiment does not specifically limit this. The following takes the electronic device as the execution subject as an example to illustrate this embodiment and the following embodiments. Among them, the electronic device can be installed in the printing device, or it can be separated from the printing device and serve as the host computer of the printing device. That is, when the electronic device is installed in the printing device, the printing device executes the technical solutions recorded in the embodiments of this application. When the electronic device is separated from the printing device, the electronic device serves as the host computer of the printing device and executes the technical solutions recorded in the embodiments of this application.

[0072] In this embodiment, the print head includes a nozzle for printing ink, the calibration pattern is a pattern for calibration printed on consumables such as paper, film, etc. by the printing device during the calibration process, and the calibration image is a picture taken of the calibration pattern, and there is at least one calibration image. The calibration pattern includes a plurality of sub-patterns, each of which includes at least one line. That is, controlling the print head to print the calibration pattern is to control the print head to use different printing parameters to print each sub-pattern, and each sub-pattern corresponds to different printing parameters.

[0073] As an optional implementation, after the print head completes printing the calibration pattern, the size information of the calibration pattern is determined according to the calibration type corresponding to the calibration pattern, the height information of the image acquisition module relative to the calibration pattern is determined according to the size information, and the image acquisition module is adjusted to a position corresponding to the height information, so that the image acquisition module can capture the complete calibration pattern in one calibration image.

[0074] As another optional implementation, after the print head completes the calibration pattern, according to the calibration type corresponding to the calibration pattern, the image acquisition module is controlled to adjust according to the acquisition posture, and then the image acquisition module is controlled to move horizontally or vertically, and at least one calibration image is acquired during the movement. If the number of calibration images is greater than one, all the calibration images are spliced ​​to form the calibration pattern, that is, the contents corresponding to each calibration image do not overlap.

[0075] Step S20: extracting line features of lines corresponding to each sub-pattern in at least one calibration image to obtain a line feature set.

[0076] In this embodiment, the calibration types include but are not limited to broken needle detection, step calibration, color calibration, bidirectional calibration, dual print head calibration and ink drop point calibration. Among them, broken needle detection: detect whether each channel and each nozzle of the print head is blocked. Step calibration: calibration between the paper feeding system and the print head. Color calibration: position calibration between different color channels of the same print head. Bidirectional calibration: calibration to ensure that the ink droplets fall on the same position when the print head moves back and forth. Dual print head calibration: calibration of position deviation between different print heads. Ink drop point calibration method: adjust the time and amplitude of the piezoelectric nozzle drive waveform. Different calibration types correspond to different calibration patterns. The line feature is the quantity that indicates a certain feature of the calibration pattern. Different calibration types will have different feature extraction methods and feature data, that is, the expression of line features will be different. The line feature set is an array whose elements are composed of line feature values ​​and corresponding number values. The line feature value is the numerical value of the line feature, and the number value is the number of the pattern corresponding to the line feature.

[0077] As an optional implementation, according to the calibration type, the feature extraction method corresponding to the batch of calibration images is determined, the calibration pattern is divided into several sub-patterns, each sub-pattern has a corresponding number value, and then according to the feature extraction method, the sub-patterns and corresponding number values ​​in each calibration image are extracted, and then for each sub-pattern, the line features of the sub-pattern are extracted, and the line feature value of the sub-pattern is determined according to the line features, and then the line feature value Fmn and the corresponding number value Nmn are combined into an element, recorded as Vmn (Fmn, Nmn). After all sub-patterns of all calibration images are feature extracted, the line feature set corresponding to the calibration pattern is composed according to several elements.

[0078] Step S30, determining a calibration value according to the line feature set.

[0079] In one embodiment, the calibration value is a number value. That is, a set of calibration patterns includes a plurality of sub-patterns, and each sub-pattern corresponds to a number value. When the print head prints different sub-patterns, the setting parameters used are different, that is, the number value can correspond to the setting parameters of the print head when printing the sub-pattern. Therefore, a line feature value that meets the requirements is selected from the line feature set, and the calibration value is determined to be the number value corresponding to the line feature value.

[0080] As an optional implementation, if the electronic device and the printing device are integrated, the host computer sends a calibration signal, and when the electronic device receives the calibration signal, it determines the calibration type based on the received calibration signal; then based on the calibration type, the print head is controlled to print the calibration pattern, the electronic device controls the image acquisition module to acquire at least one calibration image, and then extracts the line features of the lines corresponding to each sub-pattern in each calibration image to generate a line feature set; then the calibration value is determined based on the line feature set, and finally the printing device is updated based on the calibration value.

[0081] As another optional implementation, if the electronic device and the printing device are separately arranged, that is, the electronic device serves as a host computer, the electronic device sends a calibration signal to the printing device, the printing device determines the calibration type based on the received calibration signal, then obtains the calibration pattern corresponding to the calibration type, and controls the print head to print the calibration pattern, captures at least one calibration image through the image acquisition module, and sends the calibration image back to the electronic device, the electronic device extracts the line features of the lines corresponding to each sub-pattern in each calibration image, and generates a line feature set; determines the calibration value based on the line feature set, and sends the calibration value to the printing device, so that the printing device is updated according to the calibration value.

[0082] As an optional implementation, when the electronic device is used as the execution subject, if the electronic device is installed in the printing device, the printing device directly executes the operation of obtaining the calibration image. If the electronic device is set separately from the printing device as a host computer, the host computer sends instructions to control the printing device to print the calibration pattern and control the image acquisition module to obtain the calibration image. After the print head prints the calibration pattern, the electronic device determines the size information of the calibration pattern according to the calibration type corresponding to the calibration pattern. For example, for the calibration of the broken needle detection type, the calibration pattern may be small and the size information is relatively clear; while for the calibration type of the dual print head, the calibration pattern may be large, and the size information needs to be determined by comprehensively considering factors such as the positional relationship of the two print heads. Then, the height information of the image acquisition module relative to the calibration pattern is calculated based on the size information, and the image acquisition module is adjusted to the position corresponding to the height information by means of motor drive or mechanical adjustment, so as to ensure that the image acquisition module can capture the complete calibration pattern in one calibration image. After the print head completes the calibration pattern, the electronic device controls the image acquisition module to adjust according to the acquisition posture according to the calibration type corresponding to the calibration pattern. For example, for different calibration types, the angle, focal length, etc. of the image acquisition module may need to be adjusted accordingly. Then, the image acquisition module is controlled to move horizontally or vertically, and at least one calibration image is acquired during the movement. If the number of calibration images is greater than one, the electronic device processes the acquired images to ensure that the contents corresponding to each calibration image do not overlap, so that the calibration pattern can be accurately spliced ​​later.

[0083] The feature extraction method corresponding to the batch of calibration images can be determined according to the calibration type corresponding to the calibration pattern. Different calibration types correspond to different calibration patterns and feature extraction methods. For example, for the broken needle detection type, it may be necessary to analyze the area corresponding to each nozzle in the calibration pattern to extract features such as color uniformity and ink drop shape; for the color matching calibration type, it may be necessary to compare the positional relationship of different color channels to extract features such as the degree of alignment of color edges. The calibration pattern is divided into several sub-patterns, each of which has a corresponding number value. For each calibration image, the sub-patterns and the corresponding number values ​​are first extracted. Then, for each sub-pattern, the line features of the sub-pattern are extracted according to the feature extraction method. For example, for a certain sub-pattern, the thickness of its line, the saturation of the color, and other features may be extracted through an image processing algorithm. Next, the line feature value of the sub-pattern is determined according to the line feature, and the line feature value Fmn and the corresponding number value Nmn are combined into an element, which is recorded as Vmn (Fmn, Nmn). After all sub-patterns of all calibration images have been feature extracted, a line feature set corresponding to the calibration pattern is formed according to several elements. The calibration value is determined according to the line feature set.

[0084] Specifically, a line feature value that meets the requirements is selected from the line feature set. The selection criteria may be determined according to different calibration types. For example, for the step calibration type, the feature value representing the distance between the paper feed system and the print head that is closest to the standard value may be selected; for the bidirectional calibration type, the feature value representing the smallest ink drop position deviation when the print head moves back and forth may be selected. After determining the line feature value, the number value corresponding to the line feature value is used as the calibration value. The electronic device downloads the determined calibration value, that is, the number value, to the printing device. After receiving the calibration value, the printing device calibrates according to the set parameters corresponding to the number value. For example, if the calibration value corresponds to a specific nozzle parameter adjustment in the broken needle detection type, the printing device will adjust the inkjet force, frequency, etc. of the corresponding nozzle according to the parameter; if the calibration value corresponds to a color channel position adjustment in the color registration calibration type, the printing device will adjust the printing position of the corresponding color channel according to the parameter.

[0085] Exemplarily, a user uses a printing device to perform color printing business. In daily production, it is found that the color deviation of the printed color pattern is large, and it is suspected that the color calibration problem is caused by the inaccurate position between different color channels of the print head. The electronic device, a host computer set separately from the printing device, receives the color calibration instruction initiated by the user, sends a signal to the printing device, and controls the printing device to print the color calibration pattern. The pattern is composed of a plurality of small squares of different colors, each small square represents a sub-pattern, and has a corresponding number value. According to the color calibration type, the electronic device determines the size information of the calibration pattern. Since the color calibration pattern is relatively small, the size information is easy to determine. Then, the height information of the image acquisition module relative to the calibration pattern is calculated according to the size information, and the image acquisition module is adjusted to a suitable position by a motor drive to ensure that the complete calibration pattern can be captured in a calibration image. For the color calibration type, the electronic device determines that the feature extraction method is to compare the alignment degree of the edges of small squares of different colors. First, each color small square (sub-pattern) and the corresponding number value are extracted from the calibration image. Then, for each small square, the position information and color information of its edge are extracted by an image processing algorithm. The distance deviation between the edges of small squares of different colors is calculated according to the edge position information as the line feature. The line feature value is determined according to the distance deviation, and the line feature value Fmn and the corresponding number value Nmn are combined into an element, recorded as Vmn (Fmn, Nmn). After processing all the small squares of all calibration images, a line feature set is formed. The electronic device selects the line feature value representing the smallest edge distance deviation of small squares of different colors from the line feature set. The number value corresponding to the line feature value is the calibration value of the color calibration. The electronic device downloads the calibration value to the printing device. The printing device adjusts the printing position of different color channels according to the set parameters corresponding to the number value, so that patterns of different colors can be aligned more accurately, thereby improving the printing quality.

[0086] Optionally, after step S30, the following steps are included:

[0087] Step S40: calibrate the printing device based on the calibration value.

[0088] In this embodiment, the calibration value is a serial number value, which is sent to the printing device, and the printing device performs calibration according to the printing parameters corresponding to the serial number value.

[0089] That is, in this embodiment, when the print head prints the calibration pattern, it prints different sub-patterns according to different printing parameters, and then determines the calibration value, which is the number value of the sub-pattern with the best printing effect. Then, the corresponding printing parameter is determined according to the number value, and then the printing parameter is used as the parameter used by the printing device to complete the calibration of the printing device. The printing parameters include but are not limited to the motor step length: adjust the distance moved by the motor in each step to ensure the movement accuracy of the print head on the paper. If the step length is inaccurate, the image may be misplaced or blurred. Paper conveying speed: by adjusting the speed of paper conveying to match the moving speed of the print head, the image is evenly distributed on the paper. Color offset: for print heads of different colors, adjust their offsets in the horizontal and vertical directions to achieve accurate color alignment. For example, if the red print head has a horizontal offset relative to the blue print head, it can be corrected by adjusting the offset of the red print head. Color intensity ratio: according to the actual printing effect, adjust the output intensity ratio of the print heads of different colors to obtain a more accurate and natural color performance. For example, if the yellow color is too light, the output intensity of the yellow print head can be appropriately increased. Forward and reverse printing compensation values: Since there may be slight differences in the print head's forward and reverse movement, the compensation values ​​for forward and reverse printing need to be adjusted to ensure the accuracy and consistency of bidirectional printing. For example, the amount of ink for reverse printing can be increased or the print head's movement speed can be adjusted. Print head alignment parameters: Adjust the alignment parameters of the print head during bidirectional movement so that the lines printed in the forward and reverse directions can accurately overlap. This can be achieved by adjusting the position or angle of the print head. Print head replacement strategy: If a broken needle is detected, the print head replacement strategy needs to be determined. You can choose to replace the print head immediately or use a spare print head for printing to ensure the continuation of the printing task. Print quality compensation parameters: In the case of a broken needle, adjust the print quality compensation parameters, such as increasing the amount of ink, reducing the printing resolution, or using a special printing mode, to minimize the impact of the broken needle on the image quality. At the same time, you can also consider adjusting the color and contrast of the image to cover up the defects caused by the broken needle.

[0090] The present application provides a calibration method for a printing device. The present application first obtains at least one calibration image corresponding to a calibration pattern printed by a print head, wherein the calibration pattern includes multiple sub-patterns, and each sub-pattern includes at least one line; extracts line features of lines corresponding to each sub-pattern in at least one calibration image to obtain a line feature set; and determines a calibration value based on the line feature set. The present application solves the technical problem in the related art that the manual recognition method has large errors, inaccuracies, and low efficiency, which in turn leads to low efficiency in the nozzle calibration of the printing device. The present application achieves the technical effect of accurately and quickly determining the calibration value, reducing human intervention and errors, and improving the accuracy and consistency of calibration.

[0091] Based on any embodiment, in a possible embodiment of the present application, a calibration method for a printing device is proposed, step S10 comprising:

[0092] Step S11, controlling the print head to print a plurality of sub-patterns in sequence along a preset direction.

[0093] In this embodiment, the preset direction is the x-axis direction or the y-axis direction.

[0094] The printing device determines the calibration type according to the received calibration signal, then obtains the calibration pattern corresponding to the calibration type, and determines multiple sub-patterns corresponding to the calibration pattern, as well as the arrangement direction of the sub-patterns, and then controls the print head to print multiple sub-patterns in sequence along the preset direction based on the arrangement direction of the sub-patterns as the preset direction.

[0095] Step S12, moving the image acquisition module along a preset direction, and controlling the image acquisition module to continuously acquire images of the calibration pattern to obtain at least one calibration image.

[0096] In this embodiment, the image acquisition module is adjusted according to the acquisition posture corresponding to the calibration pattern, and then the image acquisition module is controlled to move along a preset direction and acquire calibration images so that the calibration patterns in each calibration image do not overlap.

[0097] In this embodiment, calibration pattern: a specific pattern printed by the printing device on the consumables during the calibration process, which is used for subsequent calibration operations. Different calibration types have different calibration patterns. Capture posture: the position and posture of the image acquisition module when capturing the calibration pattern, including parameters such as height, angle, and focal length.

[0098] As an optional implementation, the electronic device first determines the acquisition posture requirements according to the calibration type corresponding to the calibration pattern. For example, for the calibration of the broken needle detection type, the image acquisition module may be required to align each nozzle area of ​​the print head with a higher resolution and a specific angle in order to clearly capture information on whether the nozzle is clogged; for the dual print head calibration type, the image acquisition module may be required to be adjusted to a position and angle that can cover both print head areas at the same time. Then, the image acquisition module is adjusted to a state that meets the acquisition posture requirements by means of motor drive, mechanical adjustment or software control.

[0099] In this embodiment, preset direction: the preset moving direction of the image acquisition module, which can be horizontal, vertical or other specific directions, determined according to the characteristics of the calibration pattern and the acquisition requirements. Calibration image: the picture taken for the calibration pattern, used to extract line features for calibration.

[0100] As an optional implementation, the electronic device determines the preset direction based on factors such as the calibration type and the size of the calibration pattern. For example, if the calibration pattern is long and strip-shaped, longitudinal movement acquisition may be selected; if the calibration pattern is wide and wide, horizontal movement acquisition may be selected. The image acquisition module is controlled to move at a constant speed or variable speed along the preset direction, and the calibration image is captured according to a certain time interval or position trigger mechanism during the movement. Ensure that the calibration patterns in each calibration image do not overlap, so that more comprehensive and accurate calibration information can be obtained by splicing or analyzing different parts of the calibration pattern in subsequent processing.

[0101] Exemplarily, a user uses a DTF (Direct to Film) printing device to make a pattern on a T-shirt. During the printing process, it is found that the color uniformity and color registration accuracy are not ideal, and color registration calibration is required. Exemplarily, during the printing process, it is found that there is a problem with the coordination between the paper feeding system and the print head, and step calibration is required. After receiving the step calibration instruction, the DTF electronic device determines the acquisition posture according to the step calibration type. For step calibration, its calibration pattern may be a series of equidistant line patterns. The acquisition posture requires the image acquisition module to align with the printing area at an angle and height that can clearly capture the line details. The DTF electronic device adjusts the height and angle of the image acquisition module by controlling the motor to meet the acquisition posture requirements. For example, the image acquisition module is adjusted to a height of 20 cm from the printing area, and the calibration pattern is aligned with the printing plane at a 40-degree angle. According to the characteristics of the step calibration pattern, the preset direction is determined to be longitudinal movement. The DTF electronic device controls the image acquisition module to move at a uniform speed from top to bottom, and collects a calibration image at a certain distance, such as 3 cm. Ensure that the calibration patterns in each calibration image do not overlap, so that the line patterns in different positions can be analyzed in detail in subsequent processing. For example, the first calibration image may only contain the upper part of the calibration pattern, the second calibration image contains the middle part, and the third calibration image contains the lower part. By processing these non-overlapping calibration images, the position deviation between the paper feed system and the print head can be determined more accurately, so as to perform step calibration and improve the print quality of the DTF printing device.

[0102] By controlling the print head to print multiple sub-patterns in sequence along a preset direction; moving the image acquisition module along the preset direction, and controlling the image acquisition module to continuously acquire images of the calibration pattern, at least one calibration image is obtained, thereby making the captured calibration image more accurate, reducing the error rate, and improving the efficiency of the overall calibration process.

[0103] Based on any embodiment, in a possible embodiment of the present application, refer to Fig. 9 , step S20, comprising:

[0104] Step S21 , extracting a target area and a number value of the target area in the calibration image, wherein the target area includes a sub-pattern.

[0105] In this embodiment, calibration type: different calibration requirement types such as broken needle detection, step calibration, color calibration, etc. Each calibration type corresponds to a specific calibration pattern and target area. Target area: an area in the calibration image with specific features or representing a specific meaning, for example, a sub-pattern corresponds to a target area, which is used to extract line features for calibration, that is, the overall calibration pattern is composed of several target areas. Number value: a unique identification number assigned to each target area, which is used to correspond to the line feature value later.

[0106] When performing a calibration operation, the target area that should be focused on in the calibration image under the current calibration type is determined. For example, when performing a color calibration, the target area may be a specific pattern area corresponding to different color channels; in a step calibration, the target area may be a specific line or mark area related to the position relationship between the paper feed system and the print head. Through a pre-set rule or algorithm, a number value is assigned to each target area so that the line feature value can be accurately associated later.

[0107] As an optional implementation, the position of each sub-pattern in the calibration image is detected by an AI target detection algorithm, and several detection frames are marked in the image according to the position. The category corresponding to the sub-pattern can also be determined, and the category is compared with the calibration type. If they are different, a prompt message of calibration error is output; if they are the same, the falsely detected detection frame is filtered through prior knowledge such as position and size to remove invalid detection frames. The sub-pattern label in each detection frame is identified based on the AI ​​algorithm. If there are wrong numbers, the falsely detected numbers are verified and corrected by the correct numbers identified before and after. If all the numbers are correct, the calibration image detection frame and the corresponding numbers are matched through the position information to extract the target area and the corresponding number value.

[0108] Step S22, extracting line features of each target area, determining line feature values ​​corresponding to each number value, and making correspondence between the line feature values ​​of each target area and each number value.

[0109] In this embodiment, line feature: indicates the quantity of a certain feature of the target area, and the line feature has different expressions under different calibration types. For example, in broken needle detection, the line feature may be the color uniformity of the nozzle area, the shape of the ink droplets, etc.; in color calibration, the line feature may be the edge alignment degree of different color areas, etc. Line feature value: the value obtained after the line feature is quantified.

[0110] For each target area, specific image processing algorithms and techniques are used to extract its line features. For example, the image analysis algorithm is used to perform color analysis, edge detection, shape recognition and other operations on the target area to determine the line features. Then, the line features are quantified to obtain the corresponding line feature values. For example, if the line feature is the degree of edge alignment, the feature value can be represented by a numerical value such as pixel distance.

[0111] As an optional implementation, the calibration image is preprocessed to reduce noise, and then for each target area in the detection frame, the target corresponding to the sub-pattern is separated from the image background to extract the line or color corresponding to the sub-pattern, and then the target enclosing rectangular frame is extracted to select each line, and then the line features are extracted for each line partition, and then the feature data is output, such as the difference in line distance between different areas, the smaller the value, the closer to the accurate calibration value. Then, the line feature value corresponding to each target area is determined based on the feature data, and the line feature value is matched with the number value of the target area.

[0112] Step S23: if the extraction of each calibration image is completed, a line feature set is generated based on the line feature values ​​and number values ​​of all target areas.

[0113] In this embodiment, according to the above steps, the target area in each calibration image is processed, the line features are extracted and the line feature values ​​are determined. When all calibration images are processed, the number value and the corresponding line feature value of each target area are combined. For example, for the first target area in the first calibration image, it is recorded as V11 (F11, N11), where F11 is the line feature value and N11 is the number value. Similarly, after processing all target areas of all calibration images, a line feature set in the form of an array is obtained, that is, arry{{V11, V12, .. V1n},{V21, V22, .. V2n}, ...{Vm1, Vm2, .. Vmn}}.

[0114] Exemplarily, after receiving the color calibration instruction, the DTF electronic device determines the target area in the calibration image according to the color calibration type. In this case, the target area may be a specific pattern area printed by different color channels. For example, there are three color channels, red, yellow, and blue, each color channel corresponds to a number of sub-patterns, and each sub-pattern corresponds to a target area. Number values ​​are assigned to these target areas respectively. The line features of each target area are extracted, and the line feature values ​​corresponding to each number value are determined. For each target area, its line features are extracted. In color calibration, the line feature can be the degree of alignment of the edges of different color areas. Through the image analysis algorithm, the edge position of each color area is detected, and the distance deviation between the edges of different color areas is calculated as the line feature. Then, this distance deviation is quantized to obtain the line feature value. For example, if the distance deviation between the edges of the red area and the yellow area is 3 pixels, then the line feature value corresponding to the red area and the yellow area is 3. In the same way, the line feature values ​​of the yellow area and the blue area, and the blue area and the red area are determined. If the extraction of each calibration image is completed, a line feature set is generated based on the number value and the corresponding line feature value. Assume that a total of 5 calibration images are taken, that is, m=5, and there are 3 target areas in each image, that is, n=3. According to the above steps, the first image is processed, and after AI detection and classification processing, 3 target areas and corresponding digital number values ​​are extracted, namely number-5, number-4, and number-3. Then, image processing is performed on each target area to extract line features, and the current line feature value F11 and the corresponding number N11 are obtained, which are recorded as V11 (F11, N11). Similarly, after processing all target areas of the first image, the second image is processed until all 5 images are processed. Finally, the line feature set arry{{V11, V12, V13}, {V21, V22, V23}, {V31, V32, V33}, {V41, V42, V43}, {V51, V52, V53}} is obtained. This set contains the number value and line feature value of each target area in all calibration images, providing a basis for subsequent determination of calibration values.

[0115] Optionally, step S21 includes:

[0116] Step S211, identifying sub-pattern labels in the calibration image;

[0117] Step S212, extracting a target area from the calibration image based on a preset detection frame and calibration type;

[0118] Step S213 : Based on the position information of the target area and the sub-pattern number, each target area is matched with each sub-pattern number to obtain a number value corresponding to each target area.

[0119] In this embodiment, the sub-pattern labels are numbers, letters, or a combination of numbers and letters, that is, the number value corresponding to each sub-pattern is shown in FIG. Figure 4 , Figure 4 The calibration pattern of step calibration, the upper line is each sub-pattern, the number under each sub-pattern is the number value, that is, the sub-pattern label. The detection box is a rectangular box, such as Figure 6 As shown in the figure, the outer rectangular boxes are all detection boxes, the lower detection box is the sub-pattern label, and the upper detection box is the sub-pattern. The position information is the coordinate range of each sub-pattern label in the image, and the coordinate range contains the sub-pattern label, or contains the sub-pattern label and its corresponding sub-pattern. The sub-pattern label and the sub-pattern constitute a target area.

[0120] As an optional implementation, image recognition technology is used to analyze the calibration image. A deep learning algorithm, such as a convolutional neural network, can be used to train a digital recognition model. The model is able to recognize sub-pattern labels under different calibration types. The calibration image is preprocessed, including denoising, contrast enhancement and other operations to improve the clarity and recognizability of the numbers. For example, a median filter is used to remove noise from the image, and then the contrast of the image is enhanced by histogram equalization. The preprocessed calibration image is input into the digital recognition model, and the model outputs the sub-pattern labels in the image. For the step calibration type, these digital parameters are usually located below the sub-pattern, such as Figure 4 As shown. The detection frame is a rectangular frame used to frame the target area during the image recognition process. Different calibration types have different detection frame settings to accurately locate and extract the target area. Determine the corresponding detection frame settings based on the current calibration type. For step calibration, the detection frame can be set according to the size and position of the sub-pattern. For example, the size of the detection frame can be slightly larger than the sub-pattern to ensure that the sub-pattern and the sub-pattern label below it can be completely framed. Use the image analysis algorithm to determine the position information of the sub-pattern label in the calibration image. Edge detection, feature point matching and other methods can be used to accurately determine the coordinate range of the digital parameter. Match the detection frame with the position information of the sub-pattern label. If the coordinate range of the detection frame coincides with the position information of the sub-pattern label or is close within a certain range, the detection frame is considered to correspond to the digital parameter. As shown Figure 6 As shown in the figure, the yellow and green rectangular boxes are detection boxes, the green detection box contains the sub-pattern label, and the yellow detection box contains the sub-pattern. Once the position information of the detection box and the sub-pattern label is matched successfully, the corresponding target area can be extracted based on the detection box. For example, if the detection box is a rectangular box, the area in the detection box can be extracted as the target area by cropping the image. The sub-pattern label is used as the number value of the target area. In this way, each target area has a unique number, which is convenient for subsequent extraction and calibration of line features based on the number value.

[0121] Through the above three steps, the target area in the calibration image and the number value of the target area can be accurately determined, providing a basis for subsequent calibration operations.

[0122] Optionally, before step S213, step S212 includes:

[0123] Step a, based on preset prior knowledge, identifying and removing abnormal target areas;

[0124] Step b: if an abnormal sub-pattern label is identified, the abnormal sub-pattern label is corrected according to the sub-pattern label preceding and / or following the abnormal sub-pattern label.

[0125] In this embodiment, the detection frame recognized by AI may have anomalies. After several detection frames are recognized according to the calibration image, the abnormal detection frames in the detection frames are removed according to the prior knowledge corresponding to the calibration type, because the size, shape and other features of the calibration patterns corresponding to the calibration types are different. At the same time, the sub-pattern labels should be continuous integers. Therefore, according to this rule, it is determined that there are abnormal sub-pattern labels in the sub-pattern labels. If there are abnormal sub-pattern labels, the abnormal sub-pattern label is updated according to the previous sub-pattern label and the next sub-pattern label of the abnormal sub-pattern label.

[0126] Because the target area and the number value of the target area in the calibration image are extracted, the target area includes a sub-pattern; the line features in each target area are extracted, the line feature values ​​of each target area are determined, and the line feature values ​​of each target area are matched with each number value; if the extraction of each calibration image is completed, a line feature set is generated based on the line feature values ​​and number values ​​of all target areas. Reduce the time and expertise required for manual calibration, save time and reduce labor costs. At the same time, based on AI image recognition technology, the positioning accuracy and generalization of the calibration image area are improved. In addition, smaller patterns that are more suitable for machine vision recognition are customized to reduce the use of consumables and increase the speed of automatic detection.

[0127] Based on any embodiment, in a possible embodiment of the present application, step S22 includes:

[0128] Step S221, separating the target subject and the background in the target area.

[0129] In this embodiment, the target area is the area in the calibration image corresponding to the specific sub-pattern number, which is composed of the sub-pattern and the number below it. In step calibration, the target area is usually an area containing several lines and their corresponding number values. The target body is the main object in the target area, that is, the individual lines. In step calibration, the lines represent the positional relationship between the paper feed system and the print head or other parameters that need to be calibrated. The background is the part of the target area other than the target body, that is, the area outside the lines and numbers.

[0130] Image processing technology is used to analyze the image of the target area. Methods such as threshold segmentation and edge detection can be used to separate the target subject from the background. For example, for a grayscale image, a suitable threshold can be set based on the grayscale difference between the line and the background to divide the image into two parts: the foreground, which is the target subject, and the background. In this way, the target subject can be highlighted to prepare for subsequent feature extraction.

[0131] Step S222: extracting a target bounding rectangle based on the target body.

[0132] In this embodiment, the target enclosing rectangular frame is a rectangular frame that can completely enclose the target main body line and is used to determine the position and range of the line so as to perform partitioning and extract line features.

[0133] For the separated target main lines, use image processing algorithms to extract their contours. Edge detection algorithms, such as Canny edge detection, can be used to determine the edge positions of the lines. Then, based on the contours of the lines, the smallest rectangular box that can completely surround the lines is calculated, i.e., the target enclosing rectangular box. Each target enclosing rectangular box corresponds to a line, ensuring that the features of the lines can be accurately extracted.

[0134] Step S223 , partitioning the target area based on the target enclosing rectangular frame to obtain multiple sub-target areas, and extracting line features in each sub-target area.

[0135] In this embodiment, the line feature is a quantity indicating a certain feature of the target area, and the line feature has different expressions under different calibration types. In step calibration, the line feature can be the line distance between lines, etc. The sub-target area is the area corresponding to each line in the target area.

[0136] According to the target enclosing rectangle, the target body is divided into different areas. For example, each line can be regarded as a small interval, and each small interval can be regarded as a partition. Then, for each partition, specific line features are extracted. In step calibration, line width, length, grayscale value and other features can be extracted. For adjacent partitions, the feature differences between them can be calculated, such as the line distance between adjacent partitions. In this way, the features of the target body can be fully described.

[0137] Step S224: Calculate the line feature value of the target area based on the line feature differences in each sub-target area.

[0138] In this embodiment, the line feature value is a value obtained after the line feature is quantized. In step calibration, the line feature value may be the average value of the line distance, etc.

[0139] According to the extracted line features, the line feature value is determined. For example, in step calibration, the average of the line distances between all adjacent partitions can be calculated as the line feature value of the target area. Then, the line feature value is associated with the number value of the target area, so that the corresponding line feature value can be found according to the number value for calibration.

[0140] For example, taking the step calibration of a DTF printing device as an example, Figure 4 The calibration pattern for step calibration contains 11 sub-patterns with number values ​​ranging from -5 to 5. For the target area in each calibration image, image preprocessing is first performed to remove noise and enhance contrast. Then, the threshold segmentation method is used to separate the target body from the background. For example, according to the grayscale difference between the line and the background, a suitable threshold is set to divide the image into two parts, the foreground and the background. This can highlight the lines and facilitate subsequent processing. For the separated lines, the edge detection algorithm is used to determine their edge positions. Then, according to the outline of the line, the minimum rectangular box that can completely surround the line is calculated, that is, the target enclosing rectangular box. Each target enclosing rectangular box corresponds to a line to ensure that the features of the line can be accurately extracted. Take each target enclosing rectangular box as a partition. Then, for each partition, extract the features of the line such as width, length, and grayscale value. For adjacent partitions, the line distance between them is calculated as the line feature. For example, for the sub-pattern numbered -5, the corresponding line is divided into 10 partitions, and the line distance between adjacent partitions is calculated to obtain a set of line distance data. For the sub-pattern numbered -5, the average of the line distances between all adjacent partitions is calculated as the line feature value of the target area. Assume that the calculated average line distance is 2.5 pixels. Then, the line feature value 2.5 is associated with the number value -5. In the same way, the sub-patterns of other number values ​​are processed to obtain the line feature value corresponding to each sub-pattern and associate it with the corresponding number value.

[0141] Through the above steps, the line feature value of each target area can be accurately extracted and associated with the number value, providing a basis for the subsequent step calibration. Due to the separation of the target body and the background in the target area; the target enclosing rectangle is extracted based on the target body; the target area is partitioned based on the target enclosing rectangle to obtain multiple sub-target areas, and the line features in each sub-target area are extracted; based on the line feature differences in each sub-target area, the line feature value of the target area is calculated, thereby realizing the rapid identification of the line feature value based on a simple calibration pattern, and improving the calibration efficiency.

[0142] Based on any embodiment, in a possible embodiment of the present application, step S30 includes:

[0143] Step S31, determining an evaluation strategy according to the calibration type.

[0144] In this embodiment, the evaluation strategy is used to evaluate the standards and methods of line feature values. Depending on the calibration type, the evaluation strategy may include specific calculation formulas, threshold ranges, optimization targets, etc. When performing a calibration operation, the corresponding evaluation strategy is first determined based on the current calibration type. For example, for step calibration, the evaluation strategy may focus on the position accuracy between the paper feed system and the print head, taking into account factors such as the uniformity of spacing between lines; for bidirectional calibration, the evaluation strategy may focus on the accuracy of ink droplets landing in the same position when the print head moves back and forth, such as calculating the overlap of lines printed in different directions.

[0145] Step S32, evaluating each line feature in the line feature set according to the evaluation strategy to obtain a calibration value.

[0146] In this embodiment, processing according to the evaluation strategy is to perform operations such as calculation, comparison, and screening on the line feature values ​​according to the evaluation strategy to determine which line feature values ​​meet the calibration requirements.

[0147] According to the determined evaluation strategy, each line feature value in the line feature set is processed. This may include calculating specific indicators, comparing with preset thresholds, sorting, etc. For example, for step calibration, the standard deviation of the line spacing corresponding to each line feature value may be calculated to measure the uniformity of the spacing; for bidirectional calibration, the overlapping area or distance difference between lines printed in different directions may be calculated.

[0148] In this embodiment, after processing, line feature values ​​that meet the evaluation strategy are screened out from the line feature set. These line feature values ​​represent the target area features that are closest to the ideal calibration state. Then, the number values ​​corresponding to these line feature values ​​are determined as calibration values. Because each number value corresponds to a sub-pattern, and the sub-pattern is related to a specific print head setting parameter when printing. By determining that the calibration value is a number value that meets the requirements, the corresponding setting parameters can be applied to the printing device to achieve accurate calibration.

[0149] For example, a printing shop uses DTF printing equipment for printing business and finds that there is a problem with the coordination between the paper feeding system and the print head, and needs to perform step calibration. For step calibration, the evaluation strategy is determined to calculate the uniformity of the spacing between lines. Specifically, the spacing between the lines in each sub-pattern is calculated, and the standard deviation of all spacing is calculated. The smaller the standard deviation, the more uniform the spacing and the better the calibration effect. Each line feature value in the line feature set is processed. Assume that the line feature set is arry{{V11,V12,..V1n},{V21,V22,..V2n},...{Vm1,Vm2,..Vmn}}, where each Vmn (Fmn,Nmn) represents the feature value and number value of a target area. For step calibration, the line spacing in each target area is extracted as the line feature value Fmn. Then, the standard deviation of the line spacing of all target areas is calculated. After calculation, the line feature values ​​corresponding to a set of line spacings with the smallest standard deviation are found. Assume that this line characteristic value is V35 (F35, N35), where F35 is the characteristic value of the line spacing and N35 is the number value. The number value N35 is determined as the calibration value of the step calibration. The printing device is adjusted according to the setting parameters corresponding to the number value N35 to improve the position accuracy between the paper feeding system and the print head.

[0150] For example, a user uses a DTF printing device to make a pattern on a T-shirt, and needs to perform a bidirectional calibration to ensure that the ink droplets fall on the same position when the print head moves back and forth. For bidirectional calibration, the evaluation strategy is determined to calculate the overlap of lines printed in different directions. Specifically, for each sub-pattern, the positions of the lines printed in the forward and reverse directions are compared, and the overlapping area or distance difference between them is calculated. The larger the overlapping area or the smaller the distance difference, the better the bidirectional calibration effect. Each line feature value in the line feature set is processed. For bidirectional calibration, the overlapping area or distance difference between the forward and reverse printed lines in each target area is extracted as the line feature value Fmn. Then, the overlapping areas of all target areas are summed or the distance differences are averaged to obtain a comprehensive evaluation index. According to the numbered values ​​corresponding to the processed line feature values ​​that meet the evaluation strategy as calibration values, the numbered values ​​corresponding to a set of line feature values ​​with the largest overlapping area or the smallest distance difference are found as calibration values. Assume that this line feature value is V42 (F42, N42), where F42 is the feature value of the overlapping area or the distance difference, and N42 is the numbered value. The number value N42 is determined as the calibration value of the bidirectional calibration. The printing device is adjusted according to the setting parameters corresponding to the number value N42 to improve the accuracy of the bidirectional printing.

[0151] For example, if the calibration type is broken needle detection, each target area is a line segment. If the line segment prints a line, the line feature value is recorded as 1. If the line segment does not print a line, the line feature value is recorded as 2, thereby generating a line feature set, such as Fig.14 As shown, the number value is analyzed through the elements with line characteristic value 0 to determine the nozzle number of the broken needle.

[0152] As an optional implementation, Figure 4 is the calibration pattern for step calibration, Fig.10 is the calibration pattern corresponding to the bidirectional calibration, Fig.11 This is the calibration pattern corresponding to the color calibration. Fig.12 This is the calibration pattern corresponding to the dual print heads. Fig.13 This is the calibration pattern corresponding to the broken needle detection.

[0153] For example, the user uses a printing device to perform step calibration, and the calibration pattern printed by the printing device is as follows: Figure 4 As shown in , there are 11 sub-patterns. The image acquisition module needs to take pictures in multiple times. For example, step calibration requires taking four pictures to take a full picture. The number of calibration images taken is recorded as m, and the number of target areas that can be captured in a single calibration image is recorded as n. Figure 5 As shown in , there are three sub-images in the calibration image, and each sub-image is a target area. Figure 6 As shown, the target area and number value are extracted, such as Figure 7As shown in the figure, the line feature values ​​of each target area are determined and associated with the detection frame of the target area. Then the line feature values ​​of all calibration images are extracted to obtain an array of all line feature values ​​and values, from which the absolute value of the line feature value is the smallest, that is, a group of target areas with the highest line overlap is found. Figure 8 , as shown in the green box, the output calibration value is the number 0 of the target area.

[0154] By determining the evaluation strategy according to the calibration type and processing each line feature value in the line feature set according to the evaluation strategy and using the number value corresponding to the processed line feature value that meets the evaluation strategy as the calibration value, the optimal setting parameters of the printing device for the current calibration type can be quickly determined, thereby improving the efficiency of calibration.

[0155] For example, in order to help understand the technical concept or technical principle of the calibration method of the printing device after the above embodiments are combined, please refer to Fig.15 , Fig.15 A brief flow chart of a calibration method for a printing device is provided, which is as follows: first, m images, namely calibration images, are input, and the number of images taken in different calibration modes is different. Input the first calibration image, a total of m calibration images, after AI detection and classification processing, extract n groups of target areas and corresponding number values ​​in the mth calibration image; then for each calibration image, from the nth target area, where n starts from 1, perform image processing on the target area to extract line features, and obtain the current line feature value Fmn and the corresponding number Nmn, recorded as Vmn (Fmn, Nmn), and determine whether n is the last one of the calibration image. If not, extract the line feature value and number value of each target area in a loop; if so, determine whether the mth calibration image is the last one. If not, extract the line feature value and number value corresponding to each target area of ​​the next calibration image until all target areas of all calibration images are extracted, and obtain arry{{V11,V12,..V1n},{V21,V22,..V2n},...{Vm1,Vm2,..Vm n}}. Find the best Fmn value from the arry array, output the corresponding number value Nmn, which is the current calibration value, and update the printing device according to the calibration value to end the calibration. At the same time, perform AI target detection on the calibration image to determine several detection frames, correct the detection frames based on prior knowledge, remove abnormal detection frames, and then perform digital parameter recognition to determine each sub-pattern label, correct the abnormal sub-pattern labels, and then match each detection frame with the sub-pattern label as several target areas.

[0156] The process of image processing to extract line features is to pre-process the target area to reduce noise, then separate the target and background, extract the target enclosing rectangle, and then extract line features for each target enclosing rectangle partition, and finally output feature data, such as the difference in line distance between different areas. The smaller the value, the closer it is to the accurate calibration value.

[0157] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the calibration method of the printing device in the above-mentioned embodiment one.

[0158] Reference below Fig.16 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to a printing device, or a host computer (mobile phone, laptop computer, tablet computer, desktop computer, etc.) connected to the printing device. Fig.16 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0159] like Fig.16 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0160] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0161] The electronic device provided by the present application adopts the calibration method of the printing device in the above embodiment, which can solve the technical problem that the manual recognition method in the related art has large errors, inaccuracies, and low efficiency, which in turn leads to low efficiency of the nozzle calibration of the printing device. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the electronic device provided by the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0162] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0163] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0164] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the calibration method in the above-mentioned embodiment.

[0165] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0166] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0167] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the electronic device: obtains at least one calibration image corresponding to the calibration pattern printed by the print head; extracts the line features of the lines corresponding to each sub-pattern in each calibration image to generate a line feature set; determines the calibration value according to the line feature set; and calibrates the printing device based on the calibration value.

[0168] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0169] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0170] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0171] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the calibration method of the above-mentioned printing device, and can solve the technical problem that the manual recognition method in the related art has large errors, inaccuracies, and low efficiency, which leads to low efficiency of the nozzle calibration of the printing device. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the calibration method of the printing device provided by the above-mentioned embodiment, and will not be repeated here.

[0172] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the calibration method for a printing device as described above when the computer program is executed by a processor.

[0173] The computer program product provided by the present application can solve the technical problem that the manual recognition method in the related art has large errors, inaccuracies, and low efficiency, which in turn leads to low efficiency of the nozzle calibration of the printing device. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the calibration method of the printing device provided by the above embodiment, and will not be repeated here.

[0174] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A method for calibrating a printing device, characterized in that: The calibration method comprises: Acquire at least one calibration image corresponding to a calibration pattern printed by a print head, wherein the calibration pattern includes a plurality of sub-patterns, and each of the sub-patterns includes at least one line; Extracting line features of lines corresponding to each of the sub-patterns in the at least one calibration image to obtain a line feature set; A calibration value is determined based on the set of line features.

2. The method for calibrating a printing device according to claim 1, wherein: The step of obtaining at least one calibration image corresponding to the calibration pattern printed by the print head comprises: Controlling the print head to print the plurality of sub-patterns in sequence along a preset direction; The image acquisition module is moved along a preset direction, and the image acquisition module is controlled to continuously acquire images of the calibration pattern to obtain the at least one calibration image, each of which includes at least one sub-pattern.

3. The calibration method of a printing device according to claim 1, characterized in that: The step of extracting line features of lines corresponding to each of the sub-patterns in the at least one calibration image to obtain a line feature set comprises: Extracting a target area in the calibration image and a serial number value of the target area, wherein the target area includes one of the sub-patterns; Extracting the line features in each of the target areas, determining the line feature values ​​of each of the target areas, and making correspondence between the line feature values ​​of each of the target areas and each of the number values; If the extraction of each calibration image is completed, the line feature set is generated based on the line feature values ​​and the number values ​​of all target areas.

4. The method for calibrating a printing device according to claim 3, wherein: The step of extracting the target area in the calibration image and the number value of the target area includes: identifying sub-pattern labels in the calibration image; Extracting the target area from the calibration image based on a preset detection frame and calibration type; Based on the position information of the target area and the sub-pattern number, each of the target areas is matched with each of the sub-pattern numbers to obtain the number value corresponding to each of the target areas.

5. The calibration method of a printing device according to claim 4, characterized in that: Before the step of matching each of the target areas with each of the sub-pattern labels based on the position information of the target area and the sub-pattern label to obtain the number value corresponding to each of the target areas, the step of extracting the target area and the number value of the target area in the calibration image further includes: Based on preset prior knowledge, identify and remove abnormal target areas; and / or, If an abnormal sub-pattern label is identified, the abnormal sub-pattern label is corrected according to the sub-pattern label preceding the abnormal sub-pattern label and / or the sub-pattern label following the abnormal sub-pattern label.

6. The calibration method of a printing device according to claim 3, characterized in that: The step of extracting the line features in each of the target areas and determining the line feature values ​​of each of the target areas comprises: Separating the target subject and the background in the target area; Extracting a target bounding rectangular frame based on the target subject; Partitioning the target area based on the target enclosing rectangular frame to obtain a plurality of sub-target areas, and extracting the line features in each of the sub-target areas; The line feature value of the target area is calculated based on the line feature differences in each of the sub-target areas.

7. The calibration method of a printing device according to claim 1, characterized in that: The step of determining the calibration value according to the line feature set comprises: Determine the evaluation strategy based on the calibration type; Each of the line features in the line feature set is evaluated according to the evaluation strategy to obtain a calibration value.

8. The method for calibrating a printing device according to claim 1, wherein: After the step of determining the calibration value according to the line feature set, the method further includes: The printing device is calibrated based on the calibration value.

9. An electronic device, characterized in that: The electronic device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the calibration method for the printing device according to any one of claims 1 to 8.

10. A printing system, characterized in that: The printing system includes a host computer and a printing device; The host computer is used to send a calibration signal to the printing device, and receive a calibration image sent by the printing device, wherein the calibration image includes a calibration pattern, the calibration pattern includes a plurality of sub-patterns, and each of the sub-patterns includes at least one line; Extracting line features of lines corresponding to each of the sub-patterns in the at least one calibration image to obtain a line feature set; determining a calibration value according to the set of line features; sending the calibration value to the printing device; The printing device is used to receive the calibration signal sent by the host computer, control the print head to print the calibration pattern based on the calibration signal; collect at least one calibration image corresponding to the calibration pattern, and send the calibration image to the host computer; receive the calibration value sent by the host computer, and calibrate the printing device according to the calibration value.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the calibration method of the printing device according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Method and equipment for calibrating horizontal distance between different ink group nozzles for Single Pass printing and storage medium

    CN120462029A