Data processing method, device and equipment for variable image printing and storage medium

By dividing the data of the image to be printed into invariant and variable parts, applying appropriate halftone processing and data types to each part, and optimizing the boundary transition using an error diffusion algorithm, the problems of long processing time and resource waste in existing technologies are solved, thus achieving efficient image printing.

CN116339649BActive Publication Date: 2026-01-06SHENZHEN HOSONSOFT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111603517.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2026-01-06
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

Existing technologies suffer from long processing times and significant waste of storage resources when handling printing tasks with partially variable images.

Method used

The data of the image to be printed is divided into invariant and variable parts, and different halftone processing methods and data types are used to process them respectively. The boundary transition is optimized by using an error diffusion algorithm.

Benefits of technology

It effectively shortens data processing time, saves storage resources, and ensures image printing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116339649B_ABST
    Figure CN116339649B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of printing, and provides a data processing method, device and equipment for variable image printing and a storage medium. The data processing method for variable image printing comprises the following steps: S1, acquiring first image data of a to-be-printed image, wherein the first image data corresponds to a non-variable part of the to-be-printed image; S2, processing the first image data by using a first halftone processing method to obtain first processing data represented by a first data type; S3, acquiring second image data of the to-be-printed image, wherein the second image data corresponds to a variable part of the to-be-printed image; and S4, processing the second image data by using a second halftone processing method to obtain second processing data represented by a second data type. The present application also comprises a device, equipment and storage medium for executing the above method. The present application can save system storage resources and shorten data processing time when printing a printing task with partial image variation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of inkjet printing technology, and in particular to a data processing method, apparatus, device, and storage medium for variable image printing. Background Technology

[0002] Inkjet printing refers to the process of ejecting ink droplets from nozzles on a printhead onto a printing medium to produce images or text. In some printing scenarios, it's necessary to print multiple copies of different images, but only a portion of these images differs, while the rest remains the same. For example, printing labels or QR codes on images with a color background; in these scenarios, the printed label or QR code portion is the changing image, while the background image remains constant. Inkjet printing often performs halftone processing on the image data to obtain a specific type of bit data, such as 2-bit (corresponding to four ink dot types: empty dot, small dot, medium dot, and large dot) or 1-bit (corresponding to two ink dot types: empty dot and non-empty dot). Currently, for printing scenarios with variable images, 2-bit halftone processing is often used to obtain 2-bit data. However, since the variable parts of the image are often different, processing each variable image as 2-bit data results in excessively long processing times and significant waste of system resources. Summary of the Invention

[0003] In view of this, the present invention provides a data processing method, apparatus, device and storage medium for variable image printing, in order to solve the technical problems of long processing time and serious waste of storage resources in the prior art when processing printing tasks with partially variable images.

[0004] In a first aspect, the present invention provides a data processing method for variable image printing, the method comprising the following steps:

[0005] S1: Obtain the first image data of the image to be printed, wherein the first image data is the image data corresponding to the non-changing part of the image to be printed;

[0006] S2: The first image data is processed using the first halftone processing method to obtain first processed data represented by the first data type;

[0007] S3: Obtain the second image data of the image to be printed, wherein the second image data is the image data corresponding to the changed part in the image to be printed;

[0008] S4: Process the second image data using the second halftone processing method to obtain the second processed data represented by the second data type.

[0009] Preferably, the first image data and the second image data consist of a plurality of sub-data that correspond one-to-one with the pixels of the image to be printed. In step S2: processing the first image data using a first halftone processing method to obtain first processed data represented by a first data type, the sub-data of the first image data are processed one by one according to the processing order. The method for processing any one of the sub-data further includes the following steps:

[0010] S21: Obtain the data conversion error value received for this sub-data;

[0011] S22: Perform error diffusion processing on the sub-data based on the data conversion error value;

[0012] S23: Convert the sub-data that has undergone error diffusion processing into data represented by a first data type, and determine the data conversion error value to be received by the adjacent pixels that have undergone error diffusion processing and the sub-data corresponding to the adjacent pixels based on the data conversion error generated by the sub-data conversion. The adjacent pixels are pixels that are adjacent to the pixel position corresponding to the sub-data.

[0013] Preferably, step S23: converting the sub-data that has undergone error diffusion processing into data represented by a first data type, and determining the required data conversion error value for each pixel that has received error diffusion processing and the sub-data corresponding to each pixel based on the data conversion error generated by the sub-data conversion, wherein the adjacent pixels are pixels adjacent to the pixel position corresponding to the sub-data, further includes the following steps:

[0014] S231: Obtain the data conversion error generated during the data conversion of this sub-data;

[0015] S232: Obtain the allocation method for distributing the data conversion error to adjacent pixels;

[0016] S233: Determine the data conversion error value to be received by the adjacent pixels that receive error diffusion processing and the corresponding sub-data of the adjacent pixels according to the allocation method.

[0017] Preferably, step S22: performing error diffusion processing on the sub-data based on the data conversion error value further includes the following steps:

[0018] S221: Obtain the boundary adjustment coefficient of the variable part in the image to be printed;

[0019] S222: Determine whether the sub-data is located at the boundary position of the changing part in the image to be printed;

[0020] S223: If so, divide the data conversion error value received by the sub-data by the boundary adjustment coefficient and then add it to the sub-data;

[0021] S224: Otherwise, directly add the data conversion error value received by the sub-data to the sub-data.

[0022] Preferably, step S221: obtaining the boundary adjustment coefficient of the variable part in the image to be printed further includes the following steps:

[0023] S2211: Get the concentration M1 of the largest ink droplet corresponding to the first data type;

[0024] S2212: Get the concentration M2 of the largest ink droplet corresponding to the second data type;

[0025] S2213: Calculate the boundary adjustment coefficient A1 of the variable part in the image to be printed based on the maximum ink droplet concentration M1 corresponding to the first data type and the maximum ink droplet concentration M2 corresponding to the second data type, where A1 = M1 / M2.

[0026] Preferably, the first image data and the second image data consist of a plurality of sub-data that correspond one-to-one with the pixels of the image to be printed. In step S3: processing the first image data using the second halftone processing method to obtain the second processed data represented by the second data type, the sub-data of the second image data are processed one by one according to the processing order. The method for processing any one of the sub-data further includes the following steps:

[0027] S31: Obtain the data conversion error value received for this sub-data;

[0028] S32: Perform error diffusion processing on the sub-data based on the data conversion error value;

[0029] S33: Convert the sub-data that has undergone error diffusion processing into data represented by a second data type, and determine the data conversion error value to be received by the adjacent pixels that have undergone error diffusion processing and the sub-data corresponding to the adjacent pixels based on the data conversion error generated by the sub-data conversion. The adjacent pixels are pixels that are adjacent to the pixel position corresponding to the sub-data.

[0030] Preferably, in step S2: the first image data is processed using the first halftone processing method to obtain the first processed data represented by the first data type, and the first data type is 2-bit data; in step S4: the second image data is processed using the second halftone processing method to obtain the second processed data represented by the second data type, and the second data type is 1-bit data.

[0031] Secondly, the present invention also provides a data processing apparatus for variable image printing, the apparatus comprising:

[0032] The first image data acquisition module is used to acquire the first image data of the image to be printed, wherein the first image data is the image data corresponding to the non-changing part of the image to be printed;

[0033] The first data processing module is used to process the first image data using a first halftone processing method to obtain first processed data represented by a first data type.

[0034] The second image data acquisition module is used to acquire the second image data of the image to be printed, wherein the second image data is the image data corresponding to the variable part in the image to be printed;

[0035] The second data processing module is used to process the second image data using a second halftone processing method to obtain second processed data represented by a second data type.

[0036] Thirdly, the present invention also provides a data processing apparatus for variable image printing, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which implement the method described in the first aspect when executed by the processor.

[0037] Fourthly, the present invention also provides a storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method described in the first aspect.

[0038] Beneficial Effects: The data processing method, apparatus, device, and storage medium for variable image printing of the present invention divides the data of the image to be printed into first image data corresponding to the invariant portion and second image data corresponding to the variable portion. Furthermore, by performing halftone processing on the first image data corresponding to the invariant portion and the second image data corresponding to the variable portion, first processed data represented by a first data type and second processed data represented by a second data type are obtained, respectively. Since the invariant and variable portions of the image to be printed are represented by different bit type data, the invariant and variable portions can be represented by the most suitable bit type data for each data processing and image printing process. This satisfies the requirements of image printing effect, effectively saves storage resources, and significantly shortens data processing time. Attached Figure Description

[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, and these are all within the protection scope of the present invention.

[0040] Figure 1 This is a flowchart of the data processing method for variable image printing according to the present invention;

[0041] Figure 2 A schematic diagram of the structure of the image to be printed, composed of variable and invariant parts;

[0042] Figure 3 This is a flowchart of the method for halftone processing of a first image according to the present invention;

[0043] Figure 4 A flowchart illustrating the method for determining the data conversion error value received by the sub-data according to the present invention;

[0044] Figure 5 This is a schematic diagram illustrating how data conversion errors can spread to adjacent pixels.

[0045] Figure 6 This is a flowchart of the method for adjusting the error that has diffused to the boundary position according to the present invention;

[0046] Figure 7 A schematic diagram of pixels at the boundary position;

[0047] Figure 8 This is a flowchart of the method for obtaining boundary adjustment coefficients;

[0048] Figure 9 A schematic diagram of the data processing apparatus for variable image printing according to the present invention;

[0049] Figure 10 This is a schematic diagram of the data processing device for variable image printing according to the present invention. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. In the description of the present invention, it should be understood that the terms "center," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, the element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Where there is no conflict, embodiments of the present invention and the various features thereof can be combined with each other, all of which are within the scope of protection of the present invention.

[0051] Example 1

[0052] like Figure 1 As shown, this embodiment provides a data processing method for variable image printing, the method including the following steps:

[0053] S1: Obtain the first image data of the image to be printed, wherein the first image data is the image data corresponding to the non-changing part 10 in the printed image;

[0054] This embodiment is applicable to scenarios where multiple copies of an image are printed. For example... Figure 2As shown, these images typically consist of static image portions (these static patterns are identical in each image) and dynamic images (these dynamic patterns can be different in each image). Based on whether the image portions change, this step also divides the data of the image to be printed into two parts: the first part is the first image data, which is obtained by converting the static portion of the image to be printed. The second part is the second image data, which is obtained by converting the dynamic portion of the image to be printed. One method for converting the printed image into the corresponding image data is to input the image to be printed into raster image processing software for rasterization processing, obtaining image data that the inkjet printer can recognize.

[0055] S2: The first image data is processed using the first halftone processing method to obtain first processed data represented by the first data type;

[0056] This step uses halftone processing to convert the image data corresponding to the unchanging parts of the printed image from the previous step into first processed data represented by a first data type.

[0057] Halftone processing refers to the technique of quantizing a continuous-tone image (such as a grayscale image and a color image) into a binary image or a color image with only a few colors using a small number of colors, and making the visual effect of the quantized image similar to the original image at a certain distance. Common inkjet printed images and printed images are halftone images. The changes from light to dark or from pale to rich are represented by the size of the halftone dots or the halftone dot coverage.

[0058] Data type refers to the data type categorized by the number of bits used, such as 1-bit data, 2-bit data, 4-bit data, 8-bit data, etc. For example, if the first data is 2-bit data, then the first data processed will be represented using 2 bits.

[0059] S3: Obtain the second image data of the image to be printed, wherein the second image data is the image data corresponding to the variable part 30 in the printed image;

[0060] This step first obtains the image data corresponding to the changed parts in the printed image.

[0061] S4: Process the second image data using the second halftone processing method to obtain the second processed data represented by the second data type.

[0062] This step uses halftone processing to convert the image data corresponding to the changed parts in the printed image from the previous step into second processed data represented by second data.

[0063] The data processing method in this embodiment divides the data of the image to be printed into first image data corresponding to the invariant portion 10 and second image data corresponding to the variable portion 30. Furthermore, by performing halftone processing on the first image data corresponding to the invariant portion 10 and the second image data corresponding to the variable portion 30, first processed data represented by a first data type and second processed data represented by a second data type are obtained, respectively. Since the invariant portion 10 and the variable portion 30 of the image to be printed are represented by different bit type data, the invariant portion 10 and the variable portion 30 of the image to be printed can be represented by the most suitable bit type data for each of the data processing and image printing processes. This satisfies the requirements of the image printing effect while effectively saving the system resources of the printing equipment.

[0064] The first and second processed data obtained through the aforementioned steps can be used as the final print data, or they can be further optimized before being used as print data.

[0065] In a preferred embodiment, S2: the first image data is processed using a first halftone processing method to obtain first processed data represented by a first data type, where the first data type is 2-bit data; and S4: the second image data is processed using a second halftone processing method to obtain second processed data represented by a second data type, where the second data type is 1-bit data.

[0066] In this embodiment, in S2, a 2-bit halftone processing algorithm can be used to convert the unchanged image data into first processed data, and a 1-bit halftone processing algorithm can be used to convert the changed image data into second processed data.

[0067] Halftone processing of 2-bit data can ultimately transform 256 data values ​​in the range [0, 255] into four values: 0, 1, 2, and 3, according to certain rules. Each value corresponds to a type of ink dot; for example, value 0 corresponds to an empty dot, value 1 to a small dot, value 2 to a medium dot, and value 3 to a large dot. The volume of the ink droplet forming an empty dot is 0, the volume of the ink droplet forming a large dot is greater than the volume of the ink droplet forming a medium dot, and the volume of the ink droplet forming a medium dot is the same as the volume of the ink droplet forming a small dot.

[0068] Halftone processing of 1-bit data can ultimately transform 256 data values ​​in the range [0, 255] into two values, 0 and 1, through certain rules. These two values ​​correspond to two different ink droplet types: 0 corresponds to an empty dot, and 1 corresponds to a non-empty dot.

[0069] This embodiment uses 2-bit data, which can represent a wider variety of ink droplet types, to represent the static parts of the image to be printed. This allows for better reproduction of the static parts during printing. Since the static parts can be stored once and reused repeatedly, using 2-bit data ensures good printing quality without consuming excessive storage resources. Simultaneously, this embodiment uses a smaller 1-bit data set to represent the dynamic parts of the image that do not require high printing precision. This avoids the situation where storing a large number of images for the dynamic parts would result in an excessively large overall data volume, leading to excessively long image data processing time and excessive image data storage space.

[0070] In this embodiment, the first image data and the second image data are composed of several sub-data that correspond one-to-one with the pixels of the image to be printed. In S2: processing the first image data using a first halftone processing method to obtain first processed data represented by a first data type, the sub-data of the first image data are processed one by one according to the processing order. Since the image to be printed is usually composed of several pixels, for ease of processing, this embodiment divides the first image data and the second data into multiple sub-data in units of pixels, with one pixel corresponding to one sub-data. During halftone processing, the sub-data of the first image data are processed one by one according to a certain processing order until all the sub-data of the first image data has been processed. All the processed sub-data constitutes the first processed data represented by the first data type. Figure 3 As shown, the method for processing any one of the sub-data also includes the following steps:

[0071] S21: Obtain the data conversion error value received for this sub-data;

[0072] After the first image data is converted to data represented by the first data type, a data conversion error will exist. For example, using 1-bit halftone processing, the 256 data values ​​[0, 255] are ultimately converted into two values, 0 and 1, according to certain rules. Originally, a sub-data of the first image data represented a grayscale value of 220, but after conversion, it becomes the value 1 in 1-bit data. The grayscale value of the first image data corresponding to the value 1 in 1-bit data is 255. Therefore, an error of 255 - 220 = 35 is generated during the conversion of the first image data to 1-bit data. This error is recorded as the data conversion error generated by the sub-data conversion. In order to compensate for the aforementioned error, this embodiment adopts an error diffusion halftone algorithm, which distributes the error to the surrounding pixels, so that the sub-data corresponding to these pixels receives a portion of the data conversion error, i.e., the data conversion error value received by the sub-data. Since the pixel corresponding to a sub-data may be adjacent to multiple pixels, a sub-data may receive multiple data conversion error values ​​distributed by other sub-data. At this time, the data conversion error values ​​distributed to the sub-data are added together to obtain the data conversion error value of the sub-data.

[0073] S22: Perform error diffusion processing on the sub-data based on the data conversion error value;

[0074] This step processes the received data conversion error value of the currently processed sub-data with the initial value of the sub-data to obtain sub-data that has undergone error diffusion processing.

[0075] In this embodiment, as Figure 6 As shown, step S22: performing error diffusion processing on the sub-data based on the data conversion error value further includes the following steps:

[0076] S221: Obtain the boundary adjustment coefficient of the variable part in the image to be printed;

[0077] Because there is a boundary between the static and dynamic image portions in the image to be printed, this boundary is located at the pixel position where the static and dynamic image portions intersect. These pixel positions correspond to the boundary positions 20 of the first image data and the second image data. Since the first processing data is obtained by halftone processing of the first image data, and the second processing data is obtained by halftone processing of the second image data, the boundary positions of the first image data and the second image data also correspond to the boundary positions of the first processing data and the second processing data. Because the first processing data and the second processing data are represented using different bit types, that is, using different bits to represent the dynamic and static portions of the image to be printed, there is an unnatural transition between the static and dynamic image portions.

[0078] The method for obtaining the boundary adjustment coefficient of the variable part is as follows:

[0079] S2211: Get the concentration M1 of the largest ink droplet corresponding to the first data type;

[0080] For example, when using 1-bit data to represent a changing area, there is only one type of ink droplet volume. In this case, the maximum ink droplet concentration corresponding to the first data type is the ink droplet volume when using 1-bit data for inkjet printing. For example, if the ink droplet volume ejected when using 1-bit data for inkjet printing is 6 pL, then M1 = 6 pL.

[0081] S2212: Get the concentration M2 of the largest ink droplet corresponding to the second data type;

[0082] For example, when printing a background area using 2-bit data, the ejected ink droplets come in three sizes: small, medium, and large. In this case, the concentration of the large droplet corresponding to the second data type is the amount of ink ejected by the printhead. For instance, the ink volumes corresponding to the small, medium, and large droplets are 3 pL, 5 pL, and 7 pL respectively. Therefore, the concentration of the largest droplet corresponding to the second data type, M2, is 7 pL.

[0083] S2213: Calculate the boundary adjustment coefficient A1 of the variable part in the image to be printed based on the maximum ink droplet concentration M1 corresponding to the first data type and the maximum ink droplet concentration M2 corresponding to the second data type, where A1 = M1 / M2.

[0084] S222: Determine whether the sub-data is located at the boundary position of the changing part in the image to be printed;

[0085] The boundary position of the changing part in the image to be printed refers to the position where the sub-data belongs to the changing part of the image to be printed, and it is located at the boundary between the changing part and the non-changing part. For example... Figure 7 The position of pixel pa is the boundary position of the changing part in the image to be printed, and the position of pixel pb is the boundary position of the non-changing part in the image to be printed.

[0086] S223: If so, divide the data conversion error value received by the sub-data by the boundary adjustment coefficient and then add it to the sub-data;

[0087] For example, if the sub-data being processed is located at the boundary of the variable part in the image to be printed, and the data conversion error value received by the sub-data is E1, while the initial value of the sub-data is D1, then the value of the processed sub-data obtained after error diffusion processing is E1 / A1+D1.

[0088] S224: Otherwise, directly add the data conversion error value received by the sub-data to the sub-data.

[0089] For example, if the sub-data being processed belongs to the changing part of the image to be printed, but is not located at the boundary of the changing part, and the data conversion error value received by the sub-data is E1, while the initial value of the sub-data is D1, then the value of the processed sub-data obtained after error diffusion processing is E1+D1.

[0090] S23: Convert the sub-data that has undergone error diffusion processing into data represented by a first data type, and determine the data conversion error value to be received by the adjacent pixels that have undergone error diffusion processing and the sub-data corresponding to the adjacent pixels based on the data conversion error generated by the sub-data conversion. The adjacent pixels are pixels that are adjacent to the pixel position corresponding to the sub-data.

[0091] like Figure 4 As shown, the method for determining the data conversion error value to be received for adjacent pixels undergoing error diffusion processing and the corresponding sub-data includes the following steps:

[0092] S231: Obtain the data conversion error generated during the data conversion of this sub-data;

[0093] For example, after converting the first image data into data represented by the first data type, there will be a data conversion error. For instance, using halftone processing of 1-bit data, the 256 data values ​​in [0, 255] are ultimately converted into two values, 0 and 1, through certain rules. The grayscale value represented by a sub-data of the original first image data is 223, but after conversion, it becomes the value 1 in 1-bit data. The grayscale value of the first image data corresponding to the value 1 in 1-bit data is 255. Therefore, in the process of converting the first image data into 1-bit data, a data conversion error of 255 - 223 = 32 is generated.

[0094] S232: Obtain the allocation method for distributing the data conversion error to adjacent pixels;

[0095] S233: Determine the data conversion error to be received by the adjacent pixels that will undergo error diffusion processing and the corresponding sub-data of the adjacent pixels according to the allocation method.

[0096] See Figure 5 For example, the allocation method is to allocate the data conversion error (corresponding to pixel p0) to the adjacent first pixel p1, second pixel p2, third pixel p3 and fourth pixel p4, where the data conversion error value received by the sub-data corresponding to the first pixel is 6, the data conversion error value received by the sub-data corresponding to the second pixel is 14, the data conversion error value received by the sub-data corresponding to the third pixel is 10, and the data conversion error value received by the sub-data corresponding to the fourth pixel is 2.

[0097] Similarly, in this embodiment, in S3: obtaining the second image data of the image to be printed, the second image data is the image data corresponding to the changing part of the image to be printed. The sub-data of the second image data are processed one by one in the processing order. The method for processing any one of the sub-data further includes the following steps:

[0098] S31: Obtain the data conversion error value received for this sub-data;

[0099] S32: Perform error diffusion processing on the sub-data based on the data conversion error value;

[0100] The error diffusion processing method includes the following steps:

[0101] S331: Obtain the data conversion error generated during the data conversion of this sub-data;

[0102] S332: Obtain the allocation method for distributing the data conversion error to adjacent pixels;

[0103] S333: Determine the data conversion error value to be received by the adjacent pixels that will undergo error diffusion processing and the corresponding sub-data of the adjacent pixels according to the allocation method.

[0104] S33: Convert the sub-data that has undergone error diffusion processing into data represented by a second data type, and determine the data conversion error value to be received by the adjacent pixels that have undergone error diffusion processing and the sub-data corresponding to the adjacent pixels based on the data conversion error generated by the sub-data conversion. The adjacent pixels are pixels that are adjacent to the pixel position corresponding to the sub-data.

[0105] S32: Performing error diffusion processing on the sub-data based on the data conversion error value further includes the following steps:

[0106] S321: Obtain the boundary adjustment coefficient of the invariant part of the image to be printed;

[0107] S322: Determine whether the sub-data is located at the boundary position of the non-changing part of the image to be printed;

[0108] S323: If so, divide the received data conversion error value of the sub-data by the boundary adjustment coefficient and then add it to the sub-data;

[0109] S224: Otherwise, directly add the data conversion error value received by the sub-data to the sub-data.

[0110] The method for obtaining the boundary adjustment coefficient of the variable part in the image to be printed also includes the following steps:

[0111] S3211: Get the concentration M1 of the largest ink droplet corresponding to the first data type;

[0112] S3212: Get the concentration M2 of the largest ink droplet corresponding to the second data type;

[0113] S3213: Calculate the boundary adjustment coefficient A1 of the variable part in the image to be printed based on the maximum ink droplet concentration M1 corresponding to the first data type and the maximum ink droplet concentration M2 corresponding to the second data type, where A1 = M2 / M1.

[0114] Example 2

[0115] Please see Figure 8 This embodiment provides a data processing apparatus for variable image printing, the apparatus comprising:

[0116] The first image data acquisition module is used to acquire the first image data of the image to be printed, wherein the first image data is the image data corresponding to the non-changing part of the image to be printed;

[0117] The first data processing module is used to process the first image data using a first halftone processing method to obtain first processed data represented by a first data type.

[0118] The second image data acquisition module is used to acquire the second image data of the image to be printed, wherein the second image data is the image data corresponding to the variable part in the image to be printed;

[0119] The second data processing module is used to process the second image data using a second halftone processing method to obtain second processed data represented by a second data type.

[0120] The first data processing module further includes:

[0121] A data conversion error acquisition submodule is used to acquire the data conversion error value received by the sub-data.

[0122] An error diffusion processing submodule is used to perform error diffusion processing on the sub-data based on the data conversion error value.

[0123] The sub-data conversion submodule is used to convert the sub-data that has undergone error diffusion processing into data represented by a first data type, and to determine the data conversion error value to be received by the adjacent pixels that have undergone error diffusion processing and the sub-data corresponding to the adjacent pixels based on the data conversion error generated by the sub-data conversion. The adjacent pixels are pixels that are adjacent to the pixel position corresponding to the sub-data.

[0124] Example 3

[0125] In addition, combined Figure 9 The data processing method for variable image printing described in this embodiment of the invention can be implemented by a data processing device for variable image printing. Figure 9 A schematic diagram of the hardware structure of the data processing device for variable image printing provided in an embodiment of the present invention is shown.

[0126] The data processing device for variable image printing may include a processor 401 and a memory 402 storing computer program instructions.

[0127] Specifically, the processor 401 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present invention.

[0128] Memory 402 may include mass storage for data or instructions. For example, and not limitingly, memory 402 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 402 may include removable or non-removable (or fixed) media. Where appropriate, memory 402 may be internal or external to a data processing device. In a particular embodiment, memory 402 is a non-volatile solid-state memory. In a particular embodiment, memory 402 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0129] The processor 401 reads and executes computer program instructions stored in the memory 402 to implement any of the data addressing methods for random area printing in the above embodiments.

[0130] In one example, the data processing device for variable image printing may also include a communication interface 403 and a bus 410. For example, Figure 6 As shown, the processor 401, memory 402, and communication interface 403 are connected through bus 410 and complete communication with each other.

[0131] The communication interface 403 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of the present invention.

[0132] Bus 410 includes hardware, software, or both, that couples components used for fractional ink volume output together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 410 may include one or more buses. While specific buses are described and illustrated in embodiments of the invention, the invention contemplates any suitable bus or interconnect.

[0133] Example 4

[0134] Furthermore, in conjunction with the data processing method for variable image printing in the above embodiments, this invention can be implemented using a computer-readable storage medium. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the data processing methods for variable image printing in the above embodiments.

[0135] The above is a detailed description of the data processing method, apparatus, device, and storage medium for variable image printing provided in the embodiments of the present invention.

[0136] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.

[0137] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the required tasks. The programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0138] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0139] The above description is merely a specific embodiment of the present invention. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.

Claims

1. A data processing method for variable image printing, characterized by, The method comprises the following steps: S1: obtaining first image data of a to-be-printed image, the first image data being image data corresponding to a non-variable part in the to-be-printed image; S2: processing the first image data by using a first halftone processing method to obtain first processing data in a first data type; S3: obtaining second image data of the to-be-printed image, the second image data being image data corresponding to a variable part in the to-be-printed image; S4: processing the second image data by using a second halftone processing method to obtain second processing data in a second data type, the first image data and the second image data being composed of a plurality of sub-data corresponding to pixels of the to-be-printed image one by one; In the S2: processing the first image data by using the first halftone processing method to obtain the first processing data in the first data type, the sub-data of the first image data are processed one by one according to a processing sequence, and the method for processing any one of the sub-data further comprises the following steps: S21: obtaining a data conversion error value received by the sub-data; S22: performing error diffusion processing on the sub-data according to the data conversion error value; S23: converting the sub-data subjected to the error diffusion processing into data in the first data type, and determining data conversion error values required to be received by adjacent pixels subjected to error diffusion processing and sub-data corresponding to the adjacent pixels according to a data conversion error generated by the conversion of the sub-data, the adjacent pixels being pixels adjacent to a pixel position corresponding to the sub-data; The S22 further comprises the following steps: S221: obtaining a boundary adjustment coefficient of the variable part in the to-be-printed image; S222: judging whether the sub-data is located at a boundary position of the variable part in the to-be-printed image; S223: if yes, dividing the data conversion error value received by the sub-data by the boundary adjustment coefficient and then superimposing the data conversion error value on the sub-data; S224: if no, directly superimposing the data conversion error value received by the sub-data on the sub-data.

2. The data processing method of variable image printing according to claim 1, characterized in that, The S23: converting the sub-data subjected to the error diffusion processing into data in the first data type, and determining data conversion error values required to be received by each pixel subjected to error diffusion processing and sub-data corresponding to each pixel according to a data conversion error generated by the conversion of the sub-data, the adjacent pixels being pixels adjacent to a pixel position corresponding to the sub-data further comprises the following steps: S231: obtaining a data conversion error generated by the conversion of the sub-data; S232: obtaining a distribution manner of distributing the data conversion error to adjacent pixels; S233: determining data conversion error values required to be received by the adjacent pixels subjected to error diffusion processing and sub-data corresponding to the adjacent pixels according to the distribution manner.

3. The data processing method of variable image printing according to claim 2, characterized in that, The S221: obtaining a boundary adjustment coefficient of the variable part in the to-be-printed image further comprises the following steps: S2211: obtaining a maximum ink drop concentration M1 corresponding to the first data type; S2212: obtaining a maximum ink drop concentration M2 corresponding to the second data type; S2213: calculating a boundary adjustment factor A1 of the variable part in the image to be printed according to the maximum ink drop concentration M1 corresponding to the first data type and the maximum ink drop concentration M2 corresponding to the second data type, wherein A1=M1 / M2.

4. The data processing method of variable image printing according to claim 1, characterized by, The first image data and the second image data are composed of a plurality of sub-data corresponding to the pixels of the image to be printed one by one, and in the S3: processing the first image data by the second halftone processing method to obtain the second processing data represented by the second data type, the sub-data of the second image data are processed one by one according to the processing order, and the method for processing any one of the sub-data further comprises the following steps: S31: obtaining the data conversion error value received by the sub-data; S32: performing error diffusion processing on the sub-data according to the data conversion error value; S33: converting the sub-data subjected to the error diffusion processing into data represented by the second data type, and determining the data conversion error value required to be received by the adjacent pixels corresponding to the sub-data and the adjacent pixel pairs corresponding to the adjacent pixels subjected to the error diffusion processing according to the data conversion error generated by the conversion of the sub-data, wherein the adjacent pixels are the pixels adjacent to the pixel position corresponding to the sub-data.

5. The data processing method of variable image printing according to any one of claims 1 to 4, characterized in that, The first data type of the S2: processing the first image data by the first halftone processing method to obtain the first processing data represented by the first data type is 2-bit data, and the second data type of the S4: processing the second image data by the second halftone processing method to obtain the second processing data represented by the second data type is 1-bit data.

6. A data processing apparatus for variable image printing, characterized by The device comprises: a first image data acquisition module, which is used to acquire first image data of an image to be printed, wherein the first image data corresponds to a non-variable part of the image to be printed; a first data processing module, which is used to process the first image data by a first halftone processing method to obtain first processing data represented by a first data type; a second image data acquisition module, which is used to acquire second image data of the image to be printed, wherein the second image data corresponds to a variable part of the image to be printed; a second data processing module, which is used to process the second image data by a second halftone processing method to obtain second processing data represented by a second data type; The first data processing module further comprises: a data conversion error acquisition submodule, which is used to obtain a data conversion error value received by the sub-data; an error diffusion processing submodule, which is used to perform error diffusion processing on the sub-data according to the data conversion error value; a sub-data conversion sub-module, configured to convert the sub-data subjected to the error diffusion process into data represented in a first data type, and determine a data conversion error value required to be received by a corresponding sub-data of a neighboring pixel subjected to the error diffusion process and a neighboring pixel pair corresponding to the sub-data according to a data conversion error generated by the conversion of the sub-data, the neighboring pixel being a pixel adjacent to a pixel position corresponding to the sub-data; and S221: obtaining a boundary adjustment coefficient of a variable part in the image to be printed; S222: determining whether the sub-data is located at a boundary position of the variable part in the image to be printed; S223: if yes, dividing the data conversion error value received by the sub-data by the boundary adjustment coefficient and then superimposing the data conversion error value on the sub-data; S224: if no, directly superimposing the data conversion error value received by the sub-data on the sub-data.

7. A data processing apparatus for variable image printing, characterized by comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of any one of claims 1-5.

8. A storage medium having stored thereon computer program instructions, characterized in that, when executed by a processor, implement the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Halftone image generation method based on sectioned error diffusion

    CN103402042A

  • Printer and method of processing an image to be printed

    CN105103529A

  • Printing image data processing method, device and equipment and storage medium

    CN109669647A