Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present invention provides an image printing method, where all base layer channels including coordinate information of pixel points in a region to be printed are obtained according to the coordinate information of the pixel points; further acquiring concentration information of all the base layer channels corresponding to the pixel points; calculating the concentration information of the covering layer corresponding to the pixel points according to the concentration information of all the basic layer channels and a preset calculation rule; and printing white ink or gloss oil on the pixel points of the printing upper base layer according to the concentration information of the covering layer corresponding to the pixel points. By the method, the density information of the covering layer can be definitely determined, and white ink or gloss oil is printed according to the density information of the covering layer so as to enhance the expression effect of the original image. The method specifically comprises the following steps:
s1, acquiring concentration information of all basic layer channels containing coordinate information of pixel points according to the coordinate information of the pixel points in the region to be printed, wherein each basic layer channel corresponds to a specified color channel;
referring to fig. 2, the coordinate information of the pixel point a in the area to be printed is (i, j), and the base layer channel includes: c (Cyan), M (Magenta), Y (Yellow), K (black), L (Cyan)c(light cyan) channel, Lm(light red) channel, Ly(pale yellow) channel, LKOne or more of a (light black) channel, a R (Red ) channel, a G (Green ) channel, a B (Blue ) channel.
Specifically, the density information, that is, the ink amount information, of all the channels of the base layer corresponding to the pixel point, which embody the pixel point, is obtained. As shown in fig. 2, the density information of the C channel of the pixel a is C (i, j), the density information of the M channel is M (i, j), the density information of the Y channel is Y (i, j), and the density information of the K channel is K (i, j).
S2, calculating the concentration information of the covering layer corresponding to the pixel point according to the concentration information of all the basic layer channels and a preset calculation rule;
preferably, in the first embodiment, the preset calculation rule is: when the concentration information of the base layer channel is zero, the concentration of the covering layer is also zero; otherwise, a fixed value is given as the concentration information of the cover layer. In this embodiment, the basic channels include a C (Cyan) channel, an M (Magenta) channel, a Y (Yellow) channel, and a K channel, and when the C (Cyan) channel of the a pixel has zero density information, i.e., C (i, j) is 0, the M (Magenta) channel has zero density information, i.e., M (i, j) is 0, the Y (Yellow) channel has zero density information, i.e., Y (i, j) is 0, and the K channel has zero density information, i.e., K (i, j) is 0, the white ink density of the cover layer is also zero white (i, j) is 0; otherwise, the white ink concentration of the cover layer is a fixed value white (i, j) ═ val, and the specific calculation formula is as follows:
the density information of the covering layer generated under the calculation rule enables the positions, where the density information of the pixel points in the region to be printed is zero, namely the blank positions to be not paved with white ink, and the positions, where the density information of the pixel points is not zero, namely the non-blank positions to be paved with uniform white ink, so that the printed image has higher expressive force under the setoff of the white ink.
Preferably, in the second embodiment, the preset calculation rule is: and taking the maximum value of the concentration information of all the base layer channels as the concentration information of the covering layer. In this embodiment, the maximum value of the density information C (i, j), M (i, j), Y (i, j), and K (i, j) of the C, M, Y, K channel of the pixel a is taken as the density information white (i, j) of the cover layer white ink, and the specific formula is as follows:
white(i,j)=Max(C(i,j),M(i,j),Y(i,j),K(i,j))
the Max () function represents the maximum value in a set of values, and if the set of values includes L1, L2, L3, and L4, where L1 > L2, L1 > L3, and L1 > L4, Max (L1, L2, L3, and L4) is L1.
The density information of the covering layer generated under the calculation rule enables each pixel point with non-zero density information in the area to be printed to be paved with white ink with the maximum density, so that the printed image can present an obvious embossment effect, and the expressive force of the image is enhanced.
Preferably, in the third embodiment, the preset calculation rule is: when the concentration information of the base layer channel is zero, the concentration of the covering layer is also zero; otherwise, taking the minimum value of the values of which the density information of all the base layer channels is not zero as the density information of the covering layer. The specific calculation formula is as follows:
the function Min () represents to find the minimum value in a group of values, and if the group of values includes Q1, Q2, Q3, and Q4, where Q1 < Q2, Q1 < Q3, and Q1 < Q4, Min (Q1, Q2, Q3, and Q4) ═ Q1, Color1(i, j), Color2(i, j), Color3(i, j), and Color4(i, j) represent the concentration information of a channel in C, M, Y, K of the pixel point a.
The density information of the covering layer generated under the calculation rule enables each pixel point with the density information not being zero in the area to be printed to be paved with white ink with the minimum density, so that the printed image can have a weak embossment effect.
Preferably, in the fourth embodiment, the preset calculation rule is: when the concentration information of the base layer channel is zero, the concentration of the covering layer is a fixed value; otherwise, the concentration information of the covering layer is zero. In this embodiment, the basic channels include only a C (Cyan), an M (Magenta), a Y (Yellow), and a K (black) channel, and when the C (Cyan) channel of the a pixel has zero density information, i.e., C (i, j) is 0, the M (Magenta) channel has zero density information, i.e., M (i, j) is 0, the Y (Yellow) channel has zero density information, i.e., Y (i, j) is 0, and the K channel has zero density information, i.e., K (i, j) is 0, the white ink density of the cover layer has a fixed value white (i, j) val; otherwise, the white ink density of the cover layer is zero white (i, j) ═ 0, and the specific calculation formula is as follows:
the density information of the covering layer generated under the calculation rule enables the positions, namely blank positions, where the density information of the pixel points in the area to be printed is zero to be paved with uniform white ink, and the positions, namely non-blank positions, where the density information of the pixel points is not zero to be paved with no white ink, so that the whole area to be printed is covered with ink, the color of the printed image is not affected by the color of the printing medium, the use range of the printing medium is expanded, and the calculation rule can use the colored printing medium and also can use the transparent printing medium without the color.
Preferably, in a fifth embodiment, the preset calculation rule is: and the concentration of the covering layer of all the pixel points in the area to be printed is a fixed value. In this embodiment, the density of the covering layer of all the pixels in the area a to be printed is a set value, and the density information of the covering layer generated under the calculation rule enables the whole area to be printed to be covered with uniform white ink, so that the whole printed product is brighter and more gorgeous under the contrast of a white background.
Preferably, the base layer channel further includes a spot color channel, and in the sixth embodiment, the calculation rule is: the concentration of the covering layer is concentration information of the spot color channel. The spot color channel is a color channel different from C, M, Y, K four color channels, and refers to a specific color ink mixed in advance, and a complementary process Color (CMYK) ink, such as bright orange, green, fluorescent color, metallic silver color, and the like.
In a seventh embodiment, when the density information of the spot color channel corresponding to the pixel point is zero, the density of the cover layer of the pixel point is calculated according to the calculation rule of the first embodiment.
In an eighth embodiment, when the density information of the spot color channel corresponding to the pixel point is zero, the density of the cover layer of the pixel point is calculated according to the calculation rule of the second embodiment.
In a ninth embodiment, when the density information of the spot color channel corresponding to the pixel point is zero, the density of the cover layer of the pixel point is calculated according to the calculation rule of the third embodiment.
In a tenth embodiment, when the density information of the spot color channel corresponding to the pixel point is zero, the density of the cover layer of the pixel point is calculated according to the calculation rule of the fourth embodiment.
The density information of the cover layer generated by adopting the calculation rules of the sixth, seventh, eighth, ninth and tenth embodiments enables the white ink density at the blank position to be determined by adopting the density information of the base layer channel when the density information corresponding to the pixel point of the spot color channel is zero, so that the blank white ink does not appear in the finally printed image, and the expressive force of the printed image is enhanced.
The preset calculation rules of all the above embodiments are not only applicable to the calculation of the white ink concentration in the embodiments, but also applicable to the calculation of the gloss oil concentration, and the calculation of the gloss oil concentration is not described herein again.
And S3, printing white ink or gloss oil on the pixel points of the base layer according to the concentration information of the covering layer.
Specifically, according to the density information of the cover layer corresponding to the pixel point, in this embodiment, the density information of the cover layer is gray scale data with gradually changed gray scales, the gray scale data of the cover layer is converted into print data that can be recognized by a printer through image processing software, and the print data is input into an inkjet printer for printing white ink or gloss oil.
In summary, the image printing method of the present invention provides various methods for calculating the density of a cover layer (white ink or gloss oil), which make up for the lack of the existing printing technology in calculating the density of the cover layer, and the method can definitely determine the density information of the cover layer, and print the white ink or gloss oil according to the density information of the cover layer, thereby enhancing the representation effect of the original image.
Referring to fig. 3, an embodiment of the present invention provides an image printing apparatus, including:
a base layer density information obtaining module 10, configured to obtain density information of all base layer channels including coordinate information of a pixel point according to coordinate information of the pixel point in an area to be printed, where each base layer channel corresponds to a specified color channel;
a covering layer concentration information obtaining module 20, configured to calculate concentration information of a covering layer corresponding to the pixel point according to the concentration information of all the base layer channels and a preset calculation rule;
and the printing module 30 is configured to print white ink or gloss oil on the pixel points of the upper base layer according to the concentration information of the covering layer.
Preferably, the calculation rule is: when the concentration information of the base layer channel is zero, the concentration of the covering layer is also zero; otherwise, a fixed value is given as the concentration information of the cover layer. Specifically, when the density information in the C (Cyan) channel data information of the pixel a is zero, i.e., C (i, j) is 0, the density information in the M (Magenta) channel data information is zero, i.e., M (i, j) is 0, the density information in the Y (Yellow) channel data information is zero, i.e., Y (i, j) is 0, and the density information in the K channel data information is zero, i.e., K (i, j) is 0, the white ink density of the cover layer is also zero white (i, j) is 0; otherwise, the white ink concentration of the cover layer is a fixed value white (i, j) ═ val, and the specific calculation formula is as follows:
preferably, the calculation rule is: and taking the maximum value of the concentration information of all the base layer channels as the concentration information of the covering layer. Specifically, the maximum value of the density information C (i, j), M (i, j), Y (i, j), and K (i, j) in the C, M, Y, K channel data information of the pixel point a is taken as the density information white (i, j) of the cover layer white ink, and the specific formula is as follows:
white(i,j)=Max(C(i,j),M(i,j),Y(i,j),K(i,j))
the Max () function represents the maximum value in a set of values, and if the set of values includes L1, L2, L3, and L4, where L1 > L2, L1 > L3, and L1 > L4, Max (L1, L2, L3, and L4) is L1.
Preferably, the calculation rule is: when the concentration information of the base layer channel is zero, the concentration of the covering layer is also zero; otherwise, taking the minimum value of the values of which the density information of all the base layer channels is not zero as the density information of the covering layer. The specific calculation formula is as follows:
the function Min () represents to find the minimum value in a group of values, and if the group of values includes Q1, Q2, Q3, and Q4, where Q1 < Q2, Q1 < Q3, and Q1 < Q4, Min (Q1, Q2, Q3, and Q4) ═ Q1, Color1(i, j), Color2(i, j), Color3(i, j), and Color4(i, j) represent the concentration information of a channel in C, M, Y, K of the pixel point a.
Preferably, the calculation rule is: when the concentration information of the base layer channel is zero, the concentration of the covering layer is a fixed value; otherwise, the concentration information of the covering layer is zero. Specifically, when the density information in the C (Cyan) channel data information of the pixel a is zero, i.e., C (i, j) is 0, the density information in the M (Magenta) channel data information is zero, i.e., M (i, j) is 0, the density information in the Y (Yellow) channel data information is zero, i.e., Y (i, j) is 0, and the density information in the K channel data information is zero, i.e., K (i, j) is 0, the white ink density of the cover layer is a fixed value white (i, j) is val; otherwise, the white ink density of the cover layer is zero white (i, j) ═ 0, and the specific calculation formula is as follows:
preferably, the calculation rule is: and the concentration of the covering layer of all the pixel points in the area to be printed is a set value.
Preferably, the base layer channels include a C (Cyan), M (Magenta), Y (Yellow), K, Lc (light Cyan), L (Magenta)M(light red) channel, Ly (light yellow) channel, LKOne or more of a (light black) channel, a R (Red ) channel, a G (Green ) channel, a B (Blue ) channel.
Preferably, the base layer channel includes a spot color channel, and the calculation rule is: and the density of the covering layer is density information in the spot color channel data information.
Preferably, when the density information of the spot color channel corresponding to the pixel point is zero and the density information of the base layer channel is also zero, the density of the cover layer is also zero; otherwise, a fixed value is given as the concentration information of the cover layer.
Preferably, when the density information of the spot color channel corresponding to the pixel point is zero, the maximum value of the density information of all the base layer channels is used as the density information of the cover layer.
Preferably, when the density information of the spot color channel corresponding to the pixel point is zero and the density information of the base layer channel is also zero, the density of the cover layer is zero; otherwise, taking the minimum value of the values of which the density information of all the base layer channels is not zero as the density information of the covering layer.
Preferably, when the density information of the spot color channel corresponding to the pixel point is zero, and when the density information of the base layer channel is also zero, the density of the cover layer is a fixed value; otherwise, the concentration information of the covering layer is zero.
In addition, the image printing method of the embodiment of the present invention described in conjunction with fig. 1 may be implemented by an image printing apparatus. Fig. 4 is a schematic diagram showing a hardware configuration of an image printing apparatus according to an embodiment of the present invention.
The image printing device may include a processor 401 and a memory 402 storing computer program instructions.
Specifically, the processor 401 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more Integrated circuits implementing embodiments of the present invention.
Memory 402 may include mass storage for data or instructions. By way of example, and not limitation, memory 402 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 402 may include removable or non-removable (or fixed) media, where appropriate. The memory 402 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 402 is a non-volatile solid-state memory. In a particular embodiment, the memory 402 includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.
The processor 401 may implement any of the image printing methods in the above embodiments by reading and executing computer program instructions stored in the memory 402.
In one example, the image printing device may also include a communication interface 403 and a bus 410. As shown in fig. 4, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 to complete communication therebetween.
The communication interface 403 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present invention.
Bus 410 includes hardware, software, or both to couple the components of the image printing device to each other. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel 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 bus or a combination of two or more of these. Bus 410 may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
In addition, in combination with the image printing method in the above embodiments, embodiments of the present invention may be implemented by providing a computer-readable storage medium. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the image printing methods in the above embodiments.
In summary, embodiments of the present invention provide an image printing method, an apparatus, a device, and a storage medium, in which the method obtains density information of all base layer channels including coordinate information of a pixel point in an area to be printed according to the coordinate information of the pixel point; calculating the concentration information of the covering layer corresponding to the pixel points according to the concentration information of all the basic layer channels and a preset calculation rule; and printing white ink or gloss oil on the pixel points of the printing upper base layer according to the concentration information of the covering layer corresponding to the pixel points. By the method, the density information of the covering layer can be definitely determined, and white ink or gloss oil is printed according to the density information of the covering layer so as to enhance the expression effect of the original image.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium 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, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.