Use of color in media helps convey information. Numerous forms of media, such as digital images and printed media, rely on various techniques to render color, and accurate color rendering may enhance communication.
The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
Color inconsistency in printed media may occur for various reasons. In some examples, a creator of digital images may use printers from different vendors, who may implement custom or proprietary color reproducing techniques. An image printed with one printer may appear different from the same image printed to the same type of medium by another printer. While some users and color experts may be able to configure their imaging and printing workflows to reduce color inconsistency, this often requires training. A significant set of creators, such as office workers and home users, are not trained in color and thus rely on their printers to reproduce color consistently. In addition, a given creator, whether trained in color or not, may use different printers, such as a home printer and an office printer, and may expect consistent color reproduction without undue manual effort.
Printer manufacturers have a significant degree of latitude in mapping common digital color spaces, such as Standard Red Green Blue (sRGB), to the color reproduction capabilities (i.e., gamut) of their printers. For example, a cyan-magenta-yellow-black (CMYK) printer gamut may have a narrower range of colors compare to the sRGB color space. As such, the printer manufacturer typically uses their experience and judgment to map sRGB colors not able to be reproduced by the printer (out of gamut) to CMYK colors that are reproducible by the printer (in gamut).
The techniques described herein aim to supplement or replace subjective human judgment in mapping digital image color to printer gamut with a rules-based approach that reduces or eliminates color inconsistency among different printing devices. The techniques described herein include a color encoding that is consistent with widely used RGB workflows and that provides a workspace that is shaped to fit a range of printer gamuts, so that creators may avoid using complicated workflows and relying on printer manufacturers' subjective color reproduction choices.
The techniques described herein provide a color encoding and related transforms including a forward transform and a reverse transform. The color encoding may be used to encode datapoints, such as image pixel data, within a color space. Such datapoints and color space may be referred to as source or output datapoints and color space, which are distinguished herein from reference datapoints and color space. The source/output datapoints and color space may be described as RGB triplets. The reference datapoints and color space may be described in terms of an accepted reference standard, such as CIELAB as defined by the International Commission on Illumination.
The forward transform transforms a color encoding for a source datapoint of the source color space (e.g., an RGB triplet) into a corresponding reference datapoint of a reference color space (e.g., L*a*b* coordinates).
The reverse transform transforms a reference datapoint of the reference color space (e.g., L*a*b* coordinates) into a corresponding color encoding of an output datapoint of the output color space (e.g., an RGB triplet).
Both transforms use selected colors within the reference color space. An example set of selected colors is white, black, and a set of chromatic colors spanning different print gamuts of a range of different printing devices. Example chromatic colors include red, green, blue, cyan, magenta, and yellow. In a further example, as will be discussed in detail below, the selected colors number eight and are white, black, red, green, blue, cyan, magenta, and yellow.
The selected colors may define a polyhedron within the reference color space and may be selected to fit each face of the polyhedron to a corresponding apparent surface of the combined print gamut of the range of different printing devices, such as different models of printers made by different manufacturers. The combined print gamut may be empirically determined, such as by printing an image to different types of media (e.g., matte paper, glossy paper, etc.) with different marking agents (e.g., inks, toners, etc.) using different printers, measuring the resulting color under controlled conditions (e.g., with a spectrophotometer), and combining these measurements into a combined gamut. The combined gamut may be a field of discrete colors that may be reproducible by at least one of the printers in the range. As such, the selected colors may closely represent in RGB terms actual capabilities of a range of different printing devices that a creator could be expected to use.
The non-transitory machine-readable medium 100 may be provided to a computing device, such as a desktop computer, notebook computer, All-in-One (AiO) computer, server, tablet computer, smartphone, or the like.
The medium 100 may include a non-volatile memory, such as read-only memory (ROM), electrically-erasable programmable read-only memory (EEPROM), or flash memory. The non-transitory machine-readable medium 100 may include volatile memory, such as a random-access memory (RAM). The non-transitory machine-readable medium 100 may include an electronic, magnetic, optical, or other physical storage device that encodes the instructions 102 that implement the functionality discussed herein.
A processor that executes the instructions 102 may include a microcontroller, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), or a similar processing device.
The instructions 102 may be directly executable, such as binary or machine code, and/or may include interpretable code, bytecode, source code, or similar instructions that may undergo additional processing to be executed. All of such examples may be considered executable instructions.
The selected colors 106 may include white 110, black 112, and a set of chromatic colors 114, 116. The chromatic colors 114, 116 number two or more, for example, six. The selected colors 106 are specifically chosen to span different print gamuts of a range of different printing devices.
The instructions 102 encode a source datapoint 120 of a source color space 122 with the color encoding 104 to obtain a reference datapoint 124 of the reference color space 108 by determining the reference datapoint 124 as a mixture of white 110, black 112, and two colors selected from the set of chromatic colors 114, 116. Encoding from the source color space 122 to the reference color space 108 may be considered a forward transform.
The source color space 122 may be a display device color space, such as an RGB color space. The source datapoint 120 may be encoded as a red, green, and blue triplet with values, for example, from 0 to 255. Any number of source datapoints 120 may be encoded. A source datapoint 120 may represent a pixel in a digital image that includes thousands, millions, or more pixels.
The reference color space 108 may be a CIELAB color space or other widely accepted standard color space. In other examples, the reference color space 108 may be a proprietary or ad hoc color space. The reference datapoint 124 may be encoded as a triplet of lightness value, L*, and two opponent color values, a* and b*. Lightness L* may range from 0 to 100 to respectively represent black 112 and white 110. The a* axis represents green-red opponents, where negative values are green and positive values are red. The b* axis represents blue-yellow opponents, with negative values being blue and positive values being yellow. The a* and b* axes are theoretically unbounded but may be limited to specific ranges, such as −128 to 127, for implementation purposes.
The instructions 102 output the reference datapoint 124. The reference datapoint 124 may represent a pixel in a digital image, which may be outputted as an array of such reference datapoints 124.
The color encoding 104 may be defined with regard to a reference viewing environment. In various examples, a reference viewing environment is defined as follows: a luminance level for observer adaptive white is 350 lux (111.4 candela per square meter or cd/m2), the observer adaptive white point has chromaticity values of CIE D50 (x=0.3456, y=0.3583), and the viewing surround is average.
The color encoding 104 and its selected colors 106 may be defined according to Table 1 or 2.
Fitting the gamut 200 of the color encoding 104 to the combined print gamut 202 may include having an outermost point in the print gamut 202 lie within a planar face of the color encoding gamut 200. In other examples, an outermost point in the print gamut 202 may be a relatively small distance from the corresponding a planar face of the color encoding gamut 200, such as 2%, 4%, 8%, or 10% of the overall width of the print gamut 202. In various examples, the planar face of the color encoding gamut 200 may be spaced one print-gamut point away from an outermost point of the print gamut 202, which may reduce errors in interpolation near the surface of the color encoding gamut 200.
In various examples, white 100 may be defined as ideal reflective white and black 112 may be defined as having 5% of the reflectance of ideal white. The positions of the chromatic colors 114, 116 may be selected such that they closely enclose the point cloud that is the combined print gamut 202. White 110, black 112, and the chromatic colors 114, 116 may be set to exact values in the combined print gamut 202 to avoid unnecessary color mixing by a printer when pure white 110, black 112, or a chromatic color 114, 116 is desired. Note that the L* value of yellow was selected to be 100 based on testing.
With reference to
Interpolation may use four of the selected colors 106 including white 110, black 112, a primary chromatic color, and a secondary chromatic color. The chromatic colors 114, 116 may be selected to include red, green, and blue as primary chromatic colors and cyan, magenta, and yellow as secondary chromatic colors. In such examples, there are six possible unique color selections of primary color, secondary color, white, and black, as shown in
With reference to
As will be explained below, the selection of the primary and secondary colors may be based on the relative position in the source color space 122 of the source datapoint 120 relative to white, black, and the primary and secondary colors. That is, with reference to
For example, with reference to
This may be inverted as:
The same logic applies to all combinations of primary and secondary colors, as shown in
For a function in an RGB coordinate space f=f(R, G, B), if fw=f(Rw, Gw, Bw), fk=(Rk, Gk, Bk), fp=(Rp, Gp, Bp), and fs=f(Rs, Gs, Bs) are known and the values of f inside the tetrahedron 402-412 defined by these four sets of color coordinates are unknown, these values may be approximated using linear interpolation. Barycentric coordinates may be used to express this computation:
f=α
w
f
w+αkfk+αpfp+αsfs. (6)
Further, if f is known for all the vertices of the RGB unit cube, fw=f(1, 1, 1), fk=f(0, 0, 0), fr=f(1, 0, 0), fg=f(0, 1, 0), fb=f(0, 0, 1), fc=f(0, 1, 1), fm=f(1, 0, 1), and fy=f(1, 1, 0), then f may be approximated over the entire space. To interpolate f at the RGB values of a source datapoint 120, first the tetrahedron 402-412 that contains the source datapoint 120 is found, after which the value of f can be interpolated as described above. To find the correct tetrahedron 402-412, the source datapoint 120 RGB values may be transformed into the barycentric coordinates of each tetrahedron 402-412. If a tetrahedron 402-412 is found such that the coordinates satisfy 0≤αw≤1, 0≤αk≤1, 0≤αp≤1, and 0≤αs≤1, then the source datapoint 120 point lies within that tetrahedron 402-412. This procedure simplifies to a partitioning identified by six possible RGB ordinal patterns, as follows:
Alternatively and equivalently, these calculations may be expressed according to a ranking of RGB components. For this purpose, an ordinal sorting of RGB components may be expressed as follows:
(r0,r1,r2)=(R,G,B) (9)
(rλ,rμ,rν)=sort(r0,r1,r2) (10)
such that rλ≤rμ≤rν, where
(λ,μ,ν)=argsort(r0,r1,r2). (11)
Using Equations (9) to (11), the barycentric coordinates of each of the six tetrahedra 402-412 may be expressed as αw=rλ, αk=1−rν, αp=rν−rμ, and αs=rμ−rλ, such that Equations (6) to (8) may be reduced to the expression:
f=r
λ
f
w+(1−rν)fk+(rν−rμ)fp+(rμ−rλ)fs. (12)
As such, given an RGB source datapoint 120 the relevant primary and secondary colors may be determined from the containing tetrahedra 402-412, or equivalently from the RGB component ranking, and proportional amounts of white (αw), black (αk), a primary color (αp), and a secondary color (αs) may be computed. The forward transform may thus be completed by computing the reference datapoint 124 in the reference color space 108 as:
At block 502, a source datapoint is received. The source datapoint may be member of a set of pixel data and may represent a single pixel. The source datapoint may be within a source color space that accords with an RGB color model.
At block 504, two colors, termed primary and secondary, are determined. The primary and secondary colors are used with white and black to encode the source datapoint. The primary and secondary colors are selected based on the source datapoint from the chromatic colors that define the color encoding. The color component values of the source datapoint may be ranked and the primary and secondary colors may be selected based on the ranking, as discussed above with regard to Equations (9)-(12). Alternatively, the primary and secondary colors may be determined as the two chromatic colors that, with white and black, define a volume within the source color space that contains the source datapoint, as discussed above with regard to
At block 506, the proportional amounts of white, black, and the primary and secondary colors selected at block 504 may be determined for the source datapoint. Linear interpolation may be used to determine the proportional amounts. This may apply Equation (7) or (12) above, for example.
At block 508, the source datapoint is encoded by determining the reference datapoint in the reference color space as the mixture of white, black, and the primary and secondary colors based on the proportional amounts from block 506. Equation (13) may be applied. The reference datapoint may be expressed as an L*a*b* triplet in a CIELAB color space.
At block 510, the reference datapoint is outputted. The reference datapoint may be member of a set of pixel data that is outputted to a printer device for reproduction or to a computing device for storage, manipulation, or communication.
Note that blocks 504-508 are shown and described as discrete actions for sake of explanation. In various implementations, various actions may be carried out simultaneously and/or by the same computation.
The non-transitory machine-readable medium 600 may be provided to a computing device, such as a desktop computer, notebook computer, AiO computer, server, tablet computer, smartphone, or the like. The medium 600 may be similar or identical to the medium 100 discussed above.
The discussion above for the medium 100 may be referenced for detail not repeated here concerning the color encoding 104, selected colors 106, reference color space 108, and other components sharing like reference numerals and/or like terminology.
The instructions 602 encode a reference datapoint 124 of the reference color space 108 with the color encoding 104 to obtain an output datapoint 604 of an output color space 606 by determining the output datapoint 604 as a mixture of white 110 or black 112, and two colors selected from the set of chromatic colors 114, 116. Encoding from the reference color space 108 to the output color space 606 may be considered a reverse transform that complements the forward transform discussed with respect to
As mentioned above, the reference color space 108 may be a CIELAB color space or other standard color space. The reference datapoint 124 may be encoded as a triplet of lightness value, L*, and two opponent color values, a* and b*.
The output color space 606 may be a display-device color space, such as an RGB color space that is directly consumed by a display device. The output datapoint 604 may be encoded as a red, green, and blue triplet with values, for example, from 0 to 255. Any number of output datapoints 604 may be encoded, such as a set of datapoints that represent pixels of a digital image. The output color space 606 may be the same as the source color space 122 discussed with respect to
The instructions 602 further output the output datapoint 604, for example, as part of a digital image.
In various examples, the instructions 602 and instructions 102 (
The reverse transform may convert a L*a*b* reference datapoint 124 to a respective RGB output datapoint 604 to using linear interpolation, as follows.
The reference datapoint 124 may be described as a linear combination of four of the selected colors 106. For example, the same four colors from the forward transform may be used in the reverse transform, namely white 110, black 112, one of the red-green-blue primary colors, and one of the cyan-magenta-yellow secondary colors.
The reference datapoint 124 may be described as a mixture, as follows:
White and black are common to all six tetrahedra 402-412 (
Further, by defining the following:
Equation (15) can be written as:
Thus, the reverse transform may be expressed as follows:
With regard to Equations (9) to (12), RGB values may be computed directly from these barycentric coordinates provided that the correct tetrahedron 402-412 is selected:
r
λ=αw, (20a)
r
μ=αw+αs, (20b)
r
ν=αw+αp+αs. (20c)
A hue angle of the point (L*, a*, b*) in the context of the partitioning described by Tables 1 and 2 may be used to determine the correct tetrahedron 402-412 where:
Thus, once the proportional amounts of white (αw), black (αk), a primary color (αp), and a secondary color (αs) are computed using Equations (20)-(22), the RGB components of the output datapoint 604 may be computed using Equation (1) above.
At block 702, a reference datapoint is received. The reference datapoint may be member of a set of pixel data and may represent a single pixel. The reference datapoint may be within a reference color space, such as a CIELAB color space.
At block 704, two colors, termed primary and secondary, are determined. The primary and secondary colors are used with white and/or black to encode the reference datapoint. The primary and secondary colors are selected based on the reference datapoint from the chromatic colors defining the color encoding. The primary and secondary colors may be selected based on a hue angle of the reference datapoint, as discussed above with regard to Equations (21) and (22). Other methodologies may be used to determine the primary and secondary colors as the two chromatic colors that, with white and black, define a volume within the reference color space that contains the reference datapoint (i.e., analogous to
At block 706, the proportional amounts of white, black, and the primary and secondary colors selected at block 704 may be determined for the reference datapoint. This may apply Equations (20) above, for example.
At block 708, the output datapoint is encoded by determining the output datapoint in the output color space as the mixture of white, black, and the primary and secondary colors based on the proportional amounts from block 706. Equation (1) may be applied. The output datapoint may be expressed as RGB triplet in an RGB color space.
At block 710, the output datapoint is outputted. The output datapoint may be member of a set of pixel data that is outputted to a display device for display.
Note that blocks 704-708 are shown and described as discrete actions for sake of explanation. In various implementations, various actions may be carried out simultaneously and/or by the same computation.
The computing device 800 includes a communications interface 804, a display device 806, and a processor 808 connected to the communications interface 804 and the display device 806.
The communications interface 804 may include a serial port, parallel port, network adaptor, or similar device capable of communicating data with another device, such as a printer. The communications interface 804 may be wired or wireless. The communications interface 804 may be a direct point-to-point interface, such as a universal serial bus (USB)™ interface, or may be a network interface, such as a wireless network adaptor and driver.
The display device 806 may include a light-emitting diode (LED) display, liquid-crystal display (LCD), or similar device capable of displaying a digital image formed of an array of pixels. The display device 806 may include a touchscreen.
The processor 808 may include a CPU or other kind of processor (examples discussed above) capable of executing instructions that implement the functionality discussed herein.
The color encoding 802 is defined by selected colors within a reference color space. The selected colors 802 fit a combined print gamut of a range of different printing devices. For example, the selected colors may be specifically chosen to define a polyhedron within the reference color space, such that each face of the polyhedron fits a corresponding apparent surface of the combined print gamut. In this way, the selected colors 802 may define a gamut that encompasses the combined print gamut and that is shaped like the combined print gamut (see
In an example forward transform, processor 808 encodes pixel data 810 displayed at the display device 806 with the color encoding 802 to obtain a set of encoded datapoints 812 by determining each encoded datapoint as a mixture of the selected colors that define the color encoding 802. The techniques discussed elsewhere herein may be used.
As such, a first set of pixel data 810 (i.e., an image) may be created or manipulated by the computing device 800, such as with an image capture device, image manipulation program, or productivity program. The first set of pixel data 810 may then be transformed into a corresponding first set of encoded datapoints 812 that matches the combined print gamut. The first set of encoded datapoints 812 may be outputted to a printing device via the communications interface 804. Having been encoded with the color encoding 802, the first set of encoded datapoints 812 is thus more likely provide expected color reproduction provided that the printer is or is similar to a member of the range of printers used to establish the combined print gamut. Further, the color encoding 802 or a representation thereof may also be provided to the printing device, for example, as an International Color Consortium (ICC) profile.
In an example reverse transform, the processor 808 encodes encoded datapoints 812 received at the communications interface 804 with the color encoding 802 to obtain a set of pixel data 810 by determining each pixel to be a mixture of the selected colors of the color encoding 802. The set of pixel data 810 may be outputted to the display device 806 for display.
As such, a second set of encoded datapoints 812 may be received, for example, from another computing device, and then converted to a second set of pixel data 810 suitable for display at the display device 806.
The printing device 900 includes a communications interface 902 and a processor 904 connected to the communications interface 902. The printing device 900 may include a print engine 906 connected to the processor 904. An example of a printing device 900 that includes a print engine 906 is an office or home printer, such as an inkjet printer or laser printer. An example of a printing device 900 that may omit a print engine 906 is a print service computing device that processes images into files configured for printing.
The communications interface 902 may include a serial port, parallel port, network adaptor, or similar device capable of communicating data with another device, such as a computing device. The communications interface 902 may be wired or wireless. The communications interface 902 may be a direct point-to-point interface, such as a USB™ interface, or may be a network interface, such as a wireless network adaptor and driver.
The processor 904 may include a CPU or other kind of processor (examples discussed above) capable of executing instructions that implement the functionality discussed herein.
The print engine 906 includes an electromechanical apparatus to apply print agent, such as ink or toner, to print media, such as paper.
The communications interface 902 may receive encoded datapoints 812 encoded by the color encoding 802 (e.g., from a computing device 800 of
In other examples, the printing device 900 may store the color encoding 802 in conjunction with its working color space 908 in a form that allows the processor 904 to convert pixel data 810 to the working color space 908. Hence, pixel data (e.g., an RGB image) may be received by the communications interface 902 and the printing device 900 may convert the pixel data into its working color space 908. That is, for example, the printing device 900 converts sRGB data into data encoded by the color encoding 802 and converts such data into the working color space 908 (e.g., CMYK).
In view of the above, it should be apparent that a printer (subtractive) shaped reference medium gamut may be described using an RGB color encoding and may be used to encompass a range of different printing devices. This may allow a wide range of different printing devices that serve different users and use-cases to reproduce color with the same or similar results. Consistent and expected color among different computing and printing devices may be realized without the need for specialized knowledge and training.
Further, the example color encoding described by Tables 1 and 2 was found to be efficient when compared to an example reference printer data set. The example reference printer data set had a gamut volume of 827,089. The example color encoding described by Tables 1 and 2 has a gamut volume of 948,153. This represents an encoding efficiency of about 87% (827,089/948,153).
Further, as the number of possible input color spaces increases (e.g., sRGB, Adobe™ RGB, Digital Cinema Initiative or DCI-P3, SWOP or Specifications for Web Offset Publications, etc.) the techniques described herein provide simplicity, efficiency, and consistency when compared to ad hoc custom color management for the likewise increasing number of combinations of printer-and-input color space.
It should be recognized that features and aspects of the various examples provided above can be combined into further examples that also fall within the scope of the present disclosure. In addition, the figures are not to scale and may have size and shape exaggerated for illustrative purposes.