Method, device and equipment for dynamically adjusting printing chromatic aberration of printer and medium
The CMYK format image of the inkjet printer is adjusted by the Poisson disk sampling algorithm, and it is directly fed back to the printing engine, solving the problem of high labor intensity and inconvenient use of the printing color difference in the prior art, and achieving efficient and accurate color difference Adjustment.
Patent Information
- Application Number
- CN202411352769.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-09-26
AI Technical Summary
The existing inkjet printers have high labor intensity to adjust printing color difference, making it difficult to accurately correspond to image information to the nozzle position, which is inconvenient to use and requires high equipment performance.
By obtaining the RGB image collected by the visual system, converting it into CMYK format images, and using the Poisson disk sampling algorithm to adjust the dot according to the grayscale adjustment value, it is directly fed back to the printing engine to dynamically adjust the printing color difference.
Reduces the equipment performance requirements, avoids the inconvenience of re-checking the RIP adjustment range after adjusting the printing position, and improves the efficiency and accuracy of adjustment.
Smart Images

Figure CN119396351A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial inkjet printing control software, and in particular to a method, device, equipment and medium for dynamically adjusting the printing color difference of a printer. Background Art
[0002] Color difference refers to the difference between the printed color and the color in the original image or design draft. Through precise color difference adjustment, the color of the printed product can be guaranteed to be highly consistent with the expected level, thereby improving the overall printing quality. There are two main methods for adjusting the printing color difference of existing inkjet printers. One is to adjust the voltage of the nozzle. The disadvantage is that the nozzle voltage and color grayscale are not linearly related, and the adjustment requires repeated manual comparisons, which is labor-intensive. The other is to adjust the image at the RIP (Raster Image Processor) stage, that is, the print grayscale adjustment parameters are fed back to the RIP front end. The disadvantage is that the RIP system does not have the layout information of the inkjet printer, and it is difficult to accurately correspond to the corresponding position of the nozzle. Moreover, after adjusting the printing position, it is necessary to recheck the adjustment range of the RIP, which is very inconvenient to use. At the same time, the RIP needs to reprocess the image, and the equipment performance requirements are high. Summary of the invention
[0003] The purpose of the present invention is to provide a method, device, equipment and medium for dynamically adjusting the printing color difference of a printer, so as to solve the problems that the existing printing color difference adjustment method has high labor intensity, the printed image information cannot accurately correspond to the nozzle position, the RIP adjustment range needs to be rechecked, the use is inconvenient, and the equipment performance requirements are high.
[0004] In order to achieve the above object, the present invention provides the following technical solutions:
[0005] In a first aspect, the present invention provides a method for dynamically adjusting the color difference of printing by a printer, comprising:
[0006] Acquire an RGB image acquired by a visual system, and convert the RGB image into a first CMYK format image;
[0007] Comparing the first CMYK format image with the second CMYK format image to obtain a grayscale adjustment value of each grayscale adjustment area of the image;
[0008] According to the grayscale adjustment value of each grayscale adjustment area of the image, a Poisson disk sampling algorithm is used to adjust the dot distribution of the second CMYK format image with a corresponding density to obtain an adjusted CMYK format image;
[0009] Printing is performed according to the adjusted CMYK format image to obtain a target printed image.
[0010] Compared with the prior art, the method for dynamically adjusting the color difference of a printer provided by the present invention converts the acquired RGB image into a first CMYK format image; compares the first CMYK format image with the second CMYK format image to obtain the grayscale adjustment value of each grayscale adjustment area of the image; according to the grayscale adjustment value of each grayscale adjustment area of the image, the Poisson disk sampling algorithm is used to adjust the dot distribution of the second CMYK format image with the corresponding density to obtain the adjusted CMYK format image; because the scheme adopts the Poisson disk sampling algorithm, the grayscale adjustment of the CMYK format image can be directly performed according to the grayscale adjustment value, so that the grayscale adjustment value can be directly fed back to the RIP The backend, i.e. the print engine, can directly print the adjusted CMYK format image without a series of RIP processing, which reduces the performance requirements of the device and avoids the inconvenience of using the RIP adjustment range after adjusting the print position. At the same time, since the print engine retains the information of the nozzles and nozzle holes actually corresponding to each pixel of the image when processing the second CMYK image obtained after the RIP processing for the first time, the adjusted CMYK format image data obtained by adjusting the dot distribution of the second CMYK format image with the corresponding density according to the grayscale adjustment value fed back to the print engine can correspond to the printer layout. In addition, the Poisson disk sampling algorithm is used to adjust the image to ensure the uniformity of the dot distribution, which is in line with the characteristics of the human eye. The algorithm has a linear relationship with the grayscale, and can be adjusted linearly, and the system responds quickly.
[0011] Optionally, the step of adjusting the dot distribution of the second CMYK format image with a corresponding density by using a Poisson disk sampling algorithm according to the grayscale adjustment value of each grayscale adjustment area of the image to obtain the adjusted CMYK format image comprises:
[0012] Calculate the target percentage of the grayscale adjustment value to the grayscale value of the grayscale adjustment area in the second CMYK format image;
[0013] A Poisson disk sampling algorithm is used to determine a target pixel point layout map corresponding to the target percentage;
[0014] The pixel density of the grayscale adjustment area in the second CMYK format image is adjusted according to the target pixel layout diagram, so that the pixel density of the grayscale adjustment area after adjustment increases or decreases by a target percentage compared with before adjustment, thereby obtaining an adjusted CMYK format image.
[0015] Optionally, the using of a Poisson disk sampling algorithm to determine a target pixel point layout diagram corresponding to the target percentage includes:
[0016] Substituting the target percentage into
[0017] sampleCount=width×height×M
[0018] Calculate the target sample number; where sampleCount is the target sample number, width is the width of the target pixel layout map, height is the height of the target pixel layout map, and M is the target percentage;
[0019] Substituting the target sample size into
[0020] minDistance=sqrt(width×height / sampleCount)
[0021] Get the minimum radius;
[0022] Pixel samples that meet preset conditions are randomly selected from the initial pixel layout map according to the minimum radius to obtain a target pixel layout map corresponding to the target percentage.
[0023] Optionally, randomly selecting pixel samples that meet a preset condition in the initial pixel layout map according to the minimum radius to obtain a target pixel layout map corresponding to the target percentage includes:
[0024] Randomly generate an initial pixel point in the initial pixel point layout map, and save the initial pixel point into a random array;
[0025] Randomly generate N pixel points on a circle with the initial pixel point as the center, the minimum radius as the inner diameter, and the maximum radius as the outer diameter, where N is a positive integer and the maximum radius is twice the minimum radius;
[0026] Check the N pixel points one by one, and save the pixel points whose distances to all generated pixel points are greater than or equal to the minimum radius into the random array;
[0027] Taking a pixel point randomly selected from the random array as the center, sampling is continued until there are no pixels satisfying the preset conditions in the initial pixel point layout diagram, thereby obtaining a target pixel point layout diagram corresponding to the target percentage.
[0028] Optionally, the step of adjusting the pixel density of the grayscale adjustment area in the second CMYK format image according to the target pixel layout diagram so that the pixel density of the grayscale adjustment area after adjustment increases or decreases by a target percentage compared with that before adjustment, and obtaining the adjusted CMYK format image includes:
[0029] If the pixel density of the grayscale adjustment area after adjustment increases by a target percentage compared to before adjustment, superimpose the target pixel layout map with the grayscale adjustment area so that the pixels in the target pixel layout map and the pixels in the grayscale adjustment area do not overlap, obtain the added positions of the pixels in the target pixel layout map in the grayscale adjustment area of the second CMYK format image, add pixels at the added positions, and obtain the adjusted CMYK format image;
[0030] If the pixel density of the grayscale adjustment area after adjustment is reduced by a target percentage compared to before adjustment, the target pixel layout map and the grayscale adjustment area are superimposed so that the pixels in the target pixel layout map overlap with the pixels in the grayscale adjustment area, and the pixels in the target pixel layout map are deleted at the deletion position in the grayscale adjustment area of the second CMYK format image, and the adjusted CMYK format image is obtained.
[0031] Optionally, comparing the first CMYK format image with the second CMYK format image to obtain the grayscale adjustment value of each grayscale adjustment area of the image includes:
[0032] Calculating a difference between a first grayscale value of a pixel in the first CMYK format image and a second grayscale value of a pixel corresponding to the second CMYK format image;
[0033] Determine an initial grayscale adjustment value of the grayscale adjustment area according to the difference; if the first grayscale value is greater than the second grayscale value, the initial grayscale adjustment value is to reduce the difference; if the first grayscale value is less than the second grayscale value, the initial grayscale adjustment value is to increase the difference;
[0034] A fuzzy operation is performed on the initial grayscale adjustment value of the grayscale adjustment area to obtain a target grayscale adjustment value of each grayscale adjustment area of the image.
[0035] Optionally, after the Poisson disk sampling algorithm is used to determine the target pixel point layout map corresponding to the target percentage, the method further includes:
[0036] Generate image blocks corresponding to the grayscale of each target percentage according to the target pixel layout diagram;
[0037] The image blocks corresponding to the grayscale of each target percentage are saved as a lookup table;
[0038] Extracting a corresponding image block from the lookup table according to a target percentage of the grayscale adjustment area in the second CMYK format image that needs to be adjusted;
[0039] The pixel density of the grayscale adjustment area in the second CMYK format image is adjusted according to the extracted image block, so that the pixel density of the grayscale adjustment area after adjustment increases or decreases by a target percentage compared with before adjustment, thereby obtaining an adjusted CMYK format image.
[0040] In a second aspect, the present invention provides a device for dynamically adjusting the color difference of printing by a printer, comprising:
[0041] An RGB image acquisition module, used for acquiring an RGB image acquired by a visual system, and converting the RGB image into a first CMYK format image;
[0042] A grayscale adjustment value determination module, used for comparing the first CMYK format image with the second CMYK format image to obtain a grayscale adjustment value of each grayscale adjustment area of the image;
[0043] A CMYK format image adjustment module, configured to adjust the dot distribution of the second CMYK format image according to the grayscale adjustment value of each grayscale adjustment area of the image by using a Poisson disk sampling algorithm to obtain an adjusted CMYK format image;
[0044] After the color difference adjustment is completed, the printing module is used to print according to the adjusted CMYK format image to obtain a target printed image.
[0045] In a third aspect, the present invention provides a device for dynamically adjusting the color difference of printing by a printer, comprising:
[0046] A communication unit / communication interface, used to obtain an RGB image acquired by a visual system, and convert the RGB image into a first CMYK format image;
[0047] A processing unit / processor, configured to compare the first CMYK format image with the second CMYK format image to obtain a grayscale adjustment value of each grayscale adjustment area of the image;
[0048] According to the grayscale adjustment value of each grayscale adjustment area of the image, a Poisson disk sampling algorithm is used to adjust the dot distribution of the second CMYK format image with a corresponding density to obtain an adjusted CMYK format image;
[0049] Printing is performed according to the adjusted CMYK format image to obtain a target printed image.
[0050] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, the method for dynamically adjusting the color difference of printer printing is implemented.
[0051] The technical effects achieved by the device type solution provided in the second aspect, the equipment type solution provided in the third aspect, and the computer-readable storage medium solution provided in the fourth aspect are the same as those of the method type solution provided in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0053] Figure 1 A schematic diagram of a dynamic feedback process for adjusting the color difference of a printer provided by the present invention;
[0054] Figure 2 A flow chart of a method for dynamically adjusting the color difference of a printer provided by the present invention;
[0055] Figure 3 A schematic diagram of the structure of a device for dynamically adjusting the color difference of a printer provided by the present invention;
[0056] Figure 4 A schematic diagram of the structure of a device for dynamically adjusting the printing color difference of a printer provided by the present invention. DETAILED DESCRIPTION
[0057] In order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, words such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. For example, the first threshold and the second threshold are only used to distinguish different thresholds, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0058] It should be noted that, in the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0059] In the present invention, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, the combination of a and b, the combination of a and c, the combination of b and c, or the combination of a, b and c, where a, b, c can be single or multiple.
[0060] The existing steps for adjusting the printing color difference of an inkjet printer are generally to process the original image through a raster image processor, send the processed data to the print engine, the print engine prints according to the received data, determine the printing grayscale adjustment parameters according to the printed image, and then send the printing grayscale adjustment parameters to the front end of the raster image processor. The printing grayscale adjustment parameters are generally parameters for the RGB format. The raster image processor adjusts the RGB image according to the printing grayscale adjustment parameters, and then performs a series of processing on the adjusted RGB image to obtain CMYK format data and send it to the print engine for printing. The above steps are repeated to finally adjust the printing color difference. Since the raster image processor not only needs to convert RGB images into CMYK format images, but also needs to complete color space conversion, halftone processing, grayscale balance and color correction, the amount of interpretation and screening calculations involved is very large. Therefore, if the printing grayscale adjustment parameters are sent to the front end of the raster image processor, it means that the image needs to be re-processed for each adjustment, and the requirements for device performance will be very high. In addition, the raster image processor system does not have inkjet printer layout information. When adjusting the image according to the printing grayscale adjustment parameters, it is difficult to accurately correspond the data of each area of the image to the corresponding position of the nozzle, and after adjusting the printing position, it is necessary to recheck the adjustment range of the raster image processor, which is very inconvenient to use.
[0061] To solve the above problems, the present application provides a method, device, equipment and medium for dynamically adjusting the color difference of printing by a printer, such as Figure 1As shown, the dynamic feedback process of adjusting the printing color difference is as follows: the raster image processor RIP processes the original image to obtain a CMYK format image, the printing engine processes the CMYK format image and prints it, the machine vision system collects the printed image, converts the collected image into a CMYK format image and performs grayscale value difference with the original CMYK format image to obtain grayscale adjustment parameters, and feeds back the grayscale adjustment parameters to the RIP backend, that is, the printing engine. Feedback to the RIP backend does not require the RIP to process the image again, which reduces the requirements for device performance. At the same time, since the grayscale adjustment parameters are directly sent to the printing engine, and the printing engine retains the information of the nozzles, that is, the nozzle holes, that actually correspond to each pixel when processing the data of the original CMYK format image, the printing engine can directly adjust the data of the CMYK format image based on the grayscale adjustment parameters to correspond to the printer layout, and the adjustment of the printing position has no effect on the algorithm. The adjustment of the data of the CMYK format image based on the grayscale adjustment parameters adopts the Poisson disk sampling algorithm to increase or decrease the points in the grayscale adjustment area, which ensures the uniformity of the points and conforms to the characteristics of the human eye. In addition, there is a linear relationship between the Poisson disk sampling algorithm and the grayscale, and linear adjustment can be performed, and the system responds quickly. Next, the following is an explanation with reference to the accompanying drawings.
[0062] Figure 2 A flow chart of a method for dynamically adjusting the color difference of a printer provided by the present invention, such as Figure 2 As shown, the method for dynamically adjusting the color difference of printing by a printer comprises the following steps:
[0063] Step 201: Acquire an RGB image acquired by a visual system, and convert the RGB image into a first CMYK format image;
[0064] The RGB image acquired by the visual system is acquired by the visual system after the inkjet printer prints the original image.
[0065] As an optional method, converting an RGB format image to a CMYK format image mainly involves two steps: converting an RGB color model to a CMY color model and converting a CMY color model to a CMYK color model. Specifically, converting the RGB format image to a first CMYK format image includes:
[0066] Substitute the RGB data of the RGB image into formula (1)-formula (3):
[0067] C1=1-R / 255(1)
[0068] M1=1-G / 255(2)
[0069] Y1=1-B / 255(3)
[0070] Calculate the grayscale value of each channel of the CMY model;
[0071] Among them, R is the gray value of the red channel in the RGB image, G is the gray value of the green channel in the RGB image, B is the gray value of the blue channel in the RGB image; C1 is the gray value of the cyan channel in the CMY model, M1 is the gray value of the magenta channel in the CMY model; Y1 is the gray value of the yellow channel in the CMY model;
[0072] Substitute the grayscale value of each channel in the CMY model into formula (4)-formula (7):
[0073] K=min(C,M,Y)(4)
[0074] C=(C1-K) / (1-K)(5)
[0075] M=(M1-K) / (1-K)(6)
[0076] Y=(Y1-K) / (1-K)(7)
[0077] Calculate the grayscale value of each channel of the CMYK model to obtain a first CMYK format image;
[0078] Among them, C is the grayscale value of the cyan channel in the CMYK model, M is the grayscale value of the magenta channel in the CMYK model; Y is the grayscale value of the yellow channel in the CMYK model; K is the grayscale value of black in the CMYK model.
[0079] Step 202: Compare the first CMYK format image with the second CMYK format image to obtain the grayscale adjustment value of each grayscale adjustment area of the image;
[0080] The second CMYK format image is a CMYK format image obtained by processing the original image by a raster image processor RIP before printing by the inkjet printer.
[0081] As an optional manner, comparing the first CMYK format image with the second CMYK format image to obtain the grayscale adjustment value of each grayscale adjustment area of the image includes:
[0082] The difference between the first grayscale value of the pixel in the first CMYK format image and the second grayscale value of the corresponding pixel in the second CMYK format image is calculated; it can be understood that the first grayscale value and the second grayscale value are both grayscale values corresponding to each CMYK channel.
[0083] The initial grayscale adjustment value of the grayscale adjustment area is determined according to the difference; if the first grayscale value is greater than the second grayscale value, the initial grayscale adjustment value is to reduce the difference; if the first grayscale value is less than the second grayscale value, the initial grayscale adjustment value is to increase the difference; it should be noted that for a grayscale adjustment area, since the grayscale values of all pixels in the area may not be exactly the same, after the difference calculation, the area may contain multiple differences with different but similar values, which are collectively referred to as initial grayscale adjustment values. In order to simplify the calculation, the initial grayscale adjustment value of the grayscale adjustment area is fuzzy calculated to obtain the target grayscale adjustment value of each grayscale adjustment area of the image. In this way, the grayscale adjustment values of each grayscale adjustment area can be unified into one value, which is convenient for subsequent calculations.
[0084] Step 203: According to the grayscale adjustment values of each grayscale adjustment area of the image, a Poisson disk sampling algorithm is used to adjust the dot distribution of the second CMYK format image at a corresponding density to obtain an adjusted CMYK format image;
[0085] The above step 203 may specifically include the following steps:
[0086] Step S1: calculating the target percentage of the grayscale adjustment value to the grayscale value of the grayscale adjustment area in the second CMYK format image;
[0087] The target percentage can be obtained by dividing the grayscale adjustment value by the grayscale value of the grayscale adjustment area in the second CMYK format image. The target percentage is equivalent to the percentage of the pixel density to be adjusted.
[0088] Step S2: using a Poisson disk sampling algorithm to determine a target pixel point layout corresponding to the target percentage;
[0089] As an optional method, the above step S2 may include:
[0090] Substituting the target percentage into formula (8):
[0091] sampleCount=width×height×M(8)
[0092] Calculate the target sample number; where sampleCount is the target sample number, width is the width of the target pixel layout map, height is the height of the target pixel layout map, and M is the target percentage;
[0093] Substitute the target sample size into formula (9):
[0094] minDistance=sqrt(width×height / sampleCount)(9)
[0095] Get the minimum radius;
[0096] According to the minimum radius, pixel samples that meet the preset conditions are randomly selected from the initial pixel layout map to obtain a target pixel layout map corresponding to the target percentage. The obtained target pixel layout map includes target pixel layout maps corresponding to each grayscale adjustment area.
[0097] The target pixel layout is given linearly according to the target percentage, so the grayscale adjustment area can be adjusted linearly according to the target pixel layout, which reduces labor intensity and enhances real-time performance.
[0098] Furthermore, randomly selecting pixel samples that meet preset conditions in the initial pixel layout map according to the minimum radius to obtain a target pixel layout map corresponding to the target percentage includes:
[0099] An initial pixel point is randomly generated in the initial pixel point layout map, and the initial pixel point is saved in a random array; the initial pixel point layout map is a blank map with a preset size of width×height. Since the target pixel point layout is the position map of the point layout of the target percentage grayscale, it actually reflects the density distribution of the pixel points. The initial pixel point layout map is a custom sampling area, so the initial pixel point layout map can be exactly the same as the grayscale adjustment area in shape and size, or it can be different.
[0100] Randomly generate N pixel points on a circle with the initial pixel point as the center, the minimum radius as the inner radius, and the maximum radius as the outer radius. N is a positive integer, and the maximum radius is twice the minimum radius.
[0101] Check N pixel points one by one, and save the pixel points whose distances to all generated pixel points are greater than or equal to the minimum radius into the random array; the pixel points whose distances to all generated pixel points are greater than or equal to the minimum radius are pixel point samples that meet the preset conditions.
[0102] Taking a pixel point randomly selected from the random array as the center, continue sampling until there are no pixels that meet the preset conditions in the initial pixel point layout diagram, and obtain the target pixel point layout diagram corresponding to the target percentage. It should be noted that "taking a pixel point randomly selected from the random array as the center, continue sampling" is a repetition of the step of "taking a pixel point randomly selected from the random array as the center, randomly generating N pixels on a circle with the minimum radius as the inner diameter and the maximum radius as the outer diameter; checking the N pixels one by one, and saving the pixels whose distance to all generated pixels is greater than or equal to the minimum radius into the random array". It can be understood that the pixels in the random array are the data of the target pixel point layout diagram.
[0103] Step S3: adjusting the pixel density of the grayscale adjustment area in the second CMYK format image according to the target pixel layout diagram, so that the pixel density of the grayscale adjustment area after adjustment increases or decreases by a target percentage compared with before adjustment, thereby obtaining an adjusted CMYK format image.
[0104] As an optional method, step S3 may include the following steps:
[0105] Step S31: if the pixel density of the grayscale adjustment area after adjustment increases by a target percentage compared to before adjustment, the target pixel layout diagram is superimposed on the grayscale adjustment area; if the pixels in the target pixel layout diagram overlap with the pixels in the grayscale adjustment area, the pixels in the target pixel layout diagram are fine-tuned to positions that do not overlap with the pixels in the grayscale adjustment area, so that the pixels in the target pixel layout diagram do not overlap with the pixels in the grayscale adjustment area, and the added positions of the pixels in the target pixel layout diagram in the grayscale adjustment area of the second CMYK format image are obtained, and pixels are added at the added positions to obtain the adjusted CMYK format image;
[0106] Step S32: If the pixel density of the grayscale adjustment area after adjustment is reduced by a target percentage compared to before adjustment, the target pixel layout map and the grayscale adjustment area are superimposed, and for each pixel in the target pixel layout map, the nearest point is found in the grayscale adjustment map, and the points are adjusted to the position of the point, so that the pixels in the target pixel layout map overlap with the pixels in the grayscale adjustment area, and the pixels in the target pixel layout map are at the deletion position in the grayscale adjustment area of the second CMYK format image, and the pixels are deleted at the deletion position to obtain the adjusted CMYK format image.
[0107] In actual applications, when the preset size of the initial pixel layout diagram and the shape and size of the grayscale adjustment area are exactly the same, or the width and height of the preset size are larger than those of the grayscale adjustment area, the adjustment of the grayscale adjustment area can be completed by directly adjusting according to the above-mentioned steps S31 and S32; if the preset size is smaller than the size of the grayscale adjustment area, after executing step S31 or step S32, the target pixel layout diagram can be moved by a width distance in the width direction or by a height distance in the height direction, and then step S31 or step S32 can be continued until the moved target pixel layout diagram completely covers the grayscale adjustment area, thereby completing the adjustment of the grayscale adjustment area.
[0108] As an optional method, the calculated target pixel layout diagram can be saved as a lookup table, and the target pixel layout diagram required for each grayscale adjustment area can be directly looked up in the table during actual operation, and then adjusted to improve the system operation performance. Specifically, after the target pixel layout diagram corresponding to the target percentage is determined by using the Poisson disk sampling algorithm, the following method is further included:
[0109] Generate image blocks corresponding to the grayscale of each target percentage according to the target pixel layout diagram;
[0110] The image blocks corresponding to the grayscale of each target percentage are saved as a lookup table;
[0111] Extracting a corresponding image block from the lookup table according to a target percentage of the grayscale adjustment area in the second CMYK format image that needs to be adjusted;
[0112] The pixel density of the grayscale adjustment area in the second CMYK format image is adjusted according to the extracted image block, so that the pixel density of the grayscale adjustment area after adjustment increases or decreases by a target percentage compared with before adjustment, thereby obtaining an adjusted CMYK format image.
[0113] It is understandable that the target pixel layout corresponding to the grayscale of 1%-99% target percentage can be calculated in advance, the corresponding image block can be generated and saved as a lookup table, which can be directly looked up in actual application.
[0114] Step 204: Printing is performed according to the adjusted CMYK format image to obtain a target printed image.
[0115] The target printing image is the image printed by the inkjet printer after the printing color difference adjustment is completed.
[0116] The above method uses a machine vision system to directly collect the image printed by the inkjet printer, and then compares the collected image with the second CMYK format image saved in the print engine to obtain a grayscale adjustment parameter, and feeds the grayscale adjustment parameter back to the print engine. The print engine adjusts the second CMYK format image according to the grayscale adjustment parameter, and can dynamically adjust the printing color difference of the inkjet printer; due to the use of the Poisson disk sampling algorithm, the grayscale of the CMYK format image can be directly adjusted according to the grayscale adjustment value, so that the grayscale adjustment value can be directly fed back to the RIP backend, that is, the print engine, and the print engine can The adjusted CMYK format image can be directly printed without a series of RIP processing, which reduces the performance requirements of the equipment and avoids the inconvenience of using the RIP adjustment range after adjusting the print position. At the same time, since the print engine retains the information of the nozzles and nozzles corresponding to each pixel of the image when processing the second CMYK image obtained after RIP processing, the adjusted CMYK format image data obtained by adjusting the dot distribution of the second CMYK format image with the corresponding density according to the grayscale adjustment value fed back to the print engine can correspond to the printer layout. In addition, the Poisson disk sampling algorithm is used to adjust the image to ensure the uniformity of the dot distribution, which conforms to the characteristics of the human eye. The target pixel layout is given linearly according to the target percentage, so the grayscale adjustment area can be adjusted linearly according to the target pixel layout, which reduces labor intensity and enhances real-time performance.
[0117] The embodiment of the present invention can divide the functional modules according to the above method. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0118] In the case of dividing each functional module into corresponding functional modules, Figure 3 FIG. 1 is a schematic diagram showing a structure of a device for dynamically adjusting the color difference of a printer provided by the present invention. Figure 3 As shown, the device comprises:
[0119] The RGB image acquisition module 301 is used to acquire the RGB image collected by the visual system and convert the RGB image into a first CMYK format image;
[0120] A grayscale adjustment value determination module 302 is used to compare the first CMYK format image with the second CMYK format image to obtain a grayscale adjustment value of each grayscale adjustment area of the image;
[0121] A CMYK format image adjustment module 303, configured to adjust the dot distribution of the second CMYK format image according to the grayscale adjustment value of each grayscale adjustment area of the image by using a Poisson disk sampling algorithm to obtain an adjusted CMYK format image;
[0122] After the color difference adjustment is completed, the printing module 304 is used to print according to the adjusted CMYK format image to obtain a target printed image.
[0123] Optionally, the CMYK format image adjustment module 303 may include:
[0124] a target percentage calculation unit, used for calculating a target percentage of the grayscale adjustment value to the grayscale value of the grayscale adjustment area in the second CMYK format image;
[0125] A target pixel point layout map determining unit, used to determine a target pixel point layout map corresponding to the target percentage by using a Poisson disk sampling algorithm;
[0126] The adjusted CMYK format image determination unit is used to adjust the pixel density of the grayscale adjustment area in the second CMYK format image according to the target pixel layout diagram, so that the pixel density of the grayscale adjustment area after the adjustment is increased or decreased by a target percentage compared with before the adjustment, thereby obtaining the adjusted CMYK format image.
[0127] Optionally, the target pixel point layout map determining unit may specifically include:
[0128] Substituting the target percentage into
[0129] sampleCount=width×height×M
[0130] Calculate the target sample number; where sampleCount is the target sample number, width is the width of the target pixel layout map, height is the height of the target pixel layout map, and M is the target percentage;
[0131] Substituting the target sample size into
[0132] minDistance=sqrt(width×height / sampleCount)
[0133] Get the minimum radius;
[0134] Pixel samples that meet preset conditions are randomly selected from the initial pixel layout map according to the minimum radius to obtain a target pixel layout map corresponding to the target percentage.
[0135] Optionally, the target pixel point layout map determining unit may also be used to:
[0136] Randomly generate an initial pixel point in the initial pixel point layout map, and save the initial pixel point into a random array;
[0137] Randomly generate N pixel points on a circle with the initial pixel point as the center, the minimum radius as the inner diameter, and the maximum radius as the outer diameter, where N is a positive integer and the maximum radius is twice the minimum radius;
[0138] Check the N pixel points one by one, and save the pixel points whose distances to all generated pixel points are greater than or equal to the minimum radius into the random array;
[0139] Taking a pixel point randomly selected from the random array as the center, sampling is continued until there are no pixels satisfying the preset conditions in the initial pixel point layout diagram, thereby obtaining a target pixel point layout diagram corresponding to the target percentage.
[0140] Optionally, the adjusted CMYK format image determination unit may be used to:
[0141] If the pixel density of the grayscale adjustment area after adjustment increases by a target percentage compared to before adjustment, superimpose the target pixel layout map with the grayscale adjustment area so that the pixels in the target pixel layout map and the pixels in the grayscale adjustment area do not overlap, obtain the added positions of the pixels in the target pixel layout map in the grayscale adjustment area of the second CMYK format image, add pixels at the added positions, and obtain the adjusted CMYK format image;
[0142] If the pixel density of the grayscale adjustment area after adjustment is reduced by a target percentage compared to before adjustment, the target pixel layout map and the grayscale adjustment area are superimposed so that the pixels in the target pixel layout map overlap with the pixels in the grayscale adjustment area, and the pixels in the target pixel layout map are deleted at the deletion position in the grayscale adjustment area of the second CMYK format image, and the adjusted CMYK format image is obtained.
[0143] Optionally, the grayscale adjustment value determination module 302 may specifically include:
[0144] a difference calculation unit, configured to calculate a difference between a first grayscale value of a pixel in the first CMYK format image and a second grayscale value of a pixel corresponding to the second CMYK format image;
[0145] an initial grayscale adjustment value determining unit, configured to determine an initial grayscale adjustment value of the grayscale adjustment area according to the difference; if the first grayscale value is greater than the second grayscale value, the initial grayscale adjustment value is to reduce the difference; if the first grayscale value is less than the second grayscale value, the initial grayscale adjustment value is to increase the difference;
[0146] The target grayscale adjustment value determination unit is used to perform fuzzy operation on the initial grayscale adjustment value of the grayscale adjustment area to obtain the target grayscale adjustment value of each grayscale adjustment area of the image.
[0147] Optionally, the device further includes a lookup table operation module, and the lookup table operation module may include:
[0148] An image block determination unit, configured to generate image blocks corresponding to grayscales of each target percentage according to the target pixel point layout diagram;
[0149] A lookup table establishing unit, used for saving the image blocks corresponding to the grayscale of each target percentage as a lookup table;
[0150] A search unit, configured to extract a corresponding image block from the lookup table according to a target percentage of grayscale adjustment area in the second CMYK format image that needs to be adjusted;
[0151] The adjustment unit is used to adjust the pixel density of the grayscale adjustment area in the second CMYK format image according to the extracted image block, so that the pixel density of the grayscale adjustment area after adjustment increases or decreases by a target percentage compared with that before adjustment, thereby obtaining the adjusted CMYK format image.
[0152] The above mainly introduces the solution provided by the embodiment of the present invention from the perspective of the interaction between various network elements. It can be understood that in order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in this document, the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0153] In the case of using the corresponding integrated unit, Figure 4 The schematic diagram of the structure of a device for dynamically adjusting the color difference of a printer provided by the present invention is shown. Figure 4 As shown, the device includes:
[0154] A communication unit / communication interface, used to obtain an RGB image acquired by a visual system, and convert the RGB image into a first CMYK format image;
[0155] A processing unit / processor, configured to compare the first CMYK format image with the second CMYK format image to obtain a grayscale adjustment value of each grayscale adjustment area of the image;
[0156] According to the grayscale adjustment value of each grayscale adjustment area of the image, a Poisson disk sampling algorithm is used to adjust the dot distribution of the second CMYK format image with a corresponding density to obtain an adjusted CMYK format image;
[0157] Printing is performed according to the adjusted CMYK format image to obtain a target printed image.
[0158] Wherein, the processing unit may be a processor or a controller, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. The processor may also be a combination that implements a computing function, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module may be a transceiver, a transceiver circuit or a communication interface, and the like. The storage module may be a memory.
[0159] The processor may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present invention. The communication interface may be one or more. The communication interface may use any transceiver or other device for communicating with other devices or communication networks.
[0160] like Figure 4 As shown, the terminal device may further include a communication line. The communication line may include a path to transmit information between the components.
[0161] Optional, such as Figure 4As shown, the terminal device may further include a memory. The memory is used to store computer-executable instructions for executing the solution of the present invention, and the execution is controlled by the processor. The processor is used to execute the computer-executable instructions stored in the memory, thereby implementing the method provided by the embodiment of the present invention.
[0162] like Figure 4 As shown, the memory may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor through a communication line. The memory may also be integrated with the processor.
[0163] Optionally, the computer-executable instructions in the embodiment of the present invention may also be referred to as application program codes, which is not specifically limited in the embodiment of the present invention.
[0164] In a specific implementation, as an example, Figure 4 As shown, the processor may include one or more CPUs, such as Figure 4 CPU0 and CPU1 in.
[0165] In a specific implementation, as an example, Figure 4 As shown, the terminal device may include multiple processors, such as Figure 4 Each of these processors can be a single-core processor or a multi-core processor.
[0166] On the one hand, a computer-readable storage medium is provided, in which instructions are stored. When the instructions are executed, the above-mentioned method of dynamically adjusting the color difference of printing by a printer is implemented.
[0167] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present invention is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user device or other programmable device. The computer program or instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instruction can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a tape; it can also be an optical medium, such as a digital video disc (DVD); it can also be a semiconductor medium, such as a solid state drive (SSD).
[0168] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0169] Although the present invention has been described in conjunction with specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present invention. Accordingly, this specification and the accompanying drawings are merely exemplary illustrations of the present invention as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present invention. Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, the present invention is intended to include such modifications and variations if they fall within the scope of the claims of the present invention and their equivalents.
Claims
1. A method for dynamically adjusting the color difference of a printer, characterized in that: include: Acquire an RGB image acquired by a visual system, and convert the RGB image into a first CMYK format image; Comparing the first CMYK format image with the second CMYK format image to obtain a grayscale adjustment value of each grayscale adjustment area of the image; According to the grayscale adjustment value of each grayscale adjustment area of the image, a Poisson disk sampling algorithm is used to adjust the dot distribution of the second CMYK format image with a corresponding density to obtain an adjusted CMYK format image; Printing is performed according to the adjusted CMYK format image to obtain a target printed image.
2. The method for dynamically adjusting the color difference of a printer according to claim 1, characterized in that: The step of adjusting the distribution of dots of the second CMYK format image according to the grayscale adjustment value of each grayscale adjustment area of the image by using the Poisson disk sampling algorithm to obtain the adjusted CMYK format image includes: Calculate the target percentage of the grayscale adjustment value to the grayscale value of the grayscale adjustment area in the second CMYK format image; A Poisson disk sampling algorithm is used to determine a target pixel point layout map corresponding to the target percentage; The pixel density of the grayscale adjustment area in the second CMYK format image is adjusted according to the target pixel layout diagram, so that the pixel density of the grayscale adjustment area after adjustment increases or decreases by a target percentage compared with before adjustment, thereby obtaining an adjusted CMYK format image.
3. The method for dynamically adjusting the color difference of a printer according to claim 2, characterized in that: The method of using the Poisson disk sampling algorithm to determine the target pixel point layout diagram corresponding to the target percentage includes: Substituting the target percentage into sampleCount=width×height×M Calculate the target sample number; where sampleCount is the target sample number, width is the width of the target pixel layout map, height is the height of the target pixel layout map, and M is the target percentage; Substituting the target sample size into minDistance=sqrt(width×height / sampleCount) Get the minimum radius; Among them, minDistance is the minimum radius; Pixel samples that meet preset conditions are randomly selected from the initial pixel layout map according to the minimum radius to obtain a target pixel layout map corresponding to the target percentage.
4. The method for dynamically adjusting the color difference of a printer according to claim 3, characterized in that: The randomly selecting pixel samples that meet a preset condition in the initial pixel layout map according to the minimum radius to obtain a target pixel layout map corresponding to the target percentage includes: Randomly generate an initial pixel point in the initial pixel point layout map, and save the initial pixel point into a random array; Randomly generate N pixel points on a circle with the initial pixel point as the center, the minimum radius as the inner diameter, and the maximum radius as the outer diameter, where N is a positive integer and the maximum radius is twice the minimum radius; Check the N pixel points one by one, and save the pixel points whose distances to all generated pixel points are greater than or equal to the minimum radius into the random array; Taking a pixel point randomly selected from the random array as the center, sampling is continued until there are no pixels satisfying the preset conditions in the initial pixel point layout diagram, thereby obtaining a target pixel point layout diagram corresponding to the target percentage.
5. The method for dynamically adjusting the color difference of a printer according to claim 2, characterized in that: The step of adjusting the pixel density of the grayscale adjustment area in the second CMYK format image according to the target pixel layout diagram so that the pixel density of the grayscale adjustment area after adjustment increases or decreases by a target percentage compared with that before adjustment, and obtaining the adjusted CMYK format image comprises: If the pixel density of the grayscale adjustment area after adjustment increases by a target percentage compared to before adjustment, superimpose the target pixel layout map with the grayscale adjustment area so that the pixels in the target pixel layout map and the pixels in the grayscale adjustment area do not overlap, obtain the added positions of the pixels in the target pixel layout map in the grayscale adjustment area of the second CMYK format image, add pixels at the added positions, and obtain the adjusted CMYK format image; If the pixel density of the grayscale adjustment area after adjustment is reduced by a target percentage compared to before adjustment, the target pixel layout map and the grayscale adjustment area are superimposed so that the pixels in the target pixel layout map overlap with the pixels in the grayscale adjustment area, and the pixels in the target pixel layout map are deleted at the deletion position in the grayscale adjustment area of the second CMYK format image, and the adjusted CMYK format image is obtained.
6. The method for dynamically adjusting the color difference of a printer according to claim 1, characterized in that: The step of comparing the first CMYK format image with the second CMYK format image to obtain the grayscale adjustment value of each grayscale adjustment area of the image comprises: Calculating a difference between a first grayscale value of a pixel in the first CMYK format image and a second grayscale value of a pixel corresponding to the second CMYK format image; Determine an initial grayscale adjustment value of the grayscale adjustment area according to the difference; if the first grayscale value is greater than the second grayscale value, the initial grayscale adjustment value is to reduce the difference; if the first grayscale value is less than the second grayscale value, the initial grayscale adjustment value is to increase the difference; A fuzzy operation is performed on the initial grayscale adjustment value of the grayscale adjustment area to obtain a target grayscale adjustment value of each grayscale adjustment area of the image.
7. The method for dynamically adjusting the color difference of a printer according to claim 2, characterized in that: After the Poisson disk sampling algorithm is used to determine the target pixel point layout map corresponding to the target percentage, the following further comprises: Generate image blocks corresponding to the grayscale of each target percentage according to the target pixel layout diagram; The image blocks corresponding to the grayscale of each target percentage are saved as a lookup table; Extracting a corresponding image block from the lookup table according to a target percentage of the grayscale adjustment area in the second CMYK format image that needs to be adjusted; The pixel density of the grayscale adjustment area in the second CMYK format image is adjusted according to the extracted image block, so that the pixel density of the grayscale adjustment area after adjustment increases or decreases by a target percentage compared with before adjustment, thereby obtaining an adjusted CMYK format image.
8. A device for dynamically adjusting the color difference of a printer, characterized in that: include: An RGB image acquisition module, used to acquire an RGB image collected by a visual system, and convert the RGB image into a first CMYK format image; A grayscale adjustment value determination module, used for comparing the first CMYK format image with the second CMYK format image to obtain a grayscale adjustment value of each grayscale adjustment area of the image; A CMYK format image adjustment module, configured to adjust the dot distribution of the second CMYK format image according to the grayscale adjustment value of each grayscale adjustment area of the image by using a Poisson disk sampling algorithm to obtain an adjusted CMYK format image; After the color difference adjustment is completed, the printing module is used to print according to the adjusted CMYK format image to obtain a target printed image.
9. A device for dynamically adjusting the color difference of a printer, characterized in that: include: A communication unit / communication interface, used to obtain an RGB image acquired by a visual system, and convert the RGB image into a first CMYK format image; A processing unit / processor, configured to compare the first CMYK format image with the second CMYK format image to obtain a grayscale adjustment value of each grayscale adjustment area of the image; According to the grayscale adjustment value of each grayscale adjustment area of the image, a Poisson disk sampling algorithm is used to adjust the dot distribution of the second CMYK format image with a corresponding density to obtain an adjusted CMYK format image; Printing is performed according to the adjusted CMYK format image to obtain a target printed image.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method for dynamically adjusting the color difference of printer printing as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Ink-jet printing online measurement and printing position angle real-time adjustment system and method
CN116310289A
Image processor and its method, and recording medium
JP1999259629A
Gradation adjustment system, gradation adjusting method and gradation adjustment system control program
JP2005109975A
Color matching method and color matching device of printing machine
JP2008238543A
Inkjet printer, image processor, and image processing method
US20120081449A1