Method, device, equipment and storage medium for eliminating printing color difference
By adjusting the pixel density on irregular objects to match the cross-sectional perimeter, the problem of color depth differences in the printing of irregular objects was solved, achieving uniform image color and high-quality printing results.
Patent Information
- Application Number
- CN202111329305.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-02
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2041-09-02
AI Technical Summary
In existing technologies, users often find it difficult to find suitable printing equipment nearby to print irregular items, and when printing irregular objects, there are obvious differences in color depth, which affects image quality.
By acquiring the initial printing data of the image to be printed, the pixel density is adjusted according to the cross-sectional perimeter of each pixel row on the target object. The density correction weight method is used to adjust the pixel density to match the cross-sectional perimeter of the target object, and the initial printing data is modified to eliminate color difference.
When printing images on irregular objects, adjusting the pixel density makes the overall color of the image uniform, eliminating color difference, without changing the number and density of pixels. The adjustment method is simple and makes little change to the original image.
Smart Images

Figure CN115756342B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application filed on September 2, 2021, entitled "Cloud Printing Method, Apparatus, Device and Storage Medium" with application number 202111023204.3. Technical Field
[0002] This invention relates to the field of printing technology, and in particular to a method, apparatus, device, and storage medium for eliminating color differences in printing. Background Technology
[0003] In practical applications, some users often need to print on irregularly shaped items, such as vases and teacups. However, currently, there are relatively few printing devices capable of printing on irregularly shaped items, making it difficult for users to find suitable printing equipment nearby. To address this, cloud printing platforms can be used. Users simply upload the image to be printed and the printing requirements to the cloud printing platform, which then finds a matching printing device based on the requirements. Since a printed image consists of many pixels arranged in rows on the printing medium, for regularly shaped printing media such as cylinders, the perimeter of the printing medium is the same for each row of pixels. For irregularly shaped printing media such as cones or frustums, the perimeter of the printing medium differs for different rows of pixels. After printing, the denser the pixels, the higher the image resolution. Image resolution is usually expressed in pixels per inch (DPI). A higher DPI value indicates higher image resolution, and vice versa. However, when printing objects with different circumferences at different locations, such as cones, the pixels at the smaller circumference locations are more densely packed than those at the larger circumference locations. In other words, the DPI value at the smaller circumference locations is higher than the DPI value at the larger circumference locations. This results in significant differences in color depth at different locations of the printed object with the same amount of data, thus affecting the quality of the printed image. Therefore, current printing equipment produces poor printing results for irregular items. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method, apparatus, device and storage medium for eliminating printing color differences, in order to solve the technical problem that users in the prior art cannot find suitable printing equipment nearby to print irregular items, and that obvious differences in color depth occur when printing irregular objects.
[0005] The technical solution adopted in this invention is:
[0006] In a first aspect, the present invention provides a method for eliminating color difference in printing, 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:
[0007] Obtain the initial printing data of the image to be printed after color management processing;
[0008] Obtain the density of each pixel in the image to be printed based on the initial printing data;
[0009] The density of each pixel in each pixel row is adjusted according to the cross-sectional perimeter of the position of each pixel row on the target object.
[0010] The initial printing data is modified based on the concentration of each pixel obtained after adjustment.
[0011] Preferably, adjusting the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object includes the following steps;
[0012] The concentration correction weight of each pixel row is determined based on the perimeter of the cross section at the location of each pixel row on the target object.
[0013] The concentration of each pixel in each pixel row is adjusted according to the concentration correction weight of each pixel row.
[0014] Preferably, assuming the pixels of the printed image are arranged in N rows on the target object, the step of determining the density correction weight of each pixel row based on the cross-sectional perimeter of the position of each pixel row on the target object includes the following steps:
[0015] Obtain the perimeter of the cross section at the position of each pixel row on the target object;
[0016] Obtain the perimeter of the cross section at a reference position on the target object;
[0017] The density correction weight for each pixel row is calculated based on the perimeter of the cross-section at its location on the target object and the perimeter of the cross-section at the reference position on the target object. Let W be the density correction weight for the pixel in the i-th row. i Then W i =C i / C r C i C represents the perimeter of the cross section at the position of the i-th pixel row on the target object. r Represents the perimeter of the cross section at the reference position on the target object, i = 1, 2, ..., N-1, N.
[0018] Preferably, obtaining the perimeter of the cross-section at a reference position on the target object includes the following steps:
[0019] Obtain the initial total print ink volume based on the initial print data;
[0020] The total amount of ink to print when the position of different pixel rows on the target object is used as a reference position;
[0021] Compare the difference between the total printed ink volume corresponding to different pixel rows and the initial total printed ink volume;
[0022] The perimeter of the cross section at the position of the pixel row corresponding to the smallest absolute value among the differences is obtained as the perimeter of the cross section at the reference position.
[0023] Preferably, in obtaining the perimeter of the cross section at the reference position on the target object, the perimeter of the cross section at the end of the target object is selected as the perimeter of the cross section at the reference position on the target object.
[0024] Preferably, in adjusting the pixel density of each pixel in each pixel row according to the cross-sectional perimeter of each pixel row's position on the target object, the pixel density of pixel rows with smaller cross-sectional perimeters is reduced, and the pixel density of pixel rows with larger cross-sectional perimeters is increased.
[0025] 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 adjusting the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object includes the following steps;
[0026] Obtain the perimeter C1 of the cross section at the first end position and the perimeter C2 of the cross section at the second end position of the frustum;
[0027] Get the height H of the frustum;
[0028] Calculate the density correction weight for each pixel row based on C1, C2, and H. Let d be the distance between the g-th pixel row and the first end of the frustum. g Let W be the density correction weight for the g-th pixel row. g Then W g = 1 - dg / H + (C2 × dg) / (C1 × H);
[0029] The concentration of each pixel is adjusted based on the concentration of each pixel and the concentration of the pixel row in which each pixel belongs, using a weighted adjustment method. Let Ma be the adjusted concentration of the j-th pixel in the g-th row. g,j , then Ma g,j =W g ×Mb g,j Mb g,j This represents the concentration of the j-th pixel in the g-th row before adjustment, where j is an integer greater than or equal to 1.
[0030] In a second aspect, the present invention also provides an apparatus for eliminating printing color differences, used for printing 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, the apparatus comprising:
[0031] An initial print data acquisition module is used to acquire the initial print data of the image to be printed after color management processing.
[0032] A pixel density acquisition module is used to acquire the density of each pixel in the image to be printed based on the initial printing data.
[0033] A pixel density adjustment module is used to adjust the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object.
[0034] A data modification module is used to modify the initial printing data based on the concentration of each pixel obtained after adjustment.
[0035] Thirdly, the present invention also provides a cloud printing device, 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.
[0036] 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.
[0037] Beneficial effects: When printing images on target objects with inconsistent cross-sectional perimeters, the method, apparatus, device, and storage medium of the present invention for eliminating printing color differences adjust the density of each pixel in each pixel row according to the cross-sectional perimeter of each pixel row's position on the target object, so that the adjusted pixel density of each pixel row matches the cross-sectional perimeter of each pixel row's position on the target object. After the aforementioned adjustment, although the cross-sectional perimeters of different positions on the target object are inconsistent, the overall color depth of the image on the target object is very uniform, and the printed image will not have color differences. Furthermore, the adjustment method of this embodiment does not change the number and density of pixels in the original image, the adjustment method is simple, and the modification to the original image is relatively small. Attached Figure Description
[0038] 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.
[0039] Figure 1 A schematic diagram of the cross-section of the target object;
[0040] Figure 2 This is a flowchart of the cloud printing method of the present invention;
[0041] Figure 3 This is a schematic diagram of the pixel arrangement in the prior art;
[0042] Figure 4 This is a flowchart of the method for adjusting pixel density by cross-sectional perimeter according to the present invention;
[0043] Figure 5 This is a flowchart of the method for obtaining concentration correction weights based on the cross-sectional perimeter according to the present invention;
[0044] Figure 6 This is a flowchart of the method for adjusting pixel concentration based on concentration correction weight according to the present invention;
[0045] Figure 7 This is a flowchart of the method for selecting a reference position based on the total printing ink volume according to the present invention;
[0046] Figure 8 This is a schematic diagram of the pixel density distribution in the initial printed data of this invention;
[0047] Figure 9 This is a schematic diagram of the pixel density distribution after density adjustment according to the present invention;
[0048] Figure 10 This is a schematic diagram of the structure of the printing color difference elimination device of the present invention;
[0049] Figure 11 This is a schematic diagram of the structure of the printing color difference elimination device of the present invention;
[0050] Figure 12 This is a flowchart of the method for eliminating color difference in printing according to the present invention. Detailed Implementation
[0051] 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.
[0052] Example 1
[0053] This embodiment provides a cloud printing method that utilizes the internet to preprocess printing data in the cloud, allowing users to match suitable remote printing devices through the cloud platform according to their printing needs. This enables printing images on target objects with inconsistent cross-sectional perimeters, with the pixels of the printed image arranged in several rows on the target object. Figure 1 As shown, for ease of description, in this paper, for a given three-dimensional object, any direction is arbitrarily designated 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. When the three-dimensional object is cut from different positions in the reference direction, the perimeter of the resulting cross-section 21 may be the same or different. If the perimeter of the cross-section 21 obtained by cutting the three-dimensional object from at least two different positions is different, it belongs to the category of variable perimeter objects as described in this paper. If the perimeter of the cross-section obtained by cutting the three-dimensional object from any position is the same, it is called an equal perimeter object.
[0054] The printing method includes the following steps:
[0055] S01: Obtain the print request and verification information sent by the cloud server;
[0056] When a user needs to customize and print objects with varying perimeters, but there are no suitable printing devices available nearby, the cloud printing method described in this embodiment can be used for remote printing via the internet. The user sending the cloud printing service sends a print request and print job to the cloud server. The cloud server then filters out printing devices that meet the requirements of the print job based on the request and job, and sends the print request and verification information to those devices.
[0057] S02: Determine whether to accept the print request based on the print request and verification information;
[0058] After receiving a print request and verification information, the printing device verifies whether the print request is compliant with regulations, such as whether it was sent through a legitimate channel and whether the cloud server sending the print request has the authority to remotely print using this printing device. If the verification passes, the device determines that it can receive the print request.
[0059] S03: If a print request is received, send a request to the cloud server to transmit the initial print data;
[0060] After successful verification, the printing device sends a message to the cloud server, requesting the cloud server to transmit the initial printing data.
[0061] S1: Receive the print image sent by the cloud server and obtain the initial print data after color management processing;
[0062] Color difference management includes, but is not limited to, color calibration. This step delegates color difference management to a cloud server with stronger processing capabilities, which can reduce the amount of data processing on the printing equipment and improve printing efficiency.
[0063] S2: Obtain the density of each pixel in the image to be printed based on the initial printing data;
[0064] like Figure 8As shown, in the initial printing data corresponding to the image to be printed, each pixel has its own data, including data representing the density of each pixel. Each rectangle in the figure represents a pixel, and the data consisting of letters and numbers within each rectangle represents the density data of the pixel corresponding to that rectangle. The letter indicates the color of the printing material used to print that pixel, followed by a number indicating the density of that color; the larger the number, the greater the density of the color. It can be seen from the figure that the pixels of the printed image are arranged in N rows and M columns (N and M are integers greater than or equal to 1). Each pixel is formed by printing with four colors: C, M, Y, and K. C, M, Y, and K represent cyan ink (C), magenta ink (M), yellow ink (Y), and black ink (K), respectively. It is understood that the number and types of colors used for printing pixels in this application are not limited to the aforementioned embodiments. In other embodiments, the colors used for printing pixels are not limited to the aforementioned four. This application is applicable to any combination of numbers and types of colors.
[0065] S3: Adjust the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object;
[0066] like Figure 3 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.
[0067] Once the perimeter of the cross-section at the location of a certain pixel row on the target object is known, the pixel density of each pixel row in the image can be adjusted based on the cross-sectional perimeter.
[0068] For pixels with a small cross-sectional perimeter, the pixel density of that row can be reduced; for pixels with a large cross-sectional perimeter, the pixel density of that row can be increased.
[0069] For example, if an image consisting of four rows of pixels is printed on a target object, and the perimeter of the cross-section of each of these four rows on the target object increases sequentially from row 2 to row 4, then row 3, and finally row 1, then the pixel density of each of these four rows can be adjusted accordingly. The ratio of the adjusted pixel density to the original pixel density can increase sequentially from row 2 to row 1. For example, if the ratio of the adjusted pixel density of row 2 to the original pixel density is t2, the ratio of the adjusted pixel density of row 4 to the original pixel density is t4, the ratio of the adjusted pixel density of row 3 to the original pixel density is t3, and the ratio of the adjusted pixel density of row 1 to the original pixel density is t1, then t2 < t4 < t3 < t1.
[0070] S4: Modify the initial printing data based on the concentration of each pixel obtained after adjustment.
[0071] After adjusting the density of each pixel, the initial print data for each pixel can be modified accordingly. The modified print data undergoes halftone processing or other subsequent processing to obtain the final target print data. The printing device then prints the image onto the target object based on this final target print data.
[0072] In this embodiment, when printing images on target objects with inconsistent perimeters, the density of each pixel in each pixel row is adjusted according to the cross-sectional perimeter of the position of each pixel row on the target object, so that the pixel density of each pixel row after adjustment matches the cross-sectional perimeter of the position of each pixel row on the target object.
[0073] Before adjustment, the pixels were denser in areas with smaller perimeters, resulting in a noticeable color difference in the overall image; that is, the color was darker in areas with smaller perimeters. After the aforementioned adjustment, although the perimeters of the cross-sections of the target object are inconsistent across different locations, the overall color depth of the image on the target object is very uniform, and the printed image will not have color differences. Furthermore, the adjustment method used in this embodiment does not change the number and density of pixels in the original image; the adjustment method is simple, and the modification to the original image is relatively small.
[0074] This embodiment uses cloud-based color management, which can make full use of the cloud's processing power and improve the printing efficiency of the printing equipment.
[0075] Example 2
[0076] This embodiment provides a cloud printing device for printing 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 device includes:
[0077] A print request acquisition module is used to acquire print requests and verification information sent by the cloud server.
[0078] The judgment module is used to determine whether to accept the print request based on the print request and the verification information;
[0079] A data transmission request sending module is used to send an initial print data transmission request to the cloud server if a print request is received.
[0080] An initial print data acquisition module is used to acquire the initial print data of the image to be printed after color management processing.
[0081] A pixel density acquisition module is used to acquire the density of each pixel in the image to be printed based on the initial printing data.
[0082] A pixel density adjustment module is used to adjust the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object.
[0083] A data modification module is used to modify the initial printing data based on the concentration of each pixel obtained after adjustment.
[0084] Example 3
[0085] This embodiment provides a method for eliminating color difference in printing, used for printing images on a target object 20 with a variable perimeter, 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 12 As shown, the printing method includes the following steps:
[0086] S1: Obtain the initial printing data from the image to be printed after color management processing;
[0087] Color difference management includes, but is not limited to, color calibration.
[0088] S2: Obtain the density of each pixel in the image to be printed based on the initial printing data;
[0089] like Figure 8As shown, in the initial printing data corresponding to the image to be printed, each pixel has its own data, including data representing the density of each pixel. Each rectangle in the figure represents a pixel, and the data consisting of letters and numbers within each rectangle represents the density data of the pixel corresponding to that rectangle. The letter indicates the color of the printing material used to print that pixel, followed by a number indicating the density of that color; the larger the number, the greater the density of the color. It can be seen from the figure that the pixels of the printed image are arranged in N rows and M columns (N and M are integers greater than or equal to 1). Each pixel is formed by printing with four colors: C, M, Y, and K. C, M, Y, and K represent cyan ink (C), magenta ink (M), yellow ink (Y), and black ink (K), respectively. It is understood that the number and types of colors used for printing pixels in this application are not limited to the aforementioned embodiments. In other embodiments, the colors used for printing pixels are not limited to the aforementioned four. This application is applicable to any combination of numbers and types of colors.
[0090] S3: Adjust the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object;
[0091] like Figure 3 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.
[0092] Once the perimeter of the cross-section at the location of a certain pixel row on the target object is known, the pixel density of each pixel row in the image can be adjusted based on the cross-sectional perimeter.
[0093] For pixels with a small cross-sectional perimeter, the pixel density of that row can be reduced; for pixels with a large cross-sectional perimeter, the pixel density of that row can be increased.
[0094] For example, if an image consisting of four rows of pixels is printed on a target object, and the perimeter of the cross-section of each of these four rows on the target object increases sequentially from row 2 to row 4, then row 3, and finally row 1, then the pixel density of each of these four rows can be adjusted accordingly. The ratio of the adjusted pixel density to the original pixel density can increase sequentially from row 2 to row 1. For example, if the ratio of the adjusted pixel density of row 2 to the original pixel density is t2, the ratio of the adjusted pixel density of row 4 to the original pixel density is t4, the ratio of the adjusted pixel density of row 3 to the original pixel density is t3, and the ratio of the adjusted pixel density of row 1 to the original pixel density is t1, then t2 < t4 < t3 < t1.
[0095] S4: Modify the initial printing data based on the concentration of each pixel obtained after adjustment.
[0096] After adjusting the density of each pixel, the initial print data for each pixel can be modified accordingly. The modified print data undergoes halftone processing or other subsequent processing to obtain the final target print data. The printing device then prints the image onto the target object based on this final target print data.
[0097] In this embodiment, when printing images on target objects with inconsistent perimeters, the density of each pixel in each pixel row is adjusted according to the cross-sectional perimeter of the position of each pixel row on the target object, so that the pixel density of each pixel row after adjustment matches the cross-sectional perimeter of the position of each pixel row on the target object.
[0098] Before adjustment, the pixels were denser in areas with smaller perimeters, resulting in a noticeable color difference in the overall image; that is, the color was darker in areas with smaller perimeters. After the aforementioned adjustment, although the perimeters of the cross-sections of the target object are inconsistent across different locations, the overall color depth of the image on the target object is very uniform, and the printed image will not have color differences. Furthermore, the adjustment method used in this embodiment does not change the number and density of pixels in the original image; the adjustment method is simple, and the modification to the original image is relatively small.
[0099] like Figure 4 As shown, in this embodiment, step S3: adjusting the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object includes the following steps;
[0100] S31: Determine the concentration correction weight of each pixel row based on the cross-sectional perimeter of the position of each pixel row on the target object;
[0101] The density correction weight Wi for each pixel row is a ratio. The density correction weight Wi for a given pixel row represents the ratio between the density of the pixels in that row after density adjustment and the density of the pixels in the row before adjustment. If the density correction weight Wi for a pixel row is less than 1, it means the density of the pixels in that row will be reduced; the smaller the density correction weight Wi, the lower the density of the adjusted pixels. If the density correction weight Wi for a pixel row is greater than 1, it means the density of the pixels in that row will be increased; the larger the density correction weight Wi, the higher the density of the adjusted pixels. If the density correction weight Wi for a pixel row is equal to 1, it means the density of the pixels in that row does not need to be adjusted.
[0102] S32: Adjust the concentration of each pixel in each pixel row according to the concentration correction weight.
[0103] For example, if the density correction weight Wi of the 4th pixel row is 0.6, it means that the pixel density of the 4th pixel row is adjusted to 70% of the original. As another example, if the pixel number weight Qx of the 3rd pixel row is 0.7, it means that the number of pixels in the 3rd pixel row accounts for 70% of the number of reference pixels.
[0104] like Figure 5 As shown, assuming the pixels of the printed image are arranged in N rows on the target object, step S31: determining the density correction weight of each pixel row based on the cross-sectional perimeter of its position on the target object includes the following steps:
[0105] S311: Obtain the perimeter of the cross section at the position of each pixel row on the target object;
[0106] S312: Obtain the perimeter of the cross section at a reference position on the target object;
[0107] S313: Calculate the density correction weight for 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. Let the density correction weight of the i-th row be W. i Then W i =C i / C r C i C represents the perimeter of the cross section at the position of the i-th pixel row on the target object. r Represents the perimeter of the cross section at the reference position on the target object, i = 1, 2, ..., N-1, N.
[0108] The aforementioned steps describe a method for calculating the density correction weight of each pixel row based on the cross-sectional perimeter. Specifically, the ratio of the cross-sectional perimeter Ci at the location of each pixel row on the target object to the cross-sectional perimeter Cr at a reference location on the target object is used as the density correction weight for each pixel row. This calculation method ensures that pixel rows with larger cross-sectional perimeters have larger density correction weights, while those with smaller perimeters have smaller weights, with the density correction weights being directly proportional to the corresponding cross-sectional perimeter. Adjusting the pixel density of each pixel row using the density correction weights obtained in this manner allows the pixel density of each row to match the corresponding cross-sectional perimeter, resulting in more uniform color depth across the entire image and ensuring that the final printed image does not exhibit color differences.
[0109] 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 easy to measure, 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 where the number of pixels is known or easily calculated, and then the cross-sectional perimeter at that position can be measured or calculated.
[0110] like Figure 6 As shown, in this embodiment, step S32: adjusting the density of each pixel in the image to be printed according to the density correction weight of each pixel row includes the following steps:
[0111] S321: Obtain the concentration of each pixel in each pixel row;
[0112] This step can find the data representing the concentration of each pixel in the initial printed data, and obtain the concentration value of each pixel from this data.
[0113] S322: Obtain the concentration correction weight of the pixel row where each pixel is located;
[0114] S323: Adjust the concentration of each pixel based on the concentration of each pixel and the concentration of the pixel row it belongs to, and let Ma be the adjusted concentration of the k-th pixel in the i-th row. i,k , then Ma i,k =W i ×Mb i,k Mb i,k This represents the concentration of the k-th pixel in the i-th row before adjustment, where k is an integer greater than or equal to 1.
[0115] Ma i,k and Mb i,kIt can be an array, where each element represents the density of the corresponding color. For example, the pixel in the first column of the Nth row of the image is formed by printing with four colors: C, M, Y, and K. Where the density of color C is 80, the density of color M is 90, the density of color Y is 95, and the density of color K is 70, then Mb i,k = (80, 90, 95, 70), let W be the density correction weight for the (N-1)th row of pixels. N-1 Then Ma i,k = (80×W) N-1 90×W N-1 95×W N-1 70×W N-1 That is, after concentration correction, the concentration of color C is 80 × W. N-1 The concentration of color M is 90 × W. N-1 The concentration of color Y is 95 × W. N-1 The concentration of color K is 70 × W. N-1 .
[0116] This step, after knowing the density correction weight of each pixel row, directly multiplies the original density reference position by the corresponding density correction weight to obtain the adjusted density of each pixel.
[0117] This embodiment uses the density correction weight of each pixel row to adjust the density of each pixel in the image to be printed. In this way, even if the images to be printed on the same target object are different, this embodiment can accurately modify the initial printing data of different images by calculating the density correction weight only once, thereby realizing fast and flexible density adjustment for different printing tasks to eliminate color difference in the final printed image.
[0118] After adjusting the pixel density using the method of this embodiment, the amount of ink consumed in printing the image will change. For example... Figure 7 As shown, in this embodiment, step S312: obtaining the perimeter of the cross-section at the reference position on the target object includes the following steps:
[0119] S3121: Obtain the initial total print ink volume based on the initial print data;
[0120] Initial total print ink volume refers to the amount of ink consumed after printing according to the initial print data.
[0121] S3122: The total printing ink volume M0 corresponding to the position of different pixel rows on the target object as a reference position;
[0122] For example, if the image to be printed is arranged in N rows, then when the position of the first row of pixels on the target object is used as a reference position, the total ink volume required to print the adjusted print data after adjusting the pixel density according to the aforementioned density adjustment method is denoted as M1. M1 is the total printing ink volume corresponding to the position of the first row of pixels on the target object as the reference position. Similarly, the total printing ink volume M2 corresponding to the position of the second row of pixels on the target object as the reference position, ..., the total printing ink volume M1 corresponding to the position of the (N-1)th row of pixels on the target object as the reference position is... N-1 The total amount of ink M printed is obtained when the position of the Nth row pixel on the target object is used as a reference position. N .
[0123] S3123: Compare the difference between the total printed ink volume corresponding to different pixel rows and the initial total printed ink volume;
[0124] Wherein, the difference between the total printed ink volume corresponding to the pixels in the first row and the initial total printed ink volume is df1 = M1 - M0, the difference between the total printed ink volume corresponding to the pixels in the second row and the initial total printed ink volume is df2 = M2 - M0, ..., the difference between the total printed ink volume corresponding to the pixels in the (N-1)th row and the initial total printed ink volume is df N-1 =M N-1 -M0, the difference between the total printed ink volume and the initial total printed ink volume corresponding to the Nth row pixel (df) N =M N -M0. Compare df1, df2, ..., df N-1 df N-1 The magnitude of the absolute value.
[0125] S3124: Obtain the perimeter of the cross section of the pixel row corresponding to the smallest absolute value among the differences as the perimeter of the cross section of the reference position on the target object.
[0126] For example, if the absolute value of df7 is the smallest, then the position of the 7th row of pixels on the target object is used as the reference position.
[0127] Using the aforementioned method can minimize the change in the overall printing ink volume after concentration adjustment, eliminating color difference while making the printing ink volume of the adjusted image close to that of the original image.
[0128] Furthermore, in this embodiment, step S312: obtaining the perimeter of the cross-section at a reference position on the target object includes the following steps:
[0129] S3125: Obtain the remaining available ink level of the printing device;
[0130] Remaining available ink is the amount of ink that the printing device can use for printing without adding ink.
[0131] S3126: Determine whether the total printing ink volume after concentration adjustment is likely to be less than or equal to the remaining usable ink volume;
[0132] Since the total ink volume varies after ink volume adjustment using different reference positions, this step compares the minimum total ink volume with the remaining usable ink volume. If the minimum total ink volume is greater than the remaining usable ink volume, it indicates that the total ink volume after density adjustment cannot be less than or equal to the remaining usable ink volume; conversely, the total ink volume may be less than or equal to the remaining usable ink volume.
[0133] S3127: If so, determine the reference position based on the remaining available ink and obtain the cross-sectional perimeter of the reference position;
[0134] If the total printed ink volume is less than or equal to the remaining available ink volume, it means that printing can proceed according to the density adjustment data without adding ink. In this case, select the position where the total printed ink volume after density adjustment is less than or equal to the remaining available ink volume as a reference position for density adjustment.
[0135] S3128: Otherwise, send an ink refill prompt message.
[0136] If the total ink usage cannot be less than or equal to the remaining available ink, an ink refill prompt message will be issued, prompting the user to add ink to the printing device to complete the printing task.
[0137] Using the aforementioned method can effectively avoid the situation where the printer ink is insufficient after adjusting the ink concentration.
[0138] Example 4
[0139] In actual printing, printing on a circular platform is a common application scenario. Because the circumference of the cross-section varies at different locations on the platform, color differences can easily occur. This embodiment provides a method specifically designed to eliminate color differences when printing on circular platforms.
[0140] The target object is a frustum, which includes a first end and a second end that are arranged opposite to each other. S3: Adjusting the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object includes the following steps;
[0141] S301: Obtain the perimeter C1 of the cross section at the first end position and the perimeter C2 of the cross section at the second end position of the frustum;
[0142] S302: Get the height H of the frustum;
[0143] S303: Calculate the density correction weight for each pixel row based on C1, C2, and H. Let d be the distance between the g-th pixel row and the first end of the frustum. g Let W be the density correction weight for the g-th pixel row. g Then W g =1-dg / H+(C2×dg) / (C1×H).
[0144] S304: Adjust the concentration of each pixel based on the concentration of each pixel and the concentration of the pixel row in which each pixel belongs, and let Ma be the adjusted concentration of the j-th pixel in the g-th row. g,j , then Ma g,j =W g ×Mb g,j Mb g,j This represents the concentration of the j-th pixel in the g-th row before adjustment, where j is an integer greater than or equal to 1.
[0145] This step cleverly utilizes the characteristic that the circumference of a frustum's cross-section changes proportionally with its axial position. It calculates the density correction weights for pixels at various positions on the frustum using readily available data such as the circumferences of the two ends of the frustum, the height of the frustum, and the distance of each pixel row from one end of the frustum. This simplifies the calculation process and facilitates faster computer processing. The pixel density distribution in the initial printed data is shown below. Figure 8 As shown, the density distribution of the pixels after density adjustment is as follows: Figure 9 As shown.
[0146] Where there is no conflict between the technical solutions, the technical solution in the printing method of this embodiment can also be applied to the cloud printing method in embodiment 1.
[0147] Example 5
[0148] Please see Figure 10 This embodiment provides an apparatus for eliminating printing color differences, 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:
[0149] An initial print data acquisition module is used to acquire the initial print data of the image to be printed after color management processing.
[0150] A pixel density acquisition module is used to acquire the density of each pixel in the image to be printed based on the initial printing data.
[0151] A pixel density adjustment module is used to adjust the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object.
[0152] A data modification module is used to modify the initial printing data based on the concentration of each pixel obtained after adjustment.
[0153] The pixel density adjustment module also includes:
[0154] A concentration correction weight determination submodule is used to determine the concentration correction weight of each pixel row based on the cross-sectional perimeter of the position of each pixel row on the target object.
[0155] A concentration adjustment submodule is used to adjust the concentration of each pixel in each pixel row according to the concentration correction weight of each pixel row.
[0156] Example 6
[0157] In addition, combined Figure 11 The printing method described in the foregoing embodiments of the present invention can be implemented by the printing device of this embodiment. Figure 11 A schematic diagram of the hardware structure of the printing device provided in an embodiment of the present invention is shown.
[0158] The printing device in this embodiment may include a processor 401 and a memory 402 storing computer program instructions.
[0159] 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.
[0160] 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.
[0161] 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.
[0162] In one example, the printing device of this embodiment may further include a communication interface 403 and a bus 410. Wherein, as... Figure 6 As shown, the processor 401, memory 402, and communication interface 403 are connected through bus 410 and complete communication with each other.
[0163] 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.
[0164] 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.
[0165] Example 7
[0166] Furthermore, in conjunction with the printing methods described 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 these computer program instructions are executed by a processor, they implement any of the printing methods described in the above embodiments.
[0167] The above is a detailed description of the printing method, apparatus, device, and storage medium provided in the embodiments of the present invention.
[0168] 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.
[0169] 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.
[0170] 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.
[0171] 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 for eliminating color difference in printing, characterized in that, For printing images on target objects with inconsistent cross-sectional perimeters, the method for printing images with pixels arranged in rows on the target object includes the following steps: Obtain the initial printing data of the image to be printed after color management processing; Obtain the density of each pixel in the image to be printed based on the initial printing data; The density of each pixel in each pixel row is adjusted according to the cross-sectional perimeter of the position of each pixel row on the target object. The initial printing data is modified based on the adjusted density of each pixel. The step of adjusting the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object includes the following steps; The concentration correction weight of each pixel row is determined based on the perimeter of the cross section at the location of each pixel row on the target object. The concentration of each pixel in each pixel row is adjusted according to the concentration correction weight of each pixel row. Suppose the pixels of the printed image are arranged in N rows on the target object. The step of determining the density correction weight of each pixel row based on the cross-sectional perimeter of the position of each pixel row on the target object includes the following steps: Obtain the perimeter of the cross section at the position of each pixel row on the target object; Obtain the perimeter of the cross section at a reference position on the target object; The density correction weight of each pixel row is calculated based on 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. Let the density correction weight of the i-th pixel row be Wi, then Wi=Ci / Cr, where Ci represents the cross-sectional perimeter of the position of the i-th pixel row on the target object, and Cr represents the cross-sectional perimeter of the reference position on the target object, i=1,2……N-1,N; Obtaining the perimeter of the cross section at a reference position on the target object includes the following steps: Obtain the initial total print ink volume based on the initial print data; The total amount of ink to print when the position of different pixel rows on the target object is used as a reference position; Compare the difference between the total printed ink volume corresponding to different pixel rows and the initial total printed ink volume; The perimeter of the cross section at the position of the pixel row corresponding to the smallest absolute value among the differences is obtained as the perimeter of the cross section at the reference position.
2. The method for eliminating printing color difference according to claim 1, characterized in that, The step of adjusting the density of each pixel in the image to be printed based on the density correction weight of each pixel row includes the following steps: Obtain the concentration of each pixel in each pixel row; Obtain the concentration correction weight of the pixel row where each pixel is located; The concentration of each pixel is adjusted according to the concentration of each pixel and the concentration of the pixel row in which each pixel is located. Let Mai,k be the adjusted concentration of the kth pixel in the i-th row. Then Mai,k = Wi × Mbi,k, where Mbi,k represents the concentration of the kth pixel in the i-th row before adjustment, and k is an integer greater than or equal to 1.
3. The method for eliminating printing color difference according to claim 1, characterized in that, The process of obtaining the perimeter of the cross-section at a reference position on the target object includes the following steps: Find the remaining available ink level on the printer; Determine whether the total printing ink volume after concentration adjustment is likely to be less than or equal to the remaining usable ink volume; If so, the reference position is determined based on the remaining available ink, and the cross-sectional perimeter of the reference position is obtained; Otherwise, send an ink refill prompt message.
4. The method for eliminating printing color difference according to claim 1, characterized in that, The target object is a frustum, which includes a first end and a second end that are disposed opposite to each other. The step of adjusting the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object includes the following steps: Obtain the perimeter C1 of the cross section at the first end position and the perimeter C2 of the cross section at the second end position of the frustum; Get the height H of the frustum; Calculate the density correction weight of each pixel row based on C1, C2 and H. Let dg be the distance between the g-th pixel row and the first end of the frustum. Let Wg be the density correction weight of the g-th pixel row. Then Wg = 1 - dg / H + (C2 × dg) / (C1 × H). The concentration of each pixel is adjusted by modifying the concentration of each pixel and the concentration of the pixel row in which each pixel is located. Let the adjusted concentration of the j-th pixel in the g-th row be Mag,j. Then Mag,j = Wg × Mbg,j, where Mbg,j represents the concentration of the j-th pixel in the g-th row before adjustment, and j is an integer greater than or equal to 1.
5. An apparatus for eliminating color difference in printing, used to print an image on a target object with inconsistent cross-sectional perimeters, wherein the pixels of the printed image are arranged in several rows on the target object, the apparatus comprising: An initial print data acquisition module is used to acquire the initial print data of the image to be printed after color management processing. A pixel density acquisition module is used to acquire the density of each pixel in the image to be printed based on the initial printing data. A pixel density adjustment module is used to adjust the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object. A data modification module is used to modify the initial printing data according to the density of each pixel obtained after adjustment. The step of adjusting the density of each pixel in each pixel row according to the cross-sectional perimeter of the position of each pixel row on the target object includes the following steps; The concentration correction weight of each pixel row is determined based on the perimeter of the cross section at the location of each pixel row on the target object. The concentration of each pixel in each pixel row is adjusted according to the concentration correction weight of each pixel row. Suppose the pixels of the printed image are arranged in N rows on the target object. The step of determining the density correction weight of each pixel row based on the cross-sectional perimeter of the position of each pixel row on the target object includes the following steps: Obtain the perimeter of the cross section at the position of each pixel row on the target object; Obtain the perimeter of the cross section at a reference position on the target object; The density correction weight of each pixel row is calculated based on the cross-sectional perimeter of its position on the target object and the cross-sectional perimeter of the reference position on the target object. Let Wi be the density correction weight of the i-th pixel row, then Wi = Ci / Cr, where Ci represents the cross-sectional perimeter of the i-th pixel row on the target object, and Cr represents the cross-sectional perimeter of the reference position on the target object, i = 1, 2, ..., N-1, N. Obtaining the cross-sectional perimeter of the reference position on the target object includes the following steps: Obtain the initial total print ink volume based on the initial print data; The total amount of ink to print when the position of different pixel rows on the target object is used as a reference position; Compare the difference between the total printed ink volume corresponding to different pixel rows and the initial total printed ink volume; The perimeter of the cross section at the position of the pixel row corresponding to the smallest absolute value among the differences is obtained as the perimeter of the cross section at the reference position.
6. A device for eliminating color differences in printing, characterized in that, include: At least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method as described in any one of claims 1-5.
7. A storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by a processor, the method as described in any one of claims 1-5 is implemented.
Citation Information
Patent Citations
Image printing method, device and equipment, and storage medium
CN108960351A
Inkjet printing apparatus and printing method
WO2017120693A1