Method, device and equipment for processing variable-length printing data and storage medium

By adjusting the number and distribution of effective pixels in the pixel row, the color difference problem in inkjet printing on objects with inconsistent cross-sectional perimeters was solved, achieving uniform image density and high-quality printing results.

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

Patent Information

Application Number
CN202111028049.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-02
Publication Date
2026-01-06
Estimated Expiration
2041-09-02

AI Technical Summary

Technical Problem

Existing inkjet printing technology causes variations in color depth when printing objects with inconsistent cross-sectional perimeters, affecting image quality.

Method used

By adjusting the number and distribution of effective pixels in each pixel row, data processing is performed based on the perimeter of the target object's cross-section. Continuous effective pixels are selected and replaced with the original printed data to ensure that the pixel density matches the cross-sectional perimeter.

Benefits of technology

It achieves uniform overall pixel density in the image when printing on objects with inconsistent cross-sectional perimeters, eliminating color differences and preserving image information of the region of interest.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115742564B_ABST
    Figure CN115742564B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of printing, and provides a variable perimeter printing data processing method, device, equipment and storage medium. The variable perimeter printing data processing method comprises the following steps: obtaining original printing data of the image; determining the number of effective pixel points of each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object; selecting continuous pixel points from the original pixel points of each pixel row as effective pixel points according to the number of effective pixel points of each pixel row; and replacing the original printing data corresponding to the original pixel points of each pixel row with the printing data corresponding to the effective pixel points of each pixel row to obtain target printing data. The present application also comprises a device, equipment and storage medium for executing the above method. The present application can effectively improve the color difference problem during printing.
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 method, apparatus, device, and storage medium for processing variable perimeter printing data. Background Technology

[0002] Inkjet printing refers to the process of ejecting ink droplets from nozzles on a printhead onto a printing medium to obtain images or text. Printed images are composed of many pixels; the denser the pixels, the higher the resolution of the printed image. When printing on the surface of a cup shaped like a frustum of a cone, such as... Figure 1 As shown, the circumferences of the cup's rim and base are different, and the circumference varies further from the rim to the base. Pixels are denser in areas with a smaller circumference than in areas with a larger circumference. This results in noticeable color variations across different areas of the printed object, even with the same amount of data, thus affecting the quality of the printed image. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a method, apparatus, device and storage medium for processing variable perimeter printing data, in order to solve the technical problem of obvious color depth differences when printing objects with different cross-sectional perimeters in the prior art.

[0004] The technical solution adopted in this invention is:

[0005] In a first aspect, the present invention provides a method for processing variable perimeter printing data, used to print images on target objects with inconsistent cross-sectional perimeters, wherein the pixels of the printed image are arranged in several rows on the target object, and the printing method includes the following steps:

[0006] Obtain the original print data of the image;

[0007] The number of effective pixels in each pixel row is determined based on the perimeter of the cross section at the location of each pixel row on the target object.

[0008] Based on the number of valid pixels in each pixel row, consecutive pixels are selected from the original pixels in each pixel row as valid pixels.

[0009] The target print data is obtained by replacing the original print data corresponding to the original pixels in each pixel row with the print data corresponding to the valid pixels in each pixel row.

[0010] Preferably, the step of replacing the original print data corresponding to the pixels in each pixel row with the print data corresponding to the effective pixels in each pixel row to obtain the target print data includes the following steps:

[0011] Obtain the print data corresponding to the valid pixels of each pixel row from the original print data;

[0012] The distribution position of the effective pixels in each pixel row is determined based on the number of effective pixels in each pixel row.

[0013] Replace the print data of the pixels located at the distribution positions in each pixel row with the print data of the corresponding valid pixels, and set the print data of the remaining pixels to not print to obtain the target print data.

[0014] Preferably, determining the distribution position of the effective pixels in each pixel row within its corresponding pixel row based on the number of effective pixels in each pixel row includes the following steps:

[0015] Get the number of valid pixels in each pixel row;

[0016] Based on the number of valid pixels in each pixel row, select a corresponding number of positions that are evenly distributed in each pixel row from the original positions of the pixels in each pixel row as valid positions.

[0017] Valid pixels are assigned to the valid locations, with one valid pixel corresponding to one valid location.

[0018] Preferably, determining the number of effective pixels in each pixel row based on the perimeter of the cross-section at the location of each pixel row on the target object includes the following steps:

[0019] The pixel count weight of each pixel row is determined based on the perimeter of the cross section at the position of each pixel row on the target object and the perimeter of the cross section at the reference position on the target object.

[0020] Get the number of pixels in the pixel row corresponding to the reference position on the target object;

[0021] The effective pixel count of each pixel row is calculated based on the pixel count weight of each pixel row and the pixel count of the pixel row corresponding to the reference position. Let Nc be the pixel count of the pixel row corresponding to the reference position, and N be the pixel count of the i-th pixel row. i The weight of the number of pixels in the i-th row is Q. i Then N i =Nc×Q i , where i is an integer greater than or equal to 1.

[0022] Preferably, determining the pixel count weight of each pixel row based on the perimeter of the cross-section at the location of each pixel row on the target object and the perimeter of the cross-section at the reference position on the target object includes the following steps:

[0023] Obtain the perimeter of the cross section at the position of each pixel row on the target object;

[0024] Obtain the perimeter of the cross section at a reference position on the target object;

[0025] The pixel count weight of each row is calculated based on the perimeter of the cross-section at its position on the target object and the perimeter of the cross-section at the reference position on the target object. Let Lc be the perimeter of the cross-section at the reference position on the target object, and L be the perimeter of the i-th row of pixels. i Then Q i =L i / Lc, where Q i The weight of the number of pixels in the i-th row.

[0026] Preferably, the target object is a frustum, the frustum including a first end and a second end disposed opposite to each other, and the step of determining the number of effective pixels in each pixel row based on the cross-sectional perimeter of each pixel row at its position on the target object includes the following steps;

[0027] Obtain the perimeter L1 of the cross section at the first end of the frustum;

[0028] Obtain the perimeter L2 of the cross section at the second end of the frustum;

[0029] Obtain the number of pixels Nr in the pixel row corresponding to the first end position of the frustum and the height D of the frustum. H ;

[0030] Based on L1, L2, and D H Calculate the pixel count weight for each pixel row;

[0031] The effective pixel count of each pixel row is calculated based on the pixel count weight of each pixel row and the pixel count of the pixel row corresponding to the first end position of the frustum. The effective pixel count N of the pixel row that is j rows away from the first end position of the frustum is... j =Nr×W j W j The pixel count weight is the number of pixels in the pixel row that is j rows away from the first end of the frustum, where j is an integer greater than or equal to 1.

[0032] Preferably, in the case of L1, L2 and D H In calculating the pixel count weight for each pixel row, according to formula W... j =1-d j / D H +(L2×d j ) / (L1×D H ) Calculate the pixel count weight for each pixel row, where d j Let j be the distance of the pixel row that is j rows away from the first end of the frustum from the first end of the frustum.

[0033] In a second aspect, the present invention also provides an apparatus for processing variable perimeter printing data, used to print images on target objects with inconsistent cross-sectional perimeters, wherein the pixels of the printed images are arranged in several rows on the target object, and the apparatus includes:

[0034] A raw print data acquisition module, which is used to acquire the raw print data of the image;

[0035] The effective pixel count determination module is used to determine the effective pixel count of each pixel row based on the perimeter of the cross section at the position of each pixel row on the target object.

[0036] An effective pixel selection module is used to select consecutive pixels from the original pixels in each pixel row as effective pixels based on the number of effective pixels in each pixel row.

[0037] The data processing module is used to replace the original print data corresponding to the pixels in each pixel row with the original print data corresponding to the effective pixels in each pixel row to obtain the target print data.

[0038] Thirdly, the present invention also provides an apparatus for processing variable perimeter printing data, 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.

[0039] In a fourth aspect, 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.

[0040] Beneficial Effects: When printing images on target objects with inconsistent cross-sectional perimeters, the variable perimeter printing data processing method, apparatus, device, and storage medium of the present invention select consecutive pixels from the original pixels of each pixel row as effective pixels. The number and distribution of pixels in each pixel row are adjusted according to the cross-sectional perimeter of the position of each pixel row on the target object to change the pixel density, so that the adjusted number and distribution of pixels in each pixel row match the cross-sectional perimeter of the position of each pixel row on the target object. After the aforementioned adjustment, the overall pixel density of the image printed on the target object becomes uniform, and the printed image will not have color differences. Because the effective pixels are selected consecutively, the image information of the region of interest can be well preserved. Attached Figure Description

[0041] 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.

[0042] Figure 1 This is a schematic diagram of the pixel arrangement in the prior art;

[0043] Figure 2 A schematic diagram of the cross-section of the target object;

[0044] Figure 3 This is a flowchart of the variable perimeter printing data processing method of the present invention;

[0045] Figure 4 This is a schematic diagram illustrating the selection of effective pixels in this invention;

[0046] Figure 5 This is a flowchart of the method for obtaining target printing data according to the present invention;

[0047] Figure 6 This is a flowchart of the method for determining the effective pixel distribution position according to the present invention;

[0048] Figure 7 This is a flowchart of the method for determining the number of effective pixels based on the cross-sectional perimeter according to the present invention;

[0049] Figure 8 This is a flowchart of the method for determining the number of pixels based on the cross-sectional perimeter according to the present invention;

[0050] Figure 9 This is a flowchart of the method for printing images on a frustum-shaped target object according to the present invention;

[0051] Figure 10 This is a schematic diagram of the structure of the variable perimeter printing data processing device of the present invention;

[0052] Figure 11 This is a schematic diagram of the structure of the variable perimeter printing data processing device of the present invention. Detailed Implementation

[0053] 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.

[0054] Example 1

[0055] like Figure 2 As shown in this paper, for a given three-dimensional object, arbitrarily choosing a direction as the reference direction, the planar figure obtained by cutting the three-dimensional object at a certain position in the reference direction using a plane perpendicular to the reference direction is called the cross-section of the three-dimensional object. The perimeter of the cross-section 21 obtained when cutting the three-dimensional object from different positions in the reference direction may be the same or different. If the perimeter of the cross-section 21 obtained from at least two different positions of a three-dimensional object is different, then it belongs to the category of objects with inconsistent cross-sectional perimeters as described in this paper.

[0056] This embodiment discloses a method for processing variable perimeter printing data, used to print images on target objects 20 with inconsistent cross-sectional perimeters, such as... Figure 1 As shown, the aforementioned inconsistent cross-sectional perimeters refer to the fact that at least two cross-sections 21 obtained from different positions along the reference direction have different perimeters. When the image is printed onto the target object 20, the pixels of the printed image are arranged in several rows on the target object 20, such as... Figure 3As shown, the printing method includes the following steps:

[0057] S1: Obtain the original print data of the image;

[0058] The aforementioned image is the image to be printed on the target object. This step specifically includes the following steps:

[0059] S11: Perform color correction on the image to be printed to obtain intermediate printing data;

[0060] S12: After screen-processing the intermediate print data, the original print data is obtained.

[0061] After obtaining the raw print data, this method continues with the following processing:

[0062] S2: Determine the number of effective pixels in each pixel row based on the perimeter of the cross section at the position of each pixel row on the target object;

[0063] like Figure 1 As shown, when an image is printed onto a target object, the pixels 11 that make up the image are arranged in rows and columns on the target object. For ease of description, the rows formed by the arrangement of pixels 11 are referred to as pixel rows 10 in this paper. The image printed on the target object can be considered as being composed of several rows of pixel rows 10. If the direction perpendicular to the pixel rows 10 is taken as the aforementioned reference direction, then each pixel row 10 is located at a different position on the target object in the reference direction. The cross-section obtained by cutting the target object from the position of a certain pixel row 10 is the cross-section of the position of that pixel row on the target object, and the perimeter of this cross-section is the perimeter of the cross-section of the position of that pixel row on the target object.

[0064] Once the perimeter of the cross-section at the location of a certain pixel row on the target object is known, the number of pixels in each pixel row of the image can be adjusted based on the perimeter. A smaller cross-sectional perimeter allows for a smaller number of pixels in that row, making the pixel distribution more sparse. For example, if an image consisting of 4 pixel rows is printed on a target object, before adjustment, all 4 rows have the same number of pixels, f. Since the perimeter of the cross-section at the location of the 3rd pixel row on the target object is smaller than that of the 1st, 2nd, and 3rd rows, the number of pixels in the 3rd pixel row can be reduced to g. That is, only g pixels are retained in the 3rd pixel row, and these retained g pixels are called the effective pixels of the 3rd pixel row. Here, f and g are positive integers, and f > g.

[0065] S3: Select consecutive pixels from the original pixels in each pixel row as valid pixels based on the number of valid pixels in each pixel row.

[0066] like Figure 4As shown, to maximize the preservation of image information from valuable regions or regions of interest (ROIs) in the original image, this step selects consecutive pixels belonging to the valuable or ROI from the original pixels in each pixel row as valid pixels. The number of consecutive pixels selected in each pixel row is the number of valid pixels corresponding to that pixel row. For example, if the fourth pixel row in the original image has 2000 pixels, and the number of valid pixels determined by the perimeter of the fourth pixel row is 1800, then 1800 consecutive pixels are selected from the fourth pixel row as valid pixels.

[0067] Figure 4 The dashed circles in the image represent unselected pixels, while solid circles represent valid pixels. This step adjusts the number and density of pixels by selecting a subset of consecutive pixels from the existing pixels in each row. This adjustment preserves image information from valuable or regions of interest. Since the perimeter of the cross-section at each pixel row on the target object differs, some rows require pixel number adjustment, while others do not. For rows where pixel number adjustment is unnecessary, all existing pixels in that row can be selected as valid pixels.

[0068] S4: Replace the original print data corresponding to the original pixels in each pixel row with the print data corresponding to the valid pixels in each pixel row to obtain the target print data.

[0069] This step obtains the target print data by replacing the print data. When printing the target print data, the printing device only prints the print data corresponding to the selected valid pixels in each pixel row.

[0070] like Figure 5 As shown, in this embodiment, step S4: replacing the original print data corresponding to each pixel point in each pixel row with the print data corresponding to the effective pixel points in each pixel row to obtain the target print data includes the following steps:

[0071] S41: Obtain the print data corresponding to the valid pixels of each pixel row from the original print data;

[0072] When printing images, the printing device prints based on the printing data. The printing data used to form a certain pixel is the printing data corresponding to that pixel. Similarly, the printing data corresponding to the valid pixels refers to the printing data used to form the valid pixels. Since the valid pixels are selected from the original pixels in each pixel row, the printing data corresponding to the valid pixels in each pixel row can be quickly obtained from the original printing data. For example, in the original image, the third pixel row has 2200 pixels, and the number of valid pixels in the third pixel row is 2000. The 2000 consecutive pixels from the 100th pixel to the 2099th pixel in the third pixel row are valid pixels. Therefore, the printing data of the aforementioned 2000 pixels is extracted from the original printing data as the printing data corresponding to the valid pixels in the third pixel row.

[0073] S42: Determine the distribution position of the effective pixels in each pixel row within its corresponding pixel row based on the number of effective pixels in each pixel row;

[0074] This step can use a halftone algorithm or other methods to obtain the distribution positions. For example, the positions of the original pixels in each pixel row can be determined using a random number method to decide whether to replace them with data from valid pixels.

[0075] like Figure 6 As shown, in this preferred embodiment, step S42: determining the distribution position of the effective pixels in each pixel row according to the number of effective pixels in each pixel row includes the following steps:

[0076] S421: Get the number of valid pixels in each pixel row;

[0077] S422: Select a number of positions that are evenly distributed in each pixel row from the original positions of the pixels in each pixel row, based on the number of valid pixels in each pixel row.

[0078] Each pixel, once printed onto the target object, occupies a specific position on the object. Each pixel has a corresponding position, and the original pixel's position is its printed position on the target object. The number of valid positions is the same as the number of valid pixels in each pixel row. For example, in the original image, the 5th pixel row has n1 pixels, while the 3rd pixel row has n2 valid pixels. Therefore, n2 evenly distributed positions are selected from the n1 positions corresponding to the n1 pixels in the 5th pixel row as valid positions. Here, n1 and n2 are positive integers.

[0079] S423: Assign valid pixels to the valid positions, where one valid pixel corresponds to one valid position.

[0080] Once the valid positions are selected, the previously selected pixels can be matched with the valid positions, and each valid pixel can be assigned a corresponding valid position, or each valid position can be assigned a corresponding valid pixel.

[0081] Because the effective positions are evenly distributed in each pixel row, the pixels in the final printed image are also evenly distributed in each pixel row. This not only makes the color difference of the adjusted image small, but also ensures the fidelity of the original image, and makes the image transition within the same pixel row more natural.

[0082] As a preferred allocation method, effective pixels can be assigned to each effective position sequentially according to their arrangement in the original pixel row. For example, the 6th pixel row of the original image has 1600 pixels, numbered from left to right as 1, 2...1599, 1600. The 6th pixel row has 1200 effective pixels. Therefore, pixels numbered 200 to 1399 are selected as effective pixels, and 1200 evenly distributed positions are chosen from the 1600 positions corresponding to the 1600 pixels in the 6th pixel row. When assigning the aforementioned pixels numbered 200 to 1399 to the 1200 evenly distributed effective positions, these 1200 effective pixels are assigned in ascending order of their left-to-right numbering.

[0083] Following the aforementioned order can minimize color difference while maximizing the preservation of image information in valuable or interesting regions of the original image.

[0084] S43: Replace the print data of the pixels located at the distribution positions in each pixel row with the print data of the corresponding valid pixels, and set the print data of the remaining pixels to not produce ink to obtain the target print data.

[0085] This step divides the original pixels in each pixel row into two parts. The first part consists of pixels that will be replaced by valid pixels, and the remaining part is the second part, which contains pixels that will not be printed. The positions corresponding to the pixels in the first part are the aforementioned valid positions. In practice, the data storage location for the first part of the pixels is first located, and then the data of the valid pixels is stored in the aforementioned storage location to overwrite the data of the first part of the pixels. The data corresponding to the second part of the pixels is then processed to prevent ink from being printed. In practice, the values ​​of these data can be set to 0, so that the printing device will operate without ink ejection when printing this data.

[0086] like Figure 7 As shown, in this embodiment, step S2: determining the number of effective pixels in each pixel row based on the perimeter of the cross-section at the location of each pixel row on the target object includes the following steps:

[0087] S21: Determine the pixel count weight of each pixel row based on the perimeter of the cross section at the position of each pixel row on the target object and the perimeter of the cross section at the reference position on the target object.

[0088] The reference position on the target object can be selected according to the actual situation. For example, it can be a position at the end of the target object where the cross-sectional perimeter is easily measured, or it can be a position in the middle of the target object, or a position where the cross-sectional perimeter can be obtained indirectly. Alternatively, it can be a position of a pixel row with a known or easily calculated number of pixels, and then the cross-sectional perimeter at that position can be measured or calculated. The pixel number weight is a ratio; the pixel number weight of a certain pixel row represents the ratio between the number of pixels in that pixel row printed on the target object and the number of pixels in other pixel rows. A larger pixel number weight indicates that the number of pixels in that pixel row is greater than the number of pixels in other pixel rows, and vice versa. For example, if the pixel count weight of the 6th pixel row is Q6 = 0.64, it means that the pixel count of the 6th pixel row accounts for 64% of the reference pixel count. If the pixel count weight of the 7th pixel row is Q7 = 0.73, it means that the pixel count of the 7th pixel row accounts for 73% of the reference pixel count.

[0089] S22: Obtain the number of pixels in the pixel row corresponding to the reference position on the target object;

[0090] In this step, the pixel count of the row corresponding to the reference position determined in the original printed data can be directly used as the final pixel count of that row, and the pixel count of other rows can be adjusted based on this final pixel count. Alternatively, this step can be performed by setting the pixel count of the row corresponding to the reference position to the desired pixel count, and then adjusting the pixel count of other rows based on this set pixel count.

[0091] S23: Calculate the effective pixel count of each pixel row based on the pixel count weight of each pixel row and the pixel count of the pixel row corresponding to the reference position. Let the pixel count of the pixel row corresponding to the reference position be Nc, and the pixel count of the i-th pixel row be N. i The weight of the number of pixels in the i-th row is Q.i Then N i =Nc×Q i , where i is an integer greater than or equal to 1.

[0092] After knowing the pixel count weight of each pixel row, this step directly multiplies the pixel count of the pixel row corresponding to the reference position by the pixel count weight to obtain the number of effective pixels in each pixel row.

[0093] This embodiment uses a pixel count weighting method to calculate the effective number of pixels. Regardless of how the number of pixels used for reference changes, the number of pixels corresponding to the pixel row can be quickly calculated, and the density distribution of pixels in all positions of the entire image is ensured to be uniform, thereby enabling flexible adjustment of the number of pixels.

[0094] like Figure 8 As shown, in this embodiment, step S21: determining the pixel count weight of each pixel row based on the perimeter of the cross-section at the location of each pixel row on the target object and the perimeter of the cross-section at the reference position on the target object includes the following steps:

[0095] S211: Obtain the perimeter of the cross section at the position of each pixel row on the target object;

[0096] S212: Obtain the perimeter of the cross section at a reference position on the target object;

[0097] S213: Calculate the pixel count weight of each row of pixels based on the perimeter of the cross-section at the position of each pixel row on the target object and the perimeter of the cross-section at the reference position on the target object. Let the perimeter of the cross-section at the reference position on the target object be Lc, and the perimeter of the cross-section of the i-th pixel row be L. i Then Q i =L i / Lc, where Q i The weight of the number of pixels in the i-th row.

[0098] The aforementioned steps describe a method for calculating pixel count weights based on the cross-sectional perimeter. Specifically, the ratio of the cross-sectional perimeter of each pixel row's location on the target object to the cross-sectional perimeter of a reference location on the target object is used as the pixel count weight for each row. This calculation method assigns a higher pixel count weight to rows with longer cross-sectional perimeters and a lower weight to rows with shorter perimeters. Adjusting the pixel count of each row using these weights ensures that the pixel count of each row matches the corresponding cross-sectional perimeter, resulting in a more uniform pixel density across the entire image and preventing color differences in the final printed image.

[0099] As a preferred approach, in this embodiment, the variance of the ink volume per unit area in each region of the adjusted image is less than or equal to a preset value. This embodiment uses the variance of the ink volume per unit area in each region of the image to represent the ink volume per unit area in each region of the image. Through the aforementioned image adjustment, this embodiment controls the variation in ink volume per unit area in each region within an allowable range by controlling the variance of the ink volume per unit area in each region of the image, thereby ensuring that the printed image does not have obvious color differences. The preset value can be set according to the requirements of the printing effect. In practice, experiments can be conducted first, printing with different preset values, so that the preset value for the final printing can be selected based on the printing effects of different preset values.

[0100] Example 2

[0101] In actual printing, printing on frustums or objects with similar shapes is a common application scenario. Because the circumference of the cross-section varies at different locations on a frustum, color differences can easily occur. This embodiment provides a method specifically designed to eliminate color differences in printing on frustums.

[0102] like Figure 9 As shown, the target object is a frustum, which includes a first end and a second end that are arranged opposite to each other. S2: Adjusting the number of pixels and the distribution of pixels in each pixel row of the image according to the cross-sectional perimeter of each pixel row on the target object includes the following steps;

[0103] S201: Obtain the perimeter L1 of the cross section at the first end of the frustum;

[0104] S202: Obtain the perimeter L2 of the cross section at the second end of the frustum;

[0105] S203: Obtain the number of pixels Nr and the height D of the frustum corresponding to the pixel row at the first end position of the frustum. H ;

[0106] S204: Based on L1, L2 and D H Calculate the weight of the number of valid pixels in each pixel row;

[0107] S205: Calculate the effective pixel count of each pixel row based on the effective pixel count weight of each pixel row and the pixel count of the pixel row corresponding to the first end position of the frustum, where the effective pixel count of the pixel row j rows away from the first end position of the frustum is N. j =Nr×W j W j The effective pixel count weight is the pixel row that is j rows away from the first end of the frustum, where j is an integer greater than or equal to 1.

[0108] This step cleverly utilizes the characteristic that the circumference of the cross section of the frustum changes proportionally with the height of the frustum. By directly calculating the number of effective pixels in each pixel row by the number j of pixel rows that are far from the bottom or fixed end of the frustum, the calculation process is simplified and facilitates rapid computer processing.

[0109] In S204: calculating the effective pixel count weights for each pixel row based on L1, L2, and H, according to formula W... j =1-d j / D H +(L2×d j ) / (L1×D H ) Calculate the weight of the number of effective pixels in each pixel row, where d j Let j be the distance of the pixel row that is j rows away from the first end of the frustum from the first end of the frustum.

[0110] For example, if the target object is a frustum-shaped cup, with a circumference of L1 = 20cm at the rim and L2 = 15cm at the base, and a distance D = 25cm from the rim to the base, and a printing resolution of 900 DPI from the rim to the base and 600 DPI at the rim, then the actual pixel size of the image to be printed is 4724 × 8858. If the distance from the first end of the frustum to the pixel row j is 10cm, then the effective pixel count weight of the j-th pixel row is W. j =1 - 10 / 25 + (15 × 10) / (20 × 25), then the number of effective pixels N in the pixel row j rows away from the rim of the cup is N. j = (1-10 / 25+(15×10) / (20×25))×8858.

[0111] To accelerate computer processing speed, in this embodiment, formula W can also be used. j =1-j / N+(L2×j) / (L1×N) calculates the effective pixel weight of a pixel row that is j rows away from the first end of the frustum, where N is the total number of pixel rows. Using the aforementioned formula, the number of rows j can be used directly for calculation without needing to know the specific distance, thus making it more convenient for computer processing.

[0112] S205: Select effective pixels from the original pixels of each pixel row according to the number of effective pixels in each pixel row, so that the effective pixels of each pixel row are evenly distributed in each pixel row.

[0113] When selecting valid pixels in each pixel row, consecutive pixels in the valuable region or region of interest are selected as valid pixels.

[0114] Example 2

[0115] Please see Figure 10 This embodiment provides an apparatus for processing variable perimeter printing data, used to print images on target objects with inconsistent cross-sectional perimeters. The pixels of the printed image are arranged in several rows on the target object. The apparatus includes:

[0116] A raw print data acquisition module, which is used to acquire the raw print data of the image;

[0117] The effective pixel count determination module is used to determine the effective pixel count of each pixel row based on the perimeter of the cross section at the position of each pixel row on the target object.

[0118] The effective pixel selection module is used to select consecutive pixels from the original pixels in each pixel row as effective pixels based on the number of effective pixels in each pixel row.

[0119] The data processing module is used to replace the original print data corresponding to the pixels in each pixel row with the original print data corresponding to the effective pixels in each pixel row to obtain the target print data.

[0120] The data processing module further includes:

[0121] The effective pixel print data acquisition submodule is used to acquire the print data corresponding to the effective pixels of each pixel row from the original print data.

[0122] The distribution location acquisition submodule is used to determine the distribution location of the effective pixels in the corresponding pixel row based on the number of effective pixels in each pixel row.

[0123] The data replacement submodule is used to replace the print data of the pixels located at the distribution positions in each pixel row with the print data of the corresponding valid pixels, and set the print data of the remaining pixels to not print to obtain the target print data.

[0124] Example 3

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

[0126] The device for processing variable perimeter printing data 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 device for processing variable perimeter printing data 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 variable perimeter printing data processing method 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 variable perimeter printing data processing methods in the above embodiments.

[0135] The above is a detailed description of the method, apparatus, equipment, and storage medium for processing variable perimeter printing data 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 method of processing variable-length print data, characterized by, The application relates to a data processing method for printing an image on a target object with inconsistent cross-sectional perimeters, wherein the printed image is arranged into a plurality of pixel rows on the target object, and the method comprises the following steps: obtaining original printing data of the image; determining the number of effective pixels of each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object; selecting continuous pixels from the original pixels of each pixel row as effective pixels according to the number of effective pixels of each pixel row; replacing the original printing data corresponding to the original pixels of each pixel row with printing data corresponding to the effective pixels of each pixel row to obtain target printing data, which comprises the following steps: obtaining the printing data corresponding to the effective pixels of each pixel row from the original printing data; determining the distribution position of the effective pixels of each pixel row in the corresponding pixel row according to the number of effective pixels of each pixel row; replacing the printing data of the pixels located at the distribution position in each pixel row with the printing data of the corresponding effective pixels, and setting the printing data of the remaining pixels as no ink to obtain the target printing data.

2. The method of variable-pitch print data processing of claim 1, wherein, The method for determining the distribution position of the effective pixels of each pixel row in the corresponding pixel row according to the number of effective pixels of each pixel row comprises the following steps: obtaining the number of effective pixels of each pixel row; selecting positions with the corresponding number and uniformly distributed in each pixel row from the positions of the original pixels of each pixel row as effective positions according to the number of effective pixels of each pixel row; allocating the effective pixels to the effective positions, wherein one effective pixel corresponds to one effective position.

3. The method of variable-pitch print data processing of claim 1, wherein, The method for determining the number of effective pixels of each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object comprises the following steps: determining the pixel number weight of each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object and the cross-sectional perimeter of a reference position on the target object; obtaining the number of pixels of the pixel row corresponding to the reference position on the target object; The effective pixel point number of each pixel row is calculated according to the pixel point number weight of each pixel row and the pixel point number of the pixel row corresponding to the reference position. It is assumed that the pixel point number of the pixel row corresponding to the reference position is Nc, the pixel point number of the i-th pixel row is N i , the pixel point number weight of the i-th pixel row is Q i , then N i = Nc×Q i , wherein i is an integer greater than or equal to 1.

4. The method of variable-pitch print data processing of claim 3, wherein: The method for determining the pixel number weight of each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object and the cross-sectional perimeter of a reference position on the target object comprises the following steps: obtaining the cross-sectional perimeter of the position of each pixel row on the target object; obtaining the cross-sectional perimeter of the reference position on the target object; The pixel point quantity weight of each row of pixels is calculated according to the cross-sectional perimeter of the position of each pixel row on the target object and the cross-sectional perimeter of the reference position on the target object, the cross-sectional perimeter of the reference position on the target object is Lc, and the cross-sectional perimeter of the i-th row of pixel rows is Li i Q i =L i / Lc, wherein Q i is the pixel point quantity weight of the i-th row of pixel rows.

5. The method of variable-pitch print data processing of claim 1, wherein, The target object is a circular truncated cone, the circular truncated cone comprises oppositely arranged first and second end portions, and the method for determining the number of effective pixels of each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object comprises the following steps: obtaining the cross-sectional perimeter L1 of the position of the first end portion of the circular truncated cone; obtaining the cross-sectional perimeter L2 of the position of the second end portion of the circular truncated cone; Obtaining the pixel point number Nr of the pixel row corresponding to the first end position of the circular truncated cone and the height D of the circular truncated cone H ; According to L1, L2 and D H Calculate the pixel point number weight of each pixel row; The effective pixel point number of each pixel row is calculated according to the pixel point number weight of each pixel row and the pixel point number of the pixel row corresponding to the first end position of the circular truncated cone, wherein the effective pixel point number N of the pixel row j rows away from the first end position of the circular truncated cone j = Nr×W j , wherein W j is the pixel point number weight of the pixel row j rows away from the first end position of the circular truncated cone, and j is an integer greater than or equal to 1.

6. The method of variable-pitch print data processing of claim 5, wherein, According to L1, L2 and D H In calculating the pixel count weight for each pixel row, according to formula W... j =1- d j / D H +(L2×d j ) / (L1×D H ) Calculate the pixel count weight for each pixel row, where d j Let j be the distance of the pixel row that is j rows away from the first end of the frustum from the first end of the frustum.

7. An apparatus for processing variable-stroke printing data, characterized by The application also relates to a device for printing an image on a target object with inconsistent cross-sectional perimeters, wherein the printed image is arranged into a plurality of pixel rows on the target object, and the device comprises: an original printing data obtaining module for obtaining original printing data of the image; an effective pixel number determining module for determining the number of effective pixels of each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object; The effective pixel point selection module is configured to select continuous pixel points from original pixel points of each pixel row as effective pixel points according to the number of effective pixel points of each pixel row. The data processing module is configured to replace print data corresponding to original pixel points of each pixel row with original print data corresponding to effective pixel points of each pixel row to obtain target print data. The data processing module further includes: An effective pixel point print data acquisition submodule is configured to acquire print data corresponding to effective pixel points of each pixel row from original print data. A distribution position acquisition submodule is configured to determine distribution positions of effective pixel points of each pixel row in the corresponding pixel row according to the number of effective pixel points of each pixel row. A data replacement submodule is configured to replace print data of pixel points located at the distribution positions in each pixel row with print data of corresponding effective pixel points, and set print data of remaining pixel points as no ink to obtain target print data.

8. An apparatus for processing variable-stroke printing data, characterized by comprising: The computer program instructions, when executed by the processor, implement the method of any one of claims 1-6. The computer program instructions, when executed by the processor, implement the method of any one of claims 1-6.

9. A storage medium having stored thereon computer program instructions, characterized in that, ​

Citation Information

Patent Citations

  • Methods and systems for screening images

    CN113196735A

  • Inkjet printing apparatus and printing method

    WO2017120693A1