Chromaticity Matrix to Tristimulus Matrix Conversion for RGB Color Spaces – Even in the Dark

Chromaticity Matrix to Tristimulus Matrix Conversion for RGB Color Spaces – Even in the Dark

Rochester Institute of Technology RIT Scholar Works Presentations and other scholarship Faculty & Staff Scholarship 1-2-2018 Chromaticity Matrix to Tristimulus Matrix Conversion for RGB Color Spaces – Even In the Dark J A Stephen Viggiano Rochester Institute of Technology Nanette Salvaggio Rochester Institute of Technology Nitin Sampat Rochester Institute of Technology Follow this and additional works at: https://scholarworks.rit.edu/other Recommended Citation Viggiano, J A Stephen; Salvaggio, Nanette; and Sampat, Nitin, "Chromaticity Matrix to Tristimulus Matrix Conversion for RGB Color Spaces – Even In the Dark" (2018). Accessed from https://scholarworks.rit.edu/other/960 This Conference Paper is brought to you for free and open access by the Faculty & Staff Scholarship at RIT Scholar Works. It has been accepted for inclusion in Presentations and other scholarship by an authorized administrator of RIT Scholar Works. For more information, please contact [email protected]. https://doi.org/10.2352/ISSN.2470-1173.2018.16.COLOR-324 This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ Chromaticity Matrix to Tristimulus Matrix Conversion for RGB Color Spaces – Even In the Dark J A Stephen Viggiano, Nanette Salvaggio, and Nitin Sampat School of Photographic Arts and Sciences Rochester Institute of Technology (USA) Abstract Some nomenclature Two methods to transform primary chromaticities and white point This paper compares two methods for computing the tristimulus val- into primary tristimulus values are examined and compared. One method ues of three primaries of specified chromaticity coordinates that re- appears in numerous places in the literature; we refer to this as the “famil- sult in a specified white point. That phrase, while accurate, is cum- iar” method, and provide a novel interpretation of it. The second is much bersome. We shall simply refer to “the tristimulus values of the pri- less well-known and is referred to as the “unfamiliar” method. maries” in the remainder of the paper. Necessary and sufficient conditions for computing primary tristim- ulus values from their chromaticities are identified; in brief, the triangle Introduction in the (x, y) chromaticity diagram must have non-zero area. The com- In certain color spaces, including sRGB, primaries are specified in putational burdens for the methods were compared; the familiar method terms of their chromaticity coordinates, together with the tristim- required slightly more arithmetical operations. ulus values of a white point. [1, 2] Some image storage formats, Two problems with the familiar method were identified: high poten- including the Portable Network Graphic (PNG) format, offer the tial for rounding error and the inability to contend with a non-luminous capability of similar specification of the chromaticity coordinates of primary. The unfamiliar method is less prone to rounding error, andis the primaries in image metadata. [3] Knowing the primaries permits able to contend with primaries on the alychne. It is recommended that the color management, interchange of data, and greater inter-operability. unfamiliar method be preferred. These benefits stem from the ability to transform from RGBintoa common color space such as CIE XYZ. Symbols and Notation R, G, B: Radiometrically-linear red, green, and blue Stable-primary RGB color spaces and their primaries In color spaces such as sRGB, Adobe 1998 RGB, and DCI-P3, the X , Y, Z: (CIE) tristimulus values tristimulus values produced are linearly related to the relative radio- metric amplitudes of each primary, with the linear relation governed Xn, Yn, Zn: Tristimulus values of color space’s white point by the tristimulus values of each primary. A color space with this property is characterized as having stable primaries. [4] The dis- XR, YR, ZR: Tristimulus values of color space’s red primary cussion in this paper applies to stable-primary RGB color spaces whose primaries are defined by their chromaticity coordinates, to- XG, YG, ZG; XB, YB, ZB: Tristimulus values of color space’s green gether with the tristimulus values of the white point. and blue primaries, respectively It is possible to define the primaries of a stable-primary RGB color space in terms of their tristimulus values. However, because x , y , z : Chromaticity coordinates of red primary R R R tristimulus values vary with white point luminance and chromatic- ity, and the physical means of producing color, such as phosphors, x , y , z ; x , y , z : Chromaticity coordinates of green and G G G B B B filters, organic light-emitting diodes or lasers are more directly tied blue primaries, respectively to the chromaticity coordinates, it is customary to specify the pri- T: Matrix containing the tristimulus values of the primaries maries in terms of their chromaticity coordinates (which are, in the- ory, invariant with respect to changes in white point). Nevertheless, T˜: Matrix of tristimulus values of primaries, with each primary it is their tristimulus values, rather than their chromaticity coordi- normalized to unit luminance nates, that are ultimately required for color management and related tasks. C: Matrix containing the chromaticity coordinates of the primaries Conversion input and output The goal is to start with a white point and the chromaticity coordi- = + + SR: Tristimulus sum for red primary (SR XR YR ZR) nates of the primaries, and determine the tristimulus values of the primaries needed to produce the specified white point. The tristim- SG, SB: Tristimulus sums for green and blue primaries, respectively S: Matrix containing SR, SG, and SB on diagonal, zero elsewhere IS&T International Symposium on Electronic Imaging 2018 324-1 Color Imaging XXIII: Displaying, Processing, Hardcopy, and Applications 0.6 0.9 G Statement of Problem 0.8 0.5 R D65 No method for direct conversion of the chromaticity coordinates of 0.7 0.4 a set of three primaries into the corresponding tristimulus values 0.6 G needed to produce a specified white point seems to exist. Rather, 0.5 v' y 0.3 0.4 there are at least two methods that each require determination of an D65 0.2 0.3 R intermediate result. One method appears in Bala [5] and Berns [4] B 0.2 0.1 and elsewhere. [6] Because it seems to appear in several sources, it 0.1 is referred to in this paper as the “familiar method.” The other is rel- B 0.0 0.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 atively obscure, appearing in Viggiano and Wang; [7] this method x u' will be denoted the “unfamiliar method.” Both methods will be de- Figure 1. Chromaticity coordinates of ITU-R Recommendation BT.709 primaries. scribed in more detail below. Left: x, y chromaticity diagram. Right: 1976 u’, v’ chromaticity diagram. The chro- This investigation addressed the following questions: maticity coordinates of the D65 white point are included in both plots. 1. What are the necessary and sufficient conditions a set of three sets of chromaticity coordinates must satisfy to permit computation of the corresponding tristimulus values, once a ulus values may be gathered into a matrix, thus: white point is specified? 2 3 2. Must any additional conditions be satisfied to ensure the 6XR XG XB7 matrix of tristimulus values may be inverted, permitting con- T = 4YR YG YB 5 version from XYZ to RGB? ZR ZG ZB to facilitate conversion between radiometrically-linear primary am- 3. Does either of the two methods impose any additional re- plitudes R, G, and B and tristimulus values X , Y , and Z using the strictions on the primaries? matrix formula: 2 3 2 3 4. Does one of the methods require less computational burden 6X 7 6R7 than the other? 4Y 5 = T4G5 (1) Z B 5. Is one of the methods more susceptible to numerical errors, such as from rounding, than the other? as well as the inverse relationship, going from tristimulus values to primary amplitudes: Necessary and sufficient conditions for the conver- 2 3 2 3 sion R X Assuming the white point is specified in terms of its tristimulus val- 6 7 − 6 7 4G5 = T 1 4Y 5 (2) ues, and three primaries are specified as a set of chromaticity co- B Z ordinates, it is necessary that the three primaries enclose a triangle with non-zero area in the x,y chromaticity diagram. The area of the triangle may be computed as a determinant: Example 1. ITU Recommendation BT.709 specifies a D65 white point and primaries having the following chromaticity coordinates: 1 − − = xr x b x g x b Area − − (3) 2 yr yb yg yb Primary x y Red 0.64 0.33 (This may result in a negative area if the primaries R, G, andBtrace Green 0.30 0.60 a clockwise path in the chromaticity diagram, rather than a counter- Blue 0.15 0.06 clockwise path as would normally be the case.) The chromaticities of the primaries and the white point appearin This is also a sufficient condition, as shall be demonstrated in the discussion on the unfamiliar method. Fig 1. The tristimulus values of theD65 white point at unit lumi- = = = nance are Xn 0.9505, Yn 1.0000, and Zn 1.0890. This white point and the chromaticity coordinates constitute the input to the conversion. The objective is the matrix of tristimulus values ofthe Example 2. Consider the ITU-R BT.709 primaries, presented ear- primaries needed to produce this white point; for BT.709, this is: lier and illustrated in Figure 1: We compute the area in the CIE x, 2 3 y chromaticity diagram of the triangle whose vertices are the chro- 60.4124 0.3576 0.18057 = T709 40.2126 0.7152 0.07225 0.0193 0.1192 0.9505 The process of going from input to output, according to thetwo methods, will be addressed in sections that follow.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us