Laser printing method, printer and storage medium

By segmenting and splicing laser energy matrix data, the problems of low laser printing efficiency and poor imaging effect compatibility in the prior art are solved, and efficient and clear card printing effect are achieved.

CN119987690APending Publication Date: 2025-05-13TAI LI DE SHI DA YIN JI JIANG MEN YOU XIAN GONG SI
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411853387.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing laser printing technology has problems such as low printing efficiency and poor imaging effect compatibility in card production, and it is difficult to ensure both printing efficiency and image clarity.

Method used

By obtaining the printing template of the medium to be printed, determining the layout position and filling in the data, dividing the task to be printed into multiple subtasks, determining the laser energy matrix data of each subtask, and splicing it into the target laser energy matrix data, realizing one-time printing and imaging.

Benefits of technology

Improves printing efficiency and image clarity, reduces the lack of details caused by mutual interference between printing effect data, and improves the overall printing effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987690A_ABST
    Figure CN119987690A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a laser printing method, a printer and a storage medium. The method comprises the steps that a printing template of a to-be-printed medium is obtained, the layout position of the to-be-printed medium is determined according to the printing template, the printing template is filled with to-be-filled data according to the layout position, and a to-be-printed task is obtained; obtaining printing effect data of the printing template and coordinate information of the printing effect data in the printing template; segmenting the to-be-printed task according to the printing effect data and the coordinate information to obtain a plurality of sub-tasks; for each subtask, determining laser energy matrix data for printing the subtask; splicing the laser energy matrix data of the plurality of sub-tasks to obtain target laser energy matrix data for printing the to-be-printed task; and printing the to-be-printed task in the to-be-printed medium according to the target laser energy matrix data. The embodiment of the invention can improve the printing efficiency and the definition of the printed image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of printing technology, and in particular to a laser printing method, a printer and a storage medium. Background Art

[0002] In the related art, in the process of card production, laser printing can be used to print relevant content on the medium to be printed. Common laser printing methods include single-resolution dot matrix and multi-resolution dot matrix. In the single-resolution dot matrix laser printing method, the laser beam scans the printing material along a set trajectory at a fixed switching frequency and reacts physically or chemically with it. This method is simple to use, the overall imaging effect is unevenly filled, and the edge contour smoothness is poor; in the multi-resolution dot matrix laser printing method, a variety of printing parameters are configured for the printed graphics and printed in multiple times. This method has low production efficiency and poor imaging effect compatibility. At present, it is urgent to propose a printing method that can ensure printing efficiency and print clear images at the same time when producing cards. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to provide a laser printing method, a printer and a storage medium, aiming to improve both the printing efficiency and the clarity of the printed image.

[0004] To achieve the above object, a first aspect of an embodiment of the present application provides a laser printing method, comprising the following steps:

[0005] Acquire a printing template of a medium to be printed, determine a layout position of the medium to be printed according to the printing template, fill the data to be filled into the printing template according to the layout position, and obtain a task to be printed;

[0006] Acquire printing effect data of the printing template and coordinate information of the printing effect data in the printing template;

[0007] Divide the printing task to be printed according to the printing effect data and the coordinate information to obtain a plurality of subtasks;

[0008] For each of the subtasks, determining laser energy matrix data for printing the subtask;

[0009] splicing the laser energy matrix data of the plurality of subtasks to obtain target laser energy matrix data for printing the task to be printed;

[0010] The task to be printed is printed in the medium to be printed according to the target laser energy matrix data.

[0011] In one embodiment, the step of obtaining a printing template for a medium to be printed includes:

[0012] Performing template feature recognition on the medium to be printed to obtain the template feature of the medium to be printed;

[0013] According to the template features, the corresponding printing template is obtained from a preset database.

[0014] In one embodiment, the printing effect data includes image data and text data, the coordinate information includes a first position of the image data and a second position of the text data, and the plurality of subtasks include a first image subtask corresponding to the image data and a first text subtask corresponding to the text data;

[0015] The printing task is divided according to the printing effect data and the coordinate information to obtain a plurality of subtasks, including:

[0016] The task to be printed is divided according to the first position and the second position to obtain the first image subtask and the first text subtask.

[0017] In one embodiment, the printing effect data includes multiple resolutions set for the to-be-printed task, and the coordinate information includes target positions corresponding to multiple resolutions;

[0018] The printing task is divided according to the printing effect data and the coordinate information to obtain a plurality of subtasks, including:

[0019] The task to be printed is divided according to the multiple target positions to obtain multiple subtasks.

[0020] In one embodiment, the plurality of subtasks include a plurality of second text subtasks and a plurality of second image subtasks;

[0021] For each of the subtasks, determining laser energy matrix data for printing the subtask comprises:

[0022] Determine the low-frequency region image and the high-frequency region image in each of the second image subtasks, and perform image smoothing processing on the transition region between the low-frequency region image and the high-frequency region image to obtain each optimized second image subtask;

[0023] For each of the optimized second image subtasks, determining first laser energy matrix data for printing the optimized second image subtasks;

[0024] For each of the second text subtasks, second laser energy matrix data for printing the second text subtask is determined.

[0025] In one embodiment, the laser energy matrix data of the plurality of subtasks are spliced ​​to obtain the target laser energy matrix data for printing the task to be printed, including:

[0026] According to the target positions of the second text subtasks and the target positions of a plurality of the second image subtasks, the first laser energy matrix data and the second laser energy matrix data are spliced ​​to obtain the target laser energy matrix data.

[0027] In one embodiment, determining the laser energy matrix data for printing the subtask includes:

[0028] Determining initial laser energy data for each pixel in the subtask;

[0029] For each pixel point in the subtask, determining laser energy compensation data for each pixel point in the subtask according to the initial laser energy data for each pixel point in an adjacent area;

[0030] The laser energy matrix data of the subtask is determined according to the initial laser energy data and the laser energy compensation data of each pixel point in the subtask.

[0031] In one embodiment, for each pixel point in the subtask, determining the laser energy compensation data of each pixel point in the subtask according to the initial laser energy data of each pixel point in the adjacent area includes:

[0032] Traversing each pixel in the subtask to determine a first adjacent region and a second adjacent region of the current pixel;

[0033] Acquire the initial laser energy data of each first adjacent pixel point in the first adjacent area, and the initial laser energy data of each second adjacent pixel point in the second adjacent area;

[0034] Determine local laser energy compensation data of the current pixel point according to the initial laser energy data of each first adjacent pixel point in the first adjacent area;

[0035] Determine the global laser energy compensation data of the current pixel point according to the initial laser energy data of each second adjacent pixel point in the second adjacent area;

[0036] The laser energy compensation data of the current pixel point is determined according to the local laser energy compensation data and the global laser energy compensation data of the current pixel point.

[0037] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a printer, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.

[0038] To achieve the above-mentioned purpose, a third aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0039] The present application proposes a laser printing method, printer and storage medium, the method comprising: obtaining a printing template of a medium to be printed, determining a layout position of the medium to be printed according to the printing template, filling the data to be filled into the printing template according to the layout position, and obtaining a task to be printed; obtaining printing effect data of the printing template and coordinate information of the printing effect data in the printing template; dividing the task to be printed according to the printing effect data and the coordinate information to obtain a plurality of subtasks; for each of the subtasks, determining laser energy matrix data for printing the subtask; splicing the laser energy matrix data of the plurality of subtasks to obtain target laser energy matrix data for printing the task to be printed; and printing the task to be printed in the medium to be printed according to the target laser energy matrix data. By determining the laser energy matrix data of each subtask, the target laser energy matrix data is obtained according to the laser energy matrix data of each subtask. In this way, printing imaging can be completed at one time when printing the task to be printed, without printing each subtask separately according to the laser energy matrix data of each subtask, thereby improving printing efficiency. On this basis, the task to be printed is divided by printing effect data and coordinate information, and the laser energy matrix data of each subtask is determined separately, so that the subtasks with different printing effect data can convert the laser energy data separately, thereby reducing the mutual interference of printing effect data when converting laser energy data based on the entire task to be printed, resulting in the laser energy matrix data of the task to be printed missing the details of the task to be printed, thereby improving the clarity of the printed image. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a flow chart of a laser printing method provided by an embodiment of the present application;

[0041] Figure 2 yes Figure 1 A flowchart of an embodiment of a sub-step of determining laser energy matrix data of a sub-task in step 140;

[0042] Figure 3 yes Figure 2A flowchart of an embodiment of a sub-step of step 220;

[0043] FIG. 4A to FIG. 4B is a schematic diagram of parameters used to determine local laser energy compensation data provided by an embodiment of the present application;

[0044] FIG. 5A to FIG. 5B is a schematic diagram of parameter changes used to determine global laser energy compensation data provided by an embodiment of the present application;

[0045] Figure 6 yes Figure 1 A flowchart of an embodiment of a sub-step of step 160;

[0046] Figure 7 is a schematic diagram of printing the bending area in step 630 provided in an embodiment of the present application;

[0047] Figure 8 It is a schematic diagram of the hardware structure of the printer provided in the embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0051] In the related art, in the process of card production, laser printing can be used to print relevant content on the medium to be printed. Common laser printing methods include single-resolution dot matrix and multi-resolution dot matrix. In the single-resolution dot matrix laser printing method, the laser beam scans the printing material along a set trajectory at a fixed switching frequency and reacts physically or chemically with it. This method is simple to use, the overall imaging effect is unevenly filled, and the edge contour smoothness is poor; in the multi-resolution dot matrix laser printing method, a variety of etching parameters are configured for the printed graphics and the etching is performed multiple times. This method has low production efficiency and poor imaging effect compatibility. At present, it is urgent to propose a printing method that can ensure printing efficiency and print clear images at the same time when producing cards.

[0052] In order to improve both the printing efficiency and the clarity of the printed image, the embodiments of the present application provide a laser printing method, a printer and a computer-readable storage medium. The method may include: obtaining a printing template of the medium to be printed, determining the layout position of the medium to be printed according to the printing template, filling the data to be filled into the printing template according to the layout position, and obtaining the task to be printed; obtaining the printing effect data of the printing template and the coordinate information of the printing effect data in the printing template; dividing the task to be printed according to the printing effect data and the coordinate information to obtain multiple subtasks; for each subtask, determining the laser energy matrix data for printing the subtask; splicing the laser energy matrix data of multiple subtasks to obtain the target laser energy matrix data for printing the task to be printed; and printing the task to be printed in the medium to be printed according to the target laser energy matrix data. By determining the laser energy matrix data of each subtask, the target laser energy matrix data is obtained according to the laser energy matrix data of each subtask. In this way, printing imaging can be completed at one time when printing the task to be printed, without printing each subtask separately according to the laser energy matrix data of each subtask, thereby improving printing efficiency. On this basis, the task to be printed is divided by printing effect data and coordinate information, and the laser energy matrix data of each subtask is determined separately, so that the subtasks with different printing effect data can convert the laser energy data separately, thereby reducing the mutual interference of printing effect data when converting laser energy data based on the entire task to be printed, resulting in the laser energy matrix data of the task to be printed missing the details of the task to be printed, thereby improving the clarity of the printed image.

[0053] A laser printing method, a printer, and a storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the laser printing method in the embodiments of the present application is described.

[0054] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.

[0055] See also Figure 1 , Figure 1 The process of the laser printing method provided by an embodiment of the present application is shown. In the embodiment of the present application, Figure 1 The laser printing method may include steps 110 to 160.

[0056] Step 110: obtaining a printing template of the medium to be printed, determining the layout position of the medium to be printed according to the printing template, filling the data to be filled into the printing template according to the layout position, and obtaining a task to be printed;

[0057] Step 120: Obtaining printing effect data of the printing template and coordinate information of the printing effect data in the printing template;

[0058] Step 130: Segment the printing task according to the printing effect data and the coordinate information to obtain a plurality of subtasks;

[0059] Step 140: for each subtask, determining laser energy matrix data for printing the subtask;

[0060] Step 150: splicing the laser energy matrix data of multiple subtasks to obtain target laser energy matrix data for printing the task to be printed;

[0061] Step 160: Printing the task to be printed in the medium to be printed according to the target laser energy matrix data.

[0062] In one embodiment, the medium to be printed may be printing paper, a printing ID card, etc., which is not specifically limited here.

[0063] In one embodiment, the printing template of the medium to be printed refers to an image template with a space reserved for filling data. The printing template can call a corresponding template from a preset database according to the selection information of the printer user, or can be done in other ways, which are not specifically limited here.

[0064] In one embodiment, in the process of obtaining the printing template of the medium to be printed, the template feature recognition can be performed on the medium to be printed to obtain the template feature of the medium to be printed, and then the corresponding printing template can be obtained from the preset database according to the template feature. The printing template can be obtained from the preset database according to the template feature, so that the task to be printed can be obtained conveniently by filling the data to be printed, which is conducive to improving the efficiency of forming the task to be printed.

[0065] In one embodiment, the template feature refers to information associated with the template used to indicate the medium to be printed, and the template feature can be one of different types of data such as images and texts, which are not specifically limited here. The template feature can be extracted by the corresponding extraction tool of each feature (for example, text can be extracted using optical character recognition technology (Optical Character Recognition, OCR)), or the required template feature can be directly extracted by a pre-trained template feature recognition model. Among them, the pre-trained template feature recognition model can be obtained by training neural networks such as convolutional neural networks (CNN) and recurrent neural networks (RNN), which are not specifically limited here.

[0066] In one embodiment, in the process of performing template feature recognition on the medium to be printed and obtaining the printing template from the preset database according to the template features obtained by recognition, the medium to be printed may be first scanned and imaged to obtain an image of the medium to be printed, then the image of the medium to be printed may be preprocessed to obtain a processed image, then the processed image may be template feature recognized to obtain the template features of the medium to be printed, then multiple printing templates stored in the preset database may be compared according to the template features to determine the printing template corresponding to the template features. The preprocessing may be denoising, contrast enhancement, etc., which are not specifically limited here.

[0067] In one embodiment, the layout position refers to a set of information used to indicate different printing positions of different types of data in the to-be-filled data on the to-be-printed medium, and the layout position may specifically include the position where each type of data is printed on the to-be-printed medium. The to-be-printed data may include different types of data such as images and texts, which are not specifically limited here.

[0068] In one embodiment, in the process of determining the layout position of the medium to be printed according to the printing template, filling the data to be filled into the printing template according to the layout position, and obtaining the task to be printed, specifically, different positions of different types of data in the medium to be printed in the data to be printed can be determined according to the layout position, then, the positions corresponding to the different positions of the different types of data in the medium to be printed in the printing template are determined, and then, each type of data is filled in the corresponding position in the printing template. Wherein, the task to be printed refers to the image to be printed, which can be a grayscale image or a color image, which is not specifically limited here. For example, the data to be filled includes type A data and type B data, the printing template includes a first filling area and a second filling area, the layout position of the medium to be printed includes a type A data position and a type B data position, the first filling area corresponds to the type A data position, and the second filling area corresponds to the type B data position. For this reason, the type A data can be filled in the first filling area, and the type B data can be filled in the second filling area.

[0069] In one embodiment, printing effect data refers to data required for printing the task to be printed, wherein the printing effect data may include data formed by the data to be filled in the task to be printed, and may also include data such as resolution to determine the image printing quality, etc., which is not specifically limited here.

[0070] In one embodiment, the coordinate information of the printing effect data in the printing template refers to information used to indicate the position of the specific printing effect data in the printing template. For example, if the specific printing effect data is resolution, the printer can determine to print the image at a specific position with a specific resolution according to the coordinate information; if the specific printing effect data is data to be filled, the printer can determine to print the data to be filled at a specific position according to the coordinate information.

[0071] In one embodiment, in the process of dividing the task to be printed according to the printing effect data and the coordinate information to obtain subtasks, the area of ​​each specific printing effect data in the task to be printed can be determined according to the coordinate information of each specific printing effect data, and then the area of ​​each specific printing effect data in the task to be printed is divided to obtain multiple subtasks. The subtask refers to a regional image in the image to be printed.

[0072] In one embodiment, the printing effect data may include image data and text data, the coordinate information includes a first position of the image data and a second position of the text data, and the multiple subtasks may include a first image subtask corresponding to the image data and a text subtask corresponding to the text data. In the process of segmenting the task to be printed according to the printing effect data and the coordinate information to obtain multiple subtasks, the task to be printed may be segmented according to the first position and the second position to obtain a first image subtask and a first text subtask. The image data refers to the data of a specific image as a whole (such as a portrait) to be printed on the medium to be printed in the task to be printed; the text data refers to the data of a specific text (such as a word, a sentence, a number, etc.) to be printed on the medium to be printed in the task to be printed. In addition, the first image subtask refers to the specific image as a whole formed by the image data in the task to be printed; and the first text subtask refers to the specific text formed by the text data in the task to be printed. For example, the image data of a portrait, the image data of a verification code, etc. may all be the image data. In addition, the image data and the text data may be one or more, and in the case where the image data or the text data are multiple, the multiple image data may be different types of image data, which is not specifically limited here. It should be noted that, for the sake of convenience, the following embodiments are described by taking the case where both image data and text data are one as an example. When there are multiple image data or text data, each image data or text data can be executed with reference to the following embodiments, and no further description is given here.

[0073] By segmenting at the first position and the second position, the first image subtask and the first text subtask can be accurately segmented from the task to be printed, so that the image information and text information can be obtained relatively completely from the task to be printed, which helps the subsequent laser energy data conversion process to obtain accurate laser energy matrix data based on the image information and text information, thereby improving the consistency between the printing effect and the image to be printed.

[0074] In one embodiment, the printing effect data includes multiple resolutions set for the task to be printed, and the coordinate information includes target positions corresponding to the multiple resolutions. In the process of dividing the task to be printed according to the printing effect data and the coordinate information to obtain multiple subtasks, the task to be printed can be divided according to multiple target positions to obtain multiple subtasks. The target position refers to a position used to indicate an image area with a specific resolution in the task to be printed.

[0075] By segmenting at each target position, multiple subtasks can be accurately segmented from the task to be printed, so that regional information of different resolutions can be obtained from the task to be printed more completely, which helps the subsequent laser energy data conversion process to obtain accurate laser energy matrix data based on regional information of different resolutions, thereby improving the consistency between the printing effect and the image to be printed.

[0076] In one embodiment, for each subtask, determining the laser energy matrix data for printing the subtask means first determining the laser energy data corresponding to each pixel in each subtask, and then obtaining the laser energy matrix data of each subtask according to the laser energy data corresponding to each pixel in each subtask. The conversion relationship between each pixel and the laser energy data can be determined by a preset formula (such as a conversion formula between a gray value or an RGB value and the laser energy data), a preset table, etc., which is not specifically limited here.

[0077] In one embodiment, the plurality of subtasks may include a plurality of second text subtasks and a plurality of second image subtasks. In the process of determining the laser energy matrix data for printing the subtask for each subtask, the low-frequency region image and the high-frequency region image in the second image subtask may be determined first, and the transition region between the low-frequency region image and the high-frequency region image may be image smoothed to obtain an optimized second image, and then, for each optimized second image subtask, the first laser energy matrix data for printing the optimized second image subtask may be determined, and then, for each second text subtask, the second laser energy matrix data for printing the second text subtask may be determined.

[0078] Among them, the second image subtask refers to a regional image with partial content of a specific image data. For example, for a portrait, the portrait can be divided into multiple regional images according to multiple target positions. The regional image here is the second image subtask, which contains partial content of a portrait; the second text subtask refers to a regional image with partial content of a specific text data. For example, for a number, the number can be divided into multiple regional images (such as a part of a number) according to multiple target positions. The regional image here is the second text subtask, which contains partial content of a text. In addition, each second image subtask can be processed with the same smoothing precision or with different smoothing precision, which is not specifically limited here. By smoothing the transition areas in the second image subtasks of different resolutions, the image details displayed by the second image subtasks of different resolutions can be more delicate. In this way, the consistency of subtasks with different resolutions during printing can be improved, so that the printed image can be more realistic and delicate.

[0079] In one embodiment, the low-frequency region image refers to a region image in the second image subtask, where the grayscale value of the image changes relatively slowly, for example, a face region image, a skin region image, etc., where the color changes of these region images are relatively slow. Among them, the low-frequency region image obtained in the embodiment of the present application can be one or more, which is not specifically limited here. For the convenience of description, the following embodiments are described by taking one low-frequency region image as an example. When there are multiple low-frequency region images, each low-frequency region image can be executed with reference to the following embodiment, which is not repeated here.

[0080] In one embodiment, the high-frequency regional image refers to the regional image in which the grayscale value of the image in the second image subtask changes relatively dramatically, for example, the regional image where the skin area and the clothing area meet, the regional image where different colors on the clothing meet, etc., the color changes of these regional images are relatively dramatic. Among them, the high-frequency regional image obtained in the embodiment of the present application can be one or more, which is not specifically limited here. For the convenience of description, the following embodiments are described by taking one high-frequency regional image as an example. When there are multiple high-frequency regional images, each high-frequency regional image can be executed with reference to the following embodiment, which is not repeated here.

[0081] In one embodiment, in the process of performing image smoothing on the transition area between the low-frequency area image and the high-frequency area image, the transition area can be filtered by one of the filtering algorithms such as Gaussian filtering and median filtering, so that the high-frequency area image can smoothly transition to the low-frequency area image.

[0082] In one embodiment, for each second image subtask, in the process of determining the low-frequency region image and the high-frequency region image in each second image subtask, and performing image smoothing processing on the transition region between the low-frequency region image and the high-frequency region image to obtain each optimized second image subtask, specifically, the image subtask can be pre-processed first to obtain a grayscale image, then, the gradient value of the grayscale image is calculated according to the grayscale value of each pixel of the grayscale image, then, the grayscale image is divided into regions according to a preset gradient threshold and gradient value to obtain a low-frequency region image and a high-frequency region image, then, according to the change of the gradient value between the low-frequency region image and the high-frequency region image, a transition region is determined, then, the grayscale values ​​of all pixels in the transition region are averaged to obtain an average grayscale value of the pixel, then, the grayscale value of the pixel is updated to the average grayscale value to obtain a processed pixel, then, the processed pixel, the pixel of the low-frequency region image, and the pixel of the high-frequency region image are combined to obtain an optimized second image subtask. Through the gradient value and the preset gradient threshold, the low-frequency area image and the high-frequency area image in the regional image can be accurately identified, so that the transition area can be accurately identified. On this basis, by updating the grayscale values ​​of all pixels in the transition area to the grayscale values ​​of all pixels in the transition area, the grayscale distribution consistency in the transition area can be improved, eliminating the grayscale unevenness in the transition area, so that the optimized second image subtask can be more delicate.

[0083] In one embodiment, determining the first laser energy matrix data for printing the optimized second image subtask refers to first converting each pixel in the optimized second image subtask into laser energy data, and then determining the first laser energy matrix data based on the laser energy data of each pixel in the optimized second image subtask.

[0084] In one embodiment, determining the second laser energy matrix data for printing the second text subtask refers to first converting each pixel in the printing second text subtask into laser energy data, and then determining the second laser energy matrix data based on the laser energy data of each pixel in the second text subtask.

[0085] In one embodiment, before determining the second laser energy matrix data for printing the second text subtask, the second text subtask can be preprocessed so that the level of detail of the second text subtask can be improved, thereby enabling the process of determining the second laser energy matrix data to perform more delicate laser energy data conversion.

[0086] In one embodiment, in the process of determining any laser energy matrix data, the laser energy data corresponding to each pixel in a specific subtask (one of the second image subtask or the second text subtask) can be determined according to the energy mapping table, and then the laser energy matrix data of the specific subtask can be determined according to the laser energy data corresponding to each pixel in the specific subtask. Among them, the energy mapping table can record the mapping relationship between the RGB value of the pixel and the laser energy data, and can also record the mapping relationship between the gray value of the pixel and the laser energy data, etc., which is not specifically limited here. Compared with the method of determining the first and second laser energy matrix data using a preset formula, determining the first and second laser energy matrix data through the energy mapping table can better reduce the amount of calculation of laser energy data conversion, thereby improving the efficiency of determining the first and second laser energy matrix data.

[0087] In one embodiment, for a case where multiple subtasks include a first image subtask and a first text subtask, in the process of determining the laser energy matrix data for printing the subtask for each subtask, specifically, the third laser energy matrix data for printing the first image subtask and the fourth laser energy matrix data for printing the first text subtask can be determined.

[0088] In one embodiment, splicing the laser energy matrix data of multiple subtasks to obtain the target laser energy matrix data for printing the task to be printed refers to the operation of synthesizing the laser energy matrix data of each subtask into the target laser energy matrix data according to the position of each subtask in the task to be printed. Among them, in the target laser energy matrix data, the position of the laser energy matrix data of each subtask in the target laser energy matrix data corresponds to the position of each subtask image in the task to be printed. In addition, in the synthesis process, the laser energy matrix data of each subtask can be synthesized according to the original data, or can be synthesized according to the weight coefficient of each subtask, etc., which is not specifically limited here.

[0089] In one embodiment, in the process of splicing the laser energy matrix data of multiple subtasks to obtain the target laser energy matrix data for printing the task to be printed, the first laser energy matrix data and the second laser energy matrix data can be spliced ​​according to the target positions of the second text subtasks and the target positions of the multiple second image subtasks to obtain the target laser energy matrix data.

[0090] In one embodiment, in the process of splicing each first laser energy matrix data and each second laser energy matrix data according to the target positions of each second text subtask and the target positions of multiple second image subtasks to obtain the target laser energy matrix data, specifically, the initial laser energy matrix data corresponding to the printing template can be first obtained, then, the position mapping relationship between the task to be printed and the initial energy matrix data is determined, and then, according to the position mapping relationship, each target position in the task to be printed is converted into a target matrix position in the initial laser energy matrix data, and then, the initial laser energy data in each target matrix position is replaced with each first laser energy matrix data or second laser energy matrix data.

[0091] By performing data splicing at each target position, multiple first laser energy matrix data and multiple second laser energy matrix data can be accurately spliced ​​into the initial laser energy matrix data, so that the multiple first laser energy matrix data and multiple second laser energy matrix data can be associated with the information of each target position through the target laser energy matrix data, which helps the printing process to accurately print out multiple second image subtasks and multiple second text subtasks in the medium to be printed according to each target position, thereby improving the consistency between the printing effect and the image to be printed.

[0092] In one embodiment, for a case where multiple subtasks include a first image subtask and a first text subtask, in the process of determining the laser energy matrix data for printing the subtask for each subtask, specifically, the initial laser energy matrix data corresponding to the printing template can be first obtained, then the position mapping relationship between the task to be printed and the initial energy matrix data can be determined, and then, according to the position mapping relationship, the first position and the second position in the task to be printed are correspondingly converted into the first matrix position and the second matrix position in the initial laser energy matrix data, and then, the initial laser energy data in the first matrix position is correspondingly replaced with the third laser energy matrix data, and the initial laser energy data in the second matrix position is correspondingly replaced with the fourth laser energy matrix data.

[0093] See also Figure 2 , Figure 2 Shows Figure 1 The process of a sub-step embodiment of determining the laser energy matrix data of a sub-task in step 140, in one embodiment, the process of determining the laser energy matrix data of a sub-task may include the following steps.

[0094] Step 210: determining initial laser energy data for each pixel in the subtask;

[0095] Step 220: for each pixel point in the subtask, according to the initial laser energy data of each pixel point in the adjacent area, determine the laser energy compensation data of each pixel point in the subtask;

[0096] Step 230: Determine the portrait laser energy matrix data according to the initial laser energy data and laser energy compensation data of each pixel point in the subtask.

[0097] In one embodiment, the initial laser energy data may be determined by a preset conversion formula, an energy mapping table, etc., which is not specifically limited here.

[0098] In one embodiment, the adjacent regions may be regions on both sides of a pixel, or regions on both sides of a region to which the pixel belongs, etc., which are not specifically limited here. The sizes of the adjacent regions on both sides may be the same or different, which are not specifically limited here.

[0099] In one embodiment, when the adjacent areas are the two side areas for a pixel point, the laser energy compensation data of the pixel point can be determined by the sum of the initial laser energy data of all the pixels in each side area and the coefficient of each side area, or the laser energy compensation data of the pixel point can be determined by the maximum initial laser energy data in each side area and the coefficient of each side area, and so on, which is not specifically limited here.

[0100] In one embodiment, when the adjacent areas are the areas on both sides of the area to which the pixel point belongs, the laser energy compensation data can be determined by one of the specific methods such as the sum of the initial laser energy data of all the pixels in each side area, or the laser energy compensation data of the area to which the pixel point belongs is determined by the maximum initial laser energy data in each side area, and then this laser energy compensation data is used as the laser energy compensation data of each pixel point in the area to which the pixel point belongs.

[0101] In one embodiment, determining laser energy matrix data according to initial laser energy data and laser energy compensation data of each pixel in a subtask refers to a process of first summing the initial laser energy data and laser energy compensation data of each pixel in the subtask to obtain target laser energy data of each pixel in the subtask, and then obtaining laser energy matrix data according to the target laser energy data of each pixel in the subtask. The summing according to the initial laser energy data and the laser energy compensation data may be based on the summing of the original data or the summing of the original data and coefficients, which is not specifically limited here.

[0102] The laser energy compensation data is used to compensate the initial laser energy data of each pixel after the grayscale conversion of the printing task. In this way, the printing texture of the image can be improved during printing, thereby improving the quality of the printed image and helping to make the printed image more realistic.

[0103] It should be noted that Figure 2 The step flow shown in the figure can be applied in a scenario where the multiple subtasks include a first image subtask and a first text subtask, and can also be applied in a scenario where the multiple subtasks include a second image subtask and a second text subtask.

[0104] See also Figure 3 , Figure 3 Shows Figure 2 In the process of a sub-step embodiment of step 220, in one embodiment, step 220 may include the following steps.

[0105] Step 310: traverse each pixel in the subtask to determine the first adjacent area and the second adjacent area of ​​the current pixel;

[0106] Step 320: Acquire initial laser energy data of each first adjacent pixel point in the first adjacent area, and initial laser energy data of each second adjacent pixel point in the second adjacent area;

[0107] Step 330: determining local laser energy compensation data of the current pixel point according to the initial laser energy data of each first adjacent pixel point in the first adjacent area;

[0108] Step 340: determining global laser energy compensation data of the current pixel point according to the initial laser energy data of each second adjacent pixel point in the second adjacent area;

[0109] Step 350: Determine the laser energy compensation data of the current pixel point according to the local laser energy compensation data and the global laser energy compensation data of the current pixel point.

[0110] In one embodiment, the first adjacent region refers to an image region including the current pixel and adjacent pixels of the current pixel, and the second adjacent region refers to an adjacent region of the image region to which the current pixel belongs. The image region to which the current pixel belongs may be the first adjacent region or may not be the first adjacent region, which is not specifically limited here.

[0111] In one embodiment, determining the local laser energy compensation data of the current pixel point according to the initial laser energy data of each first adjacent pixel point in the first adjacent area refers to performing data calculation according to the initial laser energy data of the adjacent pixel points of the current pixel point (that is, the first adjacent pixel points) in the first adjacent area to obtain the local laser energy compensation data of the current pixel point relative to the first adjacent area. The data calculation for the first adjacent area may be summing up the initial laser energy data, taking the maximum value, etc., which is not specifically limited here.

[0112] In one embodiment, in the process of determining the local laser energy compensation data of the current pixel point based on the initial laser energy data of each first-adjacent pixel point in the first adjacent area, specifically, the position of each first-adjacent pixel point in the first adjacent area relative to the current pixel point can be determined first, and then, based on the position of each first-adjacent pixel point relative to the current pixel point, the first compensation coefficient of each first-adjacent pixel point can be determined, and then, the first data difference between the initial laser energy data of the current pixel point and the initial laser energy data of each first-adjacent pixel point can be determined, and then, the local laser energy compensation data can be determined based on the first data difference and the first compensation coefficient of each first-adjacent pixel point.

[0113] By determining the local laser energy compensation data according to the first data difference and the first compensation coefficient of each first adjacent pixel point, the situation in which the printing effect is affected by the local energy unevenness can be reduced during the printing process, so that the printing effect can be closer to the image to be printed. In addition, by performing local compensation on the initial laser energy data of each pixel point, the energy of the laser beam used for printing can be made more accurate, so that the printing effect can have a gradient color block effect close to the light and dark interlacing of pencil sketches and smooth and natural.

[0114] The specific process of determining local laser energy compensation data is explained below using a specific example.

[0115] See also Figure 4A and Figure 4B , Figure 4A The current initial laser energy data of each pixel in the first adjacent area is shown, X represents the initial laser energy data of the current pixel point, and the others are the initial laser energy data of each first adjacent pixel point; Figure 4B Shows Figure 4A Specifically, when it is necessary to calculate the local laser energy compensation data of the current pixel, first, according to the position of each first adjacent pixel relative to the current pixel, Figure 4BThe first compensation coefficient of each first adjacent pixel point is determined in the table shown, and then the first data difference between the initial laser energy data of the current pixel point and the initial laser energy data of each first adjacent pixel point is determined. Then, referring to the following formula (1), the local laser energy compensation data Y1 is determined according to the first data difference and the first compensation coefficient of each first adjacent pixel point.

[0116] Y1=(X-XL1)*Kxl1+(X-XL2)*Kxl2+(X-XR1)*Kxr1+(X-XR2)*Kxr2+(X-XB1)*Kxb1+(X-XB1L1)*Kxb1l1+(X-XB1 L2)*Kxb1l2+(X-XB1R1)*Kxb1r1+(X-XB1R2)*Kxb1r2+(X-XB2)*Kxb2+(X-XB2L1)*Kxb2l1+(X-XB2R1)*Kxb2r1 (1).

[0117] In one embodiment, determining the global laser energy compensation data of the current pixel point based on the initial laser energy data of each second adjacent pixel point in the second adjacent area means first performing data calculation based on the initial laser energy data of each second adjacent pixel point in the second adjacent area adjacent to the area to which the current pixel point belongs, obtaining the global laser energy compensation data of the area to which the current pixel point belongs, and then determining the global laser energy compensation data of each pixel point in the area to which the current pixel point belongs based on the global laser energy compensation data of the area to which the current pixel point belongs. The data calculation for the second adjacent area may be summing up the initial laser energy data, taking the maximum value, etc., which is not specifically limited here. The area to which the current pixel point belongs is the same size as the adjacent second adjacent area.

[0118] In one embodiment, in the process of determining the global laser energy compensation data of the current pixel point based on the initial laser energy data of each second adjacent pixel point in the second adjacent area, specifically, all the pixel points in the subtask can be divided into regions according to a preset region size to obtain a plurality of global compensation calculation regions, and then, for the plurality of global compensation calculation regions located in the first row, the initial laser energy data of all the pixel points in each global compensation calculation region are summed to obtain the sum of the laser energy data of each global compensation calculation region located in the first row, and then, starting from the global compensation calculation region in the second row, for each global compensation calculation region located in the same row, the sum of the laser energy data of the current global compensation calculation region is determined based on the preset second compensation coefficient and the current sum of the laser energy data of the global compensation calculation region in the previous row and the global compensation calculation region located in the same column as the current global compensation calculation region. After calculating the sum of laser energy data of each global compensation calculation area in the last row, the global laser energy compensation data of the global compensation calculation area to which the current pixel belongs is determined according to the sum of the current laser energy data of each global compensation calculation area, the preset third compensation coefficient, the second data difference between the sum of the current laser energy data of each global compensation calculation area and the sum of the current laser energy data of the two second adjacent areas adjacent to the front and the back, and the preset fourth compensation coefficient, and then the global laser energy compensation data of the global compensation calculation area to which the current pixel belongs is used as the global laser energy compensation data of each pixel in the global compensation calculation area to which the current pixel belongs. The global compensation calculation area divided in determining the global laser energy compensation data of the current pixel will not be applied to the process of determining the local laser energy compensation data of the current pixel.

[0119] By calculating the global laser energy compensation, the spot superposition effect brought by the energy of the printing spot of the current pixel point on a part of the printing spot of the previous row of pixels can be reduced, thereby reducing the situation where the printing spot of the previous row of pixels is over-etched by the laser used by the printing spot of the current pixel point, thereby making the printed image more delicate and realistic.

[0120] The specific process of determining the global laser energy compensation data is explained below using a specific example.

[0121] See also Figure 5A and Figure 5B , we can first divide all pixels in the subtask into regions according to the preset region size, and obtain Figure 5A The multiple global compensation calculation areas shown (i.e. Figure 5AThen, for the multiple global compensation calculation areas located in the first row, the initial laser energy data of all pixels in each global compensation calculation area are summed to obtain the laser energy data and L1Q (Q = 1, 2, 3 ...) of each global compensation calculation area located in the first row. Then, as Figure 5B , refer to formula (2) starting from the second row, for each global compensation calculation area located in the same row, according to the preset second compensation coefficient kl3, and the current laser energy data and L(N-1)Q (N=2,3...) of the global compensation calculation area in the previous row and the same column as the current global compensation calculation area, determine the laser energy data and LNQ of the current global compensation calculation area, and then refer to formula (3) to determine the global laser energy compensation data Y2 of the global compensation calculation area to which the current pixel belongs according to the current laser energy data and LNQ of each global compensation calculation area, the preset third compensation coefficient kl1, the second data difference between the current laser energy data and LNQ of each global compensation calculation area and the current laser energy data and of the two second adjacent areas in front and behind, and the preset fourth compensation coefficient kl2, and then use the global laser energy compensation data Y2 of the global compensation calculation area to which the current pixel belongs as the global laser energy compensation data of each pixel in the global compensation calculation area to which the current pixel belongs.

[0122] LNQ=kl3*L(N-1)Q, N=2,3……, Q=1,2,3…… (2);

[0123] Y2=LNQ*Kl1+(LNQ-L(N-1)Q)*Kl2+(LNQ-L(N+1)Q)*Kl2, N=2,3..., Q=1,2,3... (3).

[0124] In one embodiment, the laser energy compensation data of the current pixel point is determined based on the local laser energy compensation data and the global laser energy compensation data of the current pixel point. Specifically, the laser energy compensation data can be obtained by summing the original data of the local laser energy compensation data and the global laser energy compensation data. The laser energy compensation data can also be obtained by summing the product of the local laser energy compensation data and its corresponding coefficient and the product of the global laser energy compensation data and its corresponding coefficient. The laser energy compensation data can also be obtained by taking the maximum value of the local laser energy compensation data and the global laser energy compensation data, and so on. No specific limitation is made here.

[0125] It should be noted that Figure 3 The step flow shown in the figure can be applied in a scenario where the multiple subtasks include a first image subtask and a first text subtask, and can also be applied in a scenario where the multiple subtasks include a second image subtask and a second text subtask.

[0126] See also Figure 6 , Figure 6 Shows Figure 1 In the process of a sub-step embodiment of step 160, in one embodiment, step 160 may include the following steps.

[0127] Step 610: Determine the bending area in the task to be printed;

[0128] Step 620: determining frequency conversion information of the bending area according to the data corresponding to the bending area in the target laser energy matrix data;

[0129] Step 630: Print the bending area according to the bending area frequency conversion information and the corresponding data in the target laser energy matrix data.

[0130] In one embodiment, the bending area refers to the bending edge of a part of the image of the task to be printed. For example, a subtask of the task to be printed includes a portrait, and the portrait has hair as the edge of the portrait, and the edge formed by the curved hair in the hair as the edge of the portrait is the bending area. The bending area can be one or more, which is not specifically limited here. For the convenience of description, one bending area is taken as an example below. The embodiments of multiple bending areas can refer to the embodiments below, which are not repeated here.

[0131] In one embodiment, when printing an image, in addition to the target laser energy matrix data, the laser printer also needs printing configuration parameters, and the printing configuration parameters include the motor frequency parameters of the optical reflective lens motor used to drive the laser beam to move. Determining the frequency conversion information of the bending area according to the data corresponding to the bending area in the target laser energy matrix data refers to determining the motor frequency parameters required for this part of the data according to the data corresponding to the bending area in the target laser energy matrix data, and then reducing the frequency of this part of the motor frequency parameters to obtain the operation of indicating the reduction of the motor frequency parameters in the bending area. Among them, the frequency conversion information can indicate that the motor frequency parameters are reduced by a fixed value in the bending area, or it can indicate that the motor frequency parameters are gradually reduced in the bending area, etc., which are not specifically limited here.

[0132] The specific process of step 630 is described below with a specific example.

[0133] See also Figure 7 , Figure 7The edge line ACB of a subtask is shown. Assuming that the motor frequency parameter of the optical reflective lens motor is F1 frequency when printing a straight line, the frequency conversion information indicates that the motor frequency parameter of the optical reflective lens motor needs to be reduced from F1 frequency to F2 frequency when printing a curved area. Then, when printing line AC, the optical reflective lens motor moves according to the F1 frequency, and when reaching point C, the F1 frequency is reduced to F2 frequency, and line CB is printed according to the F2 frequency.

[0134] By determining the frequency conversion information of the bending area and printing the bending area according to the frequency conversion information of the bending area and the corresponding data in the target laser energy matrix data, the optical reflective lens motor can be moved according to lower motor frequency parameters when printing the bending area, thereby reducing the understeering caused by the optical reflective lens motor using higher motor frequency parameters to drive the laser beam when moving in the bending area, which helps to improve the printing effect.

[0135] The following is a specific application scenario in card production.

[0136] First, a printing template of a card to be printed is obtained, and the layout position of data / content such as images and texts to be printed on the card to be printed is determined according to the printing template of the card to be printed. Then, the data / content to be filled is filled into the printing template according to the layout position to obtain a card task to be printed. Then, a regional layout such as image or text data or a task to be printed in the printing template is obtained, which includes multiple regions, printing effect data such as resolution data corresponding to each region, and coordinate information corresponding to the printing effect data in the printing template. Then, the card task to be printed is segmented according to the printing effect data and the coordinate information to obtain multiple card sub-regions, which are the specific forms of sub-tasks after the card task to be printed is segmented. Then, for each card sub-region, laser energy matrix data for printing the card sub-region is determined, and then the laser energy matrix data of multiple card sub-regions are spliced ​​to obtain target laser energy matrix data for printing the card task to be printed. Then, the card is printed in the card to be printed according to the target laser energy matrix data.

[0137] With reference to this specific application scenario, this specific application scenario can be combined with the above-mentioned multiple embodiments to form multiple different specific application scenarios, which will not be described in detail here.

[0138] An embodiment of the present application further provides a printer, which includes a memory and a processor, wherein the memory stores a computer program, and the above-mentioned laser printing method is implemented when the processor executes the computer program.

[0139] See also Figure 8 , Figure 8The hardware structure of a printer of another embodiment is shown, and the printer 800 includes:

[0140] The processor 801 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0141] The memory 802 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 802 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 802, and the processor 801 calls and executes the laser printing method of the embodiment of this application;

[0142] Input / output interface 803, used to implement information input and output;

[0143] The communication interface 804 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0144] A bus 805 that transmits information between the various components of the device (e.g., the processor 801, the memory 802, the input / output interface 803, and the communication interface 804);

[0145] The processor 801 , the memory 802 , the input / output interface 803 and the communication interface 804 are connected to each other in communication within the device via a bus 805 .

[0146] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned laser printing method is implemented.

[0147] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0148] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0149] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0150] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0151] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0152] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0153] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0154] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0155] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0156] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0157] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0158] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A laser printing method, characterized in that: The following steps are involved: Acquire a printing template of a medium to be printed, determine a layout position of the medium to be printed according to the printing template, fill the data to be filled into the printing template according to the layout position, and obtain a task to be printed; Acquire printing effect data of the printing template and coordinate information of the printing effect data in the printing template; Dividing the printing task to be printed according to the printing effect data and the coordinate information to obtain a plurality of subtasks; For each of the subtasks, determining laser energy matrix data for printing the subtask; splicing the laser energy matrix data of the plurality of subtasks to obtain target laser energy matrix data for printing the task to be printed; The task to be printed is printed in the medium to be printed according to the target laser energy matrix data.

2. The method according to claim 1, characterized in that The step of obtaining a printing template for a medium to be printed includes: Performing template feature recognition on the medium to be printed to obtain the template feature of the medium to be printed; According to the template features, the corresponding printing template is obtained from a preset database.

3. The method according to claim 1, characterized in that: The printing effect data includes image data and text data, the coordinate information includes a first position of the image data and a second position of the text data, and the plurality of subtasks include a first image subtask corresponding to the image data and a first text subtask corresponding to the text data; The printing task is divided according to the printing effect data and the coordinate information to obtain a plurality of subtasks, including: The to-be-printed task is segmented according to the first position and the second position to obtain the first image subtask and the first text subtask.

4. The method according to claim 1, characterized in that The printing effect data includes a plurality of resolutions set for the task to be printed, and the coordinate information includes a plurality of target positions corresponding to the resolutions; The printing task is divided according to the printing effect data and the coordinate information to obtain a plurality of subtasks, including: The task to be printed is divided according to the multiple target positions to obtain multiple subtasks.

5. The method according to claim 4, characterized in that The plurality of subtasks include a plurality of second text subtasks and a plurality of second image subtasks; For each of the subtasks, determining laser energy matrix data for printing the subtask comprises: Determine the low-frequency region image and the high-frequency region image in each of the second image subtasks, and perform image smoothing processing on the transition region between the low-frequency region image and the high-frequency region image to obtain each optimized second image subtask; For each of the optimized second image subtasks, determining first laser energy matrix data for printing the optimized second image subtasks; For each of the second text subtasks, second laser energy matrix data for printing the second text subtask is determined.

6. The method according to claim 5, characterized in that The step of splicing the laser energy matrix data of the plurality of subtasks to obtain the target laser energy matrix data for printing the task to be printed includes: According to the target positions of the second text subtasks and the target positions of the second image subtasks, the first laser energy matrix data and the second laser energy matrix data are spliced ​​to obtain the target laser energy matrix data.

7. The method according to claim 1, characterized in that The step of determining laser energy matrix data for printing the subtask comprises: Determining initial laser energy data for each pixel in the subtask; For each pixel point in the subtask, determining laser energy compensation data for each pixel point in the subtask according to the initial laser energy data for each pixel point in an adjacent area; The laser energy matrix data of the subtask is determined according to the initial laser energy data and the laser energy compensation data of each pixel point in the subtask.

8. The method according to claim 7, characterized in that The step of determining, for each pixel point in the subtask, laser energy compensation data for each pixel point in the subtask according to the initial laser energy data for each pixel point in an adjacent area, comprises: Traversing each pixel in the subtask to determine a first adjacent region and a second adjacent region of the current pixel; Acquire the initial laser energy data of each first adjacent pixel point in the first adjacent area, and the initial laser energy data of each second adjacent pixel point in the second adjacent area; Determine local laser energy compensation data of the current pixel point according to the initial laser energy data of each first adjacent pixel point in the first adjacent area; Determine the global laser energy compensation data of the current pixel point according to the initial laser energy data of each second adjacent pixel point in the second adjacent area; The laser energy compensation data of the current pixel point is determined according to the local laser energy compensation data and the global laser energy compensation data of the current pixel point.

9. A printer, characterized in that: The printer comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Laser marking method, system and equipment and storage medium

    CN112692440A

  • Laser marking method and device, terminal equipment and storage medium

    CN117245225A

  • Seamless splicing large-format digital printing method and system

    CN118819434A

  • Laser printing method, laser printer and storage medium

    CN119937946A

  • Program generation method and information processing device

    JP2014069223A