[go: up one dir, main page]

CN111845099B - Method, device, equipment and medium for setting white ink quantity of printer - Google Patents

Method, device, equipment and medium for setting white ink quantity of printer Download PDF

Info

Publication number
CN111845099B
CN111845099B CN201910343397.7A CN201910343397A CN111845099B CN 111845099 B CN111845099 B CN 111845099B CN 201910343397 A CN201910343397 A CN 201910343397A CN 111845099 B CN111845099 B CN 111845099B
Authority
CN
China
Prior art keywords
value
image
color
channel
ink
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910343397.7A
Other languages
Chinese (zh)
Other versions
CN111845099A (en
Inventor
左国云
黄中琨
陈艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Hansen Software Co.,Ltd.
Original Assignee
Shenzhen Hosonsoft Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Hosonsoft Co Ltd filed Critical Shenzhen Hosonsoft Co Ltd
Priority to CN201910343397.7A priority Critical patent/CN111845099B/en
Priority to CN202210130503.5A priority patent/CN114475005B/en
Publication of CN111845099A publication Critical patent/CN111845099A/en
Application granted granted Critical
Publication of CN111845099B publication Critical patent/CN111845099B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J2/00Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed
    • B41J2/005Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed characterised by bringing liquid or particles selectively into contact with a printing material
    • B41J2/01Ink jet
    • B41J2/21Ink jet for multi-colour printing
    • B41J2/2107Ink jet for multi-colour printing characterised by the ink properties
    • B41J2/2114Ejecting specialized liquids, e.g. transparent or processing liquids
    • B41J2/2117Ejecting white liquids
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J2/00Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed
    • B41J2/005Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed characterised by bringing liquid or particles selectively into contact with a printing material
    • B41J2/01Ink jet
    • B41J2/21Ink jet for multi-colour printing
    • B41J2/2121Ink jet for multi-colour printing characterised by dot size, e.g. combinations of printed dots of different diameter
    • B41J2/2128Ink jet for multi-colour printing characterised by dot size, e.g. combinations of printed dots of different diameter by means of energy modulation
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J2/00Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed
    • B41J2/005Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed characterised by bringing liquid or particles selectively into contact with a printing material
    • B41J2/01Ink jet
    • B41J2/21Ink jet for multi-colour printing
    • B41J2/2132Print quality control characterised by dot disposition, e.g. for reducing white stripes or banding

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Color Image Communication Systems (AREA)
  • Ink Jet (AREA)

Abstract

The invention discloses a method, a device, equipment and a medium for setting white ink quantity of a printer. The method for setting the white ink amount of the printer comprises the steps of acquiring the color value of a printing medium and recording the color value as a first color value; acquiring a foreground image in an image to be printed after a background image is removed; processing the foreground image according to the first color value to obtain a first gray image; traversing the first gray scale image to obtain a first gray scale value of each pixel point in the gray scale image; comparing the first gray value with a set color threshold value to obtain a comparison result; and setting the ink value of the white ink channel when the foreground image is printed according to the comparison result. The method, the device, the equipment and the medium for setting the white ink quantity of the printer can save the ink quantity and reduce the printing cost.

Description

Method, device, equipment and medium for setting white ink quantity of printer
Technical Field
The invention relates to the field of ink-jet printing, in particular to a method, a device, equipment and a medium for setting white ink quantity of a printer.
Background
The ink jet printing technology refers to a technology of ejecting ink droplets through nozzles on an ejection head onto a printing medium to obtain an image or characters. With the continuous progress of the technology, the color and material of the printing medium are more and more abundant, so that the color of a large area in the image to be printed is consistent with the color of the printing medium, for example, the image to be printed includes a background image and a foreground image, and the color of the background image is close to or almost the same as the color of the printing medium. Especially in the textile industry, when a color image is printed, a layer of white ink with an ink value of 100% needs to be printed for bottoming, and if all pixel points are subjected to ink discharge according to the existing method, not only the color ink but also the white ink are wasted, so that the printing cost is increased.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a medium for setting white ink quantity of a printer, which are used for solving the problems of ink waste and printing cost increase caused by ink discharge of all pixel points when the color of a large area in an image to be printed is consistent with the color of a printing medium in the prior art.
In a first aspect, an embodiment of the present invention provides a method for setting a white ink amount of a printer, the method including:
acquiring a color value of a printing medium, and recording the color value as a first color value;
acquiring a foreground image in an image to be printed after a background image is removed;
processing the foreground image according to the first color value to obtain a first gray image;
traversing the first gray scale image to obtain a first gray scale value of each pixel point in the gray scale image;
comparing the first gray value with a set color threshold value to obtain a comparison result;
and setting the ink value of the white ink channel when the foreground image is printed according to the comparison result.
Preferably, the processing the foreground map according to the first color value to obtain a gray map includes:
obtaining color values corresponding to all pixel points in the foreground image, and recording the color values as second color values;
acquiring a difference value corresponding to each pixel point according to the first color value and the second color value;
generating an intermediate image according to the difference value corresponding to each pixel point;
and carrying out graying processing on the intermediate image to obtain a corresponding first grayscale image.
Preferably, when the first gray value is A, the color threshold is T, and when A ≧ T, the ink quantity value of the white ink channel when the foreground image is printed is:
W=255-A
where W is the ink quantity value of white ink for the white ink channel when printing the foreground map.
Preferably, if the first gray value is a, the color threshold is T, and when a < T, the setting the ink amount value of the white ink in the white ink channel when the foreground image is printed according to the comparison result includes:
carrying out graying processing on the foreground image to obtain a second grayscale image;
traversing the second gray scale map to obtain a second gray scale value corresponding to each pixel point in the second gray scale map;
and setting the ink amount value of the white ink channel when the foreground image is printed according to the second gray value.
Preferably, if the second gray value is B, the ink amount value of the white ink in the white ink channel when the foreground image is printed is set as:
W=255-B
where W is the ink quantity value of white ink for the white ink channel when printing the foreground map.
Preferably, the printer further includes a cyan channel, a magenta channel, a yellow channel, and a black channel, and when W is 0, the method further includes:
adjusting the ink values of the cyan channel, the magenta channel, the yellow channel and the black channel of the corresponding pixel point according to the ink value of the white channel, so that the ink values of the cyan channel, the magenta channel, the yellow channel and the black channel are as follows:
C=0,M=0,Y=0,K=0
where C is the ink value for the cyan channel, M is the ink value for the magenta channel, Y is the ink value for the yellow channel, and K is the ink value for the black channel.
Preferably, the gray scale calculation formula of the graying process is as follows:
Figure BDA0002041465510000031
wherein Gray represents a Gray value, and a color value of a pixel point in the image in the CMYK color mode is (C, M, Y, K).
In a second aspect, an embodiment of the present invention provides an apparatus for setting a white ink amount of a printer, the apparatus including:
the first color value acquisition module is used for acquiring the color value of the printing medium and recording the color value as the first color value;
the foreground image acquisition module is used for acquiring a foreground image in the image to be printed after the background image is removed;
the first gray-scale image acquisition module is used for processing the foreground image according to the first color value to obtain a first gray-scale image;
the first gray value acquisition module is used for traversing the first gray image to acquire a first gray value of each pixel point in the gray image;
the comparison result acquisition module is used for comparing the first gray value with a set color threshold value to obtain a comparison result;
and the ink quantity setting module is used for setting the ink quantity value of the white ink channel when the foreground image is printed according to the comparison result.
In a third aspect, an embodiment of the present invention provides a device for setting an amount of white ink for a printer, including: 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 of the first aspect of the embodiments described above.
In a fourth aspect, embodiments of the present invention provide a storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of the first aspect in the above embodiments.
In summary, according to the method, the device, the equipment and the medium for setting the white ink amount of the printer provided by the embodiment of the invention, the color value of the printing medium is obtained, the color value of the printing medium is compared with the color values of all the pixel points in the foreground image in the image to be printed, and the processed image color value is compared with the set color threshold value to obtain the amount of the white ink needed to be printed for each pixel point when the foreground image is printed, so that not only can part of the ink amount be saved, but also the printing cost is reduced, and the white ink amount is reasonably set according to the color value of each pixel point in the foreground image instead of directly generating 100% of the white ink amount, so that the printed image has good transition and touch feeling.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method of setting the amount of white ink for a printer according to a first embodiment of the present invention.
Fig. 2 is a flowchart of a method of setting the amount of white ink in a printer according to a second embodiment of the present invention.
Fig. 3 is a flowchart of a method of setting the amount of white ink in a printer according to a third embodiment of the present invention.
Fig. 4 is a flowchart of a method of setting the amount of white ink in a printer according to a fourth embodiment of the present invention.
Fig. 5 is a flowchart of a method of setting the amount of white ink in a printer according to a fifth embodiment of the present invention.
Fig. 6 is a flowchart of a method of setting the amount of white ink in a printer according to a sixth embodiment of the present invention.
FIG. 7 is a schematic configuration diagram of a white ink amount setting apparatus for a printer according to a seventh embodiment of the present invention.
Fig. 8 is a schematic structural view of a white ink amount setting apparatus for a printer according to an eighth embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in 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 to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Referring to fig. 1, in the method for setting white ink amount of a printer according to the embodiment of the present invention, the color value of the printing medium is obtained, and is compared with the color values of all the pixels in the foreground image of the image to be printed, and the color value of the processed image is compared with the set color threshold value, so as to obtain the amount of white ink to be printed at each pixel when the foreground image is printed, thereby not only saving a part of the ink amount and reducing the printing cost, but also reasonably setting the white ink amount instead of 100% of the white ink amount according to the color value of each pixel in the foreground image, so that the printed image has good transition and touch feeling. The method specifically comprises the following steps:
s1, acquiring a color value of the printing medium and recording the color value as a first color value;
specifically, when the color value of the printing medium used by the user is known, the color value input by the user on the image processing interactive interface can be directly obtained; when the color value of the printing medium used by the user is unknown, the color value of the printing medium may be acquired by scanning the printing medium using an image scanner (e.g., eyeone). Wherein, the color value input by the user on the image processing interactive interface or scanned and obtained by the image scanner is reflected differently in different color modes, for example, in the CMYK color mode, the first color value of the printing medium is (C)0、M0、Y0、K0) If in the RGB color mode, the first color value of the print medium is (R)0、G0、B0)。
S2, acquiring a foreground image in the image to be printed after the background image is removed;
specifically, in this embodiment, the image to be printed includes a background image and a foreground image, the foreground image is extracted from the image to be printed and placed into an image with a blank background and a size consistent with that of the original image, so as to form an intermediate image only including the foreground image, the intermediate image is printed during printing, and second color values of all pixel points in the intermediate image (i.e., the foreground image) are obtained, wherein when the foreground image is particularly large, a large amount of storage space needs to be consumed, and the requirement on printing accuracy is not high, the actual printing size of the foreground image can be stored, then the foreground image is scaled by the same scale, and the scaled foreground image is placed into the image with a blank background by the same scale after scaling.
Preferably, referring to fig. 2, removing the background image from the image to be printed to obtain the foreground image specifically includes the following steps:
s211, carrying out graying and binarization processing on the image to be printed to obtain a binary image;
s212, determining a foreground image area in the image to be printed according to the binary image;
s213, extracting the foreground image in the foreground image area from the image to be printed.
Specifically, in the embodiment, for the case that the color of the background image is relatively similar to the color of the printing medium, the to-be-printed image is directly grayed and binarized to obtain a binary image, then the foreground image area in the to-be-printed image is determined according to the binary image, and the foreground image is extracted from the foreground image area. The graying, binarization and foreground image extraction of the image to be printed are all processed by using an algorithm function in an image processing library (such as opencv), which is the prior art and is not described herein again.
Referring to fig. 3, in another embodiment, the step of removing the background image from the image to be printed to obtain the foreground image specifically includes the following steps:
s221, traversing all pixel points in the image to be printed to obtain the color value of each pixel point, and recording the color value as a third color value;
s222, performing data processing on the third color value and the first color value to obtain a corresponding intermediate image;
s223, carrying out graying and binarization processing on the intermediate image to obtain a binary image;
s224, determining a foreground image area in the image to be printed according to the binary image;
and S225, extracting the foreground image in the foreground image area from the image to be printed.
Specifically, in this embodiment, for the case that the color of the background map is far from the color of the printing medium, a difference value is first made between the third color values of all the pixel points in the image to be printed and the first color value of the printing medium to obtain an intermediate image, then the intermediate image is grayed and binarized to obtain a binary image, finally, a foreground map region in the image to be printed is determined according to the binary image, a foreground map is extracted from the foreground map region, and the foreground map is traversed to obtain the second color values of all the pixel points in the foreground map. The graying, binarization and foreground image extraction processing of the image to be printed are also processed by using an algorithm function in an image processing library (such as opencv), which is the prior art and is not described herein again.
S3, processing the foreground image according to the first color value to obtain a first gray image;
specifically, color values of all pixel points in the foreground image are obtained, the first color value is subtracted from the color values of all pixel points in the foreground image to obtain an intermediate image, and graying is adopted to process the intermediate image to obtain a gray image, so that the gray value of each pixel point in the foreground image is a value, and unlike the case that each pixel point in the color image in an RGB mode comprises R, G, B three values, or each pixel point in the color image in a CMYK mode comprises C, M, Y, K four values, the color image cannot be subjected to color value comparison, and therefore graying processing of the image is required to facilitate color value comparison and data processing.
Preferably, referring to fig. 4, the specific step of processing the foreground image according to the first color value to obtain a first gray scale image includes:
s31, obtaining color values corresponding to all pixel points in the foreground image, and recording the color values as second color values;
s32, acquiring a difference value corresponding to each pixel point according to the first color value and the second color value;
s33, generating an intermediate image according to the difference value corresponding to each pixel point;
and S34, carrying out graying processing on the intermediate image to obtain a corresponding first grayscale image.
Specifically, the first color value and the second color value are converted into color values in the same color mode, such as color values in a CMYK color mode or color values in a lab color mode, then the first color value and the second color value are subjected to difference to obtain a difference value of each pixel, specifically, an absolute value of each difference value is taken as a color value of each pixel in the intermediate image, and if in the CMYK color mode, the first color value is: c1=20、M1=60、Y1=50、K1The second color value of a certain pixel point is as follows: c2=10、M2=30、Y2=40、K2If the pixel point is 50, the difference value of the pixel point is that delta C is | C1-C2|=10、△M=|M1-M2|=30、△Y=|M1-M2|=10、△K=|M1-M2|=20。
Preferably, referring to fig. 5, when the color value in the lab color mode is used for calculation, the specific method for obtaining the difference value of each pixel point includes the following steps:
s311, obtaining an ICC color conversion curve of the printer;
s312, converting the first color value and the second color value into a corresponding first lab value and a corresponding second lab value according to the ICC color conversion curve;
s313, obtaining the corresponding difference value of each pixel point according to the first lab value and the second lab value.
Specifically, an ICC curve of a color management curve of a printer executing a print job is obtained, the first color value and the second color value are converted into a corresponding first lab value and a corresponding second lab value through the ICC curve, a difference value corresponding to each pixel point is obtained by performing difference calculation on the second lab value corresponding to each pixel point and the first lab value of the print medium, and in the lab color mode, the first color value is: l is1=50、a1=40、b1The second color value of a certain pixel point is as follows: l is2=30、a2=60、b2If 70, the difference value of the pixel point is:Δl ═ L1-L2|=20、△a=|a1-a2|=30、△b=|b1-b2And if the value is 40, the difference value obtained by calculating the lab value is more accurate than the color difference value obtained by calculating in other color modes.
Preferably, when the color value is a color value in an RGB color mode, the conversion formula in the graying process is:
Gray=R×0.299+G×0.587+B×0.114
wherein Gray represents the Gray value of the pixel or the print medium, and the color value of the pixel or the print medium in the RGB color mode is (R, G, B).
When the color value is the color value in the CMYK color mode, the conversion formula in the graying process is:
Figure BDA0002041465510000081
wherein Gray represents the Gray value of the pixel or the print medium, and the color value of the pixel or the print medium in the CMYK color mode is (C, M, Y, K).
S4, traversing the first gray scale image to obtain a first gray scale value of each pixel point in the gray scale image;
specifically, the existing traversal algorithm is adopted to traverse all the pixel points in the first gray scale map to obtain the first gray scale value of each pixel point.
S5, comparing the first gray value with a set color threshold value to obtain a comparison result;
specifically, the first gray value of each pixel point is compared with a color threshold (for example, the color threshold is 1.5) obtained according to the characteristics of the printer to obtain a comparison result, and the ink discharge condition of each pixel point during printing is determined according to the comparison result.
And S6, setting the ink quantity value of the white ink channel when the foreground image is printed according to the comparison result.
Specifically, in this embodiment, the white ink channel and the other color channels are parameter names for setting the usage of the corresponding ink, and the range of the ink amount value of the white ink in the white ink channel is 0 to 100%, where the specific data value range of the ink amount value of the ink during printing is set by the user according to different printing devices and usage environments, and is a standard for quantifying the ink condition that the pixel point needs to be printed. In this embodiment, let a first gray value be a, the color threshold be T, and when a ≧ T, the ink quantity value of the white ink in the white ink channel when printing the foreground map is:
W=255-A
where W is the ink quantity value of white ink for the white ink channel when printing the foreground map.
Referring to fig. 6, when a < T, the setting the ink amount value of the white ink channel when the foreground image is printed according to the comparison result includes:
s61, carrying out graying processing on the foreground image to obtain a second gray image;
s62, traversing the second gray scale map to obtain a second gray scale value corresponding to each pixel point in the second gray scale map;
and S63, setting the ink quantity value of the white ink channel when the foreground image is printed according to the second gray value.
Specifically, graying the color foreground image to obtain a gray image, marking the gray image as a second gray image, obtaining a second gray value corresponding to each pixel point in the gray image by adopting the existing traversal algorithm, calculating and obtaining the ink quantity value of the white ink channel when the foreground image is printed according to the second gray value, setting the second gray value as B, and setting the ink quantity value of the white ink channel when the foreground image is printed according to the second gray value as follows:
W=255-B
where W is the ink quantity value of white ink for the white ink channel when printing the foreground map.
Preferably, the printer further includes a cyan channel, a magenta channel, a yellow channel, and a black channel, and when W is 0, the method further includes:
adjusting the ink values of the cyan channel, the magenta channel, the yellow channel and the black channel of the corresponding pixel point according to the ink value of the white channel, so that the ink values of the cyan channel, the magenta channel, the yellow channel and the black channel are as follows:
C=0,M=0,Y=0,K=0
where C is the ink value for the cyan channel, M is the ink value for the magenta channel, Y is the ink value for the yellow channel, and K is the ink value for the black channel.
Specifically, when the ink amount value of the white channel obtained by calculation is 0, the color values of the other channels of the printer are also adjusted to be 0, that is, the white channel does not discharge ink, and the other channels do not discharge ink, and meanwhile, in this embodiment, when the ink amount values of all the channels corresponding to the pixel points in the foreground map are 0, the ink amount value of the white channel is also zero. The printer may also include a spot color channel, such as a red color channel, a blue color channel, and the like, and when the ink amount value of the white color channel is zero, the ink amount value of the spot color channel is also zero.
The ink amount value of the white ink channel is adjusted according to the comparison result of the color value in the foreground image and the threshold value instead of directly setting the ink amount value of the white ink channel to be 100% according to the traditional method, so that the waste of the ink amount is avoided, and meanwhile, the background image is removed to directly print the foreground image, so that the ink amount (including the color ink amount and the white ink amount) of the background image is saved, and the printing cost is reduced.
Referring to fig. 7, an embodiment of the present invention provides a device for setting a white ink amount of a printer, the device including:
a first color value obtaining module 10, configured to obtain a color value of a printing medium, and record the color value as a first color value;
a foreground image obtaining module 20, configured to obtain a foreground image obtained after removing a background image from an image to be printed;
a first grayscale image obtaining module 30, configured to process the foreground image according to the first color value to obtain a first grayscale image;
the first gray value obtaining module 40 is configured to traverse the first gray map to obtain a first gray value of each pixel point in the gray map;
a comparison result obtaining module 50, configured to compare the first gray value with a set color threshold to obtain a comparison result;
and an ink amount setting module 60, configured to set an ink amount value of the white ink in the white ink channel when the foreground image is printed according to the comparison result.
Preferably, the first gray scale image obtaining module 30 includes:
the second color value acquisition unit is used for acquiring color values corresponding to all pixel points in the foreground image and recording the color values as second color values;
the color difference value acquisition unit is used for acquiring the difference value corresponding to each pixel point according to the first color value and the second color value;
the intermediate image generating unit is used for generating an intermediate image according to the difference value corresponding to each pixel point;
and the first gray-scale image acquisition unit is used for carrying out gray-scale processing on the intermediate image to obtain a corresponding first gray-scale image.
Preferably, when the first gray value is A, the color threshold is T, and when A ≧ T, the ink quantity value of the white ink channel when the foreground image is printed is:
W=255-A
where W is the ink quantity value of white ink for the white ink channel when printing the foreground map.
Preferably, assuming that the first gray value is a and the color threshold is T, when a < T, the ink amount setting module 60 includes:
the second gray-scale image acquisition unit is used for carrying out gray-scale processing on the foreground image to obtain a second gray-scale image;
the second gray value acquisition unit is used for traversing the second gray map to acquire a second gray value corresponding to each pixel point in the second gray map;
and the ink amount value acquisition unit is used for setting the ink amount value of the white ink channel when the foreground image is printed according to the second gray value.
Preferably, if the second gray value is B, the ink amount value of the white ink in the white ink channel when the foreground image is printed is set as:
W=255-B
where W is the ink quantity value of white ink for the white ink channel when printing the foreground map.
Preferably, the printer further includes a cyan channel, a magenta channel, a yellow channel, and a black channel, and when W is 0, the method further includes:
adjusting the ink values of the cyan channel, the magenta channel, the yellow channel and the black channel of the corresponding pixel point according to the ink value of the white channel, so that the ink values of the cyan channel, the magenta channel, the yellow channel and the black channel are as follows:
C=0,M=0,Y=0,K=0
where C is the ink value for the cyan channel, M is the ink value for the magenta channel, Y is the ink value for the yellow channel, and K is the ink value for the black channel.
Preferably, the gray scale calculation formula of the graying process is as follows:
when the color value of the image is a value in an RGB color mode, the gray scale calculation formula is:
Gray=R×0.299+G×0.587+B×0.114
when the color value of the image is the value in the CMYK color mode, the gray scale calculation formula is:
Figure BDA0002041465510000121
where Gray represents a Gray value, a color value of the image in the RGB color mode is (R, G, B), and a color value of the image in the CMYK color mode is (C, M, Y, K).
In addition, the method of setting the amount of white ink for a printer of the embodiment of the present invention described in conjunction with fig. 1 can be implemented by a device for setting the amount of white ink for a printer. Fig. 8 is a schematic diagram showing a hardware configuration of a device for setting the white ink amount of a printer according to an embodiment of the present invention.
The printer white ink volume setting 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 reads and executes computer program instructions stored in the memory 402 to implement the method for setting the amount of white ink for a printer according to any of the above-described embodiments.
In one example, the device for setting the amount of white ink of a printer may further include a communication interface 403 and a bus 410. As shown in fig. 8, 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.
The bus 410 includes hardware, software, or both that couple the components of the printer white ink volume setting 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 method for setting the white ink amount of the printer in the above embodiment, the embodiment of the present invention can 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 above described embodiments of the method for setting white ink volume for a printer.
In summary, according to the method, the device, the equipment and the medium for setting the white ink amount of the printer provided by the embodiments of the present invention, the color value of the printing medium is obtained, and is compared with the color values of all the pixels in the foreground image in the image to be printed, and the processed image color value is compared with the set color threshold value to obtain the amount of the white ink to be printed at each pixel when the foreground image is printed, so that not only can part of the ink amount be saved, but also the printing cost is reduced, and the white ink amount is reasonably set according to the color value of each pixel in the foreground image instead of 100% of the white ink amount, so that the printed image has good transition and touch feeling.
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.

Claims (9)

1. A method of setting a white ink volume for a printer, the method comprising:
acquiring a color value of a printing medium, and recording the color value as a first color value;
acquiring a foreground image in an image to be printed after a background image is removed;
processing the foreground image according to the first color value to obtain a first gray image;
traversing the first gray scale image to obtain a first gray scale value of each pixel point in the first gray scale image;
comparing the first gray value with a set color threshold value to obtain a comparison result;
setting the ink amount value of the white ink channel when the foreground image is printed according to the comparison result;
the processing the foreground image according to the first color value to obtain a first gray scale image comprises:
obtaining color values corresponding to all pixel points in the foreground image, and recording the color values as second color values;
acquiring a difference value corresponding to each pixel point according to the first color value and the second color value;
generating an intermediate image according to the difference value corresponding to each pixel point;
and carrying out graying processing on the intermediate image to obtain a corresponding first grayscale image.
2. The method for setting white ink quantity of printer according to claim 1, wherein if the first gray value is A, the color threshold is T, and if A ≧ T, the ink quantity value of white ink channel when printing the foreground map is:
W=255-A
where W is the ink quantity value of white ink for the white ink channel when printing the foreground map.
3. The method for setting white ink volume of printer according to claim 1, wherein if a first gray value is a and the color threshold value is T, and when a < T, the setting the ink volume value of white ink of the white ink channel when printing the foreground image according to the comparison result includes:
carrying out graying processing on the foreground image to obtain a second grayscale image;
traversing the second gray scale map to obtain a second gray scale value corresponding to each pixel point in the second gray scale map;
and setting the ink amount value of the white ink channel when the foreground image is printed according to the second gray value.
4. The method for setting the white ink amount of a printer according to claim 3, wherein if the second gray value is B, the ink amount value of the white ink in the white ink channel when the foreground map is printed is set according to the second gray value as:
W=255-B
where W is the ink quantity value of white ink for the white ink channel when printing the foreground map.
5. The method for setting the amount of white ink for a printer according to claim 1 or 3, wherein the printer further includes a cyan color channel, a magenta color channel, a yellow color channel, and a black color channel, and when W =0, the method further includes:
adjusting the ink values of the cyan channel, the magenta channel, the yellow channel and the black channel of the corresponding pixel point according to the ink value of the white ink channel, so that the ink values of the cyan channel, the magenta channel, the yellow channel and the black channel are as follows:
C=0, M=0, Y=0, K=0
where W is the ink amount value of the white ink channel when the foreground image is printed, C is the ink amount value of the cyan channel, M is the ink amount value of the magenta channel, Y is the ink amount value of the yellow channel, and K is the ink amount value of the black channel.
6. The method for setting the amount of white ink for a printer according to claim 5, wherein a gradation calculation formula of the graying process is:
Figure 658947DEST_PATH_IMAGE001
wherein Gray represents a Gray value, and a color value of a pixel point in the image in the CMYK color mode is (C, M, Y, K).
7. A device for setting a white ink amount of a printer, said device comprising:
the first color value acquisition module is used for acquiring the color value of the printing medium and recording the color value as the first color value;
the foreground image acquisition module is used for acquiring a foreground image in the image to be printed after the background image is removed;
a first grayscale map obtaining module, configured to process the foreground map according to the first color value to obtain a first grayscale map, where the processing the foreground map according to the first color value to obtain the first grayscale map includes:
obtaining color values corresponding to all pixel points in the foreground image, and recording the color values as second color values;
acquiring a difference value corresponding to each pixel point according to the first color value and the second color value;
generating an intermediate image according to the difference value corresponding to each pixel point;
carrying out graying processing on the intermediate image to obtain a corresponding first grayscale image;
the first gray value acquisition module is used for traversing the first gray image to acquire a first gray value of each pixel point in the first gray image;
the comparison result acquisition module is used for comparing the first gray value with a set color threshold value to obtain a comparison result;
and the ink quantity setting module is used for setting the ink quantity value of the white ink channel when the foreground image is printed according to the comparison result.
8. An apparatus for setting a white ink amount of a printer, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of any of claims 1-6.
9. A storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1-6.
CN201910343397.7A 2019-04-26 2019-04-26 Method, device, equipment and medium for setting white ink quantity of printer Active CN111845099B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910343397.7A CN111845099B (en) 2019-04-26 2019-04-26 Method, device, equipment and medium for setting white ink quantity of printer
CN202210130503.5A CN114475005B (en) 2019-04-26 2019-04-26 Method, device, equipment and medium for setting white ink quantity based on foreground image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910343397.7A CN111845099B (en) 2019-04-26 2019-04-26 Method, device, equipment and medium for setting white ink quantity of printer

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202210130503.5A Division CN114475005B (en) 2019-04-26 2019-04-26 Method, device, equipment and medium for setting white ink quantity based on foreground image

Publications (2)

Publication Number Publication Date
CN111845099A CN111845099A (en) 2020-10-30
CN111845099B true CN111845099B (en) 2022-03-01

Family

ID=72951723

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910343397.7A Active CN111845099B (en) 2019-04-26 2019-04-26 Method, device, equipment and medium for setting white ink quantity of printer
CN202210130503.5A Active CN114475005B (en) 2019-04-26 2019-04-26 Method, device, equipment and medium for setting white ink quantity based on foreground image

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202210130503.5A Active CN114475005B (en) 2019-04-26 2019-04-26 Method, device, equipment and medium for setting white ink quantity based on foreground image

Country Status (1)

Country Link
CN (2) CN111845099B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112549792A (en) * 2020-12-03 2021-03-26 深圳诚拓数码设备有限公司 Fabric printing method and fabric printing equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002232674A (en) * 2001-01-31 2002-08-16 Ricoh Co Ltd Color image processing method, color image processing device, program, and recording medium
JP3728884B2 (en) * 1997-08-01 2005-12-21 ソニー株式会社 Image processing apparatus and method, image composition apparatus, and recording medium
CN101856904A (en) * 2009-04-03 2010-10-13 精工爱普生株式会社 Printing with multi-color inks including white ink
JP2011194832A (en) * 2010-03-23 2011-10-06 Seiko Epson Corp Printing method and program
CN103213394A (en) * 2009-11-05 2013-07-24 精工爱普生株式会社 Printing device and method of controlling printing device
JP2013154516A (en) * 2012-01-27 2013-08-15 Brother Industries Ltd Apparatus and program for generating print data
CN104885068A (en) * 2012-11-02 2015-09-02 图像电子公司 Generation of a white ink separation
CN105829114A (en) * 2013-12-18 2016-08-03 惠普发展公司,有限责任合伙企业 Printer calibration for media color
CN107665101A (en) * 2016-07-29 2018-02-06 佳能株式会社 Information processor, information processing method, storage medium and image processing system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007099554A2 (en) * 2006-02-16 2007-09-07 Sanjay Chandermohan Maheshwari Method and apparatus for generating white underbase and generating suitably modified separations for printing on colored background other than white
JP4427065B2 (en) * 2007-02-15 2010-03-03 シャープ株式会社 Image processing method and image processing apparatus
CN108960351B (en) * 2018-07-11 2021-12-17 深圳市汉森软件有限公司 Image printing method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3728884B2 (en) * 1997-08-01 2005-12-21 ソニー株式会社 Image processing apparatus and method, image composition apparatus, and recording medium
JP2002232674A (en) * 2001-01-31 2002-08-16 Ricoh Co Ltd Color image processing method, color image processing device, program, and recording medium
CN101856904A (en) * 2009-04-03 2010-10-13 精工爱普生株式会社 Printing with multi-color inks including white ink
CN103213394A (en) * 2009-11-05 2013-07-24 精工爱普生株式会社 Printing device and method of controlling printing device
JP2011194832A (en) * 2010-03-23 2011-10-06 Seiko Epson Corp Printing method and program
JP2013154516A (en) * 2012-01-27 2013-08-15 Brother Industries Ltd Apparatus and program for generating print data
CN104885068A (en) * 2012-11-02 2015-09-02 图像电子公司 Generation of a white ink separation
CN105829114A (en) * 2013-12-18 2016-08-03 惠普发展公司,有限责任合伙企业 Printer calibration for media color
CN107665101A (en) * 2016-07-29 2018-02-06 佳能株式会社 Information processor, information processing method, storage medium and image processing system

Also Published As

Publication number Publication date
CN114475005B (en) 2023-04-28
CN111845099A (en) 2020-10-30
CN114475005A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN111845084B (en) Printer ink amount adjusting method, device, equipment and medium based on image processing
US9310737B2 (en) Image inspection of printed matter with a master image
US9649839B2 (en) Image processing apparatus and image processing method
US8040569B2 (en) Image processing apparatus and method for contrast processing and intermediate color removal
CN111845101B (en) Printer ink amount adjusting method, device, equipment and medium based on color management
US9965227B2 (en) Image processing apparatus, image processing method, computer-readable recording medium, printing system, and method of producing printed material
US6125200A (en) Removing non-text information from a color image
JP5146942B2 (en) CONVERSION METHOD, DEVICE, AND COMPUTER PROGRAM FOR CONVERTING DIGITAL IMAGE OBTAINED BY SCANNER
US20100054587A1 (en) Image processing apparatus and image processing method
CN102275383B (en) Image processing apparatus and image processing system
CN111845099B (en) Method, device, equipment and medium for setting white ink quantity of printer
JP2009220423A (en) Printing apparatus, printing controller and printing method
JP2008018632A (en) Printing apparatus, printing apparatus control program, storage medium storing the program and printing apparatus control method, image processing apparatus, image processing program, storage medium storing the program and image processing method, correction area information generation apparatus, correction area Information generation program, storage medium storing the program, and correction area information generation method
CN111845098B (en) Method, device, equipment and medium for adjusting ink amount of printer
US11057528B2 (en) Information processing apparatus, method and storage medium
EP4391518A1 (en) Image processing apparatus, image processing method, program, and non-transitory computer-readable storage medium storing program
CN111845100B (en) Printer ink amount setting method, device, equipment and medium based on image processing
US10286675B2 (en) Recording apparatus and recording method
JP2010119006A (en) Image processing apparatus,and image processing method
US8289573B2 (en) Method for reducing registration defects in color printing
JP2005324459A (en) Image processing method and image forming system
JPH1091792A (en) Document segmentation method, apparatus, color printing system and computer program product
JP5162430B2 (en) Image processing apparatus and image processing method
JP2024088570A (en) Image processing apparatus, image processing method, and program
JP2003309732A (en) Image processing apparatus, image forming apparatus, image processing method, computer program, and recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211228

Address after: 518000 a201-a301, building a, Sino German European Industrial Demonstration Park, Hangcheng Avenue, guxing community, Xixiang street, Bao'an District, Shenzhen, Guangdong

Applicant after: SHENZHEN HOSONSOFT Co.,Ltd.

Address before: Room 1701, building C6, Hengfeng Industrial Town, Xixiang street, Bao'an District, Shenzhen City, Guangdong Province

Applicant before: SENDA (SHENZHEN) TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 518000 a201-a301, building a, Sino German European Industrial Demonstration Park, Hangcheng Avenue, guxing community, Xixiang street, Bao'an District, Shenzhen, Guangdong

Patentee after: Shenzhen Hansen Software Co.,Ltd.

Address before: 518000 a201-a301, building a, Sino German European Industrial Demonstration Park, Hangcheng Avenue, guxing community, Xixiang street, Bao'an District, Shenzhen, Guangdong

Patentee before: SHENZHEN HOSONSOFT Co.,Ltd.