Method, device, equipment and medium for automatically setting the amount of white ink per pixel in an image

By obtaining the mapping relationship between the inverted grayscale value of the color image and the white ink ink value, the white ink ink value of each pixel point is automatically set, which solves the hierarchy and breathability problems caused by the single white ink concentration in textile digital printing, and realizes the The vivid effect of color images and the improvement of product quality.

CN112083894BActive Publication Date: 2024-12-17SENDA SHENZHEN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910517305.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-14
Publication Date
2024-12-17
Estimated Expiration
2039-06-14

AI Technical Summary

Technical Problem

In textile digital printing, printing directly with 100% concentration of white ink will lead to a weak sense of layering of color images and waste of ink. The concentration of white ink when printing on thin fabrics will be too thick, resulting in poor breathability, resulting in a decline in product quality.

Method used

By obtaining the actual mapping relationship between the inverted gray value of the color image and the white ink ink value, the white ink ink value of each pixel point is automatically set to ensure that the amount of white ink laid and the actual color value of the color image is matched, and avoiding the same Use of white ink concentration.

Benefits of technology

It realizes a brighter color and more layered image effect of color images, while avoiding the poor breathability of fabrics caused by excessive white ink, and improving the quality of printed products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112083894B_ABST
    Figure CN112083894B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and medium for automatically setting the amount of white ink per pixel in an image. The method obtains the grayscale value of each pixel after the grayscale processing of the color image is processed and then the value is recorded as the inverted grayscale value; obtains the actual mapping relationship between the inverted grayscale value of each pixel and the amount of white ink; and obtains the amount of white ink for laying the base of each pixel of the color image before printing the color image based on the inverted grayscale value of each pixel and the actual mapping relationship. The present invention converts multi-dimensional color values ​​into one-dimensional grayscale values ​​that can be directly compared, and inverts the grayscale values, so that the white ink for laying the base and the color ink in the color image complement each other, making the printed color image more vivid and the image more layered, while also avoiding the problem of poor air permeability of the fabric printing medium caused by using the same white ink concentration for laying the base for all pixels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of printing technology, and in particular to a method, device, equipment and medium for automatically setting the amount of white ink per pixel of an image. Background Art

[0002] Inkjet printers convert colored liquid ink into fine particles through nozzles and spray them onto the printing medium. However, in some special application scenarios, if you want to print a color image, you need to print a layer of white ink on a non-white printing medium as a base, so that the color image will be more expressive. For example, in the field of textile digital printing, before printing a color image, you need to print a layer of 100% white ink as a base; but if you directly print 100% white ink without considering the color and material of the printing medium, not only will the printed color image have a weak sense of hierarchy, but it will also waste white ink. In the textile industry, it is often necessary to print thin fabrics such as silk fabrics. At this time, if you directly print 100% white ink as a base, the white ink concentration will be too thick, the air permeability of the fabric will deteriorate, and the product quality will decline. Summary of the invention

[0003] The embodiments of the present invention provide a method, device, equipment and medium for automatically setting the amount of white ink per pixel in an image, so as to solve the problem in the prior art that the concentration of the white ink used as the base when printing a color image is single and the quality of the printed product is poor.

[0004] In a first aspect, an embodiment of the present invention provides a method for automatically setting the amount of white ink per pixel in an image, the method comprising:

[0005] Obtaining the grayscale value of each pixel of the color image after grayscale processing and inverting the grayscale value, recorded as the inverted grayscale value;

[0006] Obtaining the actual mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value;

[0007] The amount of white ink used to lay the base of each pixel of the color image before printing the color image is obtained according to the inverted grayscale value of each pixel and the actual mapping relationship.

[0008] Preferably, the step of obtaining the actual mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value comprises:

[0009] Acquire an initial mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value;

[0010] Acquire an initial white ink amount value corresponding to each pixel when printing the color image according to the inverted grayscale value of each pixel and the initial mapping relationship;

[0011] Performing inkjet printing according to the initial white ink volume value and color ink volume value of each pixel to obtain a calibration image;

[0012] Acquire an adjustment coefficient for adjusting the initial mapping relationship according to the calibration image and the color image;

[0013] The initial mapping relationship is adjusted according to the adjustment coefficient to obtain the actual mapping relationship.

[0014] Preferably, the adjusting coefficient for adjusting the initial mapping relationship according to the calibration image and the color image comprises:

[0015] Scanning the calibration image and performing grayscale processing to obtain a grayscale value of each pixel in the calibration image, recorded as a first grayscale value;

[0016] Obtaining the grayscale value of each pixel of the color image after grayscale processing, recorded as a second grayscale value;

[0017] The first grayscale value and the second grayscale value are compared to obtain an adjustment coefficient for adjusting the initial mapping relationship.

[0018] Preferably, the step of obtaining the actual mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value comprises:

[0019] Acquire an initial mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value;

[0020] Select n inverse grayscale values ​​from the inverse grayscale values ​​as sample inverse grayscale values, where n≥1 and n is an integer;

[0021] Comparing the inverted grayscale value of the sample with a preset grayscale threshold to obtain a comparison result;

[0022] The initial mapping relationship is adjusted according to the comparison result to obtain the actual mapping relationship.

[0023] Preferably, n=1, and the sample inverse grayscale value is the inverse grayscale value corresponding to the largest number of pixels.

[0024] Preferably, if n>1, the step of selecting n inverse grayscale values ​​from the inverse grayscale values ​​as sample inverse grayscale values ​​comprises:

[0025] Sort all the inverse grayscale values ​​from large to small according to the number of corresponding pixels to obtain an inverse grayscale value sequence list;

[0026] Select n inverse grayscale values ​​from the inverse grayscale value sequence table from large to small, and the n inverse grayscale values ​​are the sample inverse grayscale values.

[0027] Preferably, the actual mapping relationship is represented by a smooth curve or a broken line, the horizontal coordinate of the smooth curve or the broken line is the inverted gray value, the vertical coordinate is the white ink amount value, and the broken line includes at least two line segments.

[0028] In a second aspect, an embodiment of the present invention provides a device for automatically setting the amount of white ink per pixel in an image, the device comprising:

[0029] The inverse grayscale value acquisition module is used to obtain the grayscale value of each pixel of the color image after the grayscale processing is performed, and the grayscale value is recorded as the inverse grayscale value;

[0030] An actual mapping relationship acquisition module, used to acquire the actual mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value;

[0031] The white ink quantity setting module is used to obtain the white ink quantity value for laying the base of each pixel point of the color image before printing the color image according to the inverted grayscale value of each pixel point and the actual mapping relationship.

[0032] In a third aspect, an embodiment of the present invention provides a device for automatically setting the amount of white ink on a pixel-by-pixel basis in an image, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the method of the first aspect in the above-mentioned embodiment is implemented.

[0033] In a fourth aspect, an embodiment of the present invention provides a storage medium having computer program instructions stored thereon, which implements the method of the first aspect in the above-mentioned embodiment when the computer program instructions are executed by a processor.

[0034] In summary, the embodiments of the present invention provide a method, device, equipment and medium for automatically setting the amount of white ink per pixel in an image. The method automatically obtains the white ink amount value corresponding to each pixel in a color image through the actual mapping relationship between the inverted grayscale value and the white ink amount value. The method is simple and fast, and the white ink amount value for each pixel is set according to the actual color value of each pixel in the color image, thereby ensuring that the white ink amount value for each pixel is different, thereby avoiding the problem of poor product quality caused by directly printing with the same white ink amount value in the industrial inkjet printing industry. At the same time, the white ink for the base is set in this way and the colored ink in the color image complement each other, thereby making the printed color image more vivid and the image more layered. At the same time, the problem of poor air permeability of the fabric printing medium caused by using the same white ink concentration for the base for all pixels is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following briefly introduces the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0036] Figure 1 It is a flow chart of a method for automatically setting the amount of white ink per pixel in an image according to a first embodiment of the present invention.

[0037] Figure 2 It is a flow chart of a method for automatically setting the amount of white ink per pixel in an image according to a second embodiment of the present invention.

[0038] Figure 3 4 is a flow chart of a method for automatically setting the amount of white ink per pixel in an image according to a third embodiment of the present invention.

[0039] Figure 4 It is a schematic diagram of a mapping relationship diagram of a method for automatically setting the amount of white ink per pixel in an image according to a third embodiment of the present invention.

[0040] Figure 5 It is a flow chart of a method for automatically setting the amount of white ink per pixel in an image according to a fourth embodiment of the present invention.

[0041] Figure 6 It is a schematic diagram of a mapping relationship diagram of a method for automatically setting the amount of white ink per pixel in an image according to a fourth embodiment of the present invention.

[0042] Figure 7 It is a structural schematic diagram of a device for automatically setting the amount of white ink per pixel in an image according to an embodiment of the present invention.

[0043] Figure 8 It is a structural schematic diagram of a device for automatically setting the amount of white ink per pixel in an image according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.

[0045] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0046] See also Figure 1 The embodiment of the present invention provides a method for automatically setting the amount of white ink per pixel in an image, the method specifically comprising the following steps:

[0047] S1, obtaining the grayscale value of each pixel of the color image after grayscale processing and inverting the grayscale value, recorded as the inverted grayscale value;

[0048] Specifically, all pixels in the color image are traversed to obtain the actual color value of each pixel, the actual color value is grayed to obtain the gray value of each pixel, and the gray value of each pixel is inverted to obtain the inverted gray value of each pixel, wherein the representation of the actual color value is different in different color gamuts. For example, in the CMYK color gamut, the actual color value is determined by four colors: cyan (C), magenta (M), yellow (Y), and black (K), and the actual color value of a certain pixel is (C, M, Y, K); in the RGB color gamut, the actual color value is (R, G, B). The graying process of the color image in different color gamuts is also different. The formula for graying the color image in the CMYK color gamut is:

[0049]

[0050] Among them, Gray represents the gray value, and the actual color value of the pixel is (C, M, Y, K);

[0051] The formula for grayscale processing of color images in the RGB color gamut is:

[0052] Gray=R×0.299+G×0.587+B×0.114

[0053] Among them, Gray represents the gray value, and the actual color value of the pixel is (R, G, B);

[0054] After obtaining the grayscale value of each pixel, the grayscale value is inverted to obtain the inverted grayscale value of each pixel. The calculation method of the inverted grayscale value is:

[0055] H=255-Gray

[0056] Among them, H is the inverted gray value, and Gray is the gray value.

[0057] S2, obtaining the actual mapping relationship between the inverted grayscale value of each pixel and the white ink amount value;

[0058] See also Figure 2 In this embodiment, the actual mapping relationship is obtained by the following method:

[0059] S211, obtaining an initial mapping relationship between the inverted grayscale value of each pixel and the white ink amount value;

[0060] S212, obtaining an initial white ink amount value corresponding to each pixel when printing the color image according to the inverted grayscale value of each pixel and the initial mapping relationship;

[0061] S213, performing inkjet printing according to the initial white ink amount value and color ink amount value of each pixel to obtain a calibration image;

[0062] S214, acquiring an adjustment coefficient for adjusting the initial mapping relationship according to the calibration image and the color image;

[0063] S215: Adjust the initial mapping relationship according to the adjustment coefficient to obtain the actual mapping relationship.

[0064] Specifically, an initial mapping relationship between the inverse grayscale value and the white ink ink value is set. The initial mapping relationship is set according to actual printing requirements. In the present embodiment, the initial mapping relationship is: W=H, wherein W is the white ink ink value, and H is the inverse grayscale value. The white ink ink value is equal to the inverse grayscale value and changes with the change of the inverse grayscale value. In another embodiment, the initial mapping relationship is: W=100%, wherein W is the white ink ink value. In the present embodiment, the white ink ink values ​​of all pixels are equal. After obtaining the initial mapping relationship, the initial white ink ink value corresponding to each pixel can be calculated according to the inverted grayscale value of each pixel in the obtained color image, and the first calibration image is printed according to the white ink ink value and the color ink value of each pixel, wherein the color ink value is the ink value of the four color inks of cyan (C), magenta (M), yellow (Y), and black (K) that reflect the color of the pixel; then scan and print the obtained calibration image, obtain the color value of each pixel in the calibration image, calculate the error between the color value of each pixel in the calibration image and the color value of the corresponding pixel in the color image, obtain the adjustment coefficient for adjusting the initial mapping relationship, and adjust the initial mapping relationship according to the adjustment coefficient to obtain the actual mapping relationship. Among them, the calibration image can also be manually observed, then compared with the color image, and the initial mapping relationship can be adjusted based on experience, but manual observation has large errors and low efficiency.

[0065] See also Figure 3 The specific steps of obtaining the adjustment coefficient include the following steps:

[0066] S2141, scanning the calibration image and performing grayscale processing to obtain a grayscale value of each pixel in the calibration image, recorded as a first grayscale value;

[0067] S2142, obtaining the grayscale value of each pixel after grayscale processing of the color image, recorded as a second grayscale value;

[0068] S2143: Compare the first grayscale value and the second grayscale value to obtain an adjustment coefficient for adjusting the initial mapping relationship.

[0069] Specifically, the calibration image is scanned, and then the scanned image is imported into the image processing software, and the grayscale processing program is called from the memory to grayscale the image, and then the inversion processing is performed to obtain a one-dimensional inverted grayscale value. The calibration image and the color image are only different in color, and the size, the number of pixels are the same and the pixels correspond to each other one by one. Then, the inverted grayscale value of each pixel of the color image is subtracted from the inverted grayscale value of each pixel in the scanned calibration image to obtain an adjustment coefficient corresponding to each pixel, and an adjustment mapping relationship between the adjustment coefficient and the inverted grayscale value of the color image is established. The initial mapping relationship and the adjusted mapping relationship are fitted with a quadratic polynomial and smoothed to obtain an actual mapping relationship.

[0070] See also Figure 4 , when the initial mapping relationship is as follows Figure 4 (1) is: When W=H, the actual mapping relationship after adjustment of the adjustment coefficient is as follows Figure 4 (2) At this time, the actual mapping relationship is represented by a smooth curve, and the mathematical expression of the smooth curve is: W = aH 2 +bH+c, where H is the inverted grayscale value, W is the amount of white ink, a, b, c are natural numbers and a≠0; Figure 4 (3) At this time, the actual mapping relationship is represented by a broken line, and the mathematical expression of the broken line is:

[0071]

[0072] Wherein, H is the inverse grayscale value, W is the amount of white ink, and a1, a2, and a3 are natural numbers. The representations used for the actual mapping relationship obtained according to the different adjustment coefficients are also different.

[0073] See also Figure 5 In this embodiment, the actual mapping relationship can also be obtained by the following method:

[0074] S221, obtaining an initial mapping relationship between the inverted grayscale value of each pixel and the white ink amount value;

[0075] S222, selecting n values ​​from the inverse grayscale values ​​as sample inverse grayscale values, where n≥1, and n is an integer;

[0076] S223, comparing the inverted gray value of the sample with a preset gray threshold to obtain a comparison result;

[0077] S224: Adjust the initial mapping relationship according to the comparison result to obtain the actual mapping relationship.

[0078] Specifically, an initial mapping relationship between the inverted grayscale value and the white ink ink volume value is set, and the initial mapping relationship is set according to actual printing requirements. In the present embodiment, the initial mapping relationship is: W=H, wherein W is the white ink ink volume value, H is the inverted grayscale value, and the white ink ink volume value is equal to the inverted grayscale value and changes with the inverted grayscale value; in another embodiment, the initial mapping relationship is: W=100%, wherein W is the white ink ink volume value, and in the present embodiment, the white ink ink volume values ​​of all pixels are equal. Then, n are selected from the inverted grayscale values ​​as sample inverted grayscale values, and the sample inverted grayscale values ​​are compared with the preset grayscale threshold to obtain a comparison result. For example, the inverted grayscale value with the most corresponding pixels is selected as the sample inverted grayscale value. For example, the sample inverted grayscale value is 102, and the grayscale threshold is 128, then the sample inverted grayscale value is less than the grayscale threshold. According to this comparison result, the adjustment program in the memory is called to automatically adjust the initial mapping relationship to obtain the actual mapping relationship. Figure 6 , the memory stores adjustment programs in different forms. For example, in this embodiment, the grayscale threshold is 128. When the inverted grayscale value of most pixels in the color image is less than the threshold, the white ink amount corresponding to all inverted grayscale values ​​less than 128 should be reduced accordingly, and the white ink amount corresponding to all inverted grayscale values ​​greater than 128 should be increased accordingly, so that the printed image transition is more uniform and the color expression is better. At the same time, in another embodiment, the inverted grayscale values ​​are sorted from more to less according to the corresponding pixels, and then the first 20 inverted grayscale values ​​of the corresponding pixel number are selected as sample inverted grayscale values, and the 20 sample inverted grayscale values ​​are compared with the grayscale threshold such as 128 to obtain the distribution of the sample inverted grayscale values, and different adjustment coefficients are obtained according to different distributions. The initial mapping relationship is adjusted according to the adjustment coefficient to obtain the actual mapping relationship. The grayscale threshold is set according to the needs and the medium material, and is not specifically limited here.

[0079] S3. Obtaining, according to the inverted grayscale value of each pixel and the actual mapping relationship, a white ink amount value for laying a base on each pixel of the color image before printing the color image.

[0080] Specifically, the white ink amount value corresponding to each pixel is calculated through the actual mapping relationship according to the inverted grayscale values ​​of all pixels in the color image, white ink base printing is performed according to the white ink amount value, and then color printing is performed according to the color ink amount. In this way, the printed color image is brighter and has a better sense of hierarchy. At the same time, it also avoids the problem of poor air permeability of the fabric printing medium caused by using the same white ink concentration for base printing for all pixels.

[0081] See also Figure 7 The embodiment of the present invention provides a device for automatically setting the amount of white ink per pixel in an image, the device comprising:

[0082] The inverse grayscale value acquisition module 10 is used to obtain the grayscale value of each pixel after the color image is grayed and processed, which is recorded as the inverse grayscale value;

[0083] An actual mapping relationship acquisition module 20, used to acquire an actual mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value;

[0084] The white ink quantity setting module 30 is used to obtain the white ink quantity value for laying the base of each pixel of the color image before printing the color image according to the inverted grayscale value of each pixel and the actual mapping relationship.

[0085] Preferably, the actual mapping relationship acquisition module 20 includes:

[0086] A first initial mapping relationship acquisition unit, used for acquiring an initial mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value;

[0087] An initial white ink quantity value acquisition unit, used for acquiring an initial white ink quantity value corresponding to each pixel when printing the color image according to the inverted gray value of each pixel and the initial mapping relationship;

[0088] A calibration image acquisition unit, used for performing inkjet printing according to the initial white ink volume value and color ink volume value of each pixel point to obtain a calibration image;

[0089] an adjustment coefficient acquisition unit, configured to acquire an adjustment coefficient for adjusting the initial mapping relationship according to the calibration image and the color image;

[0090] The first actual mapping relationship acquisition unit is used to adjust the initial mapping relationship according to the adjustment coefficient to obtain the actual mapping relationship.

[0091] Preferably, the adjusting coefficient for adjusting the initial mapping relationship according to the calibration image and the color image comprises:

[0092] Scanning the calibration image and performing grayscale processing to obtain a grayscale value of each pixel in the calibration image, recorded as a first grayscale value;

[0093] Obtaining the grayscale value of each pixel of the color image after grayscale processing, recorded as a second grayscale value;

[0094] The first grayscale value and the second grayscale value are compared to obtain an adjustment coefficient for adjusting the initial mapping relationship.

[0095] Preferably, the actual mapping relationship acquisition module 20 further includes:

[0096] A second initial mapping relationship acquisition unit, used to acquire an initial mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value;

[0097] A sample inverse grayscale value acquisition unit, used for selecting n values ​​from the inverse grayscale values ​​as sample inverse grayscale values, where n≥1 and n is an integer;

[0098] A comparison result acquisition unit, used for comparing the inverted gray value of the sample with the gray threshold to obtain a comparison result;

[0099] The second actual mapping relationship acquisition unit is used to adjust the initial mapping relationship according to the comparison result to obtain the actual mapping relationship.

[0100] Preferably, n=1, and the sample inverse grayscale value is the inverse grayscale value corresponding to the largest number of pixels.

[0101] Preferably, if n>1, the step of selecting n inverse grayscale values ​​from the inverse grayscale values ​​as sample inverse grayscale values ​​comprises:

[0102] Sort all the inverse grayscale values ​​from large to small according to the number of corresponding pixels to obtain an inverse grayscale value sequence list;

[0103] Select n inverse grayscale values ​​from the inverse grayscale value sequence table from large to small, and the n inverse grayscale values ​​are the sample inverse grayscale values.

[0104] Preferably, the actual mapping relationship is represented by a smooth curve or a broken line, the horizontal coordinate of the smooth curve or the broken line is the inverted gray value, the vertical coordinate is the white ink amount value, and the broken line includes at least two line segments.

[0105] In addition, combined Figure 1 The method for automatically setting the amount of white ink per pixel in an image according to the embodiment of the present invention described above can be implemented by a device for automatically setting the amount of white ink per pixel in an image. Figure 8 A schematic diagram of the hardware structure of a device for automatically setting the amount of white ink per pixel in an image provided by an embodiment of the present invention is shown.

[0106] The device for automatically setting the amount of white ink per pixel in an image may include a processor 401 and a memory 402 storing computer program instructions.

[0107] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.

[0108] Memory 402 may include a large capacity memory for data or instructions. For example, but not limitation, memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, memory 402 may include a removable or non-removable (or fixed) medium. In appropriate cases, memory 402 may be inside or outside a data processing device. In a specific embodiment, memory 402 is a non-volatile solid-state memory. In a specific embodiment, memory 402 includes a read-only memory (ROM). In appropriate cases, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.

[0109] The processor 401 reads and executes computer program instructions stored in the memory 402 to implement any one of the methods for automatically setting the amount of white ink per pixel in an image in the above embodiments.

[0110] In one example, the device for automatically setting the amount of white ink per pixel in an image may further include a communication interface 403 and a bus 410. Figure 8 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.

[0111] The communication interface 403 is mainly used to implement the communication between the modules, devices, units and / or equipment in the embodiment of the present invention.

[0112] Bus 410 includes hardware, software or both, and the parts of the image pixel-by-pixel white ink ink quantity automatic setting device are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the embodiment of the present invention describes and shows a specific bus, the present invention considers any suitable bus or interconnection.

[0113] In addition, in combination with the method for automatically setting the amount of white ink per pixel in the above-mentioned embodiment, the embodiment of the present invention can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the methods for automatically setting the amount of white ink per pixel in the above-mentioned embodiment is implemented.

[0114] In summary, the embodiments of the present invention provide a method, device, equipment and medium for automatically setting the amount of white ink per pixel in an image. The method automatically obtains the white ink amount value corresponding to each pixel in a color image through the actual mapping relationship between the inverted grayscale value and the white ink amount value. The method is simple and fast, and the white ink amount value for each pixel is set according to the actual color value of each pixel in the color image, thereby ensuring that the white ink amount value for each pixel is different, thereby avoiding the problem of poor product quality caused by directly printing with the same white ink amount value in the industrial inkjet printing industry. At the same time, the white ink for the base is set in this way and the colored ink in the color image complement each other, thereby making the printed color image more vivid and the image more layered. At the same time, the problem of poor air permeability of the fabric printing medium caused by using the same white ink concentration for the base for all pixels is avoided.

[0115] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0116] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0117] It should also be noted that the exemplary embodiments mentioned in the present invention 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 steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.

[0118] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.

Claims

1. A method for automatically setting the amount of white ink per pixel in an image, characterized in that: The method comprises: Obtain the grayscale value of each pixel of the color image after grayscale processing and then inverting the grayscale value, which is recorded as the inverted grayscale value; Obtaining an initial mapping relationship between the inverted grayscale value of each pixel and the amount of white ink; Acquiring an adjustment coefficient for adjusting the initial mapping relationship includes: Acquire an initial white ink amount value corresponding to each pixel when printing the color image according to the inverted grayscale value of each pixel and the initial mapping relationship; Performing inkjet printing according to the initial white ink volume value and color ink volume value of each pixel to obtain a calibration image; Acquire the adjustment coefficient for adjusting the initial mapping relationship according to the calibration image and the color image; or, Compare the sample inverted grayscale value with the grayscale threshold to obtain the distribution of the sample inverted grayscale value; Obtain different adjustment coefficients according to different distributions; Adjusting the initial mapping relationship according to the adjustment coefficient to obtain an actual mapping relationship; The amount of white ink used to lay the base of each pixel of the color image before printing the color image is obtained according to the inverted grayscale value of each pixel and the actual mapping relationship.

2. The method for automatically setting the amount of white ink per pixel in an image according to claim 1, characterized in that: The adjustment coefficient for adjusting the initial mapping relationship according to the calibration image and the color image comprises: Scanning the calibration image and performing grayscale processing to obtain a grayscale value of each pixel in the calibration image, recorded as a first grayscale value; Obtaining the grayscale value of each pixel of the color image after grayscale processing, recorded as a second grayscale value; The first grayscale value and the second grayscale value are compared to obtain an adjustment coefficient for adjusting the initial mapping relationship.

3. The method for automatically setting the amount of white ink per pixel in an image according to claim 1, characterized in that: The actual mapping relationship between the inverted grayscale value of each pixel and the white ink amount value is obtained by: Acquire an initial mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value; Select n inverse grayscale values ​​from the inverse grayscale values ​​as sample inverse grayscale values, where n≥1 and n is an integer; Comparing the inverted grayscale value of the sample with a preset grayscale threshold to obtain a comparison result; The initial mapping relationship is adjusted according to the comparison result to obtain the actual mapping relationship.

4. The method for automatically setting the amount of white ink per pixel in an image according to claim 3, characterized in that: When n=1, the sample inverse grayscale value is the inverse grayscale value with the most corresponding pixels.

5. The method for automatically setting the amount of white ink per pixel in an image according to claim 3, characterized in that: If n>1, the step of selecting n inverse grayscale values ​​from the inverse grayscale values ​​as sample inverse grayscale values ​​includes: Sort all the inverse grayscale values ​​from large to small according to the number of corresponding pixels to obtain an inverse grayscale value sequence list; Select n inverse grayscale values ​​from the inverse grayscale value sequence table from large to small, and the n inverse grayscale values ​​are the sample inverse grayscale values.

6. The method for automatically setting the amount of white ink per pixel in an image according to any one of claims 1 to 5, characterized in that: The actual mapping relationship is represented by a smooth curve or a broken line, the horizontal coordinate of the smooth curve or the broken line is the inverted gray value, the vertical coordinate is the white ink amount value, and the broken line includes at least two line segments.

7. A device for automatically setting the amount of white ink per pixel in an image, characterized in that: The device comprises: The inverse grayscale value acquisition module is used to obtain the grayscale value of each pixel of the color image after grayscale processing, which is recorded as the inverse grayscale value; An actual mapping relationship acquisition module, used to acquire the actual mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value; A white ink quantity setting module, for obtaining, according to the inverted grayscale value of each pixel point and the actual mapping relationship, a white ink quantity value for laying a base on each pixel point of the color image before printing the color image; The actual mapping relationship acquisition module includes: a module for acquiring an initial mapping relationship between the inverted grayscale value of each pixel and the white ink quantity value, and acquiring an adjustment coefficient for adjusting the initial mapping relationship, including: According to the inverted grayscale value of each pixel and the initial mapping relationship, the initial white ink amount value corresponding to each pixel when printing the color image is obtained; according to the initial white ink amount value and the color ink amount value of each pixel, inkjet printing is performed to obtain a calibration image; according to the calibration image and the color image, the adjustment coefficient for adjusting the initial mapping relationship is obtained; or, Compare the sample inverse grayscale value with the grayscale threshold to obtain the distribution of the sample inverse grayscale value; obtain different adjustment coefficients according to different distributions; and adjust the initial mapping relationship according to the adjustment coefficient to obtain the actual mapping relationship.

8. A device for automatically setting the amount of white ink per pixel in an image, characterized in that: include: At least one processor, at least one memory and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, implement the method according to any one of claims 1 to 6.

9. A medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.