Bellingham, Washington USA
Library of Congress Cataloging-in-Publication Data Kang, Henry R.. Computational color technology / Henry R. Kang. p. cm. Includes bibliographical references and index.
ISBN: 0-8194-6119-9 (alk. Paper) 1. Image Processing--Digital techniques. 2. Color. I. Title. TA1637.K358 2006 621.36'7--dc22 2006042243 Published by SPIE—The International Society for Optical Engineering P.O. Box 10 Bellingham, Washington 98227-0010 USA Phone: +1 360 676 3290 Fax: +1 360 647 1445 Email:
[email protected] Web: http://spie.org Copyright © 2006 The Society of Photo-Optical Instrumentation Engineers All rights reserved. No part of this publication may be reproduced or distributed in any form or by any means without written permission of the publisher. The content of this book reflects the work and thought of the author(s). Every effort has been made to publish reliable and accurate information herein, but the publisher is not responsible for the validity of the information or for any outcomes resulting from reliance thereon. Printed in the United States of America.
Contents Preface
xv
Acknowledgments
xix
1 Tristimulus Specification
1
1.1 1.2 1.3 1.4 1.5
Definitions of CIE Tristimulus Values Vector-Space Representations of Tristimulus Values Object Spectrum Color-Matching Functions CIE Standard Illuminants 1.5.1 Standard viewing conditions 1.6 Effect of Illuminant 1.7 Stimulus Function 1.8 Perceived Object 1.9 Remarks References 2 Color Principles and Properties
1 3 5 5 10 13 14 15 15 16 16 17
2.1 Visual Sensitivity and Color-Matching Functions 2.2 Identity Property 2.3 Color Match 2.4 Transitivity Law 2.5 Proportionality Law 2.6 Additivity Law 2.7 Dependence of Color-Matching Functions on Choice of Primaries 2.8 Transformation of Primaries 2.9 Invariant of Matrix A (Transformation of Tristimulus Vectors) 2.10 Constraints on the Image Reproduction References 3 Metamerism
17 19 20 21 21 21 22 22 23 23 24 27
3.1 Types of Metameric Matching 3.1.1 Metameric illuminants 3.1.2 Metameric object spectra 3.1.3 Metameric stimulus functions 3.2 Matrix R Theory v
27 28 28 28 29
vi
Computational Color Technology
3.3 Properties of Matrix R 3.4 Metamers Under Different Illuminants 3.5 Metameric Correction 3.5.1 Additive correction 3.5.2 Multiplicative correction 3.5.3 Spectral correction 3.6 Indices of Metamerism 3.6.1 Index of metamerism potential References 4 Chromatic Adaptation 4.1 Von Kries Hypothesis 4.2 Helson-Judd-Warren Transform 4.3 Nayatani Model 4.4 Bartleson Transform 4.5 Fairchild Model 4.6 Hunt Model 4.7 BFD Transform 4.8 Guth Model 4.9 Retinex Theory 4.10 Remarks References 5 CIE Color Spaces 5.1 CIE 1931 Chromaticity Coordinates 5.1.1 Color gamut boundary of CIEXYZ 5.2 CIELUV Space 5.2.1 Color gamut boundary of CIELUV 5.3 CIELAB Space 5.3.1 CIELAB to CIEXYZ transform 5.3.2 Color gamut boundary of CIELAB 5.4 Modifications 5.5 CIE Color Appearance Model 5.6 S-CIELAB References 6 RGB Color Spaces 6.1 RGB Primaries 6.2 Transformation of RGB Primaries 6.2.1 Conversion formula 6.2.2 Conversion formula between RGB primaries 6.3 RGB Color-Encoding Standards 6.3.1 Viewing conditions
31 37 39 39 39 39 39 40 40 43 43 46 47 48 49 51 52 53 53 54 54 57 57 57 59 60 60 62 62 65 69 73 73 77 77 80 81 83 84 84
Contents
6.3.2 Digital representation 6.3.3 Optical-electronic transfer function 6.4 Conversion Mechanism 6.5 Comparisons of RGB Primaries and Encoding Standards 6.6 Remarks References 7 Device-Dependent Color Spaces 7.1 7.2 7.3 7.4 7.5 7.6
Red-Green-Blue (RGB) Color Space Hue-Saturation-Value (HSV) Space Hue-Lightness-Saturation (HLS) Space Lightness-Saturation-Hue (LEF) Space Cyan-Magenta-Yellow (CMY) Color Space Ideal Block-Dye Model 7.6.1 Ideal color conversion 7.7 Color Gamut Boundary of Block Dyes 7.7.1 Ideal primary colors of block dyes 7.7.2 Additive color mixing of block dyes 7.7.3 Subtractive color mixing of block dyes 7.8 Color Gamut Boundary of Imaging Devices 7.8.1 Test target of color gamut 7.8.2 Device gamut model and interpolation method 7.9 Color Gamut Mapping 7.9.1 Color-mapping algorithm 7.9.2 Directional strategy 7.9.3 Criteria of gamut mapping 7.10 CIE Guidelines for Color Gamut Mapping References 8 Regression 8.1 Regression Method 8.2 Forward Color Transformation 8.3 Inverse Color Transformation 8.4 Extension to Spectral Data 8.5 Results of Forward Regression 8.6 Results of Inverse Regression 8.7 Remarks References 9 Three-Dimensional Lookup Table with Interpolation 9.1 Structure of 3D Lookup Table 9.1.1 Packing 9.1.2 Extraction 9.1.3 Interpolation
vii
84 85 86 86 99 99 103 103 104 105 106 107 108 108 111 112 115 115 120 122 122 124 125 126 129 129 130 135 135 139 141 142 143 146 148 149 151 151 151 152 153
viii
Computational Color Technology
9.2 Geometric Interpolations 9.2.1 Bilinear interpolation 9.2.2 Trilinear interpolation 9.2.3 Prism interpolation 9.2.4 Pyramid interpolation 9.2.5 Tetrahedral interpolation 9.2.6 Derivatives and extensions 9.3 Cellular Regression 9.4 Nonuniform Lookup Table 9.5 Inverse Color Transform 9.6 Sequential Linear Interpolation 9.7 Results of Forward 3D Interpolation 9.8 Results of Inverse 3D Interpolation 9.9 Remarks References 10 Metameric Decomposition and Reconstruction 10.1 Metameric Spectrum Decomposition 10.2 Metameric Spectrum Reconstruction 10.2.1 Spectrum reconstruction from the fundamental and metameric black 10.2.2 Spectrum reconstruction from tristimulus values 10.2.3 Error measures 10.3 Results of Spectrum Reconstruction 10.3.1 Results from average fundamental and metameric black 10.3.2 Results of spectrum reconstruction from tristimulus values 10.4 Application 10.5 Remarks References 11 Spectrum Decomposition and Reconstruction 11.1 11.2
11.3 11.4 11.5 11.6 11.7 11.8 11.9
Spectrum Reconstruction General Inverse Method 11.2.1 Spectrum reconstruction via orthogonal projection 11.2.2 Spectrum reconstruction via smoothing inverse 11.2.3 Spectrum reconstruction via Wiener inverse Spectrum Decomposition and Reconstruction Methods Principal Component Analysis Basis Vectors Spectrum Reconstruction from the Input Spectrum Spectrum Reconstruction from Tristimulus Values Error Metrics Results and Discussions 11.9.1 Spectrum reconstruction from the object spectrum
153 154 155 157 159 161 163 164 165 166 168 170 177 180 180 183 183 189 189 191 194 194 194 199 200 201 202 203 203 204 205 205 209 212 212 214 220 223 224 224 225
Contents
11.9.2 Spectrum reconstruction from the tristimulus values 11.10 Applications References 12 Computational Color Constancy 12.1
Image Irradiance Model 12.1.1 Reflection phenomenon 12.2 Finite-Dimensional Linear Models 12.3 Three-Two Constraint 12.4 Three-Three Constraint 12.4.1 Gray world assumption 12.4.2 Sällströn-Buchsbaum model 12.4.3 Dichromatic reflection model 12.4.4 Estimation of illumination 12.4.5 Other dichromatic models 12.4.6 Volumetric model 12.5 Gamut-Mapping Approach 12.6 Lightness/Retinex Model 12.7 General Linear Transform 12.8 Spectral Sharpening 12.8.1 Sensor-based sharpening 12.8.2 Data-based sharpening 12.8.3 Perfect sharpening 12.8.4 Diagonal transform of the 3-2 world 12.9 Von Kries Color Prediction 12.10 Remarks References 13 White-Point Conversion 13.1 White-Point Conversion via RGB Space 13.2 White-Point Conversion via Tristimulus Ratios of Illuminants 13.3 White-Point Conversion via Difference in Illuminants 13.4 White-Point Conversion via Polynomial Regression 13.5 Remarks References 14 Multispectral Imaging 14.1 Multispectral Irradiance Model 14.2 Sensitivity and Uniformity of a Digital Camera 14.2.1 Spatial uniformity of a digital camera 14.2.2 Spectral sensitivity of a digital camera 14.3 Spectral Transmittance of Filters 14.3.1 Design of optimal filters
ix
228 229 230 233 233 234 236 240 242 243 244 245 246 250 253 255 256 258 259 260 261 264 266 266 268 268 273 273 283 286 295 298 299 301 303 305 306 308 308 309
x
Computational Color Technology
14.3.2 Equal-spacing filter set 14.3.3 Selection of optimal filters 14.4 Spectral Radiance of Illuminant ´ 14.5 Determination of Matrix Æ 14.6 Spectral Reconstruction 14.6.1 Tristimulus values using PCA 14.6.2 Pseudo-inverse estimation 14.6.3 Smoothing inverse estimation 14.6.4 Wiener estimation 14.7 Multispectral Image Representation 14.8 Multispectral Image Quality References 15 Densitometry 15.1
Densitometer 15.1.1 Precision of density measurements 15.1.2 Applications 15.2 Beer-Lambert-Bouguer Law 15.3 Proportionality 15.3.1 Density ratio measurement 15.4 Additivity 15.5 Proportionality and Additivity Failures 15.5.1 Filter bandwidth 15.5.2 First-surface reflection 15.5.3 Multiple internal reflections 15.5.4 Opacity 15.5.5 Halftone pattern 15.5.6 Tone characteristics of commercial printers 15.6 Empirical Proportionality Correction 15.7 Empirical Additivity Correction 15.8 Density-Masking Equation 15.9 Device-Masking Equation 15.9.1 Single-step conversion of the device-masking equation 15.9.2 Multistep conversion of the device-masking equation 15.9.3 Intuitive approach 15.10 Performance of the Device-Masking Equation 15.11 Gray Balancing 15.12 Gray-Component Replacement 15.13 Digital Implementation 15.13.1 Results of the integer masking equation 15.14 Remarks References
310 311 311 312 314 314 315 316 316 317 319 320 325 326 327 329 331 332 334 334 335 335 335 335 335 336 336 338 341 342 343 344 345 346 347 347 349 350 351 353 354
Contents
16 Kubelka-Munk Theory 16.1 16.2 16.3 16.4 16.5 16.6 16.7
Two-Constant Kubelka-Munk Theory Single-Constant Kubelka-Munk theory Determination of the Single Constant Derivation of Saunderson’s Correction Generalized Kubelka-Munk Model Cellular Extension of the Kubelka-Munk Model Applications 16.7.1 Applications to multispectral imaging References
17 Light-Reflection Model 17.1 Three-Primary Neugebauer Equations 17.2 Demichel Dot-Overlap Model 17.3 Simplifications 17.4 Four-Primary Neugebauer Equation 17.5 Cellular Extension of the Neugebauer Equations 17.6 Spectral Extension of the Neugebauer Equations References 18 Halftone Printing Models 18.1 Murray-Davies Equation 18.1.1 Spectral extension of the Murray-Davies equation 18.1.2 Expanded Murray-Davies model 18.2 Yule-Nielsen Model 18.2.1 Spectral extension of Yule-Nielsen model 18.3 Area Coverage-Density Relationship 18.4 Clapper-Yule Model 18.4.1 Spectral extension of the Clapper-Yule model 18.5 Hybrid Approaches 18.6 Cellular Extension of Color-Mixing Models 18.7 Dot Gain 18.8 Comparisons of Halftone Models References 19 Issues of Digital Color Imaging 19.1 Human Visual Model 19.1.1 Contrast sensitivity function 19.1.2 Color visual model 19.2 Color Appearance Model 19.3 Integrated Spatial-Appearance Model 19.4 Image Quality 19.5 Imaging Technology
xi
355 356 357 360 360 362 365 365 366 366 369 369 370 371 373 375 376 382 385 385 387 388 388 390 392 393 394 394 395 396 400 402 407 407 409 410 412 413 413 415
xii
Computational Color Technology
19.5.1 Device characteristics 19.5.2 Measurement-based tone correction 19.5.3 Tone level 19.6 Device-Independent Color Imaging 19.7 Device Characterization 19.8 Color Spaces and Transforms 19.8.1 Color-mixing models 19.9 Spectral Reproduction 19.10 Color Gamut Mapping 19.11 Color Measurement 19.12 Color-Imaging Process 19.12.1 Performance 19.12.2 Cost 19.13 Color Architecture 19.14 Transformations between sRGB and Internet FAX Color Standard 19.15 Modular Implementation 19.15.1 SRGB-to-CIEXYZ transformation 19.15.2 Device/RGB-to-CIEXYZ transformation 19.15.3 CIEXYZ-to-CIELAB transformation 19.15.4 CIELAB-to-CIEXYZ transformation 19.15.5 CIEXYZ-to-colorimetric RGB transformation 19.15.6 CIEXYZ-to-Device/RGB transformation 19.16 Results and Discussion 19.16.1 SRGB-to-CIEXYZ transformation 19.16.2 Device/RGB-to-CIEXYZ transformation 19.16.3 CIEXYZ-to-CIELAB transformation 19.16.4 CIELAB-to-CIEXYZ transformation 19.16.5 CIEXYZ-to-sRGB transformation 19.16.6 Combined computational error 19.17 Remarks References
415 416 417 418 421 423 424 425 425 426 426 427 428 428 430 434 434 436 436 437 438 438 439 439 440 440 441 441 442 443 444
Appendices A1 Conversion Matrices
449
A2 Conversion Matrices from RGB to ITU-R.BT.709/RGB
471
A3 Conversion Matrices from RGB to ROMM/RGB
475
Contents
A4 RGB Color-Encoding Standards A4.1 SMPTE-C/RGB A4.2 European TV Standard (EBU) A4.3 American TV YIQ Standard A4.4 PhotoYCC A4.5 SRGB Encoding Standards A4.6 E-sRGB Encoding Standard A4.7 Kodak ROMM/RGB Encoding Standard A4.8 Kodak RIMM/RGB References A5 Matrix Inversion A5.1 Triangularization A5.2 Back Substitution References
xiii
479 479 480 481 482 483 484 485 486 487 489 489 491 492
A6 Color Errors of Reconstructed CRI Spectra with Respect to Measured Values 493 A7 Color Errors of Reconstructed CRI Spectra with Respect to Measured Values Using Tristimulus Inputs 497 A8 White-Point Conversion Accuracies Using Polynomial Regression 499 A9 Digital Implementation of the Masking Equation
503
A9.1 Integer Implementation of Forward Conversion A9.2 Integer Implementation of Inverse Conversion
503 506
Index
509
Preface Recent developments in color imaging have evolved from the classical broadband description to a spectral representation. Color reproductions were attempted with spectral matching, and image capture via digital camera has extended to multispectral recording. These topics have appeared in a couple of books and scattered across several digital imaging journals. However, there is no integrated view or consistent representation of spectral color imaging. This book is intended to fill that void and bridge the gap between color science and computational color technology, putting color adaptation, color constancy, color transforms, color display, and color rendition in the domain of vector-matrix representations and theories. The aim of this book is to deal with color digital images in the spectral level using vector-matrix representations so that one can process digital color images by employing linear algebra and matrix theory. This is the onset of a new era of color reproduction. Spectral reconstruction provides the means for the highest level of color matching. As pointed out by Dr. R. W. G. Hunt, spectral color matching gives color fidelity under any viewing conditions. However, current color technology and mathematical tools are still insufficient for giving accurate spectral reconstructions (and may never be sufficient because of device variations and color measurement uncertainties). Nevertheless, this book provides the fundamental color principles and mathematical tools to prepare one for this new era and for subsequent applications in multispectral imaging, medical imaging, remote sensing, and machine vision. The intent is to bridge color science, mathematical formulations, psychophysical phenomena, physical models, and practical implementations all in one work. The contents of this book are primarily aimed at digital color imaging professionals for research and development purposes. This book can also be used as a textbook for undergraduate and graduate students in digital imaging, printing, and graphic arts. The book is organized into five parts. The first part, Chapters 1–7, is devoted to the fundamentals of color science such as the CIE tristimulus specifications, principles of color matching, metamerism, chromatic adaptation, and color spaces. These topics are presented in vector-matrix forms, giving a new flavor to old material and, in many cases, revealing new perspectives and insights. This is because the representation of the spectral sensitivity of human vision and related visual phenomena in vector-matrix form provide the foundation for computational color technology. The vector-space representation makes possible the use of the well-developed fields of linear algebra and matrix theory. Chapter 1 gives the definitions of CIE tristimulus values. Each component, such as color matching function, illuminant, and object spectrum, is given in vectorxv
xvi
Computational Color Technology
matrix notation under several different vector associations of components. This sets the stage for subsequent computations. Chapter 2 presents the fundamental principles governing color matching such as the identity, proportionality, and additivity laws. Based on these laws, the conversion of primaries is simply a linear transform. Chapter 3 discusses the metameric matching from the perspective of the vector-matrix representation, which allows the derivation of matrix R, the orthogonal projection of the tristimulus color space. The properties of matrix R are discussed in detail. Several levels of the metameric matching are discussed and metameric corrections are provided. Chapter 4 presents various models of the chromatic adaptation from the fundamental von Kries hypothesis to complex retinex theory. Chapter 5 presents CIE color spaces and their relationships. Color gamut boundaries for CIELAB are derived, and a spatial extension of CIELAB is given. The most recent color appearance model, CIE CAM2000, is also included. Chapter 6 gives a comprehensive collection of RGB primaries and encoding standards and derives the conversion formula between RGB primaries. These standards are compared and their advantages and disadvantages are discussed. Chapter 7 presents the device-dependent color spaces based on the ideal block dye model. The methods of obtaining the color gamut boundary of imaging devices and color gamut mapping are provided. They are the essential parts of color rendering at the system level. The second part of the book, Chapters 8–11, provides tools for color transformation and spectrum reconstruction. These empirical methods are developed purely on mathematical grounds and are formulated in the vector-matrix forms to enable matrix computations. In Chapter 8, the least-square minimization regression technique is given, and the vector-matrix formulation of the forward and inverse color transformations are derived and extended to the spectral domain. To test the quality of the regression technique, real-world color conversion data are used. Chapter 9 focuses on lookup-table techniques, and the structure of the 3D lookup table and geometric interpolations are discussed in detail. Several extensions and improvements are also provided, and real data are used to test the value of the 3DLUT technique. Chapter 10 shows the simplest spectrum reconstruction method by using the metameric decomposition of the matrix R theory. Two methods are developed for spectrum reconstruction; one using the sum of metameric black and fundamental spectra, and the other using tristimulus values without spectral information. The methods are tested by using CIE illuminants and spectra of the “Color Rendering Index” (CRI). Chapter 11 provides several sophisticated methods of the spectrum reconstruction, including the general inverse methods such as the smoothing inverse and Wiener inverse and the principal component analysis. Again, these methods are tested by using CRI spectra because spectrum reconstruction is the foundation for color spectral imaging, utilizing the vector-matrix representations. The third part, Chapters 12–14, shows applications of spectral reconstruction to color science and technology, such as color constancy, white-point conversion, and multispectral imaging. This part deals with the psychophysical aspect of the surface reflection, considering signals reflected into the human visual pathway from
Preface
xvii
the object surface under certain kinds of illumination. We discuss the topics of surface illumination and reflection, including metameric black, color constancy, the finite-dimensional linear model, white-point conversion (illuminant mapping), and multispectral image processing. These methods can be used to estimate (or recover) surface and illuminant spectra, and can be applied to remote sensing and machine vision. Chapter 12 discusses computational color constancy, which estimates the surface spectrum and illumination simultaneously. The image irradiance model and finite-dimensional linear models for approximating the color constancy phenomenon are presented, and various constraints are imposed in order to solve the finitedimensional linear equations. Chapter 13 describes the application of fundamental color principles to white-point conversion. Several methods are developed and the conversion accuracy is compared. Chapter 14 discusses the applications of spectrum reconstruction for multispectral imaging. Multispectral images are acquired by digital cameras, and the camera characteristics with respect to color image quality are discussed. For device compatibility and cross-media rendering, a proposed multispectral image representation is given. Finally, the multispectral image quality is discussed. The fourth part, Chapters 15–18, deals with the physical model accounting for the intrinsic physical and chemical interactions occurring in the colorants and substrates. This is mainly applied to the printing process, halftone printing in particular. In this section, physical models of the Neugebauer equations, the Murray-Davies equation, the Yule-Nielsen model, the Clapper-Yule model, the Beer-Lambert-Bouguer law, the density-masking equation, and the Kubelka-Munk theory are discussed. These equations are then reformulated in the vector-matrix notation and expanded in both spectral and spatial domains with the help of the vector-matrix theory in order to derive new insights and develop new ways of employing these equations. It is shown that this spectral extension has applications in the spectral color reproduction that greatly improve the color image quality. Chapter 15 describes densitometry beginning with the Beer-Lambert-Bouguer law and its proportionality and additivity failures. Empirical corrections for proportionality and additivity failures are then developed. The density-masking equation is then presented and extended to the device-masking equation, which can be applied to gray balancing, gray component replacement, and maximum ink loading. Chapter 16 reformulates the Kubelka-Munk theory in the vector-matrix form. A general Kubelka-Munk model is presented using four fluxes that can be reduced to other halftone printing models. Chapter 17 presents the Neugebauer equations, extending them to spectral domain by using the vector-matrix notation. This notation provides the means to finding the inverse Neugebauer equations and to obtaining the amounts of primary inks. Finally, Chapter 18 contains various halftone printing models such as the Murray-Davies equation, the Yule-Nielsen model, and the Clapper-Yule model. Chapter 18 also discusses dot gain and describes a physical model that takes the optical and spatial components into account. The last part, Chapter 19, expresses my view of the salient issues in digital color imaging. Digital color imaging is an extremely complex phenomenon, in-
xviii
Computational Color Technology
volving the human visual model, the color appearance model, image quality, imaging technology, device characterization and calibration, color space transformation, color gamut mapping, and color measurement. The complexity can be reduced and image quality improved by a proper color architecture design. A simple transformation between sRGB and Internet FAX is used to illustrate this point. Henry R. Kang March 2006
Acknowledgments In the course of writing this book, I received assistance from many people in the collection of materials. I want to thank Addison-Wesley Longman, Inc., AGFA Educational Publishing, Commission Internationale de l’Éclairage (CIE), the International Society for Optical Engineering (SPIE), John Wiley & Sons, Inc., the Optical Society of America (OSA), and the Society for Imaging Science and Technology (IS&T) for allowing me to use their publications and figures. I am indebted to the staff of the Palos Verdes Public Library, Joyce Grauman in particular, for helping me to search, allocate, and acquire many books and papers that were essential in the writing of this book. I am also grateful to Prof. Brian V. Funt (Simon Fraser University), Dr. Jan Morovic (Hewlett-Packard Company, Spain), Prof. Joel Trussell (North Carolina State University), and Prof. Brian Wandell (Stanford University) for providing me with their publications so that I could gain a better understanding of the topics in their respective fields to hopefully present a correct and consistent view throughout this book. I want to thank the reviewers for their comments, suggestions, and corrections. Finally, I want to thank Cassie McClellan and Beth Huetter for obtaining permission from the original authors and publishers to use their figures, and Timothy Lamkins for managing the publication of this book.
xix
Chapter 1
Tristimulus Specification Colorimetry is the method of measuring and evaluating colors of objects. The term “color” is defined as an attribute of visual perception consisting of any combination of chromatic and achromatic contents. This visual attribute has three components: it can be described by chromatic color names such as red, pink, orange, yellow, brown, green, blue, purple, etc.; or by achromatic color names such as white, gray, black, etc.; and qualified by bright, dim, light, dark, etc., or by combinations of such names.1 The Commission Internationale de l’Éclairage (CIE) was the driving force behind the development of colorimetry. This international organization is responsible for defining and specifying colorimetry via a series of CIE Publications. The foundation of colorimetry is the human visual color sensibility, illuminant sources, and spectral measurements that are described in the context of a color space. The backbone of colorimetry is the tristimulus specification.
1.1 Definitions of CIE Tristimulus Values The trichromatic nature of human color vision is mathematically formulated by CIE to give tristmulus values X, Y , and Z. The CIE method of colorimetric specification is based on the rules of color matching by additive color mixture. The principles of additive color mixing are known as the Grassmann’s laws of color mixtures:2 (1) Three independent variables are necessary and sufficient for specifying a color mixture. (2) Stimuli, evoking the same color appearance, produce identical results in additive color mixtures, regardless of their spectral compositions. (3) If one component of a color mixture changes, the color of the mixture changes in a corresponding manner. The first law establishes what is called “trichromacy”—that all colors can be matched by a suitable mixture of three different stimuli under the constraint that none of them may be matched in color by any mixture of the others. If one stimulus is matched by the other two, then the stimulus is no longer independent from the other two. The second law means that stimuli with different spectral radiance distributions may provide the same color match. Such physically dissimilar stimuli that elicit the same color matches are called “metamers” and the phenomenon is 1
2
Computational Color Technology
said to be “metamerism” because an identical color match may consist of different mixture components. The third law establishes the proportionality and additivity of the stimulus metric for color mixing:3 (1) Symmetry law—If color stimulus ηA matches color stimulus ηB , then color stimulus ηB matches color stimulus ηA . (2) Transitivity law—If ηA matches ηB and ηB matches ηC , then ηA matches ηC . (3) Proportionality law—If ηA matches ηB , then αηA matches αηB , where α is any positive factor by which the radiant power of the color stimulus is increased or reduced, while its relative spectral distribution is kept the same. (4) Additivity law—If ηA matches ηB , ηC matches ηD , and the additive mixture (ηA + ηC ) matches the additive mixture (ηB + ηD ), then the additive mixture (ηA + ηD ) matches the additive mixture (ηB + ηC ). The CIE tristimulus specification or CIEXYZ is built on the Grassmann’s laws using the spectral information of the object, illuminant, and color-matching functions. The specification is defined in CIE Publication 15.2.4 Mathematically, CIEXYZ is the integration of the product of three spectra given by the object spectrum S(λ), the spectral power distribution (SPD) of an illuminant E(λ), and the colormatching functions (CMFs) A(λ) = {x(λ), ¯ y(λ), ¯ z¯ (λ)}, where λ is the wavelength. The object spectrum S(λ) can be obtained in reflectance, transmittance, or radiance. X = k x(λ)E(λ)S(λ) ¯ dλ ∼ x(λ ¯ i )E(λi )S(λi )λ, (1.1a) =k (1.1b) Y = k y(λ)E(λ)S(λ) ¯ dλ ∼ y(λ ¯ i )E(λi )S(λi )λ, =k (1.1c) Z = k z¯ (λ)E(λ)S(λ) dλ ∼ z¯ (λi )E(λi )S(λi )λ, =k k = 100 y(λ)E(λ) ¯ dλ ∼ y(λ ¯ i )E(λi )λ . = 100
(1.1d)
The scalar k is a normalizing constant. For absolute tristimulus values, k is set at the maximum spectral luminous efficacy of 683 lumens/watt and the color stimulus function η(λ) = E(λ)S(λ) must be in the spectral concentration unit of the radiometric quantity (watt meter−2 steradian−1 nanometer−1 ). Usually, k is chosen to give a value of 100 for luminance Y of samples with a unit reflectance (transmittance or radiance) spectrum as shown in Eq. (1.1d). Equation (1.1) also provides the approximation of tristimulus values as summations if the sampling rate is high enough to give accurate results. For an equal interval sampling, λi = λ0 + (i − 1)λ,
i = 1, 2, 3, . . . , n.
(1.1e)
Tristimulus Specification
3
and λ = λt /(n − 1), where λt is the total range of the spectrum and λ0 is the short wavelength end of the range. CIE recommends a sampling interval of λ = 5 nanometers (nm) over the wavelength range from 380 to 780 nm. In this case, λ0 = 380 nm and λt = 400 nm, and we have n = 81 samples. However, many commercial instruments use a λ = 10 nm interval in the range of 400 to 700 nm with a sample number n = 31. The summations in Eq. (1.1) sum all sample points. It is obvious that all spectra must be sampled at the same rate in the same range. By making this approximation, the integral for tristimulus values becomes a sum of products in an infinite-dimensional vector space. The sum has the form of an inner (or dot) product of three infinite-dimensional vectors. The approximation from integration to summation affects the computational accuracy, which is dependent on the sampling rate or the interval size. Trussell performed studies of the accuracy with respect to the sampling rate.5,6 Using the 2-nm interval size as the standard for comparison, he computed the color differences of natural objects and paint samples sampled at 4-nm, 6-nm, 8-nm, and 10-nm intervals under three different illuminants: A, D65 , and F2 (see Figs. 1.5 and 1.6 for SPDs of these illuminants). Generally, the color difference increases with increasing interval size. Under illuminants A and D65 , all tested samples have an average color difference of less than 0.3 units and a maximum difference of less than 1.3 units for all sampling rates. Under F2 , the average and maximum color differences can go as high as 13 and 31 units, respectively. He concluded that most colored objects are sufficiently bandlimited to allow sampling at 10 nm for illuminants with slow-varying spectra. The problem lies with a fluorescent illuminant such as F2 , having spikes in the spectrum (see Fig. 1.6). This study assured that the approximation given in Eq. (1.1) is valid and the common practice of using a 10-nm interval is acceptable if fluorescent illuminants are not used. Figure 1.1 gives a graphic illustration using a λ = 10 nm in the range of 400 to 700 nm; the products are scaled by the scalar k (not shown in the figure) to give the final tristimulus values. The 3D nature of color suggests plotting the value of each tristimulus component along orthogonal axes. The result is called tristimulus space, which is a visually nonuniform color space. Often, the tristimulus space is projected onto two dimensions by normalizing each component with the sum of tristimulus values. x = X/(X + Y + Z),
y = Y/(X + Y + Z),
z = Z/(X + Y + Z),
(1.2)
where x, y, and z are called the chromaticity coordinates. Tristimulus values are the nucleus of the CIE color specification. All other CIE color specifications such as CIELUV and CIELAB are derived from tristimulus values.
1.2 Vector-Space Representations of Tristimulus Values The approximation from integration to summation, as given in Eqs. (1.1), enables us to express the tristimulus values and the spectral sensitivity of human vision in
Figure 1.1 Graphic illustration of the CIE tristimulus computation.
4 Computational Color Technology
Tristimulus Specification
5
a concise representation of the vector-matrix form as given in Eq. (1.3), where the superscript T denotes the transposition of a matrix or vector. Υ = k(AT E)S = kÆT S,
(1.3a)
Υ = kAT (ES) = kAT η,
(1.3b)
Υ = k(A S)E = kQ E,
(1.3c)
T
T
k = 100/(y¯ E). T
(1.3d)
The symbol Æ represents the product of the color-matching matrix A and the illuminant matrix E. Equations (1.3a)–(1.3c) are exactly the same, only expressed in different associative relationships with minor differences in vector-matrix forms. In this book, we adopt to the convention that matrices and vectors are denoted by boldface italic capital letters (or symbols) and elements, which are scalars, are denoted as the corresponding lowercase italic letter. Vectors are oriented as a vertical column and viewed as a one-column matrix (or diagonal matrix whenever applicable). For historic reasons, however, there are some exceptions; for example, capital letters X, Y , and Z are used for the elements of the vector Υ to denote the tristimulus values in the CIE system, and vectors of CMF are represented as the boldface lowercase italic letters, x, ¯ y, ¯ and z¯ .
1.3 Object Spectrum The object spectrum S(λ) can readily be measured via various optical instruments such as spectrophotometer or spectroradiometer, whereas the object representation S is a vector of n elements obtained by sampling the object spectrum S(λ) at the same rate as the illuminant and CMF. Usually, the interval between samples is constant and n is the number of sample points; for example, n = 31 if the range is from 400 to 700 nm with a 10-nm interval. S = [s(λ1 ) s(λ2 ) s(λ3 ) · · · s(λn )]T = [s1 s2 s3 · · · sn ]T .
(1.4)
For the purpose of simplifying the notation, we abbreviate s(λi ) as si ; that is, an element and a scalar of the vector.
1.4 Color-Matching Functions In addition to the spectrum of an object, the CIE color specifications require the color-matching functions and the spectrum of an illuminant. The color-matching functions, also referred to as CIE standard observers, are intended to represent an average observer of normal color vision. They are determined experimentally. The experiment involves a test light incident on half of a bipartite white screen. An observer attempts to perceptually match hue, brightness, and saturation of the test ¯ light by adjusting three additive r¯ (λ), g(λ), ¯ and b(λ) primaries shining on the other
6
Computational Color Technology
half of the screen.7 According to the International Lighting Vocabulary, hue is an attribute of the visual sensation in which an area appears to be similar to one of the perceived colors: red, yellow, green, and blue, or to a combination of them; brightness is an attribute of a visual sensation in which an area appears to emit more or less light, and saturation is an attribute of a visual sensation in which the perceived color of an area appears to be more or less chromatic in proportion to its brightness.1 This visual color match can be expressed mathematically as ¯ h = r¯ R + gG ¯ + bB,
(1.5a)
where h is the color of the test light; R, G, and B correspond to the red, green, and blue matching lights (primaries), and r¯ , g, ¯ and b¯ are the relative amounts of the respective light. With this arrangement, some colors, like those in the blue-green region, cannot be matched by adding three primaries, and metamers of spectral colors are physically unattainable because they possess the highest purity, having the highest light intensity of a single wavelength. To get around this problem, one of the primaries is moved to the test side to lower the purity such that the trial side can match; for example, adding the red primary to the test light for matching a blue-green color. ¯ h + r¯ R = gG ¯ + bB.
(1.5b)
Mathematically, moving the red to the test light corresponds to subtracting it from the other two primaries. ¯ h = −¯r R + gG ¯ + bB.
(1.5c)
¯ Figure 1.2 depicts the CIE 1931 color-matching functions r¯ (λ), g(λ), ¯ and b(λ), showing negative values in some portions of the curves. The relationships between the r¯ , g, ¯ b¯ and x, ¯ y, ¯ z¯ are specified in the CIE Pub8 ¯ ¯ b(λ) are converted to chrolication No. 15. First, tristimulus values r¯ (λ), g(λ), maticity coordinates r(λ), g(λ), b(λ) using Eq. (1.6); the resulting curves are plotted in Fig. 1.3.
¯ i ) i = 1, 2, 3, . . . , n, ¯ i ) + b(λ r(λi ) = r¯ (λi )/ r¯ (λi ) + g(λ
¯ i ) i = 1, 2, 3, . . . , n, g(λi ) = g(λ ¯ i )/ r¯ (λi ) + g(λ ¯ i ) + b(λ
¯ i )/ r¯ (λi ) + g(λ ¯ i ) i = 1, 2, 3, . . . , n. ¯ i ) + b(λ b(λi ) = b(λ
(1.6a) (1.6b) (1.6c)
Then, the chromaticity coordinates r(λ), g(λ), b(λ) are converted to chromaticity coordinates x(λ), y(λ), z(λ) via Eq. (1.7).
Tristimulus Specification
7
Figure 1.2 CIE rgb spectral tristimulus values.3
x(λ) = [0.49000r(λ) + 0.31000g(λ) + 0.20000b(λ)]/ [0.66697r(λ) + 1.13240g(λ) + 1.20063b(λ)],
(1.7a)
y(λ) = [0.17697r(λ) + 0.81240g(λ) + 0.01063b(λ)]/ [0.66697r(λ) + 1.13240g(λ) + 1.20063b(λ)],
(1.7b)
z(λ) = [0.00000r(λ) + 0.01000g(λ) + 0.99000b(λ)]/ [0.66697r(λ) + 1.13240g(λ) + 1.20063b(λ)].
(1.7c)
Finally, chromaticity coordinates x(λ), y(λ), z(λ) are converted to the colormatching functions x(λ), ¯ y(λ), ¯ z¯ (λ) by scaling with the photopic luminous efficiency function V (λ) established by CIE in 1924 for photopic vision.9,10 The plot of the photopic luminous efficiency function with respect to wavelength gives a bell shape with a peak at 555 nm and a half width of about 150 nm, indicating that the visual system is more sensitive to wavelengths in the middle region of the
8
Computational Color Technology
Figure 1.3 The chromaticity coordinates of r(λ), g(λ), and b(λ).3
visible spectrum. This weighting converts radiometric quantities to photometric quantities.
and
x(λ) ¯ = [x(λ)/y(λ)]V (λ),
(1.8a)
y(λ) ¯ = V (λ),
(1.8b)
z¯ (λ) = [z(λ)/y(λ)]V (λ).
(1.8c)
This projective transformation makes all color-matching functions positive across the visible spectrum. CIE has recommended two standard observers: CIE 2◦ (1931) and CIE 10◦ (1964) observers. The CMFs of these two observers are depicted in ¯ y(λ), ¯ z¯ (λ) were derived from spectral trisFig. 1.4. CIE 1931 2◦ observer x(λ), ¯ timulus values r¯ (λ), g(λ), ¯ b(λ) using the spectral matching stimuli (R), (G), (B) at wavelengths 700.0, 546.1, and 435.8 nm, respectively, whereas CIE 1964 10◦ observer x¯ 10 (λ), y¯10 (λ), z¯ 10 (λ) were derived from spectral tristimulus values referring to matching stimuli (R10 ), (G10 ), (B10 ). These are stimuli specified in terms of wave numbers 15500, 19000, and 22500 cm−1 corresponding approximately to wavelengths 645.2, 526.3, and 444.4 nm, respectively.8
Tristimulus Specification
9
Figure 1.4 CIE 1931 2◦ and CIE 1964 10◦ observers.8
The matrix representation of color-matching functions A is a sampled standard observer with a size of n × 3, where the column number of three is due to the trichromatic nature of the human vision and the row number n is the number of sample points; for example, n = 31 if the range is from 400 nm to 700 nm with a 10-nm interval.
x(λ ¯ 1) x(λ ¯ 2) ¯ 3) A = x(λ ... ... x(λ ¯ n)
y(λ ¯ 1) y(λ ¯ 2) y(λ ¯ 3) ... ... y(λ ¯ n)
z¯ (λ1 ) x¯1 y¯1 z¯ 1 z¯ (λ2 ) x¯2 y¯2 z¯ 2 z¯ (λ3 ) = x¯3 y¯3 z¯ 3 . ... ... ... ... ... ... ... ... z¯ (λn ) x¯n y¯n z¯ n
(1.9)
¯ i ), and z¯ (λi ) are the values of the CMF sampled at the waveThe terms x(λ ¯ i ), y(λ ¯ i ) as x¯i , length λi . For the purpose of simplifying the notation, we abbreviate x(λ y(λ ¯ i ) as y¯i , and z¯ (λi ) as z¯ i .
10
Computational Color Technology
1.5 CIE Standard Illuminants Standard illuminant is another parameter in the CIE color specification. In this book, we use the symbol E(λ) for representing the spectrum of an illuminant and the vector E is a sampled spectral power distribution E(λ) of an illuminant. In Eq. (1.3), the vector E is represented as a diagonal matrix with a size of n × n,
0 e(λ1 ) 0 e(λ2 ) 0 E= 0 ... ... ... ... 0 0 0 e1 0 0 e2 0 0 e3 = 0 ... ... ... ... ... ... 0 0 0
0 0 e(λ3 ) ... ... 0 ... ... ... ... 0 ... ... ... ... ... ... ...
... ... 0 ... ... ...
... ... ... ... ... 0
0 0 0 ... ... e(λn )
... 0 ... 0 ... 0 . ... ... ... ... 0 en
(1.10)
Again, we abbreviate e(λi ) as ei . There are many standard illuminants such as Sources A, B, and C, and daylight D Illuminants. CIE Source A is a gas-filled tungsten lamp operating at a correlated color temperature of 2856 K. Sources B and C are derived from Source A by combining with a filter that is made from chemical solutions in optical cells. Different chemical solutions are used for Sources B and C. The CIE standards committee made a distinction between the terms illuminant and source. Source refers to a physical emitter of light, such as a lamp or the sun. Illuminant refers to a specific spectral power distribution, not necessarily provided directly by a source, and not necessarily realizable by a source. Therefore, CIE illuminant A is calculated in accordance with Planck’s radiation law.8 P e (λ, T ) = c1 λ−5 [exp(c2 /λT ) − 1]−1 W m−3 ,
(1.11)
where c1 = 3.7415 × 10−16 W m2 , c2 = 1.4388 × 10−2 mK, and the temperature T is set equal to 2856 K for the purpose of matching Source A. The relative SPD of CIE standard illuminant A has been calculated using Planck’s equation at a 1-nm interval between 300 to 830 nm and the standard recommends using linear interpolation for finer intervals. CIE D illuminants are the mathematical simulations of various phases of natural daylight. These illuminants are based on over 600 SPDs measured at different global locations and under various combinations of the irradiation from sun and sky. Judd, MacAdam, and Wyszecki analyzed these measurements of the combinations obtained in natural daylight and found that there is a simple relationship between the correlated color temperature (the color temperature of a blackbody radiator that has nearly the same color as the light source of
Tristimulus Specification
11
interest) of daylight and its relative SPD.11 Therefore, D illuminants are designated by the color temperature in hundreds Kevin; for example D50 is the illuminant at 5003 K. Figure 1.5 depicts the relative SPDs of several standard illuminants and Fig. 1.6 gives the relative SPDs of two fluorescent illuminants. SPDs of fluorescent illuminants have many spikes that lower the computational accuracy if the sampling interval is increased. Among them, the most frequently used illuminants are D50 , which is selected as the standard viewing illuminant for the graphic arts industry, and D65 (6504 K), which is the preferred illuminant for colorimetry when daylight is of interest. Based on the work of Judd et al.,11 CIE recommended that a phase of daylight other than the standard D65 be defined by three characteristic functions E0 (λ), E1 (λ), and E2 (λ) as E(λ) = E0 (λ) + m1 E1 (λ) + m2 E2 (λ),
(1.12a)
m1 = (−1.3515 − 1.7703x d + 5.9114y d )/md ,
(1.12b)
m2 = (0.0300 − 31.4424x d + 30.0717y d )/md ,
(1.12c)
md = 0.0241 + 0.2562x d − 0.7341y d .
(1.12d)
The component E0 (λ) is the mean function (or vector), E1 (λ) and E2 (λ) are characteristic vectors; they are plotted in Fig. 1.7. The multipliers m1 and m2 are related
Figure 1.5 Relative spectral power distributions of CIE standard illuminants.3
12
Computational Color Technology
Figure 1.6 Relative spectral power distributions of two fluorescent illuminants.8 Table 1.1 Values of multipliers for four daylight illuminants.
Tc
xd
yd
m1
m2
5000 5500 6500 7500
0.3457 0.3325 0.3128 0.2991
0.3587 0.3476 0.3292 0.3150
−1.040 −0.786 −0.296 0.144
0.367 −0.195 −0.688 −0.760
to chromaticity coordinates x d and y d of the illuminant as given in Eq. (1.12); the values for D50 , D55 , D65 , and D75 are computed and tabulated in Table 1.1. Equation (1.12) can be expressed in the matrix-vector form as given in Eq. (1.13). E = [ E 0 E 1 E 2 ][ 1 m1 m2 ]T or
e0 (λ1 ) e0 (λ2 ) E = e0 (λ3 ) ... ... e0 (λn )
e1 (λ1 ) e1 (λ2 ) e1 (λ3 ) ... ... e1 (λn )
e2 (λ1 ) e01 e2 (λ2 ) e 1 02 e2 (λ3 ) m = e03 ... 1 ... m ... 2 ... e2 (λn ) e0n
e11 e12 e13 ... ... e1n
(1.13a) e21 e22 1 e23 , (1.13b) m1 ... . . . m2 e2n
Tristimulus Specification
13
Figure 1.7 The characteristic vectors of the daylight illuminant.8
m1 = (md )−1 [ −1.3515 m2 = (md )−1 [ 0.0300 md = [ 0.0241
0.2562
−1.7703
5.9114 ][ 1 x d
y d ]T ,
(1.13c)
−31.4424
30.0717 ][ 1 x d
y d ]T ,
(1.13d)
−0.7341 ][ 1
xd
y d ]T .
(1.13e)
The vectors [E 0 , E 1 , E 2 ] sampled at a 10-nm interval from 300 to 830 nm are given in Table 1.2.8 For smaller sampling intervals, the CIE standard recommends that intermediate values be obtained by linear interpolation. This definition leads to the discrepancy between the computed illuminant D65 and original measured data. Moreover, the first derivative of the D65 SPD is not a smooth continuous function, which increases the computational uncertainty using interpolation. To minimize these problems, a new recommendation is proposed to interpolate the original 10-nm D65 data by a cubic spline function. An alternative and preferred approach is to interpolate the vectors [E 0 , E 1 , E 2 ], instead of D65 , using the cubic spline, and then calculate the D65 SPD or any other daylight SPD.12 1.5.1 Standard viewing conditions The reflection and transmission measurements depend in part on the geometry of illumination and viewing. CIE has recommended four conditions for opaque reflecting samples. These conditions are referred to as 45/0, 0/45, d/0, and 0/d.
14
Computational Color Technology Table 1.2 Values of three characteristic vectors sampled at a 10-nm interval.7
λ E0 (nm)
E1
E2
300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490
0.02 4.5 22.4 42.0 40.6 41.6 38.0 42.4 38.5 35 43.4 46.3 43.9 37.1 36.7 35.9 32.6 27.9 24.3 20.1
0.0 2.0 4.0 8.5 7.8 6.7 5.3 6.1 3.0 1.2 1.1 −0.5 −0.7 −1.2 −2.6 −2.9 −2.8 −2.6 −2.6 −1.8
0.04 6.0 29.6 55.3 57.3 61.8 61.5 68.8 63.4 65.8 94.8 104.8 105.9 96.8 113.9 125.6 125.5 121.3 121.3 113.5
|| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
λ E0 (nm)
E1
E2
500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690
16.2 13.2 8.6 6.1 4.2 1.9 0 −1.6 −3.5 −3.5 −5.8 −7.2 −8.6 −9.5 −10.9 −10.7 −12 −14 −13.6 −12
−1.5 −1.3 −1.2 −1 −0.5 −0.3 0 0.2 0.5 2.1 3.2 4.1 4.7 5.1 6.7 7.3 8.6 9.8 10.2 8.3
113.1 110.8 106.5 108.8 105.3 104.4 100 96 95.1 89.1 90.5 90.3 88.4 84 85.1 81.9 82.6 84.9 81.3 71.9
|| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
λ E0 (nm)
E1
E2
700 710 720 730 740 750 760 770 780 790 800 810 820 830
−13.3 −12.9 −10.6 −11.6 −12.2 −10.2 −7.8 −11.2 −10.4 −10.6 −9.7 −8.3 −9.3 −9.8
9.6 8.5 7 7.6 8 6.7 5.2 7.4 6.8 7.0 6.4 5.5 6.1 6.5
74.3 76.4 63.3 71.7 77 65.2 47.7 68.6 65.0 66.0 61.0 53.3 58.9 61.9
The 45/0 and 0/45 conditions have a reversed geometry relation. For 45/0 geometry, the sample is illuminated by one or more beams whose axes are at an angle of 45 ±5 deg from the normal to the sample. Viewing should be normal to the sample surface or within 10 deg of the normal. For 0/45 geometry, the sample is illuminated at normal position and viewed at 45 deg. Similarly, d/0 and 0/d have a reversed geometry relation. The designation d/0 is the abbreviation of diffuse/normal, a geometry in which the sample is illuminated with diffused light by an integrating sphere, and viewed through a port in the sphere at the normal or near-normal position. For 0/d geometry, the sample is illuminated at the normal position. The reflected flux is collected by an integrating sphere, and the viewing is directed toward an inner wall of the sphere. The integrating sphere may be of any size, provided that the total area of its ports does not exceed 10% of the inner surface area of the sphere to minimize the loss of reflected light.
1.6 Effect of Illuminant The associative relationship of ( ÆT = AT E) in Eq. (1.3a) defines the human visual subspace (HVSS) under an illuminant E or can be viewed as a weighted CMF, Æ, called the color object matching function by Worthey.13 It represents the effect of the illuminant to modify the human visual space by transforming the color-
Tristimulus Specification
15
matching matrix A. It gives a 3 × n matrix, containing the elements of the products of the illuminant and CMF. It has three rows because the CMF has only three components and n columns given by the number of samples in the visible region for illuminant as well as CMF.
x¯2 y¯2 z¯ 2
x¯1 Æ = A E = y¯1 z¯ 1 T
T
e1 x¯1 = e1 y¯1 e1 z¯ 1
e1 . . . x¯n 0 . . . y¯n 0 ... . . . z¯ n . . . 0
x¯3 y¯3 z¯ 3
e2 x¯2 e2 y¯2 e2 z¯ 2
e3 x¯3 e3 y¯3 e3 z¯ 3
... ... ...
0 0 e2 0 0 e3 ... ... ... ... 0 ...
... ... 0 ... ... ...
... 0 ... 0 ... 0 ... ... ... ... 0 en
en x¯n en y¯n . en z¯ n
(1.14)
1.7 Stimulus Function For the associative relationship of (η = ES) in Eq. (1.3b), we obtain a vector η , a color stimulus function or color signal received by the eyes. It is the product of the object and illuminant spectra, having n elements.
e1 0 η = ES = 0 ... ... 0
0 0 e2 0 0 e3 ... ... ... ... 0 0
... ... 0 ... ... ...
... ... ... ... ... ...
... 0 s1 e1 s1 . . . 0 s2 e2 s2 . . . 0 s3 = e3 s3 . ... ...... ... ... ...... ... 0 en sn en sn
(1.15)
1.8 Perceived Object The expression (QT = A T S) in Eq. (1.3c) does not contain the illuminant; it is an object spectrum weighted by color-matching functions. s1 s . . . x¯n 2 . . . y¯n .s.3. . . . z¯ n . . . sn s3 x¯3 . . . sn x¯n s3 y¯3 . . . sn y¯n . s3 z¯ 3 . . . sn z¯ n
x¯1 Q = A S = y¯1 z¯ 1 T
T
s1 x¯1 = s1 y¯1 s1 z¯ 1
x¯2 y¯2 z¯ 2
x¯3 y¯3 z¯ 3
s2 x¯2 s2 y¯2 s2 z¯ 2
(1.16)
16
Computational Color Technology
1.9 Remarks Equation (1.3) shows that the tristimulus values are a linear combination of the column vectors in A. The matrix A has three independent columns (the color-mixing functions); therefore, it has a rank of three, consisting of a 3D color-stimulus space. Any function that is a linear combination of the three color-mixing functions is within the tristimulus space.
References 1. CIE, International Lighting Vocabulary, CIE Publication No. 17.4, Vienna (1987). 2. C. J. Bartleson, Colorimetry, Optical Radiation Measurements: Color Measurement, F. Grum and C. J. Bartleson (Eds.), Academic Press, New York, Vol. 2, pp. 33–148 (1980). 3. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Edition, Wiley, New York, p. 118 (1982). 4. CIE, Recommendations on uniform color spaces, color-difference equations and psychonetric color terms, Supplement No. 2 to Colorimetry, Publication No. 15, Bureau Central de la CIE, Paris (1978). 5. H. J. Trussell and M. S. Kulkarni, Sampling and processing of color signals, IEEE Trans. Image Proc. 5, pp. 677–681 (1996). 6. H. J. Trussell, A review of sampling effects in the processing of color signals, IS&T and SID’s 2nd Color Imag. Conf., pp. 26–29 (1994). 7. F. W. Billmeyer and M. Saltzman, Principles of Color Technology, 2nd Edition, Wiley, New York, Chap. 2 (1981). 8. CIE, Colorimetry, Publication No. 15, Bureau Central de la CIE, Paris (1971). 9. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Edition, Wiley, New York, p. 395 (1982). 10. M. D. Fairchild, Color Appearance Models, Addison-Wesley Longman, Reading, MA, pp. 79–81 (1997). 11. D. B. Judd, D. L. MacAdam, and G. Wyszecki, Spectral distribution of typical daylight as a function of correlated color temperature, J. Opt. Soc. Am. 54, pp. 1031–1040 (1964). 12. J. Schanda and B. Kranicz, Possible re-definition of the CIE standard daylight illuminant spectral power distribution, Color Res. Appl. 21, pp. 473–475 (1996). 13. J. A. Worthey, Calculation of metameric reflectances, Color Res. Appl. 13, pp. 76–84 (1988).
Chapter 2
Color Principles and Properties The vector-space representation opens the doors for utilizing the well-developed mathematical fields of linear algebra and matrix theory. Cohen, Horn, and Trussell, among others, have elegantly put forth the fundamental properties of the vectorspace color representation. They showed the existence of the color match, the color additivity, the identity, the transformation of primaries, the equivalent primaries, the metameric relationship, the effect of illumination, and many imaging constraints.1–5 The abilities of representing spectral sensitivity of human vision and related visual phenomena in matrix-vector form provide the foundation for a major branch of computational color technology, namely, the studies of the phenomenon of surface reflection. This approach deals with signals reflected from an object surface under a given illumination into a human visual pathway; it has no interest in the physical and chemical interactions within the object and substrate. On the other hand, the physical interactions of the light with objects and substrates form the basis for another major branch of the computational color technology, namely, the physical color-mixing models that are used primarily in the printing industry. With the vector-space representation and matrix theory, in this chapter, we lay the groundwork for these computational approaches by revisiting the Grassmann’s law of color mixing and reexamining color matching as well as other properties.
2.1 Visual Sensitivity and Color-Matching Functions Visual spectral sensitivity of the eye measured as the spectral absorption characteristics of human cones is given in Fig. 2.1.6,7 The sampled visual spectral sensitivity is represented by a matrix of three vectors V = [V 1 , V 2 , V 3 ], one for each cone type, where V i is a vector of n elements. Compared to the CMF curves of Fig. 1.2, they differ in several ways: first, the visual spectral sensitivity has no negative elements; second, the overlapping of green (middle-wavelength) and red (long-wavelength) components is much stronger. The sensor responses to the object spectrum η(λ) can be represented by Υ = V T η. 17
(2.1)
18
Computational Color Technology
Figure 2.1 Relative spectral absorptances of human cone pigments measured by microspectrophotometry. (Reprinted with permission of John Wiley & Sons, Inc.)7
The existence of a color match can be understood by an imaginary visual experiment. Conceptually, we can imagine a set of ideal monochromatic spectra δi (λ) for i = 1, 2, 3, . . . , n. Each δi is viewed as a vector of n elements with a value 1, the full intensity of light, at the ith wavelength and zero elsewhere (a truncated delta function). Now, we perform the color-matching experiment to match this set of ideal spectra by the linear combination of three primary spectra ¯ Φ(λ) = [¯r (λ), g(λ), ¯ b(λ)]. If the sampled primary spectra have the same interval as the ideal spectra, we get a 3 × n matrix Φ = [r, g, b], where vectors r, g, and b are linearly independent, giving a rank of three to the matrix Φ. As pointed out in the color-matching experiment, spectral colors are physically unattainable. Therefore, one of the primaries is moved to the test side to lower the purity. If the relative intensities of the primaries to match one ideal spectrum δi is a i = [a1i , a2i , a3i ]T , then we have V T δ i = V T Φa i . For matching all ideal monochromatic spectra, Eq. (2.2) becomes i = 1 V T [1 0 0 0 . . . 0]T = V T [r g b][a11 a21 a31 ]T , i=2
V T [0 1 0 0 . . . 0]T = V T [r g b][a12 a22 a32 ]T ,
(2.2)
Color Principles and Properties
19
i = 3 V T [0 0 1 0 . . . 0]T = V T [r g b][a13 a23 a33 ]T , ...
...
...,
...
...
...,
i = n V T [0 0 0 0 . . . 1]T = V T [r g b][a1n a2n a3n ]T .
(2.3)
By combining all components in Eq. (2.3) together, we obtain V T I = V T ΦAT .
(2.4)
The combination of the ideal monochromatic spectra δ i gives the identity matrix I with a size of n × n, and the combination of the relative intensities of the primaries gives the color matching function A with a size of n × 3, thus we have V T = V T Φ AT . (2.5) Equation (2.5) indicates that the matrix V is a linear transformation of the colormatching matrix A. The conversion matrix (V T Φ) has a size of 3 × 3 because V T is 3 × n and Φ is n × 3. And the product (V T Φ) is nonsingular because both V and Φ have a rank of three; therefore, it can be inverted. As a result, the human visual space can be defined as any nonsingular transformation of vectors in V . −1 AT = V T Φ V T
(2.6)
−1 A = V Φ TV .
(2.7)
or
Equation (2.7) shows that the color-matching matrix A is determined solely by the primaries and the human visual sensitivity. This result is well known; the beauty is the conciseness of the proof.5 Another way to describe Eq. (2.6) or Eq. (2.5) is that the color-matching function is a linear transform of the spectral visual sensitivity, or vice versa. Indeed, Baylor and colleagues have shown the property of Eq. (2.5) experimentally by finding a linear transformation to convert their cone photopigment measurements to the color-matching functions after a correction for absorption by the lens and other inert pigments in the eye.8,9 The linearly transformed pigment data match well with the color-matching functions.
2.2 Identity Property For a color-matching matrix A derived from a set of primaries Φ = [¯r (λ), ¯ g(λ), ¯ b(λ)], the transformation of the primaries by the matrix A is an identity matrix I .4 AT Φ = I .
(2.8)
20
Computational Color Technology
The proof of the identity property is attained by rearranging Eq. (2.5) and multiplying both sides of the equation by Φ , and we get V T ΦAT Φ = V T Φ.
(2.9)
As given in Eq. (2.6), the product (V T Φ) is nonsingular and can be inverted. Therefore, we multiply both sides of Eq. (2.9) by (V T Φ)−1 . −1 T T −1 T T V Φ A Φ = V TΦ V Φ . V Φ
(2.10)
Note that T −1 T V Φ V Φ = I.
(2.11)
Substituting Eq. (2.11) into Eq. (2.10) gives the identity property of Eq. (2.8).
2.3 Color Match Any visible spectrum S can be matched by a set of primaries, having a unique three-vector a A that controls the intensity of the primaries, to produce a spectrum that appears the same to the human observer. From Eq. (2.2), we have V T S = V T Φa A .
(2.12)
The existence of a color match is obtained simply by inverting Eq. (2.12) a A = (V T Φ)−1 V T S
(2.13)
because (V T Φ) is nonsingular. The uniqueness is shown by assuming that two intensity matrices a A and a B both match the spectrum S, and we have V T Φ(a A − a B ) = V T Φa A − V T Φa B .
(2.14)
By substituting Eq. (2.13) for a A and a B , we obtain −1 −1 V T Φ V T Φ V T S − V T Φ V T Φ V T S = V T S − V T S = 0. This means a A must be equal to a B .
(2.15)
Color Principles and Properties
21
2.4 Transitivity Law Because the color-matching matrix A is a linear transform of the human visual sensitivity, we can represent the spectral sensitivity of the eye by the matrix A. And the response of the sensors to the color stimulus η gives a tristimulus value.5 AT η = Υ .
(2.16)
This transform reduces the dimension from n to 3, and causes a large loss in information, suggesting that many different spectra may give the same color appearance to the observer. In this case, two stimuli ηA (λ) and ηB (λ) are said to be a metameric match if they appear the same to the human observer. In the vector-space representation, we have A T η A = AT η B = Υ .
(2.17)
Now, if a third stimulus ηC (λ) matches the second stimulus ηB (λ), then AT ηB = AT ηC = Υ . It follows that AT ηA = AT ηC = Υ . This proves that the transitivity law holds.
2.5 Proportionality Law If ηA matches ηB , then αηA matches αηB , where α is a scalar. AT (αηA ) = α(AT ηA ) = αΥ = α(AT ηB ) = AT (αηB ).
(2.18)
Thus, αηA must match αηB and the proportionality law holds.
2.6 Additivity Law For two stimuli ηA and ηB , we have AT ηA = Υ A
and
AT η B = Υ B .
(2.19)
If we add them together, we have AT η A + AT η B = Υ A + Υ B ,
(2.20a)
AT (ηA + ηB ) = Υ A + Υ B .
(2.20b)
Moreover, if ηA matches ηB , ηC matches ηD , and (ηA + ηC ) matches (ηB + ηD ), then (ηA + ηD ) matches (ηB + ηC ). AT ηA = Υ A = Υ B = AT ηB
and
A T η C = Υ C = Υ D = AT η D ,
(2.21)
22
Computational Color Technology
AT (ηA + ηC ) = Υ A + Υ C = Υ B + Υ D = AT (ηB + ηD ),
(2.22)
A (ηA + ηD ) = A ηA + A ηD = Υ A + Υ D = A ηB + A ηC T
T
T
T
T
= AT (ηB + ηC ).
(2.23)
This shows that the additivity law holds.
2.7 Dependence of Color-Matching Functions on Choice of Primaries Two different spectra ηA and ηB can give the same appearance if and only if AT ηA = AT ηB . V T ηA = V T ηB
iff AT ηA = AT ηB .
(2.24)
Applying Eq. (2.6), AT = (V T Φ)−1 V T , to the constraint AT ηA = AT ηB , we have
V TΦ
−1
−1 V T ηA = V T Φ V T ηB .
(2.25)
Multiplying both sides of the equation by (V T Φ), Eq. (2.25) becomes −1 T T −1 T V Φ V Φ V ηA = V T Φ V T Φ V T ηB .
(2.26)
Applying the identity relationship of Eq. (2.11), we prove Eq. (2.24) is valid if and only if the constraint is true.
2.8 Transformation of Primaries If a different set of primaries Φj is used in the color-matching experiment, we will obtain a different set of the color-matching functions Aj , but the same color match. Applying Eq. (2.5) to any input spectrum η, we obtain T T V Φ A η = Υ = V T Φj AjT η.
(2.27)
This gives the relationship of T T T T V Φ A = V Φj Aj .
(2.28)
Multiplying both sides by (V T Φ)−1 , we have
V TΦ
−1 T T T −1 T T V Φ A = V Φ V Φj Aj .
(2.29)
Color Principles and Properties
23
Utilizing the identity relationship on the left-hand side of Eq. (2.29), and substituting Eq. (2.6) into the right-hand side of Eq. (2.29), we obtain −1 (2.30) AT = V T Φ V T Φj AjT = AT Φj AjT . The product (AT Φj ) is nonsingular with a size of 3 × 3 because AT is a 3 × n matrix and Φj is an n × 3 matrix. By inverting (AT Φj ), we obtain −1 T AjT = AT Φj A .
(2.31)
Equation (2.31) shows that two sets of primaries are related by a 3 × 3 linear transformation, just like the color-matching functions are related to visual spectral sensitivity by a 3 × 3 linear transformation.
2.9 Invariant of Matrix A (Transformation of Tristimulus Vectors) If Υ i and Υj are two tristimulus vectors obtained from an input spectrum S under two different sets of primaries Φi and Φj , respectively, we have Υ i = ATi S and Υj = AjT S. Applying Eq. (2.31) to AjT , we have −1 T −1 Υj = AjT S = ATi Φj Ai S = ATi Φj Υi .
(2.32)
Again, the equation shows that two tristimulus vectors of a spectrum under two different sets of primaries are related by a 3 × 3 linear transformation.
2.10 Constraints on the Image Reproduction Extending the theoretical proofs for visual sensitivity and color matching discussed in this chapter, Horn has proposed a series of constraints on the image sensors, light sources, and image generators for accurate image capture, archive, and reproduction. These constraints are presented as theorems, corollaries, or lemmas in the original paper.4 They provide the guidance to digital color transform, white-point conversion, and cross-media color reproduction. Constraint 1. The spectral response curves of the image sensors must be linear transforms of the spectral response curves of the human visual system. Constraint 1.1. Metameric spectral distributions produce identical outputs in the camera. In practice, Constraints 1 and 1.1 are difficult to meet, if not impossible; the next best thing is to design sensor response curves closest to the linear transform of the human visual responses. The nearest approximation can be obtained in the leastsquare sense.
24
Computational Color Technology
Constraint 2. The mapping of image sensor outputs to image generator inputs can be achieved by means of a linear 3 × 3 matrix transform. Constraint 2.1. The spectral response curves of the image sensors must be linearly independent, and the spectral distributions of the light must also be linearly independent. Constraint 2.2. The light-source spectral distributions need not be linear transforms of the spectral response curves of the human visual system. Constraint 2.3. In determining the transfer matrix, we can use matrices based on the standard observer curves, instead of the matrices based on the actual spectral response curves of the human visual system. This is the natural consequence of Eq. (2.5)—that standard observer curves are a linear transform away from visual sensitivity curves. Constraint 3. The gain factors used to adjust for chromatic adaptation should be introduced in the linear system after the recovery of the observer stimulation levels and before computation of the image generator control inputs. Constraint 3.1. Applying the gain factors to image sensor outputs or image generator inputs will not, in general, result in correct compensation for adaptation. Constraint 4. The set of observer stimulation levels that can be produced using nonnegative light-source levels forms a convex subset of the space of all possible stimulation levels. Constraint 4.1. The subset of stimulation levels possible with arbitrary nonnegative spectral distribution is, itself, convex and bounded by the stimulation levels produced by monochromatic light sources. Constraint 5. The problem of the determination of suitable image generator control inputs when there are more than three light sources can be posed as a problem in linear programming. For the given stimulation levels of the receptors of the observer, only three of the light sources need be used at a time. Constraint 6. For the reproduction of reproductions, the spectral response curves of the image sensors need not be linear transforms of the spectral response curves of the human visual system.
References 1. J. B. Cohen and W. E. Kappauf, Metameric color stimuli, fundamental metamers, and Wyszecki’s metameric blacks, Am. J. Psychology 95, pp. 537– 564 (1982). 2. J. B. Cohen and W. E. Kappauf, Color mixture and fundamental metamers: Theory, algebra, geometry, application, Am. J. Psychology 98, pp. 171–259 (1985). 3. J. B. Cohen, Color and color mixture: Scalar and vector fundamentals, Color Res. Appl. 13, pp. 5–39 (1988).
Color Principles and Properties
25
4. B. K. P. Horn, Exact reproduction of colored images, Comput. Vision Graph Image Proc. 26, pp. 135–167 (1984). 5. H. J. Trussell, Applications of set theoretic methods to color systems, Color Res. Appl. 16, pp. 31–41 (1991). 6. J. K. Bowmaker and H. J. A. Dartnall, Visual pigments of rods and cones in a human retina, J. Physiol. 298, pp. 501–511 (1980). 7. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Edition, Wiley, New York, pp. 623–624 (1982). Original data from J. K. Bowmaker and H. J. A. Dartnall, Visual pigments of rods and cones in a human retina, J. Physiol. 298, pp. 501–511 (1980). 8. D. A. Baylor, B. J. Nunn, and J. L. Schnapf, Spectral sensitivity of cones of the monkey Macaca Fascicularis, J. Physiol. 390, pp. 145–160 (1987). 9. B. A. Wandell, Foundations of Vision, Sinauer Assoc., Sunderland, MA, p. 96 (1995).
Chapter 3
Metamerism Grassmann’s second law indicates that two lights or two stimuli may match in color appearance even though their spectral radiance (or power) distributions differ. This kind of condition is referred to as “metamerism” and the stimuli involved are called metamers. More precisely, metamers are color stimuli that have the same color appearance in hue, saturation, and brightness under a given illumination, but a different spectral composition. Metamers and color mixing are at the heart of CIE colorimetry. The CMFs that specify the human color stimulus derive from the metameric color matching by the fact that many colors are matched by additive mixtures of three properly selected primaries. This makes it possible for the tristimulus specifications of colors such as the one given in Eq. (1.1). Note that metamers of spectral colors are physically unattainable because they possess the highest intensity. To get around this problem, a primary is added to the reference side to lower the intensity so that the trial side can match. This is the reason that there are negative values in the original CMF, before transformation to have all positive values (see Section 1.4). This chapter presents the types of metameric matching, the vector-space representation of the metamerism, and Cohen’s method of object spectrum decomposition into a fundamental color stimulus function and a metameric black, often referred to as the spectral decomposition theory or matrix R theory. In addition, several other metameric indices are also reported.
3.1 Types of Metameric Matching A general description of the metameric match for a set of mutual metamers with η1 (λ), η2 (λ), η3 (λ), . . . , ηm (λ) stimulus functions can be expressed as follows:1 ¯ dλ = η2 (λ)x(λ) ¯ dλ = · · · = ηm (λ)x(λ) ¯ dλ = X, (3.1a) η1 (λ)x(λ) ¯ dλ = η2 (λ)y(λ) ¯ dλ = · · · = ηm (λ)y(λ) ¯ dλ = Y, (3.1b) η1 (λ)y(λ) η1 (λ)¯z(λ) dλ = η2 (λ)¯z(λ) dλ = · · · = ηm (λ)¯z(λ) dλ = Z. (3.1c) For the convenience of the formulation, we drop the constant k as compared to Eq. (1.1), where the constant k is factored into function η. 27
28
Computational Color Technology
3.1.1 Metameric illuminants The stimulus functions may differ in many ways. For example, they may represent different illuminants.1 η1 (λ) = E1 (λ),
η2 (λ) = E2 (λ),
...,
ηm (λ) = Em (λ).
(3.2)
This happens in a situation where two lights have the same tristimulus values but one is a full radiator with smooth and continuous spectral distribution (e.g., tungsten lamps) and the other has a highly selective narrowband emissivity distribution (e.g., fluorescent lamps). When two light sources are metameric, they will appear to be of the same color when the observer looks directly at them. However, when two metameric sources are used to illuminate a spectrally selective object, the object will not necessarily appear the same. 3.1.2 Metameric object spectra Another possibility is that they may represent different objects illuminated by the same illuminant, such as different substrates under the same light source. η1 (λ) = E(λ)S1 (λ),
η2 (λ) = E(λ)S2 (λ),
...,
ηm (λ) = E(λ)Sm (λ). (3.3)
In this case, metamers with different spectral power distributions give the same colorimetric measure, but the appearance will look different if a different illuminant is used.1 3.1.3 Metameric stimulus functions The most complex case is where the stimulus functions represent different objects illuminated by different illuminants as given in Eq. (3.4).1 η1 (λ) = E1 (λ)S1 (λ), ηm (λ) = Em (λ)Sm (λ).
η2 (λ) = E2 (λ)S2 (λ),
..., (3.4)
Typically, a metameric match is specific to one observer or one illuminant. When either illuminant or observer is changed, it is most common to find that the metameric match breaks down. There are some instances in which the metameric match may hold for a second illuminant. Usually, this will be true if peak reflectance values of two samples are equal at three or more wavelengths. Such samples will tend to be metameric under one light source, and if the wavelength locations of intersections are appropriate, they may continue to provide a metameric match for a second illuminant. In all cases, the resulting color sensation given by Eq. (3.1) is a set of tristimulus values. As stated by Cohen, the principle purpose of color science is the establishment of lawful and orderly relationships between a color stimulus and the evoked
Metamerism
29
color sensation. A color stimulus is radiation within the visible spectrum described invariably by radiometric function depicting irradiance as a function of wavelength, whereas the evoked color sensation is subjective and is described by words of color terms such as red or blue.2 Color stimulus is the cause and color sensation is the effect. Color science is built on psychophysics, where the color matching represented by the tristimulus values as coefficients is matched psychologically.
3.2 Matrix R Theory As early as 1953, Wyszecki pointed out that the spectral power distribution of stimuli consists of a fundamental color-stimulus function η(λ) ´ (or simply “fundamental”) intrinsically associated with the tristimulus values and a metameric black function κ(λ) (or simply “residue”) unique to each metamer with tristimulus values of (0, 0, 0), having no contribution to the color specification.3,4 He further noted that the metameric black function is orthogonal to the space of the CMF. Utilizing these concepts, Cohen and Kappauf developed the method of the orthogonal projector to decompose visual stimuli into these two components, where the fundamental metamer is a linear combination of the CMF such as matrix A, and the metameric black is the difference between the stimulus and the fundamental metamer.2,5,6 This method was named the matrix R theory and has been thoroughly examined by Cohen, where several definitions of transformation matrices were added to the theory.7 Recall that the color-matching matrix A is an n × 3 matrix defined as
x¯1 x¯2 x¯ A= 3 ··· ··· x¯n
y¯1 z¯ 1 y¯2 z¯ 2 y¯3 z¯ 3 , ··· ··· ··· ··· y¯n z¯ n
(3.5)
where n is the number of samples taken in the visible spectrum. A transformation matrix M a is defined as the CMF matrix A right multiplied with its transpose.7 The resulting matrix M a is symmetric with a size of 3 × 3.
x¯1 M a = A A = y¯1 z¯ 1 T
x¯2 y¯2 z¯ 2
2 x¯ i = x¯i y¯i x¯i z¯ i
x¯1 x¯ x¯3 · · · x¯n 2 x¯ y¯3 · · · y¯n 3 ··· z¯ 3 · · · z¯ n ··· x¯n x¯ y¯ x¯ z¯ i 2i i i y¯ y¯ z¯ . i i2i y¯i z¯ i z¯ i
y¯1 y¯2 y¯3 ··· ··· y¯n
z¯ 1 z¯ 2 z¯ 3 ··· ··· z¯ n (3.6)
30
Computational Color Technology
The summation in Eq. (3.6) carries from i = 0 to i = n. The inverse of the matrix M a is called M e . M e = M −1 a .
(3.7)
Table 3.1 gives the values of M a and M e for both CIE 1931 and 1964 standard observers using the color-matching functions with the range from 390 to 710 nm at 10-nm intervals. For a set of mutual metamers, η1 (λ), η2 (λ), η3 (λ), . . . , ηm (λ) that are sampled in the same rate as the color-mixing function A, we have a set of vectors, η1 , η2 , η3 , . . . , ηm , where each ηi is a vector of n elements. Using the vector-space representation, we can represent Eq. (3.1) in a matrix-vector notation, regardless of the content of stimulus functions. AT η1 = AT η2 = · · · = AT ηi = · · · = AT ηm = Υ .
(3.8)
Vector Υ represents the tristimulus values (X, Y, Z). Next, a matrix M f is defined as M e right multiplied into matrix A. T −1 . M f = AM e = AM −1 a =A A A
(3.9)
Matrix M f has a size of n × 3 because A is n × 3 and M e is 3 × 3. By multiplying each term in Eq. (3.8) with M f , we have M f AT η 1 = · · · = M f AT η i = · · · = M f AT η m −1 ´ = M f Υ = A AT A Υ = η,
(3.10)
where η´ is the sampled fundamental function η(λ). ´ It is a vector of n elements because M f is an n × 3 matrix and Υ is a 3 × 1 vector. Cohen defined matrix R as the orthogonal projector projecting ηi into the 3D color-stimulus space. −1 T T T R = A AT A AT = AM −1 a A = AM e A = M f A .
(3.11)
Table 3.1 Values of M a and M e of CIE 1931 and 1964 standard observers.
CIE 1931 standard observer Ma
Me
7.19376 5.66609 2.55643 0.36137 –0.25966 –0.05020
5.66609 7.72116 0.84986 –0.25966 0.31696 0.02816
CIE 1964 standard observer 2.55643 0.84986 14.00625 –0.05020 0.02816 0.07885
8.38032 6.60554 3.09762 0.34187 –0.26363 –0.03987
6.60554 8.34671 1.44810 –0.26363 0.32491 0.02038
3.09762 1.44810 16.98368 –0.03987 0.02038 0.06441
Metamerism
31
As shown in Eq. (3.11), matrix R is the matrix M f left multiplied into matrix AT . Matrix R has a size of n × n because M f is n × 3 and AT is 3 × n. But it has a rank of three because it is derived solely from matrix A, having three independent columns. As a result, matrix R is symmetric. It decomposes the spectrum of the stimulus into two components, namely, the fundamental η´ and the metameric black κ, as given in Eqs. (3.12) and (3.13), respectively. η´ = Rηi ,
(3.12)
κ = ηi − η´ = ηi − Rηi = (I − R)ηi .
(3.13)
and
The vector κ is a sampled metameric black function κ(λ) and I is the identity matrix. The metameric black has tristimulus values of zero. AT κ = [0, 0, 0]T .
(3.14)
Equations (3.12) and (3.13) show that any group of mutual metamers has a common fundamental η´ but different metameric blacks κ. Inversely, the stimulus spectrum can be expressed as ηi = η´ + κ = Rηi + (I − R)ηi .
(3.15)
Equation (3.15) states that the stimulus spectrum can be recovered if the fundamental metamer and metameric black are known.1,8
3.3 Properties of Matrix R There are several interesting properties of the matrix R: (1) The fundamental metamer η´ depends only on matrix A and the common tristimulus values. (2) The fundamental metamer η´ is a metamer of ηi . They have the same tristimulus values. −1 AT η´ = AT (Rηi ) = AT A AT A AT ηi = I AT ηi = AT ηi = Υ . (3.16) (3) The matrix R is symmetric and idempotent; therefore, ´ R(Rη) = R η´ = η.
(3.17)
When matrix R operates on a fundamental color stimulus, it simply preserves the fundamental. In other words, η´ has no metameric black component.
32
Computational Color Technology
(4) The fundamental metamer η´ can be obtained from tristimulus values, η´ = M f Υ [see Eq. (3.10)], without knowing the spectral distribution of the stimulus because M f is known for a given CMF. (5) The fundamental metamer η´ given in Eq. (3.12) is a linear combination of the CMF that constitutes matrix A because matrix R depends only on matrix A, having three independent components. Therefore, matrix R has a rank of three, meaning that we can reconstruct every entry in the entire matrix by knowing any three rows or columns in the matrix. (6) The fundamental metamer η´ is independent of the primaries selected for obtaining the data in matrix A. Thus, it is invariant under any transformation of A to a new Ap , which is based on a different set of primaries. Using the invariant property of matrix A, that two different sets of primaries are related by a linear transformation (see Chapter 2.9), we can set Ap = AM,
(3.18)
where M is a nonsingular 3×3 transformation matrix. From the definition of the matrix R [see Eq. (3.11)], we have −1 R p = Ap ATp Ap ATp .
(3.19)
Substituting Eq. (3.18) into Eq. (3.19), we get
−1 −1 T T A M . R p = AM (AM)T AM (AM)T = AM M T AT AM (3.20) Since
M T AT AM
−1
−1 T −1 M = M −1 AT A ,
(3.21)
we thus have −1 T −1 T T −1 M M A = AI AT A I AT R p = AMM −1 AT A −1 = A AT A AT = R. (3.22) This proves that R is invariant under transformation of primaries. Hence, η´ is invariant. This property means that matrix R may be computed from any CMF matrix A or any linear transformation of matrix A (moreover, it may also be computed from any triplet of fundamental stimuli).2 For example, we may start with the CIE 1931 r¯ , g, ¯ b¯ or 1931 x, ¯ y, ¯ z¯ colormatching functions and end with the same matrix R, even though they have very different M a , M e , and M f matrices (see Table 3.1 for comparisons). Figure 3.1 gives the 3D plot of matrix R. There are three peaks in the diagram. The first peak is approximately 443–447 nm, the second peak
Metamerism
33
Figure 3.1 Three-dimensional plot of matrix R.2
is approximately 531–535 nm, and the third peak is around 595–605 nm; they coincide with the peaks of the CIE r¯ , g, ¯ b¯ color-matching functions for both 1931 and 1964 standard observers.9 These peak wavelengths have appeared frequently in the literature of the color sciences, such as the theoretical consideration of the color-processing mechanism,10,11 photometric relationships between complementary color stimuli,12 modes of human cone sensitivity functions,13 color film sensitivities,14–18 and invariant hues.19 (7) If η is a unit monochromatic radiation of wavelength λi , then Rη or η´ becomes a simple copy of the ith column of R. This indicates that each column or row of the matrix R (R is symmetric) is the fundamental metamer of a unit monochromatic stimulus. Therefore, η´ is a weighted sum of the fundamental metamers of all the monochromatic stimuli that constitute η. Moreover, the unweighted sum of columns or rows in matrix R gives the fundamental of an equal-energy color stimulus as shown in Fig. 3.2. (8) Given two color stimuli η1 and η2 , each has its own fundamentals η´ 1 and η´ 2 . The combination of the two fundamentals (η´ 1 + η´ 2 ) is the fundamental of the combined stimuli (η1 + η2 ). This result is the basis of the Grassmann’s additivity law.
34
Computational Color Technology
Figure 3.2 Fundamental spectrum of an equal-energy color stimulus.6
(9) When two color stimuli η1 and η2 are metamers, they have the same fundamental η´ but different metameric black κ 1 and κ 2 . The difference between the spectra of two metamers is the difference between their metameric blacks, which is still a metameric black. η1 − η2 = (η´ + κ 1 ) − (η´ + κ 2 ) = κ 1 − κ 2 .
(3.23a)
Let κ = κ 1 − κ 2 .
(3.23b)
Applying Eq. (3.14) to Eq. (3.23b), we obtain AT (κ) = AT (κ 1 − κ 2 ) = AT κ 1 − AT κ 2 = [0, 0, 0]T − [0, 0, 0]T = [0, 0, 0]T .
(3.23c)
Equation (3.23c) proves that the difference between the spectra of two metameric blacks is still a metameric black. Moreover, metameric blacks may be created from other metameric blacks, such as the addition or subtraction of two metameric blacks, or the multiplication of a metameric by a positive or negative factor. This provides the means to generate an infinite number of residues; thus, an infinite number of metamers. (10) For any set of primaries Φj , the projection of the primaries onto the visual space can be derived by the color-matching matrix A.2,8 −1 −1 RΦj = A AT A AT Φj = A AT A = M f.
(3.24)
Metamerism
35
This is because AT Φj = I . The matrix M f is comprised of the fundamental primaries and is depicted in Fig. 3.3 for both CIE 1931 and 1964 standard observers with 33 samples from 390 to 710 nm at 10-nm interval. Note that the sum of XYZ fundamentals is exactly equal to the fundamental of an equal-energy stimulus (see Fig. 3.2 for comparison). With the means to derive the fundamentals of primaries, Cohen stated:2 “The color-matching equation has historically been written with tristimulus values as coefficients, but so written the equation balances only psychologically. When the stimuli of the color-matching equation are replaced by the fundamentals processed by the visual system (after the residuals are ejected by matrix-R operations), the equation balances psychologically, physically, and mathematically.”
(11) Complementary color stimuli can be computed directly using matrix R operations.2 First, the white or gray stimulus ηw is decomposed to its fundamental η´ w and metameric black κ w . Then, any color stimulus η is decomposed to η´ and κ. The difference between the fundamentals, ´ is the complementary fundamental. Metameric blacks may n˜ = η´ w − η, be added to the complementary fundamental n˜ to create a suite of complementary metamers. As shown in Property 10, the sum of all three XYZ fundamentals is an equal-energy stimulus; it follows that each primary fundamental is com-
Figure 3.3 Fundamental primaries of CIE standard observers obtained by matrix R decompositions.
36
Computational Color Technology
plementary to the sum of the other two primaries. Thus, complementary color stimuli are a special case of the color-matching equation.2 (12) For a given set of primaries Φ and its associated matching functions A, any set of primaries Φj that have the same projection onto the visual subspace as Φ will have the same color-match functions. This gives the equivalent primaries. The condition for equivalent primaries is that their tristimulus values are equal based on the identity relationship. AT Φ = AT Φj = I .
(3.25)
The primaries Φj are decomposed as follows: Φj = η´ + κ = RΦj + (I − R)Φj .
(3.26)
The primaries Φj have the same projection onto the visual subspace as Φ; therefore, Eq. (3.26) can be rewritten as Φj = RΦ + (I − R)Φj .
(3.27)
Since the visual spectral sensitivity V and the color-matching function A define the same 3D visual subspace, the orthogonal project operator R can be written in terms of V . −1 −1 T R = A A T A AT = V V T V V .
(3.28)
Substituting Eq. (3.28) into Eq. (3.27), we have −1 T −1 T V Φ + I − V V TV V Φj . Φj = V V T V
(3.29)
Recall that the color-matching matrix is a linear transform of the visual spectral sensitivity [see Eq. (2.7)]; thus, any arbitrary set of primaries Φj will have a corresponding color-matching function Aj as given in Eq. (3.30). −1 Aj = V ΦjT V .
(3.30)
Substituting Eq. (3.29) into Eq. (3.30), we obtain
−1 T −1 T −1 Φ TV V TV V + ΦjT I − V V T V V . V (3.31) The second term of Eq. (3.31) is zero because V (V T V )−1 V T = I ; this null space component has an important implication in that it has nothing to do with the primaries used; any set of primaries or any function can Aj = V
Metamerism
37
be used, for that matter. By using the same identity relationship, the first term becomes Φ T V . −1 . Aj = V Φ T V
(3.32)
Comparing Eq. (3.32) to Eq. (2.7) A = V (Φ T V )−1 , it is clear that Aj = A. This proof implies that all primary sets generate equivalent colormatching functions and it is only the projection of the primaries onto the visual space that matters. The result provides the means to generate a set of equivalent primaries, having the same projection but different null space components, which can be chosen in such a way as to make primaries with better physical properties.8 (13) Matrix R operations can also be used to derive the monochromatic orthogonal color stimuli. With a 300 × 300 size of matrix R (300 sample points in the visual spectrum), Cohen and Kappauf have found triplets of spectral monochromatic stimuli on the spectral envelope that are orthogonal to extremely close tolerances.6 These stimuli are 457, 519, and 583 nm for the CIE 1931 standard observer and 455, 513, and 584 nm for the CIE 1964 standard observer. The three metameric blacks of these orthogonal monochromatic stimuli are also mutually orthogonal.
3.4 Metamers Under Different Illuminants Trussell has developed a method for obtaining metamers under different illuminations such as the scenario given in Eq. (3.4).8 For two illuminants, we have the following equivalence in tristimulus values: A T E 1 S 1 = AT E 1 S 2
and
AT E 2 S 1 = A T E 2 S 2
(3.33a)
ÆT1 S 1 = ÆT1 S 2
and
ÆT2 S 1 = ÆT2 S 2 .
(3.33b)
or
We can apply the orthogonal projection by modifying matrix R with the color object-matching function Æ (see Section 1.6 for Æ). ˇ = Æ ÆT Æ −1 ÆT . R We obtain the fundamentals and metameric blacks −1 ˇ 1 S 1 and nˇ 11 = Æ1 ÆT1 Æ1 ÆT1 S 1 = R −1 ˇ 1 S 2 and nˇ 12 = Æ1 ÆT1 Æ1 ÆT1 S 2 = R
(3.34)
ˇ 1 )S 1 κ´ 11 = (I − R
(3.35a)
ˇ 1 )S 2 κ´ 12 = (I − R
(3.35b)
38
Computational Color Technology
−1 ˇ 2S 1 nˇ 21 = Æ2 ÆT2 Æ2 ÆT2 S 1 = R −1 ˇ 2S 2 nˇ 22 = Æ2 ÆT2 Æ2 ÆT2 S 2 = R nˇ 11 = nˇ 12 For two illuminants, we can set n × 3 matrices Æ1 and Æ2 . e1,1 x¯1 e1,2 x¯2 e x¯ Æa = [Æ1 Æ2 ] = 1,3 3 ··· ··· e1,n x¯n
and
ˇ 2 )S 1 κ´ 21 = (I − R
(3.35c)
and
ˇ 2 )S 2 κ´ 22 = (I − R
(3.35d)
and
nˇ 21 = nˇ 22 .
(3.35e)
up an n × 6 augmented matrix Æa from the two e1,1 y¯1 e1,2 y¯2 e1,3 y¯3 ··· ··· e1,n y¯n
e1,1 z¯ 1 e1,2 z¯ 2 e1,3 z¯ 3 ··· ··· e1,n z¯ n
e2,1 x¯1 e2,2 x¯2 e2,3 x¯3 ··· ··· e2,n x¯n
e2,1 y¯1 e2,2 y¯2 e2,3 y¯3 ··· ··· e2,n y¯n
e2,1 z¯ 1 e2,2 z¯ 2 e2,3 z¯ 3 , ··· ··· e2,n z¯ n (3.36)
ÆTa S = ÆTa S 1 .
(3.37)
Equation (3.37) defines all spectra that match S 1 under both illuminants. The solution is obtained by applying the matrix R decomposition into fundamental and metameric black in the six-dimensional space, provided that the Æ1 and Æ2 ˇ a of component vectors are independent. Again, we apply the modified matrix R Eq. (3.38) by substituting Æa into Eq. (3.34) to input spectrum S 1 . ˇ a = Æa ÆTa Æa −1 ÆTa . R The resulting fundamental and metameric black are given as −1 ˇ a S 1 and κ´ a,1 = (I − R ˇ a )S 1 . nˇ a,1 = Æa ÆTa Æa ÆTa S 1 = R
(3.38)
(3.39)
The solution for Eq. (3.37) to obtain metamers is given by ˇ a S 1 + α(I − R ˇ a )S 1 . S 2 = nˇ a,1 + α κ´ a,1 = R
(3.40)
Where α is an arbitrary scalar because any positive or negative factor multiplied by a metameric black is still a metameric black (see Property 9). Mathematically, this approach of using an augmented matrix and modified matrix-R operator can be generalized to match arbitrary spectrum under several illuminants as long as the number of illuminants used is no greater than n/3, where n is the number of samples in the visible spectrum. Æa = [Æ1 Æ2 Æ3 · · · Æm−1 Æm ].
(3.41)
The problem of obtaining a realizable spectrum, i.e., one that is nonnegative, will require more constraints.8
Metamerism
39
3.5 Metameric Correction Metameric correction is a process of correcting a trial specimen to metamerically match a standard specimen under a reference viewing condition. Three methods are in use. 3.5.1 Additive correction The additive correction is performed in CIELAB space (see Section 5.3 for definitions of CIELAB space), where the correction in each color channel (L∗c , ac∗ , ∗ , or b∗ ) and standard or bc∗ ) is the difference between the trial specimen (L∗t,r , at,r t,r ∗ ∗ ∗ specimen (Ls,r , as,r , or bs,r ) under the reference viewing condition. Then, the difference is added to the corresponding channel of the trial specimen under the test ∗ , or b∗ ) to give the corrected CIELAB values (L∗ , a ∗ , viewing condition (L∗t,t , at,t t,t t,c t,c ∗ 20 or bc,r ). L∗c = L∗t,r − L∗s,r ,
∗ ∗ ac∗ = at,r − as,r ,
∗ ∗ bc∗ = bt,r − bs,r ,
(3.42)
L∗t,c
∗ at,c
∗ bt,c
(3.43)
= L∗t,t
+ L∗c ,
∗ = at,t
+ ac∗ ,
∗ = bt,t
+ bc∗ .
3.5.2 Multiplicative correction The multiplicative correction is performed in CIEXYZ space. The tristimulus values of the trial specimen in the test viewing condition (Xt,t , Yt,t , Zt,t ) are multiplied by the ratio of the corresponding tristimulus values of the standard (Xs,r , Ys,r , Zs,r ) to the trial specimen (Xt,r , Yt,r , Zt,r ) under the reference viewing condition to give the corrected tristimulus values (Xc , Yc , Zc ).21 Xc = Xt,t (Xs,r /Xt,r ),
Yc = Yt,t (Ys,r /Yt,r ),
Zc = Zt,t (Zs,r /Zt,r ).
(3.44)
3.5.3 Spectral correction The spectral correction utilizes the spectral decomposition in the fundamental metamer and its metameric black. The metameric black of the trial specimen, κ t,r , is added to the fundamental of the standard specimen, η´ s,t , to give the corrected trial spectral power distribution, ηc .22 ηc = η´ s,t + κ t,r = Rηs,t + (I − R)ηt,r .
(3.45)
As one can see, the spectral correction is an application of Property 12.
3.6 Indices of Metamerism A measure of the color difference between two metameric specimens caused by a test illuminant with a different spectral distribution from the reference illuminant
40
Computational Color Technology
is a “special metamerism index” (change in illuminant) for the two specimens. CIE recommended that the index of metamerism mt is set equal to the index of color difference E ∗ between the two specimens computed under the test illuminant. For additive correction, the index is
∗ ∗ 2 ∗ ∗ 2 1/2 mt = (L∗t,c − L∗s,t )2 + (at,c − as,t ) + (bt,c − bs,t ) ,
(3.46)
∗ , b∗ ) is the CIELAB values of the standard specimen under test where (L∗s,t , as,t s,t viewing conditions.
3.6.1 Index of metamerism potential This index is derived from spectral information about the standard and trial specimens in the reference viewing conditions. It characterizes the way in which two particular spectral power distributions differ, and provides an assessment for the potential variation of their colorimetric performance over a wide range of viewing conditions. This index is given by Nimeroff23 as m2t =
(S t,r − S s,t )2 ,
(3.47)
where S is the radiance of the specified specimen. The summation is carried out over the entire range of the visible spectrum. Nimeroff and Billmeyer have pointed out that spectral differences need to be weighted by some colorimetric response function of the eye.24,25 This weighting makes sense because eye sensitivity is not uniform across the whole visible spectrum; it is most sensitive in the center and diminishes at both ends.
References 1. C. J. Bartleson, Colorimetry Optical Radiation Measurements, F. Grum and C. J. Bartleson (Eds.), Academic Press, Inc., New York, Vol. 2, pp. 105–109 (1980). 2. J. B. Cohen, Color and color mixture: Scalar and vector fundamentals, Color Res. Appl. 13, pp. 5–39 (1988). 3. G. Wyszecki, Valenzmetrische Untersuchung des Zusammenhanges zwischen normaler und anomaler Trichromasie, Die Farbe 2, pp. 39–52 (1953). 4. G. Wyszecki, Evaluation of metameric colors, J. Opt. Soc. Am. 48, pp. 451– 454 (1958). 5. J. B. Cohen and W. E. Kappauf, Metameric color stimuli, fundamental metamers, and Wyszecki’s metameric blacks, Am. J. Psychology 95, pp. 537– 564 (1982). 6. J. B. Cohen and W. E. Kappauf, Color mixture and fundamental metamers: Theory, algebra, geometry, application, Am. J. Psychology 98, pp. 171–259 (1985).
Metamerism
41
7. H. S. Fairman, Recommended terminology for matrix R and metamerism, Color Res. Appl. 16, pp. 337–341 (1991). 8. H. J. Trussell, Applications of set theoretic methods to color systems, Color Res. Appl. 16, pp. 31–41 (1991). 9. G. Wyszecki and W. S. Stiles, Color Science: Concept and Methods, Quantitative Data and Formulae, 2nd Edition, Wiley, New York, p. 142 (1982). 10. W. A. Thornton, Three color visual response, J. Opt. Soc. Am. 62, pp. 457–459 (1972). 11. R. G. Kuehni, Intersection nodes of metameric matches, Color Res. Appl. 4, pp. 101–102 (1979). 12. D. L. MacAdam, Photometric relationships between complementary colors, J. Opt. Soc. Am. 28, pp. 103–111 (1938). 13. G. R. Bird and R. C. Jones, Estimation of the spectral functions of the human cone pigments, J. Opt. Soc. Am. 55, pp. 1686–1691 (1965). 14. F. E. Ives, The optics of trichromatic photography, Photogr. J. 40, pp. 99–121 (1900). 15. A. C. Hardy and F. L. Wurzburg, The theory of three-color reproduction, J. Opt. Soc. Am. 27, pp. 227–240 (1937). 16. W. T. Hanson and W. L. Brewer, Subtractive color photography: the role of masks, J. Opt. Soc. Am. 44, pp. 129–134 (1954). 17. W. T. Hanson and F. L. Wurzburg, Subtractive color photography: spectral sensitivities and masks, J. Opt. Soc. Am. 44, pp. 227–240 (1954). 18. R. J. Ross, Color Film for Color Television, Hastings House, New York (1970). 19. R. W. Pridmore, Theory of primary colors and invariant hues, Color Res. Appl. 16, pp. 122–129 (1991). 20. A. Brockes, The evaluation of color matches under various light sources using the metameric index, Report 9th FATIPEC Congress, Brussels 1969, Sect. 1, pp. 3–9 (1969). 21. A. Brockes, The comparison of calculated metameric indices with visual observation, Farbe 19(1/6) (1970). 22. H. S. Fairman, Metameric correction using parameric decomposition, Color Res. Appl. 12, pp. 261–265 (1987). 23. I. Nimeroff and J. A. Yurow, Degree of metamerism, J. Opt. Soc. Am. 55, pp. 185–190 (1965). 24. I. Nimeroff, A survey of papers on degree of metamerism, Color Eng. 6, pp. 44–46 (1969). 25. F. W. Billmeyer, Jr., Notes on indices of metamerism, Color Res. Appl. 16, pp. 342–343 (1991).
Chapter 4
Chromatic Adaptation Color space transformations between imaging devices are dependent on the illuminants used. The mismatch of white points is a frequently encountered problem. It happens in situations where the measuring and viewing of an object are under different illuminants, the original and reproduction use different illuminants, and the different substrates are under the same illuminant. Normally, this problem is dealt with by chromatic adaptation in which the illumination difference is treated with an appearance transform. Chromatic adaptation deals with the visual sensitivity regulation of the color vision such as the selective, yet independent, changes in responsivity of cone photoreceptors with respect to surround and stimuli. For example, a photographic scene viewed under different illuminants (e.g., tungsten lamp versus daylight D65 ) looks pretty much the same in spite of the fact that the reflected light is very different under these two illuminants. This is because our eyes have adapted under each condition to discount the illuminant difference. This is known as the “color constancy” of human vision. To understand and, therefore, to predict the color appearance of objects under a different illuminant is the single most important appearance-matching objective. It has many industry applications, such as the cross-rendering between different media. There are two main approaches; one is the chromatic adaptation employing visual evaluations, and the other one is a mathematic computation of the color constancy (or white conversion). The main goal of the computational color constancy is to predict the object’s surface reflectance. If the surface spectrum is known, the correct tristimulus can be computed under any adapted illumination. The computational color constancy will be presented in Chapter 12. This chapter reviews methods of chromatic adaptation with an emphasis on the mathematical formulation. Several models, ranging from the von Kries hypothesis to the Retinex theory, are presented.
4.1 Von Kries Hypothesis There are numerous methods developed for the chromatic adaptation that can be found in many color textbooks.1–3 The most important one is the von Kries hypothesis, which states that the individual components present in the organ of vision are completely independent of one another and each is adapted exclusively according to its own function.4 If the proportionality and additivity hold for adaptations of 43
44
Computational Color Technology
the source and destination conditions, the source and destination tristimulus values, (X s , Y s , Z s ) and (X d , Y d , Z d ), are related by a linear transformation with a 3 × 3 conversion matrix τ due to the invariant of the matrix A of the color-matching functions (see Section 2.9). [X d , Y d , Z d ]T = τ [Xs , Y s , Z s ]T ,
or
Υ d = τ Υ s,
(4.1)
where superscript T denotes the transpose of the vector. The conversion matrix τ can be derived from cone responsivity in many ways, depending on the model used. For the von Kries model, the conversion matrix takes the form1 τ = M −1 DM,
(4.2)
where M is a 3 × 3 matrix that is used to transfer from source tristimulus values to three cone responsivities (Ls , M s , S s ) of the long, medium, and short wavelengths as given in Eq. (4.3), and M −1 is the inverse matrix of M, which is not singular with three independent cone responsivities.
Ls Ms Ss
Xs = M Ys Zs
or
V s = MΥ s .
(4.3)
The transfer matrix τ is dependent on both matrices M and D, but is weighted more heavily on M in the forms of both forward and inverse matrices. Thus, M is critical to the final form of the transfer matrix τ . In theory, there are an infinite number of choices for the M matrix. Therefore, many matrices have been proposed to satisfy the constraints of the trichromacy and color matching. Two frequently used M matrices and their inversions are given in Table 4.1. The source cone responsivity (Ls , M s , S s ) is converted to destination (Ld , M d , S d ) using a D matrix that is a diagonal matrix containing the destination-to-source Table 4.1 Matrix elements of two frequently used M matrices.
| | | Matrix || 0.4002 | | −0.2263 | | 0 | | Inverted | 1.860 | matrix | 0.361 | | 0 |
Matrix M 1 0.7076 1.1653 0 −1.129 0.639 0
−0.0808 0.0457 0.9182 0.220 0 1.089
| | | || 0.3897 | | −0.2298 | | 0 | | | 1.9102 | | 0.3709 | | 0 |
Matrix M 2 0.6890 1.1834 0
−0.0787 0.0464 1.000
−1.1122 0.6291 0
0.2019 0 1.000
Chromatic Adaptation
45
ratios of the cone responsivities.
Ld Md Sd
0 Ls (Lw,d /Lw,s ) = D Ms , D = 0 (M w,d /M w,s ) Ss 0 0
0 , 0 (S w,d /S w,s )
(4.4)
where Lw , M w , and S w are the long-, medium-, and short-wavelength cone responsivities, respectively, of the scene white (or maximum stimulus), and subscripts d and s denote destination and source, respectively. For the transform from tungsten light (illuminant A; XN,A = 109.8, Y N,A = 100, and Z N,A = 35.5) to average daylight (illuminant C; X N,C = 98.0, Y N,C = 100, and Z N,C = 118.1) using Eq. (4.3), we have
Lw,s M w,s S w,s
Lw,d M w,d S w,d
X N,A = M 1 Y N,A Z N,A 0.4002 0.7076 = −0.2263 1.1653 0 0 XN,C = M 1 Y N,C Z N,C 0.4002 0.7076 = −0.2263 1.1653 0 0
−0.0808 0.0457 0.9182
109.8 111.83 100.0 = 93.30 , 35.5 32.60
(4.5a)
98.0 100.44 100.0 = 99.75 . 118.1 108.44
(4.5b)
−0.0808 0.0457 0.9182
Once the cone responsivities for both source and destination illuminants are obtained, we can determine the diagonal matrix D by taking their ratio as shown in Eq. (4.6)
Lw,s D= 0 0
0 M w,s 0
(Lw,d /Lw,s ) = 0 0
0 0 S w,s
Lw,s 0 0
0 (M w,d /M w,s ) 0
0 M w,s 0
0.898 D= 0 0
0 1.069 0
−1
S w,s
0 . 0 (S w,d /S w,s )
In this example,
0 0
0 . 0 3.327
(4.6)
46
Computational Color Technology
The last step is to convert the destination cone responsivity (Ld , M d , S d ) to tristimulus values (X d , Y d , Z d ) under the destination illuminant.
Xd Yd Zd
= M −1 1
Ld Md , Sd
M −1 1
1.860 = 0.361 0
−1.129 0.639 0
0.220 . 0 1.089
(4.7)
These steps can be combined to give a single 3 × 3 transfer matrix τ . τ = M −1 1 DM 1
1.860 = 0.361 0
−1.129 0.639 0
0.400 × −0.226 0
0.220 0 1.089
0.708 1.165 0
0.898 0 0
0 1.0691 0
−0.081 0.942 0.046 = −0.025 0.918 0
0 0 3.327
−0.225 1 0
0.752 . 0 3.327
4.2 Helson-Judd-Warren Transform Helson, Judd, and Warren derived the inverse M matrix from a set of RGB primaries with chromaticity coordinates of (0.7471, 0.2529) for red, (1.0, 0.0) for green, and (0.1803, 0.0) for blue.5 By converting back to tristimulus values and keeping the row sum equal to 1, they derived the inverse matrix M −1 3 for the conversion from the destination cone responsivities to tristimulus values.
Xd Yd Zd
= M −1 3
Ld Md , Sd
2.954 M −1 = 1 3 0
−2.174 0 0
0.220 . 0 1
(4.8)
Knowing the inverse matrix M −1 3 , they obtained the forward matrix M 3 by matrix inversion. The forward matrix, in turn, is used to convert from source tristimulus to source cone responsivities.
Ls Ms Ss
= M3
Xs Ys , Zs
0 M 3 = −0.4510 0
1 1.3588 0
0 0.1012 . 1
(4.9)
Next, the source cone responsivity is converted to destination cone responsivities using a D matrix given by Eq. (4.4), where the cone responsivities of scene white are obtained by the product of M 3 and tristimulus values of the illuminant. If the
Chromatic Adaptation
47
source is illuminant A and the destination is illuminant C, we have
Lw,s M w,s S w,s
Lw,d M w,d S w,d
XN,A = M 3 Y N,A Z N,A 100.0 = 89.95 , 35.5
0 = −0.4510 0
1 1.3588 0
0 0.1012 1
109.8 100.0 35.5
(4.10a)
X N,C 0 = M 3 Y N,C = −0.4510 Z N,C 0 100.0 = 103.63 , 118.1
1 1.3588 0
0 0.1012 1
98.0 100.0 118.1
(4.10b)
and
0 (Lw,d /Lw,s ) D= 0 (M w,d /M w,s ) 0 0
0 1 0 = 0 1.151 0 (S w,d /S w,s ) 0 0
0 . 0 3.327 (4.11)
The conversion to destination tristimulus values is given in Eq. (4.8). For illuminant A (tungsten light) to illuminant C (average daylight), the transfer matrix is τ = M −1 3 DM 3
2.954 = 1 0
1.129 = 0 0
−2.174 0 0
0.220 0 1
−0.446 1 0
0.479 . 0 3.327
1 0 0 1.151 0 0
0 0 3.327
0 −0.451 0
1 1.359 0
0 0.101 1
4.3 Nayatani Model Nayatani and coworkers proposed a nonlinear cone adaptation model to more adequately predict various experimental data from a scaling method of the magnitude estimation.6–9 The model is a two-stage process. The first stage operates in accordance with a modified von Kries transform and the second stage is a nonlinear transform using power functions that perform a compression for each cone
48
Computational Color Technology
response. Ld = δ L [(Ls + Ln )/(Lw,d + Ln )]p L , M d = δ M [(M s + M n )/(M w,d + M n )]
(4.12a) pM
,
S d = δ S [(S s + S n )/(S w,d + S n )] , pS
(4.12b) (4.12c)
where Ln , M n , and S n are the noise terms. These added noise terms take the threshold behavior into account. The adaptation for each channel is proportional to a power function of the maximum cone response by a constant δ. These coefficients δ L , δ M , and δ S are determined to produce color constancy for medium gray stimuli. The exponents p L , p M , and p S of the power function are dependent on the luminance of the adapting field. Nayatani’s nonlinear model provides a relatively simple extension to the von Kries hypothesis . It is also capable of predicting the Hunt effect (increase in colorfulness with adapting luminance),10 the Stevens effect (increase in lightness contrast with luminance),11 and the Helson-Judd effect (hue of nonselective samples under chromatic illumination).12
4.4 Bartleson Transform The Bartleson transform is based on the von Kries hypothesis with nonlinear adaptations. Bartleson chooses the König-Dieterici fundamentals that are linearly related to the CIE 1931 standard observer by a matrix M 4 .13–15 This same matrix is also used to convert tristimulus values to cone responses.
Ls Ms Ss
= M4
Xs Ys , Zs
0.0713 M 4 = −0.3952 0
0.9625 1.1668 0
−0.0147 0.0815 . 0.5610
(4.13)
For the alteration from the source to the destination cone sensitivities, Bartleson believed that the von Kries linear relationship was not adequate to predict the adaptation on color appearance, and has proposed a prototypical form with nonlinear adaptations. Ld = δ L [(Lw,d /Lw,s )Ls ]p L , M d = δ M [(M w,d /M w,s )M s ]
pM
(4.14a) ,
S d = δ S [(S w,d /S w,s )S s ]p S ,
(4.14b) (4.14c)
where the exponent p has the general expression of p = cL (Lw,d /Lw,s )dL + cM (M w,d /M w,s )dM + cS (S w,d /S w,s )dS ,
(4.14d)
Chromatic Adaptation
49
where c L , c M , and c S are constants and the coefficients δ are δ L = Lw,d (1−p L ) ,
δ M = M w,d (1−p M ) ,
δ S = S w,d (1−p S ) .
(4.14e)
When CIE illuminants are used, the general equations for adaptation of cone sensitivities are reduced to Eq. (4.15), where the long and medium wavelengths are the same as the von Kries transform and short-wavelength response (or blue fundamental) is compressed. Ld = (Lw,d /Lw,s )Ls ,
(4.15a)
M d = (M w,d /M w,s )M s ,
(4.15b)
S d = δ S [(S w,d /S w,s )S s ]p S ,
(4.15c)
P S = 0.326(Lw,d /Lw,s )27.45 + 0.325(M w,d /M w,s )−3.91 + 0.340(S w,d /S w,s )−0.45 .
(4.15d)
This gives the following diagonal D matrix:
Ls = D Ms , Ss (Lw,d /Lw,s ) D= 0 0
Ld Md Sd
0 (M w,d /M w,s ) 0
0 . (4.16) 0 δ S (S w,d /S w,s )p S · S s (p S −1)
The conversion to the destination tristimulus values is given as
Xd Yd Zd
= M −1 4
Ld Md , Sd
M −1 4
2.5170 = 0.8525 0
−2.0763 0.1538 0
0.3676 . 0 1.7825
(4.17)
4.5 Fairchild Model In order to predict the incomplete chromatic adaptation, Fairchild modified the von Kries hypothesis to include the ability to predict the degree of adaptation using the adapting stimulus.3,16,17 Fairchild’s Model is designed to be fully compatible with CIE colorimetry and to include the illuminant discount, the Hunt effect, and incomplete chromatic adaptation. The first step of the transform from tristimulus values to cone responses is the same as the von Kries model as given in Eq. (4.3).
Ls Ms Ss
= M1
Xs Ys , Zs
0.4002 M 1 = −0.2263 0
0.7076 1.1653 0
−0.0808 0.0457 . 0.9182
(4.18)
50
Computational Color Technology
It then takes the incomplete chromatic adaptation into account:
L M S
= αs
Ls Ms , Ss
α L,s αs = 0 0
0 α M.s 0
0 0 . α S.s
(4.19)
The coefficients α L,s , α M,s , and α S,s of the diagonal matrix α s are given as follows: α L,s = pL /Lw,s , pL = (1 + Y w,s 1/3 + l e )/(1 + Y w,s 1/3 + 1/ l e ), l e = 3(Lw,s /Le )/(Lw,s /Le + M w,s /M e + S w,s /S e ),
(4.20a)
α M,s = pM /M w,s , pM = (1 + Y w,s 1/3 + me )/(1 + Y w,s 1/3 + 1/me ), me = 3(M w,s /M e )/(Lw,s /Le + M w,s /M e + S w,s /S e ),
(4.20b)
α S,s = pS /S w,s , pS = (1 + Y w,s 1/3 + s e )/(1 + Y w,s 1/3 + 1/s e ), and s e = 3(S w,s /S e )/(Lw,s /Le + M w,s /M e + S w,s /S e ),
(4.20c)
where Y w,d is the luminance of the adapting stimulus (or source illuminant) in candelas per square meter or cd/m2 . Terms with the subscript e refer to the equalenergy illuminant that has a constant spectrum across the whole visible region. The postadaptation signals are derived by a transformation that allows luminancedependent interaction among three cones.
Ld Md Sd
= βs
L M , S
1 βs = βs βs
βs 1 βs
βs βs , 1
(4.21)
and β s = 0.219 − 0.0784 log Y w,s . The β term is adopted from the work of Takahama et al. For the destination chromaticities, one needs to derive the α and β matrices for that condition, then invert and apply them in reverse sequence.
L M S
= β −1 d
Ld Md , Sd
1 βd = βd βd
βd 1 βd
βd βd , 1
(4.22)
Chromatic Adaptation
51
and β d = 0.219 − 0.0784 log Y w,d . Ld L M = α −1 M , d d S Sd
Xd Yd Zd Xd Yd Zd
α L,d αd = 0 0
0 α M,d 0
0 0
,
(4.23)
α S,d
Ld M , = M −1 1 d Sd
(4.24)
−1 −1 = M −1 1 αd β d β sαsM 1
Xs Ys . Zs
(4.25)
Subsequent experiments showed that the β matrix introduced an unwanted luminance dependency that resulted in an overall shift in lightness with luminance level. This shift introduced significant systematic error in predictions for simple object colors, lending Fairchild to revise the model by removing the β matrix.
4.6 Hunt Model Hunt proposed a rather complex model to predict color appearance under various viewing conditions. First, a linear transform using matrix M 2 is performed to convert CIEXYZ to cone responses.
Ls Ms Ss
= M2
Xs Ys , Zs
0.3897 M 2 = −0.2298 0
0.6890 1.1834 0
−0.0787 0.0815 . 1.0
(4.26)
A nonlinear response function, similar to that used by Nayatani and coworkers, is used to predict the chromatic adaptation that is inversely proportional to the purity of the color of the reference light. Hunt’s nonlinear chromatic adaptation model is very comprehensive, having many parameters for various adjustments. It includes the cone bleach factors, luminance-level adaptation factors, chromatic-adaptation factors, discounting the illuminant, and prediction of the Helson-Judd effect. The detail of the formulation is given in the original publications.18–21 Results indicate that the Hunt model provides good predictions for the appearance of colors in the Natural Color System (NCS) hues (which were developed in Sweden and adopted as a national standard in Sweden), Munsell samples, prints, and projected slides.
52
Computational Color Technology
4.7 BFD Transform Like the Bartleson transform, the BFD transform, developed at the University of Bradford, England, is a modified von Kries transform in which the shortwavelength cone signals are nonlinearly corrected by a power function with an exponent that is adaptive to the input cone signal.22–24 The middle- and longwavelength cone signals are the same as the von Kries transform. First, the source tristimulus values are normalized with respect to the luminance Y s then linearly transformed to cone response signals by using the Bradford matrix M B .
Ls Ms Ss
= MB
X s /Y s Y s /Y s , Z s /Y s
0.8951 M B = −0.7502 0.0389
0.2664 1.7135 −0.0685
−0.1614 0.0367 . (4.27) 1.0296
The source cone responsivity is converted to destination cone signals using Eq. (4.28). Ld = [F D (Lw,d /Lw,s ) + 1 − F D ]Ls ,
(4.28a)
M d = [F D (M w,d /M w,s ) + 1 − F D ]M s ,
(4.28b)
τ ) + 1 − F D ]Ssτ , S d = [F D (S w,d /Sw,s
(4.28c)
τ = (S w,s /S w,d )0.0834 ,
(4.28d)
where F D is a factor to discount the illuminant difference. For the complete adaptation, F D = 1 and Eq. (4.28) becomes Ld = (Lw,d /Lw,s )Ls ,
(4.29a)
M d = (M w,d /M w,s )M s ,
(4.29b)
τ )Ssτ . S d = (S w,d /Sw,s
(4.29c)
If there is no adaptation, F D = 0 and we have Ld = Ls , M d = M s , and S d = Ssτ . For incomplete adaptation, 0 < F D < 1, specifying the proportional level of adaptation to the source illuminant, observers are adapted to chromaticities that lie somewhere between the source and destination illuminants. However, the diagonal D matrix, no longer as simple as Eq. (4.4), contains the destination to source ratios of the cone responsivities with the blue channel compression.
Ld Md Sd
(Lw,d /Lw,s ) Ls 0 = D Ms , D = Ss 0
0 (M w,d /M w,s ) 0
0 0
τ )S (τ −1) (S w,d /Sw,s s
.
(4.30)
Chromatic Adaptation
53
The conversion to the destination tristimulus values is given in Eq. (4.31).
Xd Yd Zd
= M −1 B
Ld Y s M dY s , S dY s
0.98699 M −1 = −0.43231 B −0.00853
−0.14705 0.51836 0.04004
−0.15996 0.04929 . 0.96849 (4.31)
The BFD transform is adopted in the CIECAM97s color appearance model.
4.8 Guth Model Guth’s model is derived from the field of vision science rather than colorimetry. Its cone responsivities are not a linear transform of the color-matching functions. Therefore, the model is a significant variation of the von Kries transform and similar in some ways with the Nayatani model25,26 in that it uses a power function with an exponent of 0.7. Ld = Lr {1 − [Lw,d /(Lw,d + σ )]},
and
Lr = 0.66Ls 0.7 + 0.002,
(4.32a)
M d = M r {1 − [M w,d /(M w,d + σ )]},
and
M r = 1.0M s 0.7 + 0.003,
(4.32b)
S d = S r {1 − [S w,d /(S w,d + σ )]},
and
S r = 0.45S s 0.7 + 0.00135. (4.32c)
The σ is a constant that can be thought of as a noise factor. A von Kries-type gain control coefficient can be drawn if the nonlinear relationship is ignored.3
4.9 Retinex Theory Edwin Land, founder of Polaroid, and his colleagues developed the retinex theory. Land coined the term “retinex” from “retina” and “cortex” to designate the physiological mechanisms in the retinal-cortical structure, where elements with the same wavelength sensitivity cooperate to form independent lightness images.27 Land recognized that although any color can be matched by three primaries with proper intensities, a particular mixture of these primaries does not warrant a unique color sensation because the color of an area changes when the surrounding colors are changed. To demonstrate this phenomenon and his theory that a particular wavelength-radiance distribution can produce a wide range of color sensation, Land developed “Color Mondrian” experiments. The Color Mondrian display uses about 100 different color patches arranged arbitrarily so that each color patch is surrounded by at least five or six different color patches.28 The display is illuminated by three projectors; each projector is fitted with a different interference filter to give red, green, and blue, respectively, and is equipped with an independent voltage control for intensity adjustments. The observer picks an area in the Mondrian, then the experimenter measures the three radiances coming from that
54
Computational Color Technology
area. A second area of a different color is picked by the observer, the experimenter then adjusts the strengths of the three projectors so that the radiances that come from the second patch are the same as the first patch. The interesting result is that the observer reports the same color appearance even though the radiance measurements show that the light reaching the eye is identical to the first color patch. Land suggested that color appearance is controlled by surface reflectances rather than by the distribution of reflected light. The theory states that each color is determined by a triplet of lightnesses, and that each lightness, in a situation like the Color Mondrian, corresponds to the reflectance of the area measured with a photoreceptor having the same spectral sensitivity as one of the three cone pigments.29 The output of a retinex is three arrays of computed lightnesses that are determined by taking the ratio of the signal at any given point in the scene and by normalizing it with an average of the signals in that retinex throughout the scene.30 The theory acknowledges the color change due to the changes in surrounding colors, where the influence of the surrounding colors can be varied by changing the spatial distribution of the retinex signals. Therefore, the key feature of the retinex theory is that it takes the spatial distribution of colors into consideration for the purpose of modeling the visual perceptions in a complex scene.
4.10 Remarks Chromatic adaptation is the single most important property in understanding and modeling color appearance. There are similarities in these models, such as the initial linear transform from tristimulus values to cone responses. The general form can be summarized as (i) the tristmulus values to cone responsivity transform that is usually linear except in the Guth model, (ii) the cone responsivity transform between source and destination illumination that is the central part of the chromatic adaptation and uses a variety of functions, and (iii) the conversion from the destination cone responsivity to tristimulus values, which is usually a linear transform. As far as the computational cost is concerned, the linear models based on the von Kries hypothesis are only a matrix transform between the source and destination tristimulus. In addition, there are many zeros in the transfer matrices that further lower the cost of computation. For nonlinear transforms, having more complex equations and power functions, the computational cost is much higher. However, if all parameters and exponents are fixed, the transfer matrix may be precomputed to lower the computational cost and enhance the speed.
References 1. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Edition, Wiley, New York, pp. 429–449 (1982). 2. B. A. Wandell, Foundations of Vision, Sinauer Assoc., Sunderland, MA, pp. 309–314 (1995).
Chromatic Adaptation
55
3. M. D. Fairchild, Color Appearance Models, Addison-Wesley Longman, Reading, MA, pp. 173–214 (1998). 4. J. von Kries, Chromatic adaptation, (1902), Translation: D. L. MacAdam, Sources of Color Science, MIT Press, Cambridge, MA (1970). 5. H. Helson, D. B. Judd, and M. H. Warren, Object-color changes from daylight to incandescent filament illumination, Illum. Eng. 47, pp. 221–233 (1952). 6. K. Takahama, H. Sobagaki, and Y. Nayatani, Analysis of chromatic adaptation effect by a linkage model, J. Opt. Soc. Am. 67, pp. 651–656 (1977). 7. Y. Nayatani, K. Takahama, and H. Sobagaki, Estimation of adaptation effects by use of a theoretical nonlinear model, Proc. of 19th CIE Session, Kyoto, Japan (1979), CIE Publ. No. 5, pp. 490–494 (1980). 8. Y. Nayatani, K. Takahama, and H. Sobagaki, Formulation of a nonlinear model of chromatic adaptation, Color Res. Appl. 6, pp. 161–171 (1981). 9. Y. Nayatani, K. Takahama, and H. Sobagaki, On exponents of a nonlinear model of chromatic adaptation, Color Res. Appl. 7, pp. 34–45 (1982). 10. R. W. G. Hunt, Light and dark adaptation and the perception of color, J. Opt. Soc. Am. 42, pp. 190–199 (1952). 11. J. C. Stevens and S. S. Stevens, Brightness functions: Effects of adaptation, J. Opt. Soc. Am. 53, pp. 375–385 (1963). 12. H. Helson, Fundamental problems in color vision, I: The principle governing changes in hue, saturation, and lightness of non-selective samples in chromatic illumination, J. Exp. Psych. 23, pp. 439–477 (1938). 13. C. J. Bartleson, Changes in color appearance with variations in chromatic adaptation, Color Res. Appl. 4, pp. 119–138 (1979). 14. C. J. Bartleson, Predicting corresponding colors with changes in adaptation, Color Res. Appl. 4, pp. 143–155 (1979). 15. C. J. Bartleson, Colorimetry, Optical Radiation Measurements, Color Measurement, F. Grum and C. J. Bartleson (Eds.), Academic Press, New York, Vol. 2, pp. 130–134 (1980). 16. M. D. Fairchild, A model of incomplete chromatic adaptation, Proc. 22nd Session of CIE, CIE, Melbourne, pp. 33–34 (1991). 17. M. D. Fairchild, Formulation and testing of an incomplete-chromaticadaptation model, Color Res. Appl. 16, pp. 243–250 (1991). 18. R. W. G. Hunt, A model of colour vision for predicting colour appearance, Color Res. Appl. 7, pp. 95–112 (1982). 19. R. W. G. Hunt, A model of colour vision for predicting colour appearance in various viewing conditions, Color Res. Appl. 12, pp. 297–314 (1987). 20. R. W. G. Hunt, Revised colour-appearance model for related and unrelated colours, Color Res. Appl. 16, pp. 146–165 (1991). 21. R. W. G. Hunt, An improved predictor of colourfulness in a model of colour vision, Color Res. Appl. 19, pp. 23–26 (1994). 22. M. R. Luo, M.-C. Lo, and W.-G. Kuo, The LLAB (l:c) color model, Color Res. Appl. 21, pp. 412–429 (1996).
56
Computational Color Technology
23. M. R. Luo, The LLAB model for color appearance and color difference evaluation, Recent Progress in Color Science, R. Eschbach and K. Braum (Eds.), IS&T, Springfield, VA, pp. 158–164 (1997). 24. C. Li, M. R. Luo, and R. W. G. Hunt, CAM97s2 model, IS&T/SID 7th Imaging Conf.: Color Science, System, and Application, pp. 262–263 (1999). 25. S. L. Guth, Model for color vision and light adaptation, J. Opt. Soc. Am. A 8, pp. 976–993 (1991). 26. S. L. Guth, Further applications of the ATD model for color vision, Proc. SPIE 2414, pp. 12–26 (1995). 27. E. H. Land, The retinex, Am. Sci. 52, pp. 247–274 (1964). 28. E. H. Land, The retinex theory color vision, Proc. R. Inst. Gt. Brit. 47, pp. 23– 58 (1975). 29. J. J. McCann, S. P. McKee, and T. H. Taylor, Quantitative studies in retinex theory, Vision Res. 16, pp. 445–458 (1976). 30. E. H. Land, Recent advances in retinex theory, Vision Res. 26, pp. 7–21 (1986).
Chapter 5
CIE Color Spaces Different color-imaging devices use different color spaces; well-known examples are the RGB space of televisions and cmy (or cmyk) space of printers. Colors produced by these devices are device specific, depending on the characteristics of the device. To ensure a proper color rendition in various devices, a device-independent color space, such as CIE color spaces using colorimetry to give a quantitative measure for all colors, is needed to serve as a reliable interchange standard. CIE color spaces are the colorimetric spaces that are device-independent. The nucleus of the CIE color space is the tristimulus values or CIEXYZ space that is discussed in Chapter 1. In this chapter, we present derivatives and modifications of the CIEXYZ space and the related topics of the gamut boundary, color appearance model, and spatial domain extension.
5.1 CIE 1931 Chromaticity Coordinates Chromaticity coordinates are the normalization of the tristimulus values X, Y , and Z; they are the projection of the tristimulus space to the 2D x-y plane.1 Mathematically, they are expressed as x = X/(X + Y + Z),
(5.1a)
y = Y/(X + Y + Z),
(5.1b)
z = Z/(X + Y + Z),
(5.1c)
x + y + z = 1,
(5.1d)
and
where x, y, and z are the chromaticity coordinates. 5.1.1 Color gamut boundary of CIEXYZ The color gamut boundary in CIEXYZ space is well defined in chromaticity diagrams as the spectrum locus enclosed by spectral stimuli. The gamut boundary is computed from color-matching functions (CMF), x(λ), ¯ y(λ), ¯ and z¯ (λ) of the CIE 57
58
Computational Color Technology
1931 2◦ or CIE 1964 10◦ observer by using Eq. (5.2) to give chromaticity coordinates of spectral stimuli.1 x(λ) = x(λ)/[ ¯ x(λ) ¯ + y(λ) ¯ + z¯ (λ)],
(5.2a)
y(λ) = y(λ)/[ ¯ x(λ) ¯ + y(λ) ¯ + z¯ (λ)],
(5.2b)
where λ is the wavelength. The chromaticity diagram is the plot of x versus y because the three chromaticity coordinates sum to 1; only two chromaticity coordinates x and y suffice for a specification of the chromaticity. Figure 5.1 shows the gamut boundaries of two CMFs, where the CIE 1931 CMF gives a slightly larger gamut size than the CIE 1964 CMF in the green, blue, and purple regions. The boundary of the color locus is occupied by the spectral colors. The chromaticity coordinates represent the relative amounts of the three stimuli X, Y , and Z required to obtain any color. However, they do not indicate the luminance of the resulting color. The luminance is incorporated into the Y value. Thus, a complete description of a color is given by the triplet (x, y, Y ). The chromaticity diagram provides useful information such as the dominant wavelength, complementary color, and color purity. The dominant wavelength is
Figure 5.1 Color gamuts of CIEXYZ space.
CIE Color Spaces
59
based on the Grassmann’s laws that the chromaticities of all additive stimulus mixtures from two primary colorants lie along a straight line in the chromaticity diagram. Therefore, the dominant wavelength of a color is obtained by extending the line connecting the color and the illuminant to the spectrum locus. The complement of a spectral color is on the opposite side of the line connecting the color and the illuminant used. A color and its complement, when added together in a proper proportion, yield white. If the extended line for obtaining the dominant wavelength intersects the “purple line,” the straight line that connects two extreme spectral colors (usually, 380 and 770 nm), then the color will have no dominant wavelength in the visible spectrum. In this case, the dominant wavelength is specified by the complementary spectral color with a suffix c. The value is obtained by extending a line backward through the illuminant to the spectrum locus. CIE defines purity of a given intermediate color as the ratio of two distances: the distance from the illuminant to the color and the distance from the illuminant through the color to the spectrum locus or the purple line. Pure spectral colors lie on the spectrum locus indicating a fully saturated purity of 100%. The illuminant represents a fully diluted color with a purity of 0%.
5.2 CIELUV Space CIEXYZ is a visually nonuniform color space, where colors, depending on the location in the color locus, show different degrees of error distributions. Many efforts have been dedicated to minimizing this visually nonuniform error distribution. One way to achieve more visually uniform color spaces is to perform nonlinear transforms of the CIEXYZ that describe color using opponent-type axes relative to a given absolute white-point reference. CIELUV and CIELAB are two well-known examples. CIELUV is a transform of the 1976 UCS chromaticity coordinate u , v , and Y .1,2 L∗ = 116(Y/Yn )1/3 − 16 if Y/Yn ≥ 0.008856,
(5.3a)
L∗ = 903.3(Y/Yn )
(5.3b)
if Y/Yn < 0.008856,
u∗ = 13L∗ (u − un ),
(5.3c)
v ∗ = 13L∗ (v − vn ),
(5.3d)
where L∗ is the lightness, Xn , Yn , Zn are tristimulus values of the illuminant, and u = 4X/(X + 15Y + 3Z),
v = 9Y/(X + 15Y + 3Z).
(5.4a) (5.4b)
The color difference in CIELUV space is calculated as the Euclidean distance. 1/2 . E uv = L∗2 + u∗2 + v ∗2
(5.5)
60
Computational Color Technology
It is sometimes desirable to identify the components of a color difference as correlates of perceived hue and colorfulness. Relative colorfulness or chroma is defined as 1/2 ∗ = u∗2 + v ∗2 , Cuv
(5.6)
and the relative colorfulness attribute called saturation is defined as
or
1/2 ∗ = 13 u∗2 + v ∗2 Suv
(5.7a)
∗ ∗ Suv = Cuv /L∗ .
(5.7b)
Hue angle is defined as h∗uv = tan−1 (v ∗ /u∗ ).
(5.8)
∗2 ∗2 1/2 − L∗2 − Cuv . h∗uv = Euv
(5.9)
and hue difference is
5.2.1 Color gamut boundary of CIELUV Like CIEXYZ, CIELUV has a well-defined gamut boundary that is based on the CIE 1976 uniform chromaticity scale (UCS) u and v . ¯ x(λ) ¯ + 15y(λ) ¯ + 3¯z(λ)], u (λ) = 4x(λ)/[
(5.10a)
v (λ) = 9y(λ)/[ ¯ x(λ) ¯ + 15y(λ) ¯ + 3¯z(λ)].
(5.10b)
Figure 5.2 gives the color gamut boundaries of the CIELUV space from the CIE 1931 and 1964 CMFs. Again, the CIE 1931 CMF is larger than the CIE 1964 CMF, where the gamut size difference between these two observers seems wider in CIELUV color space.
5.3 CIELAB Space CIELAB is a nonlinear transform of 1931 CIEXYZ.1 L∗ = 116f (Y/Yn ) − 16 or ∗ a = 500[f (X/Xn ) − f (Y /Yn )] b∗ = 200[f (Y/Yn ) − f (Z/Zn )] ∗ f (X/Xn ) 0 116 0 −16 L f (Y/Yn ) a ∗ = 500 −500 0 0 f (Z/Zn ) ∗ b 0 200 −200 0 1
(5.11a)
CIE Color Spaces
61
Figure 5.2 Color gamuts of CIELUV space.
and f (t) = t 1/3 = 7.787t + (16/116)
1 ≥ t > 0.008856,
(5.11b)
0 ≤ t ≤ 0.008856,
(5.11c)
where Xn , Yn , and Zn are the tristimulus values of the illuminant. Similar to CIELUV, the relative colorfulness or chroma is defined as 1/2 ∗ Cab = a ∗2 + b∗2 .
(5.12)
h∗ab = tan−1 (b∗ /a ∗ ).
(5.13)
Hue angle is defined as
Again, the color difference Eab is defined as the Euclidean distance in the 3D CIELAB space. 1/2 Eab = L∗2 + a ∗2 + b∗2 .
(5.14)
62
Computational Color Technology
The just noticeable color difference is approximately 0.5 to 1.0 Eab units. CIELAB is perhaps the most popular color space in use today. However, the problem of deriving suitably uniform metrics for a perceived small extent of color is not yet solved. CIE continues to carry out coordinated research on color difference evaluation. 5.3.1 CIELAB to CIEXYZ transform The inverse transform from CIELAB to CIEXYZ is given in Eq. (5.15). X = Xn [a ∗ /500 + (L∗ + 16)/116]3
if L∗ > 7.9996,
(5.15a)
= Xn (a ∗ /500 + L∗ /116)/7.787
if L∗ ≤ 7.9996,
(5.15b)
Y = Yn [(L∗ + 16)/116]3
if L∗ > 7.9996,
(5.15c)
= Yn L∗ /(116 × 7.787)
if L∗ ≤ 7.9996,
(5.15d)
Z = Zn [−b∗ /200 + (L∗ + 16)/116]3 if L∗ > 7.9996,
(5.15e)
= Zn (−b∗ /200 + L∗ /116)/7.787
if L∗ ≤ 7.9996.
(5.15f)
5.3.2 Color gamut boundary of CIELAB Unlike CIEXYZ and CIELUV spaces, CIELAB does not have a chromaticity diagram. As pointed out by Bartleson, this is because values of a ∗ and b∗ depend on L∗ .2 However, this does not mean that there is no gamut boundary for CIELAB. As early as 1975, Judd and Wyszecki already gave a graphic outer boundary of the CIELAB space viewed under illuminant D65 and CIE 1964 observer.3 Although the detail was not revealed on how this graph was generated, they did mention the use of optimal color stimuli. An optimal color stimulus is an imaginary stimulus, having two or more spectral components (usually, no more than three wavelengths) with a unit reflectance at the specified wavelength, and zero elsewhere. No real object surfaces can have this kind of abrupt reflectance curves. Although CIELAB space does not have a chromaticity diagram, it does have boundaries. The boundaries are obtained by using spectral and optimal stimuli if the standard observer and illuminant are selected.4 First, we compute tristimulus values of the spectral stimuli. Second, we compute tristimulus values of all possible two-component optimal stimuli. These tristimulus values are converted to L∗ , a ∗ , and b∗ via Eq. (5.3). For computing gamut boundary in CIELAB, tristimulus values of the object in Eq. (5.3) are replaced by a CMF at a given wavelength λ, then tristimulus values of the illuminant are normalized to Yn = 1. 1/3 L∗ = 116[y(λ)/Y ¯ − 16, n]
(5.16a)
CIE Color Spaces
63
1/3 1/3 a ∗ = 500 [x(λ)/X ¯ − [y(λ)/Y ¯ , n] n] 1/3 ¯ − [¯z(λ)/Zn ]1/3 , b∗ = 200 [y(λ)/Y n]
or
L∗ a∗ b∗
0 = 500 0
116 −500 200
0 0 −200
¯ x(λ)/X n −16 ¯ y(λ)/Y n 0 . z¯ (λ)/Zn 0 1
(5.16b) (5.16c)
(5.16d)
Two-dimensional projection of CIE spectral stimuli under either D50 or D65 in CIELAB shows that stimuli at both the high- and low-wavelength ends locate near the origin of the diagram where the illuminant resides as shown in Fig. 5.3. These results give a concave area in the positive a ∗ quadrants encompassed color regions from red through magenta to purple. This is because stimuli are weak at both ends of the CMF, having very small brightness and colorfulness. Thus, they are perceived as if they were achromatic hues. It is a known fact that a single spectral stimulus does not give saturated magenta colors. Magenta colors require at least two spectral stimuli in proper wavelengths
Figure 5.3 The spectral stimuli of CIE 1931 and 1964 CMFs in CIELAB space under D50 or D65 illuminant.
64
Computational Color Technology
with respect to each other such as one in the red region and the other in the blue region. Therefore, we start by computing all possible optimal stimuli of two spectral wavelengths in the range from 390 to 750 nm. This is achieved by fixing one stimulus at a wavelength λ1 and moving the other stimulus across the whole spectrum at a 5-nm interval, starting from λ2 = λ1 + 5 nm until it reaches the other end of the spectrum. The first stimulus is then moved to the next wavelength and the second stimulus again is scanned across the remaining spectrum at the 5 nm interval. This procedure is repeated until both stimuli reach the other end. Note that the 5-nm interval is an arbitrary choice. One can reduce the interval to get more precise wavelength location, or one can widen the interval to save computation cost with some sacrifice in accuracy. We employ Grassmann’s additivity law (see Section 1.1 for more detail) given in Eq. (5.17) with normalization (actually, this is the averaging because Y n is normalized to 1) to compute tristimulus values X, Y , and Z of two stimuli. ¯ 2 )]/2, X = [x(λ ¯ 1 ) + x(λ
(5.17a)
¯ 2 )]/2, Y = [y(λ ¯ 1 ) + y(λ
(5.17b)
Z = [¯z(λ1 ) + z¯ (λ2 )]/2.
(5.17c)
These tristimulus values are then plugged into Eq. (5.16) to obtain CIELAB values. With additional data from two-component optimal stimuli, we fill the concave area in the positive a ∗ quadrants somewhat to give a near convex boundary as shown in Fig. 5.4. Connecting the outermost colors produced by optimal and spectral stimuli, we obtain the boundary of the CIELAB space with respect to the illuminant used as shown in Fig. 5.5. For D65 , the resulting gamut looks pretty close to the outer boundary given by Judd and Wyszecki.3 We also obtain results for other combinations of illuminant and standard observer. For the CIE 1931 observer under illuminants D50 and D65 , D65 gives a substantially larger area in the green, cyan, blue, and purple regions, whereas D50 gives a slightly larger area in the magenta and red regions. The CIE 1964 observer under D50 and D65 gives a similar trend. Under the same illuminant, the CIE 1964 observer is slightly larger than the CIE 1931 observer in the cyan and blue regions, whereas the CIE 1931 observer is larger in the green, red, magenta, and purple regions. Generally speaking, the color gamut difference is small with respect to the difference in standard observer, but it is large with respect to the difference in illuminant used. By employing Eqs. (5.16) and (5.17), the computation indicates that there is indeed a gamut boundary in CIELAB space using spectral and optimal stimuli. However, unlike chromaticity diagrams of CIEXYZ and CIELUV that are fixed under any illumination (the gamut boundary is illuminant independent), the size of the CIELAB gamut depends on the illuminant used because the CIELAB is defined as the normalization with respect to the illuminant, which is a form of the chromatic adaptation [see Eq. (5.11)]. The illuminant has a significant influence on
CIE Color Spaces
65
Figure 5.4 The additional space of CIELAB.
the size of the gamut boundary in CIELAB space, whereas the standard observer has only a minor effect. From this computation, the common practice of connecting six primaries in CIELAB space to give a projected 2D color gamut is not a strictly correct way of defining a color gamut. However, it is a pretty close approximation for real colorants. To have a better definition of the color gamut in CIELAB plot, one should generate and measure more two-color mixtures.
5.4 Modifications The primary concerns of the CIE color space seem to be the visual uniformity and color difference measure. Since 1931, many attempts have been made to derive satisfactory formulas for establishing a uniform color space and a constant color difference across the whole space. One approach was based on the Munsell system,5 where Munsell samples were defined by three uniform scales of hue, value, and chroma. Thus, the difference between successive samples in the Munsell book of colors should be the same. If one plots Munsell samples of constant value (lightness), for example, in a uniform color space, one should get circles of increasing radius. However, none of the existing CIE color spaces and modifications meets
66
Computational Color Technology
Figure 5.5 Color gamut boundaries of CIELAB space under D50 or D65 illuminant.
this criterion as shown in Fig. 5.6.6 The benefit of plotting Munsell samples is that it provides the means to check and compare the uniformity of color spaces. The other approach was based on the MacAdam ellipses7 as shown in Fig. 5.7. If one plots small color differences in various directions from a particular color, the differences fall into an ellipsoid.6–8 For a uniform color space, the small color differences should form a circle instead of an ellipsoid. Thus, the MacAdam ellipses form the basis for a number of color difference formulas and a uniformity measure of the color space. These activities led to the establishment of CIELUV and CIELAB color spaces in 1976. Compared to CIEXYZ space, CIELUV and CIELAB are major improvements with respect to visual uniformity, but they are not totally uniform (see Fig. 5.6). As early as 1980, experimental works by McDonald already indicated that CIELAB was not completely satisfactory.9 If CIELAB were uniform, the plot of discrimination ellipses in the chromatic plane of a∗ versus b∗ should form equal-sized circles. But, the experimental results show that ellipses consistently increase in size as the distance from neutral (gray) increases. Therefore, many other uniform color spaces were proposed such as the Frei space,10 OSA,11,12 ATD,13 LABHNU,14 Hunter LAB,15 SVF space,16 Nayatani space,17 Hunt space,18 and IPT space.19 Recently, Li and Luo proposed a uniform J a b color space based on CIE color appearance model CAM97s2 (see Section 5.5).
CIE Color Spaces
67
Figure 5.6 Munsell colors of value 5 in (a) CIELAB, (b) CIELUV, (c) Hunt, and (d) Nayatani spaces. (Reprinted with permission of John Wiley & Sons, Inc.)6
A comparison study among CIELAB, CIECAM97s2, IPT, and J a b using six sets of data with large color differences shows that the J a b space gives a smaller mean color difference.20 Moreover, several color distance formulas (or color difference measures) have been constructed to determine color difference in terms of the just noticeable difference (JND); important ones are FMC,21 CMC,22–24 and BFD.25,26 Most color difference formulas proposed after 1976 are based on the non-Euclidean distance between two color stimuli, having a general expression of 1/2 E = [L∗ /(K L S L )]2 + [C ∗ /(K C S C )]2 + [H ∗ /(K H S H )]2 ,
(5.18)
where L∗ , C ∗ , and H ∗ are differences in lightness, chroma, and hue predictors, respectively. Parameters S L , S C , and S H are scaling factors that allow corrections of specific faults in the formula, and K L , K C , and K H are parametric factors that can be changed depending on viewing parameters such as textures and backgrounds. The ISO color difference standard of the CMC formula (CIE94) and BFD fall into this category. They differ in S and K parameters. For example, the simpler CIE94 formula has K L = K C = K H = 1, S L = 1, S C = 1 + 0.045C∗ab , and
68
Computational Color Technology
Figure 5.7 MacAdam ellipses in the constant lightness plane with luminance factor 0.2 plotted in (a) CIELAB, (b) CIELUV, (c) Hunt, and (d) Nayatani color spaces. (Reprinted with permission of John Wiley & Sons, Inc.)6
S H = 1 + 0.015C∗ab .22 The CMC formula has K L = K C = K H = 1 for the best fit to perceptibility data and K L = 2 for textile and other critical acceptability usage. But, it has very complex expressions for the S parameters that allow calculation of tolerance ellipsoids, which are different in size, as required for different parts of the color space. The ellipsoids are scaled so that differences in lightness, chroma, and hue, as defined by the formula, agree visually with the perceived size of these differences. In 2000, CIE released a general formula for color difference, CIEDE2000, as given in Eq. (5.19).27,28 E = [L∗ /(K L S L )]2 + [C ∗ /(K C S C )]2 + [H ∗ /(K H S H )]2 1/2 + R T Φ(C ∗ H ∗ ) . (5.19) A new term R T is introduced to deal with interactions between hue and chroma differences, which is required for blue colors to correct for the orientation of ellipses. Color difference formulas of non-Euclidean distance are rather complex; they are difficult to understand and cumbersome to use.
CIE Color Spaces
69
5.5 CIE Color Appearance Model A color appearance model is any color model that includes predictors of at least the relative color appearance attributes of lightness, chroma, and hue. To have reasonable predictors of these attributes, the model must include at least some form of a chromatic adaptation transform (see Chapter 4). All chromatic adaptation models have their roots in the von Kries hypothesis. The modern interpretation of the von Kries model is that each cone has an independent gain control as expressed in Eq. (5.20).
La Ma Sa
1/Lmax = 0 0
0 1/M max 0
0 0 1/S max
L M , S
(5.20)
where L, M, and S are the initial cone responses; La , M a , and S a are the cone signals after adaptation; and Lmax , M max , and S max are the cone responses for the scene white or maximum stimulus. This definition enables color spaces CIELAB and CIELUV to be considered as color appearance models.29 More complex models that include predictors of brightness, colorfulness, and various luminancedependent effects are the Nayatani,30 Hunt,31 RLAB,32 ATD,33 and LLAB34 models. Nayatani’s and Hunt’s models, evolved from many decades of studies, are capable of predicting an extensive array of color appearance phenomena. They are comprehensive and complex. ATD, developed by Guth, is a different type of model from the others. It is aimed at describing color vision. RLAB and LLAB are similar in structure; they are the extension of CIELAB and are relatively simple. In view of the importance of the color appearance in cross-media image renditions, the CIE has formed a committee for recommending a color appearance model. In 1997, the CIE recommended an interim color appearance model CIECAM97s.35 The formulation of CIECAM97s builds on the work of many researchers in the field of color appearance.29–34 It is a joint effort of top color scientists around the world. Subsequent studies have found three drawbacks of the model. In 2002, a revised model CIECAM02 was published.36 The formulation of CIECAM02 is the revision to CIECAM97s, but using the basic structure and form of CIECAM97s. Comparison studies indicate that CIECAM02 performs as well as or better than CIECAM97s in almost all cases and has a significant improvement in the prediction of saturation.37 Therefore, CIECAM02 is recommended for the CIE color appearance model. The formulation begins with a conversion from CIEXYZ to spectrally sharpened cone responses RGB (see Section 12.8 for the spectral sharpening) via a matrix multiplication for both sample and white point, where the matrix is the CAT02 (CIECAM97s uses the Bradford matrix, see M B of Chapter 4).
R X 0.7328 G = M CAT02 Y = −0.7036 B Z 0.0030
0.4296 1.6975 0.0136
−0.1624 0.0061 0.9834
X Y . Z
(5.21)
70
Computational Color Technology
The next step is the chromatic adaptation transform, which is a modified von Kries adaptation (CIECAM97s uses the exponential nonlinearity added to the shortwavelength blue channel). R c = [D(Y w /R w ) + 1 − D]R,
(5.22a)
Gc = [D(Y w /Gw ) + 1 − D]G,
(5.22b)
B c = [D(Y w /B w ) + 1 − D]B,
(5.22c)
D = F {1 − (1/3.6) exp[−(LA + 42)/92]},
(5.23)
where the D factor is used to specify the degree of adaptation, which is a function of the surround and LA (the luminance of the adapting field in candelas per square meter or cd/m2 ). The value of D is set equal to 1.0 for complete adaptation to the white point and 0.0 for no adaptation. In practice, D is greater than 0.65 for a dark surround and quickly approaches 0.8 with increasing LA ; for a dim surround, D is greater than 0.75 and quickly approaches 0.9 with increasing LA ; for an average surround, D is greater than 0.84 and quickly approaches 1.0 with increasing LA . Similar transformations are made for the source white point. The F value is set at 1.0, 0.9, or 0.8 for the average, dim, or dark surround, respectively. Next, parameters for the viewing conditions are computed. The value F L is calculated from Eqs. (5.24) and (5.25). k = 1/(5LA + 1),
2 F L = 0.2k 4 (5LA ) + 0.1 1 − k 4 (5LA )1/3 .
(5.24) (5.25)
The background induction factor g is a function of the background luminance factor with a range from 0 to 1. g = Y b /Y w .
(5.26)
The value g can then be used to calculate the chromatic brightness induction factors, N bb and N cb , and the base exponential nonlinearity z. N bb = N cb = 0.725(1/g)0.2 , z = 1.48 + g
1/2
(5.27) (5.28)
.
Postadaptation signals for both sample and source white are transformed from the sharpened cone responses to the Hunt-Pointer-Estevez cone responses using Eq. (5.29).
R G B
= M H M CAT02 −1
Rc Gc , Bc
(5.29)
CIE Color Spaces
where
and
71
0.38971 0.68898 −0.07868 M H = −0.22981 1.18340 0.04641 0.0 0.0 1.00000 1.096124 −0.278869 0.182745 M CAT02 −1 = 0.454369 0.473533 0.072098 . −0.009628 −0.005698 1.015326
Postadaptation nonlinear response compressions are performed by using Eq. (5.30).
(F L R /100)0.42 + 27.13 + 0.1, (5.30a)
Ga = 400(F L G /100)0.42 (F L G /100)0.42 + 27.13 + 0.1, (5.30b)
Ba = 400(F L B /100)0.42 (F L B /100)0.42 + 27.13 + 0.1. (5.30c) Ra =
400(F L R /100)0.42
The preliminary Cartesian coordinates a and b are calculated as follows: a = Ra − 12Ga /11 + Ba /11, b = (1/9) Ra + Ga − 2Ba .
(5.31) (5.32)
They are used to calculate a preliminary magnitude t and hue angle h. 1/2
t = e a 2 + b2 / Ra + Ga + (21/20)Ba ,
(5.33)
h = tan−1 (b/a).
(5.34)
Knowing h, we can compute an eccentricity factor e, which in turn is used to calculate the hue composition H . e = (12500/13)N c N cb [cos(hπ/180 + 2) + 3.8], H = Hi + [100(h − h1 )/e1 ]/[(h − h1 )/e1 + (h2 − h)/e2 ].
(5.35) (5.36)
The value N c in Eq. (5.35) is set at 1.0, 0.95, or 0.8 for average, dim, or dark surround, respectively, and the value N cb is calculated from Eq. (5.27). Table 5.1 gives h, e, and Hi values for red, yellow, green, and blue colors. The achromatic response Aˆ is calculated by using Eq. (5.37) for both sample and white. The lightness J is calculated from the achromatic signals of the sample and white using Eq. (5.38).
Aˆ = 2Ra + Ga + (1/20)Ba − 0.305 N bb , ˆ Aˆ w σ z , J = 100 A/
(5.37) (5.38)
72
Computational Color Technology
where σ is the constant for the impact of the surround; σ = 0.69 for an average surround, 0.59 for a dim surround, 0.525 for a dark surround, and 0.41 for cut-sheet transparencies. Knowing the achromatic response and lightness, the perceptual attribute correlate for brightness Q can then be calculated. Q = (4/σ )(J /100)1/2 Aˆ w + 4 F L 0.25 .
(5.39)
The chroma correlate C can be computed using the lightness J and temporary magnitude t. C = t 0.9 (J /100)1/2 (1.64 − 0.29g )0.73 .
(5.40)
Knowing the chroma C, we can calculate the colorfulness M and the saturation correlate s. M = CF L 0.25 ,
(5.41)
s = 100(M/Q)1/2 .
(5.42)
Finally, we can determine the Cartesian representations using the chroma correlate C and hue angle h. a C = C cos(h),
(5.43)
bC = C sin(h).
(5.44)
The notations a C and bC with subscript C specify the use of the chroma correlate. The corresponding Cartesian representations for colorfulness M, a M , and bM , and saturation correlate s, a s , and bs , can be computed in a similar way. As one can see, CIECAM02 is very computationally intensive. No real-time application of it is known. However, a major application of the color appearance models, CIECAM97s and CIECAM02 in particular, is the evaluation of color differences. The performances of the original CAMs and their extensions were tested using two types of color-difference data: large- and small-magnitude color differences. Results showed that the CIECAM02-based models in general gave a more accurate prediction than the CIECAM97s-based models. The modified version of CIECAM02 gave satisfactory performance in predicting different data sets (better than or equal to the best available uniform color spaces and color-difference Table 5.1 Perceptual attribute correlates of unique colors.
h e Hi
Red
Yellow
Green
Blue
Red
20.14 0.8 0
90 0.7 100
164.25 1.0 200
237.53 1.2 300
380.14 0.8 400
CIE Color Spaces
73
formulas). This strongly suggests that a universal color model based on a colorappearance model can be achieved for all colorimetric applications: color specification, color difference, and color appearance.38
5.6 S-CIELAB Zhang and Wandell extended CIELAB to account for the spatial as well as color errors in reproduction of the digital color image.39 They call this model SpatialCIELAB or S-CIELAB. The design goal is to apply a spatial filtering to the color image in a small-field or fine-patterned area, but reverting to the conventional CIELAB in a large uniform area. The procedure for computing S-CIELAB is outlined as follows: (1) Input image data are transformed into an opponent-colors space. This color transform converts the input image, specified in terms of the CIEXYZ tristimulus values, into three opponent-colors planes that represent luminance, red-green, and blue-yellow components. (2) Each opponent-colors plane is convoluted with a 2D kernel whose shape is determined by the visual spatial sensitivity to that color dimension; the area under each of these kernels integrates to one. A low-pass filtering is used to simulate the spatial blurring by the human visual system. The computation is based on the concept of the pattern-color separability. Parameters for the color transform and spatial filters were estimated from psychophysical measurements. (3) The filtered representation is converted back to CIEXYZ space, then to a CIELAB representation. The resulting representation includes both the spatial filtering and the CIELAB processing. (4) The difference between the S-CIELAB representations of the original and its reproduction is the measure of the reproduction error. The difference is expressed by a quantity Es , which is computed precisely as E∗ab in the conventional CIELAB. S-CIELAB reflects both spatial and color sensitivity. This model is a color-texture metric and a digital-imaging model. It has been applied to printed halftone images. Results indicate that S-CIELAB correlates with perceptual data better than standard CIELAB.40 This metric can also be used to improve the multilevel halftone images.41
References 1. CIE, Recommendations on uniform color spaces, color-difference equations and psychonetric color terms, Supplement No. 2 to Colorimetry, Publication No. 15, Bureau Central de la CIE, Paris (1978).
74
Computational Color Technology
2. C. J. Bartleson, Colorimetry, Optical Radiation Measurements, Color Measurement, F. Grum and C. J. Bartleson (Eds.), Academic Press, New York, Vol. 2, pp. 33–148 (1980). 3. D. B. Judd and G. Wyszecki, Color in Business, Science and Industry, 3rd Edition, Wiley, New York, pp. 331–332 (1975). 4. H. R. Kang, Color gamut boundaries in CIELAB space, NIP 19, pp. 808–811 (2003). 5. S. M. Newall, D. Nickerson, and D. B. Judd, Final report of the OSA subcommittee on the spacing of the Munsell colors, J. Opt. Soc. Am. 33, pp. 385–418 (1943). 6. M. Mahy, L. Van Eycken, and A. Oosterlinck, Evaluation of uniform color spaces developed after the adoption of CIELAB and CIELUV, Color Res. Appl. 19, pp. 105–121 (1994). 7. D. L. MacAdam, Visual sensitivities to color differences in daylight, J. Opt. Soc. Am. 32, pp. 247–274 (1942). 8. A. R. Robertson, The CIE 1976 color-difference formulae, Color Res. Appl. 2, pp. 7–11 (1977). 9. R. McDonald, Industrial pass/fail colour matching, Part III: Development of a pass/fail formula for use with instrumental measurements of colour difference, J. Soc. Dyers Colourists 96, pp. 486–495 (1980). 10. W. Frei and B. Baxter, Rate-distortion coding simulation for color images, IEEE Trans. Commun. 25, pp. 1385–1392 (1977). 11. D. L. MacAdam, Colorimetric data for samples of OSA uniform color scales, J. Opt. Soc. Am. 68, pp. 121–130 (1978). 12. D. L. MacAdam, Re-determination of colors for uniform scales, J. Opt. Soc. Am. A 7, pp. 113–115 (1990). 13. S. L. Guth, R. W. Massof, and T. Benzschawel, Vector model for normal and dichromatic color vision, J. Opt. Soc. Am. 70, pp. 197–212 (1980). 14. K. Richter, Cube-root spaces and chromatic adaptation, Color Res. Appl. 5, pp. 25–43 (1980). 15. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Edition, Wiley, New York, p. 138 (1982). 16. T. Seim and A. Valberg, Towards a uniform color space: a better formula to describe the Munsell and OSA color scales, Color Res. Appl. 11, pp. 11–24 (1986). 17. Y. Nayatani, K. Hashimoto, K. Takahama, and H. Sobagaki, A nonlinear colorappearance model using Estevez-Hunt-Pointer primaries, Color Res. Appl. 12, pp. 231–242 (1987). 18. R. W. G. Hunt, Revised colour-appearance model for related and unrelated colours, Color Res. Appl. 16, pp. 146–165 (1991). 19. F. Ebner and M. Fairchild, Development and testing of a color space (IPT) with improved hue uniformity, 6th Color Imaging Conf.: Color Science, System, and Application, pp. 8–13 (1998).
CIE Color Spaces
75
20. C. Li and M. R. Luo, A uniform colour space based upon CIECAM97s, http://www.colour.org/tc8-05. C. Li, M. R. Luo, and G. Cui, Colour-difference evaluation using color appearance models, 11th Color Imaging Conf.: Color Science, System, and Application, pp. 127–131 (2003). 21. K. D. Chickering, FMC color-difference formulas: Clarification concerning usage, J. Opt. Soc. Am. 61, pp. 118–122 (1971). 22. F. J. Clarke, R. McDonald, and B. Rigg, Modification to JPC79 colour difference formula, J. Soc. Dyers Colourists 100, pp. 128–132 (1984). 23. F. J. Clarke, R. McDonald, and B. Rigg, Modification to JPC79 colour difference formula (Errata and test data), J. Soc. Dyers Colourists 100, pp. 281–282 (1984). 24. M. H. Brill, Suggested modification of CMC formula for acceptability, Color Res. Appl. 17, pp. 402–404 (1992). 25. M. R. Luo and B. Rigg, BFD(l:c) color-difference formula, Part 1: Development of the formula, J. Soc. Dyers Colourists 103, pp. 86–94 (1987). 26. M. R. Luo and B. Rigg, BFD(l:c) color-difference formula, Part 2: Performance of the formula, J. Soc. Dyers Colourists 103, pp. 126–132 (1987). 27. M. R. Luo, G. Cui, and B. Rigg, The development of the CIE 2000 colourdifference formula: CIEDE2000, Color Res. Appl. 26, pp. 340–350 (2001). 28. M. R. Luo, G. Cui, and B. Rigg, Further comments on CIEDE2000, Color Res. Appl. 27, pp. 127–128 (2002). 29. M. D. Fairchild, Color Appearance Models, Addison-Wesley, Reading, MA (1998). 30. Y. Nayatani, H. Sobagaki, K. Hashimoto, and T. Yano, Lightness dependency of chroma scales of a nonlinear color-appearance model and its latest formulation, Color Res. Appl. 20, pp. 156–167 (1995). 31. R. W. G. Hunt, Revised colour-appearance model for related and unrelated colours, Color Res. Appl. 16, pp. 146–165 (1991). 32. M. D. Fairchild, Refinement of the RLAB color space, Color Res. Appl. 21, pp. 338–346 (1996). 33. S. Guth, Further applications of the ATD model for color vision, Proc. SPIE 2414, pp. 12–26 (1995). 34. M. R. Luo, M.-C. Lo, and W.-G. Kuo, The LLAB (l:c) color model, Color Res. Appl. 21, pp. 412–429 (1996). 35. CIE, Publication 131-1998, The CIE 1997 interim color appearance model (simple version) CIECAM97s (1998). 36. N. Moroney, M. D. Fairchild, R. W. G. Hunt, C. Li, M. R. Luo, and T. Newman, The CIECAM02 color appearance model, 10th CIC: Color Science and Engineering Systems, Technologies, Applications, pp. 23–27 (2002). 37. C. Li, M. R. Luo, R. W. G. Hunt, N. Moroney, M. D. Fairchild, and T. Newman, The performance of CIECAM02, 10th CIC: Color Science and Engineering Systems, Technologies, Applications, pp. 28–32 (2002). 38. C. Li, M. R. Luo, and G. Cui, Colour-difference evaluation using colour appearance models, 11th CIC: Color Science and Engineering Systems, Technologies, Applications, pp. 127–131, Nov. 3 (2003).
76
Computational Color Technology
39. X. Zhang and B. A. Wandell, A spatial extension of CIELAB for digital color image reproduction, SID Int. Symp., Digest of Tech. Papers, pp. 731–734 (1996). 40. X. Zhang, D. A. Silverstein, J. E. Farrell, and B. A. Wandell, Color image quality metric S-CIELAB and its application on halftone texture visibility, IEEE Compcon., pp. 44–48 (1997). 41. X. Zhang, J. E. Farrell, and B. A. Wandell, Applications of a spatial extension to CIELAB, Proc. SPIE 3025, pp. 154–157 (1997).
Chapter 6
RGB Color Spaces RGB primaries play an important role in building colorimetry. CIE color-matching functions are derived by CIE standard RGB primaries. Many imaging devices are additive systems, such as television and digital cameras that are based on RGB primaries, where image signals are encoded in a colorimetrical RGB standard. Moreover, colorimetrical RGB encoding standards are a frequently encountered representation for color reproduction and color information exchanges. This chapter presents an extensive collection of the existing RGB primaries. Their gamut sizes are compared. Methods of transforming between CIEXYZ and colorimetric RGB are discussed. A conversion formula between RGB standards under the same white point is also provided. The general structure and representation of the RGB color-encoding standard is discussed. Several important RGB encoding standards are given in Appendix 4. Finally, conversion accuracies from RGB via CIEXYZ to CIELAB of these primaries are examined.
6.1 RGB Primaries Many RGB primary sets have been proposed for use in different industries such as motion picture, television, camera, film, printing, color measurement, and computer. We have collected 21 sets of RGB primaries; their chromaticity coordinates are given in Table 6.1.1–20 Usually, the gamut size of RGB primaries is plotted in a chromaticity diagram. The mixing of these colorimetric RGB primaries obeys Grassmann’s additivity law; therefore, the color gamut boundary is indicated by the triangle that connects three primaries in the chromaticity diagram.3 From the size of the gamut, RGB primaries can be classified into three groups. The first group has a relatively small gamut size in which RGB primaries are located inside of the spectral color locus as shown in Fig. 6.1. Adobe/RGB98, Bruse/RGB, EBU/RGB, Guild/RGB, Inkjet/RGB, ITU.BT709/RGB, NTSC/RGB, SMPTE-C/RGB, SMPTE-240M/RGB, and Sony-P22/RGB fall into this group. SMPTE-C/RGB, the early standard of the Society of Motion Picture and Television Engineers, gives the smallest color gamut. Both Sony and Apple Computer use P22/RGB; it has the same blue primary as SMPTE-C/RGB but different red and green primaries. ITU709/RGB is slightly larger than SMPTE-C/RGB; it has the primaries used in several important RGB encoding standards such as sRGB and PhotoYCC. Bruse/RGB is larger 77
78
Computational Color Technology Table 6.1 CIE 1931 chromaticity coordinates of RGB primaries.
Red
Adobe/RGB981 Bruse/RGB2 CIE1931/RGB3 CIE1964/RGB3 EBU/RGB4 Extended/RGB5 Guild/RGB6 Ink-jet/RGB7 ITU-R.BT.709-28 Judd-Wyszecki/RGB9 Kress/RGB10 Laser/RGB11 NTSC/RGB12 RIMM-ROMM/RGB13–15 ROM/RGB16 SMPTE-C17 SMPTE-240M4 Sony-P2218 Wide-Gamut/RGB1 Wright/RGB19 Usami/RGB20
Green
Blue
x
y
x
y
x
y
0.640 0.640 0.7347 0.7232 0.640 0.701 0.700 0.700 0.640 0.7347 0.6915 0.7117 0.670 0.7347 0.873 0.630 0.670 0.625 0.7347 0.7260 0.7347
0.330 0.330 0.2653 0.2768 0.330 0.299 0.300 0.300 0.330 0.2653 0.3083 0.2882 0.330 0.2653 0.144 0.340 0.330 0.340 0.2653 0.2740 0.2653
0.210 0.280 0.2737 0.1248 0.290 0.170 0.255 0.250 0.300 0.0743 0.1547 0.0328 0.210 0.1596 0.175 0.310 0.210 0.280 0.1152 0.1547 –0.0860
0.710 0.650 0.7174 0.8216 0.600 0.796 0.720 0.720 0.600 0.8338 0.8059 0.8029 0.710 0.8404 0.927 0.595 0.710 0.595 0.8264 0.8059 1.0860
0.150 0.150 0.1665 0.1616 0.150 0.131 0.150 0.130 0.150 0.1741 0.1440 0.1632 0.140 0.0366 0.085 0.155 0.150 0.155 0.1566 0.1440 0.0957
0.060 0.060 0.0089 0.0134 0.060 0.046 0.050 0.050 0.060 0.0050 0.0297 0.0119 0.080 0.0001 0.0001 0.070 0.060 0.070 0.0177 0.0297 –0.0314
than ITU709/RGB as a result of extending the green primary, but keeping the red and blue primaries the same as ITU709/RGB. Adobe/RGB98 is an enlarged Bruse/RGB; the red and blue primaries are the same as Bruse/RGB with the green primary at a higher chroma. The television standard NTSC/RGB has the same green primary as Adobe/RGB98 with extended red and blue primaries. SMPTE240M/RGB, also developed for NTSC coding, has the same red and green primaries as NTSC/RGB, whereas the blue primary is the same as Adobe/RGB98. Guild/RGB is chosen for developing tristimulus colorimeters (note that the chromaticity coordinates of Guild/RGB are estimated from Fig. 2.32 of Ref. 9, p. 192); it has a sufficiently large gamut with the intention to encompass as many colors as possible. Ink-jet/RGB is derived from experimental results of ink-jet prints; it has a slightly larger gamut size than Guild/RGB. The second group has RGB primaries located on the spectral color boundary as shown in Fig. 6.2; they are the spectral stimuli. This group includes CIE1931/RGB, CIE1964/RGB, Extended/RGB, Judd-Wyszecki/RGB, Kress/RGB, Laser/RGB, Wide-Gamut/RGB, and Wright/RGB. CIE1931/RGB is the spectral matching stimuli with blue primary at 435.8 nm, green at 546.1 nm, and red at 700.0 nm
RGB Color Spaces
79
Figure 6.1 Color gamut sizes of group 1 RGB primaries.
that the CIE 1931 2◦ observer is based upon, whereas CIE1964/RGB is the basis for the CIE 1964 10◦ observer with blue at 22500 cm−1 (∼444.4 nm), green at 19000 cm−1 (∼526.3 nm), and red at 15500 cm−1 (∼645.2 nm).3 Extended/RGB with blue at 467 nm, green at 532 nm, and red at 625 nm is proposed for accommodating applications in color imaging systems.5 Judd and Wyszecki chose spectral stimuli at two extremes of the visible spectrum for blue and red primaries and the middle at 520 nm for green. They pointed out the disadvantage of choosing at spectrum extremes that the primaries have very low brightness.9 Kress proposed a default RGB, having blue at 460 nm, green at 530 nm, and red at 620 nm.10 Starkweather has suggested a spectral RGB color space using primaries of three lasers with a helium-neon laser at 633 nm for red, an argon laser at 514 nm for green, and a helium-cadmium laser at 442 nm for blue.11 Wide-Gamut/RGB, proposed by Adobe, uses spectral stimuli at 450 nm, 525 nm, and 700 nm for blue, green, and red primaries, respectively.1 Wright chooses spectral primaries at 460 nm for blue, 530 nm for green, and 650 nm for red.19 Spectral stimuli, in general, give a lager gamut size than the primaries of the first group. However, they are not free of the gamut mismatch (or gamut mapping) problem because the mismatch is dependent not only on the gamut size but also on the locations of primaries.
80
Computational Color Technology
Figure 6.2 Color gamut sizes of groups 2 and 3 RGB primaries.
The last group consists of RIMM-ROMM/RGB, ROM/RGB, and Usami/RGB; they are also plotted in Fig. 6.2. The unique feature of this group is that they have primaries outside of the spectral locus. RIMM-ROMM/RGB and Usami/RGB have a spectral stimulus for red at 700 nm, but green and blue are outside of the spectral locus.13–15,20 Note that the green and blue primaries of Usami/RGB have negative values (see Table 6.1); the triangle defined by these primaries encloses the spectral color locus, containing all real colors as well as imaginary colors. For ROM/RGB, all primaries are outside of the spectral locus.16 Note that the red and green primaries do not meet the constraint of x + y ≤ 1(another way to put it is that z must be negative).
6.2 Transformation of RGB Primaries Colorimetric RGB has a simple linear relationship with CIEXYZ. Therefore, the conversion between RGB and CIEXYZ is a simple vector-matrix multiplication, provided the matrix coefficients are known. Matrix coefficients are derived from chromaticity coordinates of RGB primaries if a white point is adopted. Conversion matrices from XYZ to RGB and the inverse transform from RGB to XYZ under illuminants A, B, C, D50 , D55 , D65 , D75 , and D93 are derived and tabulated
RGB Color Spaces
81
in Appendix 1. Moreover, using CIEXYZ as an intermediate representation, we can establish the conversion from one RGB primary set to another if the white point is the same. Conversion matrices between RGB standards under the same white point are provided in Appendix 2 and Appendix 3 for sRGB under D65 and ROMM/RGB under D50 , respectively. Different white points require an extra step of the chromatic adaptation or white-point conversion. 6.2.1 Conversion formula As shown in Section 2.8, two sets of primaries are related by a 3 × 3 linear transformation, AT2 = (AT1 Φ 2 )−1 AT1 [see Eq. (2.31)], where A is a color-matching matrix and Φ 2 is the spectra of a set of primaries used to derive the color-matching matrix. Therefore, colorimetric RGB is represented by a set of linear equations as shown in Eq. (6.1) to give the forward encoding from XYZ to RGB.
R α11 G = α21 α31 B
α12 α22 α32
α13 α23 α33
X Y , Z
(6.1)
or Υ p = αΥ , where coefficients αij are the elements of the conversion matrix α. The inverse conversion from RGB to XYZ is given as
X β11 Y = β21 β31 Z
β12 β22 β32
β13 β23 β33
R G , B
(6.2)
or Υ = βΥ p , where coefficients βij are the elements of the matrix β. Matrix β is the inverse of the matrix α as given in Eq. (6.3). With three independent channels, the matrix α is not singular and can be inverted. β = α −1 .
(6.3)
Equation (6.2) provides a path from a colorimetric RGB via CIEXYZ to other CIE specifications such as CIELAB or CIELUV because the subsequent transformations are well established.3 Moreover, it also provides a path from a colorimetric RGB to another colorimetric RGB via CIEXYZ, if the white point is the same.
82
Computational Color Technology
The inverse matrix β is related to RGB primaries in the following manner:12 X = x rT rR + x gT gG + x bT bB Y = y rT rR + y gT gG + y bT bB
(6.4a)
Z = zr T r R + zg T g G + zb T b B,
Y X Z
xrT r = y rT r zr T r
x gT g y gT g zg T g
x bT b y bT b zb T b
R G , B
(6.4b)
where (x r , y r , zr ), (x g , y g , zg ), and (x b , y b , zb ) are the chromaticity coordinates of the red, green, and blue primaries, respectively. Parameters T r , T g , and T b are the proportional constants of the red, green, and blue primaries, respectively, under an adapted white point.4,12 By comparing with Eq. (6.2), we can establish the relationship between coefficients βij and chromaticity coordinates of primaries as β11 = x r T r ; β12 = x g T g ; β13 = x b T b ; β21 = y r T r ; β22 = y g T g ; β23 = y b T b ; β31 = zr T r ; β32 = zg T g ; β33 = zb T b ,
(6.5a)
or
β11 β21 β31
β12 β22 β32
β13 β23 β33
xr = yr zr
xg yg zg
xb yb zb
Tr 0 0
0 Tg 0
0 0 , Tb
(6.5b)
or β =ΓT.
(6.5c)
Equation (6.5) can be solved for T = [T r , T g , T b ]T by using a known condition of a gray-balanced and normalized RGB system; that is, when R = G = B = 1, a reference white point (xn , yn , zn ) of the device is produced. Using this condition, Eq. (6.4a) becomes xn /yn = x r T r + x g T g + x b T b 1 = y rT r + y gT g + y bT b
(6.6a)
zn /yn = zr T r + zg T g + zb T b ,
xn /yn 1 zn /yn
xr = yr zr
xg yg zg
xb yb zb
Tr 0 0
0 Tg 0
0 0 , Tb
(6.6b)
or Υw =ΓT,
(6.6c)
RGB Color Spaces
83
where normalized tristimulus values of the white point Υ w = [xn /yn , 1, zn /yn ] are given in the left-hand side of Eq. (6.6). This equation is used to compute T r , T g , and T b because chromaticity coordinates of primaries and white point are known. The matrix has three independent columns with a rank of three; therefore, it is nonsingular and can be inverted. By inverting matrix Γ , we obtain vector T . T = Γ −1 Υ w .
(6.7)
Resulting T values are substituted back into Eq. (6.5) with the known chromaticity coordinates of primaries to obtain coefficients βij of the transfer matrix. Strictly specking, Eq. (6.6) is only valid at one extreme point of the reference white, but the derived coefficients are used in any RGB → XYZ conversions. How well this assumption holds across the whole encoding range requires further investigations. 6.2.2 Conversion formula between RGB primaries After obtaining the β matrix, one can apply Eq. (6.3) to obtain matrix α for the forward transform from XYZ to RGB, if the matrix β is not singular. Appendix 1 lists the conversion matrices for 20 sets of primaries under 8 different white points (illuminants A, B, C, D50 , D55 , D65 , D75 , and D93 ). When the white point is the same for two sets of RGB primaries, we can combine the relationships given in Eqs. (6.1) and (6.2) for converting one set of RGB primaries via CIEXYZ to another. Equation (6.8) gives the conversion formula between RGB sets.21
Rd Gd Bd
α d11 = α d21 α d31
α d12 α d22 α d32
α d13 α d23 α d33
β s11 β s21 β s31
β s12 β s22 β s32
β s13 β s23 β s33
Rs Gs , Bs
(6.8a)
or Υ p,d = α d β s Υ p,s = α d α −1 s Υ p,s ,
(6.8b)
where subscript s indicates the source and subscript d indicates the destination RGB space. These two matrices can be combined to give a single conversion matrix. All conversions between RGB primaries can be computed using Eq. (6.8) if the white point is the same. Appendix 2 gives conversion matrices of various RGB primaries to ITU-R.BT.709/RGB under D65 . Appendix 3 gives conversion matrices of various RGB primaries to ROMM/RGB under D50 . For cases of different white points, an additional step of the white-point conversion or chromatic adaptation is required. Several practical approaches of white-point conversion and chromatic adaptation have been reported.5,11,21–23
84
Computational Color Technology
6.3 RGB Color-Encoding Standards Colorimetrical RGB standards play an important role in color imaging because they are a frequently encountered representation for color reproduction and color information exchanges. The purpose of the color-encoding standard is to provide format and ranges for representing and manipulating color quantities. Its foundation is a set of RGB primaries, either imaginary or real stimuli. By adding the viewing conditions, gamma correction, conversion formula, and digital representation, a set of RGB primaries becomes a color-encoding standard. Important RGB encoding standards are SMPTE-C, European TV standard EBU, NTSC, and American Television standard YIQ for the television industry; sRGB for Internet; and PhotoYCC and ROMM-RIMM for photographic and printing industries. These standards are given in Appendix 4. The general structure of the RGB encoding standard is given in this section. 6.3.1 Viewing conditions The viewing conditions include an adapted white point such as D50 or D65 , surround, luminance level, and viewing flare. Generally, the display industry prefers D65 and the printing industry uses D50 as the adapted white point. The surround is a field outside the background and can be considered to be the entire room in which an image is viewed. Printed images are usually viewed in an illuminated “average” surround, meaning that scene objects are surrounded by other similarly illuminated objects. The luminance level is set according to the application or not set at all; for instance, the outdoor scene is set under typical daylight luminance levels (>5,000 cd/m2 ). When an image is viewed, the observer ideally should see only the light from the image itself. This is the case for instrumental color measurements, but is not the case for real viewing conditions by human observers. In most actual viewing conditions, the observer will also see flare light—the stray light imposed on the image from the environment and reflected to viewer. The viewing flare is usually low (<1.0 cd/m2 ); sometimes it is set as a percentage of the whitepoint luminance (e.g., 1%) or included in 0/45 measurements as a part of the scene itself. 6.3.2 Digital representation Cameras and scanners receive light or photons that are converted to electrons or voltage by a photoelectric process (e.g., photomultiplier). In digital devices, the voltage is further converted to bits via an analog-to-digital converter. On the other hand, a display such as a CRT monitor takes digital values and converts them back to voltage via a digital-to-analog converter to drive the electron gun. Generally, all color channels are encoded within a fixed range such as [0, 1]; this range is digitized and scaled to the bit depth used in the device, usually 8 bits.
RGB Color Spaces
85
6.3.3 Optical-electronic transfer function Most RGB encoding standards are designed for additive devices such as CRT displays in which a nonlinear voltage-to-luminance relationship exists; this requires a power function to transfer the voltage into luminance. The general equation for the electronic-optical transfer function is given in Eq. (6.9).4,21,24 P L = [(PV + offset)/(1 + offset)]gamma
if PV ≥ b,
(6.9a)
P L = gain × PV
if PV < b,
(6.9b)
where P L is the luminance factor or one of the RGB device values, and PV is the voltage. The power of the function is the monitor gamma that varies within a narrow range around 2.5. For small PV values, the voltage-to-luminance relationship is nearly linear and goes to the point of origin as given by Eq. (6.9b) with a slope as the gain. Figure 6.3 shows the effect of gamma correction for the case of gamma = 2.2 and offset = 0.099; the gamma correction linearizes the device value with luminance.
Figure 6.3 The gamma correction.
86
Computational Color Technology
Images shown on television are acquired by a camera, whereas images in a computer monitor may come from the computer itself, the Internet, a scanner, or a digital still camera. Camera and scanner have a nonlinear luminance-to-signal relationship; one needs to correct the nonlinear video signal or device value by Eq. (6.10), an inversion of Eq. (6.9). P = (1 + offset)P 1/gamma − offset
if 1 ≥ P ≥ b ,
(6.10a)
P = (1/gain) × P
if 0 < P < b .
(6.10b)
Equation (6.10) is known as the gamma correction, where P is the input video signal (or coded value of the device), P is the gamma-corrected output signal (or device value), and b is a constant.
6.4 Conversion Mechanism Once the white point is selected, the conversion mechanism between RGB and XYZ can be established. The method is given in Section 6.2. Appendix 1 gives the conversion matrices for 20 sets of primaries under eight different white points. Further transforms from CIEXYZ to CIELAB or YIQ are documented in CIE literature and color textbooks. The mechanism is a simple matrix-vector multiplication. The conversion matrix between different RGB primaries can be computed using Eq. (6.8). Appendix 2 gives conversion matrices of nineteen RGB sets to ITU-R.BT.709/RGB under D65 . Appendix 3 gives conversion matrices of nineteen RGB sets to ROMM/RGB under D50 .
6.5 Comparisons of RGB Primaries and Encoding Standards It has been shown that an improper encoding scheme can severely damage the color conversion accuracy.7 Therefore, we compare RGB primaries and standards to determine the most suitable RGB encoding with respect to the gamut size, gamma correction, encoding format (floating-point or integer representation, bit depth, etc.), and conversion accuracy. A set of 150 color patches printed by an ink-jet printer, consisting 125 color patches from five-level combinations of an RGB cube and 25 three-color mixtures, is used to compare RGB primaries and encoding standards. The color patches are measured to obtain CIEXYZ and CIELAB values under D65 illuminant. These color patches are the outputs of the current printing technology, which are readily available and frequently encountered. Thus, these patches provide a realistic environment for assessing the color transform in the system environment. To check conversion accuracy, we convert measured CIEXYZ values to a RGB encoding standard using the specified transfer matrix, gamma correction (if provided), and encoding range. We then convert the RGB-encoded data back to CIELAB via the inverse transform for the purpose of comparing to the initial
RGB Color Spaces
87
measured CIELAB. Transfer matrices from RGB to XYZ of twenty sets of RGB primaries under D65 are computed by using Eq. (6.6). The encoding matrices from XYZ to RGB are obtained via matrix inversion (see Appendix 1 for obtaining these matrices). Table 6.2 summarizes the results of the computational accuracy via RGB encoding; the second column gives the percentage of the out-of-range colors from a total of 150 colors, the third column gives the average color difference of 150 colors, and the fourth column gives the maximum color difference. SMPTE-C/RGB is the smallest space; it gives 45 out-of-range colors (30%, see Fig. 6.4). The maximum error is 27.42 Eab and the average error is 2.92 Eab (see Fig. 6.5). Using sRGB encoding, we find that 38 color patches require clipping to put the encoded value within the range of [0, 1]. This is an alarming 25.3% of the population of out-of-range colors for such a common test target that could come from any color printer. Most clipped sRGB points give an error greater than 2 Eab with a maximum of 28.26 Eab , and an average of 2.22 Eab . Outof-range colors appear in most color regions except the blue-purple region (see Fig. 6.6). Because of the clipping, these 38 points cannot be reversed back to their original CIELAB values (see Fig. 6.7). This indicates that the sRGB space is too small for printing. The increase in bit depth does not help either; errors of out-ofrange colors remain the same regardless of the bit depth (see Table 6.3). Moreover, Table 6.2 Computational accuracy of RGB encoding standards.
RGB primaries
% out of range color
Average Eab
Maximum Eab
SMPTE-C/RGB ITU-R.BT.709/RGB Sony-P22/RGB EBU/RGB Bruse/RGB Adobe/RGB98 NTSC/RGB SMPTE-240M/RGB Guild/RGB Ink-jet/RGB CIE1931/RGB Laser/RGB Judd-Wyszecki/RGB CIE1964/RGB Wide-Gamut/RGB Wright/RGB Kress/RGB Extended/RGB RIMM-ROMM/RGB ROM/RGB
30.0% 25.3% 23.3% 22.0% 18.0% 10.0% 6.0% 5.3% 0.7% 0 7.3% 5.3% 1.3% 0.7% 0.7% 0 0 0 0 0
2.92 2.22 2.67 2.28 1.43 1.17 0.87 0.74 0.60 0.58 1.08 1.05 0.74 0.64 0.67 0.68 0.64 0.61 0.71 0.43
27.42 28.26 33.59 30.23 19.31 19.83 12.19 9.60 5.91 2.94 18.08 28.26 11.54 3.68 3.53 3.30 3.36 3.00 4.29 0.99
88
Computational Color Technology
Figure 6.4 Color gamut of SMPTE-C/RGB for reproduction of printer colors.
Figure 6.5 Color differences between measured and computed out-of-gamut colors encoded in SMPTE-C/RGB.
RGB Color Spaces
89
Figure 6.6 Color gamut of sRGB for reproduction of printer colors.
Figure 6.7 Color differences between measured and computed out-of-gamut colors encoded in sRGB.
90
Computational Color Technology
the average error improves very slowly with increasing bit depth because error is mostly contributed from those out-of-range colors. By removing the 38 outof-range colors, we obtain a much smaller error as shown in row 4 of Table 6.3. Also, the average and maximum errors decrease much faster with respect to bit depth. There are several extensions of sRGB such as sRGB64 and e-sRGB. sRGB64 is a rather interesting standard; it is the same as sRGB but uses 16 bits per channel, and is actually encoded in 13 bits with a scaling factor of 8192. As shown in Table 6.3, the bit-depth increase does not help much. e-sRGB removes the constraint on the encoding range, allowing sRGB to have negative and overflow values.25 Error distributions of the CIELAB → sRGB transform without clipping are given in Table 6.4. The computation uses integer arithmetic with 8-bit ITULAB inputs. Compared to Table 6.3, average errors are smaller than the corresponding errors encoded by sRGB with clipping. Note that the maximum error of 9.22 Eab Table 6.3 Computational errors of sRGB with respect to bit depth.
Average color difference, Eab
Maximum color difference, Eab
Method∗
8-bit 9-bit 10-bit 12-bit 14-bit 8-bit
1 2 3 4
2.39 2.22 3.73 1.93
2.20 2.12 3.06 1.12
2.12 2.08 2.84 0.85
2.05 2.04 2.74 0.74
2.04 2.04 2.72 0.74
9-bit
10-bit 12-bit 14-bit
28.36 28.34 28.35 28.26 28.33 28.37 28.74 27.95 28.74 7.18 4.17 2.41
28.34 28.35 28.74 1.34
28.35 28.35 28.74 1.63
∗ Method 1: Floating-point computation. Method 2: Floating-point computation and gamma correction. Method 3: Integer computation. Method 4: Integer computation using 112 data points by removing out-of-range colors.
Table 6.4 Error distribution of CIELAB → sRGB transform without clipping.
Range
8-bit
9-bit
10-bit
11-bit
12-bit
13-bit
14-bit
0–1 1–2 2–3 3–4 4–5 5–6 6–7 7–8 8–9 9–10 Average Maximum
27 61 38 8 8 3 1 1 2 1 2.13 9.22
65 72 7 4 2
99 48 3
118 32
116 34
116 34
119 31
1.20 4.17
0.87 2.41
0.74 1.42
0.72 1.34
0.71 1.42
0.71 1.63
RGB Color Spaces
91
at 8-bit depth is about a factor of three smaller than the value obtained by sRGB. Moreover, both average and maximum errors decrease rapidly as the bit depth increases, but the improvement levels off around 11 bits. Two of the specified bit depths, 10 bits and 12 bits, give average errors of 0.87 Eab and 0.72 Eab , respectively. No clipping of out-of-range values means that it allows mathematical extrapolation from the triangle connected by the ITU-R.BT.709/RGB primaries. This practically extends the color space to an unknown size—infinity if no limit is placed on the out-of-range value. Eliminated clipping takes care of output-referred images very well. The information is retained in storage for interchange. However, the clipping still exists when converted to sRGB for display. This makes one wonder: why not use a primary set with a larger color gamut to eliminate the outof-range colors? By so doing, all colors will be encoded by interpolation. Mathematically, the extrapolation is subjected to a higher uncertainty than interpolation; not to mention the difficulty of dealing with negative values in the system environment. Sony-P22/RGB has a slightly larger gamut than ITU-R.BT.709/RGB; it has 35 out-of-range colors (23.3%). The average color difference of 150 patches with respect to the measured values is 2.67 Eab with a maximum of 33.59 Eab . EBU/RGB is slightly larger than Sony-P22/RGB; it has 33 out-of-range colors (22.0%). The average color difference of 150 patches with respect to the measured values is 2.28 Eab with a maximum of 30.23 Eab . Bruse/RGB gives 27 outof-range colors (18%) with a maximum error of 19.31 Eab and an average error of 1.43 Eab . Similar to sRGB, SMPTE-C/RGB and Bruse/RGB spaces produce out-of-range colors that appear in most color regions (see Fig. 6.8). Adobe/RGB98, having an enlarged green region, reduces the number of out-ofrange colors to fifteen (10%) by eliminating the clipping error in the green region. Therefore, the distribution of out-of-range colors is in the yellow, red, and purple regions (see Fig. 6.9). The maximum error is 19.83 Eab and the average error is 1.17 Eab . Using NTSC/RGB encoding, we find that there are nine out-of-range colors (6%). These colors are clustered in the red region with one exception in yellow (see Fig. 6.10). The maximum color difference is 12.19 Eab and the average error is 0.87 Eab . NTSC/RGB primaries, having extended space in the green region, eliminate the clipping problem in the green region. However, the green primary is located too far left on the x-axis of the chromaticity diagram, such that it reduces the space in the red-magenta region. This causes many red colors to become out of range. SMPTE-240M/RGB has a relatively large gamut; therefore, it has only 8 outof-range colors or 5.3% (see Fig. 6.11). The average color difference of 150 patches is 0.74 Eab with a maximum of 9.60 Eab . Primaries of the Ink-jet/RGB are chosen to encompass all 150 experimental data. As expected, there is no out-ofrange color (see Fig. 6.12). In 8-bit depth, the average error is 0.58 Eab and the maximum error is 2.94 Eab . Further improvements in computational accuracy can be realized by increasing the bit depth for encoding the integer RGB. The
92
Computational Color Technology
Figure 6.8 Color gamut of Bruse/RGB for reproduction of printer colors.
average error becomes smaller and the error distribution becomes narrower as the bit depth increases. Practically, there is no visually detectable error at 12 bits or higher. Guild/RGB is almost as big as Ink-jet/RGB. However, Guild’s blue primary is a little toward the right-hand side of the Ink-jet’s blue; thus, the gamut is slightly smaller in the blue region. This causes it to have one out-of-range color (0.7%). The average error is 0.60 Eab and the maximum error is 5.91 Eab . The results of Guild/RGB and Ink-jet/RGB demonstrate that it does not necessarily need a large gamut to minimize the clipping errors; a properly selected RGB set is more helpful in reducing out-of-range colors. For Group 2 RGB sets, laser spectral primaries give a much larger color space, but we still get eight out-of-range colors (5.3%). The average error is 1.05 Eab and maximum error is 28.26 Eab for 8-bit representation. This is because the positions of primaries are not in a proper wavelength to cover the real colors encountered; in particular, the wavelength of the green primary at 514 nm is too low, such that the line connecting the green and red primaries exclude many yellow and green colors (see Fig. 6.13). This primary set demonstrates that a larger gamut size does not guarantee the results to be free of out-of-range color. Results from Guild/RGB, Ink-jet/RGB, and Laser/RGB suggest that the positions of primaries are more important. CIE 1931 spectral primaries give eleven out-of-range colors (7.3%) in the green-blue region. The maximum error is 18.08 Eab and the average error is 1.08
RGB Color Spaces
Figure 6.9 Color gamut of Adobe/RGB98 for reproduction of printer colors.
Figure 6.10 Color gamut of NTSC/RGB for reproduction of printer colors.
93
94
Computational Color Technology
Figure 6.11 Color gamut of SMPTE-240M/RGB for reproduction of printer colors.
Figure 6.12 Color gamut of Ink-jet/RGB for reproduction of printer colors.
RGB Color Spaces
95
Figure 6.13 Color gamut of Laser/RGB for reproduction of printer colors.
Eab . This is because the green primary at λ = 546.1 nm is too high in wavelength (see Fig. 6.14). Concerning the color gamut, the position of the CIE 1931 green primary is too far right, whereas the laser/green primary is too far left; a proper wavelength for the green primary is around 530 nm. Other spectral primaries fare much better because the green primary is in the proper position of around 530 nm. Judd-Wyszecki/RGB, with green at 520 nm, has two out-of-range colors (0.74%). The maximum error is 11.54 Eab and the average error is 0.74 Eab . Adobe Wide-Gamut/RGB, with green at 525 nm, gives only one out-of-range color—the most saturated yellow. The maximum error is 3.53 Eab and the average error is 0.67 Eab . CIE1964/RGB, with green at 526.3 nm, gives the same out-of-range yellow with a maximum error of 3.68 Eab and an average error of 0.64 Eab (see Fig. 6.15). An Extended/RGB space, having properly selected primaries (green at 532 nm) to encompass the commercial Scanner RGB, Monitor RGB, Duoproof RGB, Inkjet CMYK, Printing offset press CMYK, and Hexachrome offset press, gives no out-of-range color (see Fig. 6.16).26 Error distributions for 150 data encoded by Extended/RGB are given in Table 6.5, showing that the error distribution becomes narrower as the bit depth increases. Also, both average and maximum errors become smaller with increasing bit depth. There is no visually detectable error at 12 bits and above. Like Extended/RGB, Kress/RGB and Wright/RGB have no out-of-range color (both green primaries are at 530 nm). The average error is 0.64 Eab and the maximum error
96
Computational Color Technology
Figure 6.14 Color gamut of CIE1931/RGB for reproduction of printer colors.
Figure 6.15 Color gamut of CIE1964/RGB for reproduction of printer colors.
RGB Color Spaces
97
Figure 6.16 The color gamut of Extended/RGB for reproduction of printer colors.
Table 6.5 Error distribution of Extended/RGB.
Range
8-bit
9-bit
10-bit
12-bit
14-bit
0–1 1–2 2–3 3–4 Average Maximum
129 15 5 1 0.61 3.00
149 1
149 1
150
150
0.31 1.08
0.16 1.18
0.04 0.14
0.01 0.08
is 3.36 Eab for Kress/RGB. The maximum error is 3.30 Eab and the average error is 0.68 Eab for Wright/RGB. ROMM/RGB and ROM/RGB are believed to enclose most, if not all, realworld producible colors. To demonstrate the importance of the gamma correction, we perform conversions with and without it to see the difference. Without gamma correction, ROMM/RGB gives an average of 0.71 Eab and a maximum of 4.29 Eab . With gamma correction, it gives an average of 0.43 Eab and a maximum of 0.99 Eab . The gamma correction provides a significant improvement for ROMM/RGB; unlike sRGB, where there are only marginal improvements (see Table 6.3).
98
Computational Color Technology
This study reveals that out-of-range colors give the biggest errors. Out-of-range colors cannot be brought into range by extending the number of bits for encoding. There are two ways of dealing with this problem: the first one is to remove the clipping (this is the approach used in e-sRGB) and the second one is to use a wide-gamut primary set. Using the first method, any out-of-range color is represented by either a negative value or a value greater than the maximum range. Negative values increase the complexity of the digital implementation. For example, one may need extra control logic for dealing with out-of-range values or one may not be able to use simple lookup tables. In addition, most electronic devices cannot render negative values. Therefore, some kind of mapping or clipping must be used. If mapping is used, the color fidelity will be in jeopardy. If a clipping is used, the same computational inaccuracy experienced in sRGB will resurface.7 Kress pointed out that any truncation of negative values would cause loss of image detail in highly saturated colors and color shifts in hue, saturation, and lightness.10 Another solution is to use a wide-gamut space. As we have shown in various RGB standards, the color space is controlled by the locations of primaries. The number, error magnitudes, and locations of out-of-range colors are dependent on the size and shape of the color space. Therefore, we can eliminate out-of-range colors by properly selecting RGB primaries; examples are Ink-jet/RGB and Extended/RGB spaces. Kress has compared the gamut of monitors (ITU709, P22, NTSC, and SMPTE), photographic films (Agfa, Fuji Photo, Kodak, and Konica), and printer-paper outputs (SWOP, wax thermal transfer, dye diffusion, Kodak Q60, and graphic-arts proofing material). He concluded that there was no single encoding scheme that resulted in minimal computation time, absence of image artifacts, device independence, and optimal quantization.10 To accommodate wider applications at the system level, Kress proposed a spectral RGB space using primaries at 620, 530, and 460 nm (note that this primary set is very close to the Extended/RGB set). With this space, colors from photographic input materials and printer outputs could be encompassed. Süsstrunk, Buckley, and Swen derived a similar conclusion that no particular RGB space was ideal for archiving, communicating, compressing, and viewing of color images.27 The correct color space depended on the application. They recommended that if the desired rendering intent is known, the use of a wide-gamut space is the best choice for the situation where more than one type of output is desired (this is the system environment). From our study, we draw the same conclusion that a wide RGB color space gives the best results in the system environment. Problems caused by using a wide RGB space are relatively minor compared to the problems caused by clipping or negative values. For example, the low numerical resolution can be overcome by using a higher bit depth and a proper gamma correction, and the mismatch between RGB encoding standard and real phosphor or CCD chromaticity becomes a device-characterization problem, which is a separate issue.
RGB Color Spaces
99
6.6 Remarks Comparisons of RGB encoding standards revealed that out-of-range colors gave the biggest color errors. We showed that the out-of-range colors induced by improper color encoding could be eliminated. There are numerous problems for color reproduction at the system level; the most difficult one, perhaps, is color gamut mismatch. There are two kinds of color gamut mismatch: one stems from the physical limitation of imaging devices (for example, a monitor gamut does not match a printer gamut); another one is due to the color-encoding standard used, such as sRGB. The difference is that one is imposed by nature and the other one is a man-made constraint to describe and manipulate color data. We may not be able to do much about limitations imposed by nature (although we have tried and are still trying by means of the color gamut mapping). However, we should make every effort to eliminate color errors caused by the color-encoding standard. It is my opinion that at system level applications, we need a wide-gamut space, such as ROMM/RGB, Kress/RGB, or Extended/RGB, for preserving color information. We should not impose a small, device-specific color space for carrying color information. With a wide-gamut space, the problem is boiled down to have proper device characterizations when we move color information between devices. It is in the device color profile that the color mismatch and device characteristics are taken into account. In this way, any color error is confined within the device; it does not spread to other system components. Furthermore, we should make gamma correction an option because not every transform requires it. For example, Scanner/RGB designed to meet the Luther condition does not need it.28 In this case, the empty slot can be used for implementing gray-balance curves, such that an equal value for all three RGB components gives a gray. However, not all scanners are designed in this way. A check of two scanners (HP OfficeJet G95 and Microtek ScanMaker 5) showed that they are nonlinear with respect to luminance; thus, gamma correction is still needed. It can be combined to the gray balancing if the lookup-table approach is used.
References Adobe Photoshop® 5.0, Adobe Systems Inc., San Jose, CA. B. Fraser and D. Blatner, http://www.pixelboyz.com. CIE, Colorimetry, Publication No. 15, Bureau Central de la CIE, Paris (1971). A. Ford and A. Roberts, Colour space conversions, http://www.inforamp. net/~poynton/PDFs/colourreq.pdf. 5. H. R. Kang, Implementation issues of digital color imaging, Color Image Science Conf. 2000, Derby, England, April 10-12, pp. 107–115 (2000). 6. J. Guild, The colorimetric properties of the spectrum, Phil. Trans. Roy. Soc. London A230, p. 149 (1931). 1. 2. 3. 4.
100
Computational Color Technology
7. H. R. Kang, Computational accuracy of RGB encoding standards, NIP 16, pp. 661–664 (2000). 8. IEC/3WD 61966-2.1: Colour measurement and management in multimedia systems and equipment—Part 2.1: Default RGB colour space—sRGB, http://www.srgb.com (1998). 9. D. B. Judd and G. Wyszecki, Color in Business Science and Industry, 3rd Edition, Wiley Interscience, New York, pp. 190–192 (1975). 10. W. C. Kress, First considerations of default RGB database, Proc. TAGA, Sewickley, PA, pp. 67–84 (1993). 11. G. Starkweather, Colorspace interchange using sRGB, http://www.srgb.com (1998). 12. Color Encoding Standard, Xerox Corp. Xerox Systems Institute, Sunnyvale, CA, p. C-3 (1989). 13. Eastman Kodak Company, Reference output medium metric RGB color space (ROMM RGB) white paper, http://www.colour.org/tc8-05. 14. Eastman Kodak Company, Reference input medium metric RGB color space (RIMM RGB) white paper, http://www.pima.net/standards/iso/tc42/wq18. 15. K. E. Spaulding, G. J. Woolfe, and E. J. Giorgianni, Reference input/output medium metric RGB color encodings (RIMM/ROMM RGB), PICS 2000 Conf., Portland, OR, March 26-29 (2000). 16. K. E. Spaulding, B. Pridham, and E. J. Giorgianni, Definition of standard reference output medium RGB color space (ROM RGB) for best practice tone/color processing, Kodak Imaging Science Best Practice Document. 17. SMPTE RP 145-1999, SMPTE C color monitor colorimetry, Society of Motion Picture and Television Engineers, White Plains, NY (1999). 18. N. Katoh and T. Deguchi, Reconsideration of CRT monitor characteristics, 5th Color Imaging Conf., Scottsdale, AZ, pp. 33–40 (1997). 19. W. D. Wright, A trichromatic colorimeter with spectral primaries, Trans. Opt. Soc. London 29, p. 225 (1927). 20. A. Usami, Colorimetric-RGB color space, IS&T’s 45th Annual Conf., East Rutherford, NJ, May 10-15, pp. 157–160 (1992). 21. SMPTE RP 177-1993, Derivation of basic television color equations, Society of Motion Picture and Television Engineers, White Plains, NY (1993). 22. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, Chap. 1, pp. 22–28 (1997). 23. H. R. Kang, Color conversion between sRGB and Internet FAX standards, NIP 16, pp. 665–668 (2000). 24. C. Poynton, Frequently asked questions about gamma, http://www.poynton. com/~poynton/. 25. PIMA 7667: 2001, Photography—Electronic still picture imaging—Extended sRGB color encoding–e-sRGB, http://www.sRGB.com/sRGB64/. 26. The Secrets of Color Management, Digital Color Prepress, Agfa Educational Publ., Randolph, MA, Vol. 5, p. 9 (1997).
RGB Color Spaces
101
27. S. Süsstrunk, R. Buckley, and S. Swen, Standard RGB color spaces, Proc. of 7th Color Imaging Conf., IS&T/SID, Scottsdale, AZ, pp. 127–134 (1999). 28. H. R. Kang, Color scanner calibration, J. Imaging Sci. Techn. 36, 162–170 (1992).
Chapter 7
Device-Dependent Color Spaces Most device-dependent color spaces are creations for the convenience of practical usage, digital representation, and computation. They do not relate to the objective definition or the way humans see color. They are used to encode device-specific digital data at the device-control level. Device-dependent color spaces fall into two main classes—additive and subtractive spaces. Additive spaces include RGB spaces and any spaces derived from Device/RGB space, such as HSV and HLS spaces. Subtractive spaces include CMY, CMYK, and Hi-Fi spaces that have five or more primary colorants. In this chapter, the color gamut of device-dependent color spaces is discussed. The gamut computation of ideal block dyes is given in detail. The process of determining a color gamut boundary of a real imaging device, which includes the test target, device gamut model, interpolation method, and color gamut descriptor, is given. Finally, we discuss color gamut mapping for cross-media rendition because of the gamut mismatch among real imaging devices.
7.1 Red-Green-Blue (RGB) Color Space RGB color space defines colors within a unit cube by the additive color-mixing model. Additive color mixing means that a color stimulus for which the radiant power in any wavelength interval, small or large, in any part of the spectrum is equal to the sum of the powers in the same interval of the constituents of the mixture, constituents that are assumed to be optically incoherent.1 As shown in Fig. 7.1, red, green, and blue are additive primaries represented by the three axes of the cube that defines the color gamut boundary of the RGB space; all colors are located within the cube. Each color in the cube can be represented as a triplet (R, G, B) where values for R, G, and B are assigned in the range from 0 to 1 (or from 0 to the bit depth of the device). In an ideal case, the mixture of two additive primaries produces a subtractive primary; thus, the mixture of the red (1, 0, 0) and green (0, 1, 0) is yellow (1, 1, 0), the mixture of the red (1, 0, 0) and blue (0, 0, 1) is magenta (1, 0, 1), and the mixture of the green (0, 1, 0) and blue (0, 0, 1) is cyan (0, 1, 1). A white (1, 1, 1) is obtained when all three primaries are added together and the black (0, 0, 0) is located at the origin of the cube. Shades of gray are located along the diagonal line that connects the black and white points. The additive color mixing of ideal block dyes behaves like a logical “OR” operation; the output is 1 when any of the primaries is 1. An important characteristic of 103
104
Computational Color Technology
Figure 7.1 Additive RGB color space.
the additive system is that the object itself is a light emitter such as a television. In addition to televisions, electronic color devices that use RGB space are scanners, computer monitors, and digital cameras.
7.2 Hue-Saturation-Value (HSV) Space HSV space has a hexcone shape as shown in Fig. 7.2. Additive and subtractive primaries occupy the vertices of the hexagon that is the 2D projection of the RGB cube along the neutral diagonal line. This hexagon governs the hue change. Hue H is represented as an angle about the vertical axis. Vertices of the hexagon are separated by 60 deg intervals. Red is at 0 deg, yellow is at 60 deg, green is at 120 deg, cyan is at 180 deg, blue is at 240 deg, and magenta is at 300 deg. Complementary colors are 180 deg apart. Saturation S indicates the strength of the color; it increases by moving from the center toward the edge of the hexagon. It varies from 0 to 1, representing the ratio of the purity of a selected color to its maximum purity. At S = 0, we have the gray scale that is represented by the center axis of the hexcone. Value V indicates the darkness of the color. It varies from 0 at the apex of the hexcone to 1 at the top. The apex represents black. At the top, colors have their maximum intensity. When V = 1 and S = 1, we have the “pure” hues. White is located at V = 1 and S = 0. Since HSV space is a modification of the RGB space, a simple transform exists between them.2 V = Max(R, G, B),
(7.1)
Device-Dependent Color Spaces
105
Figure 7.2 HSV color space.
S=0
if V = 0,
(7.2a)
S = [V − Min(R, G, B)]/V
if V > 0,
(7.2b)
H =0
if S = 0,
(7.3a)
H = 60(G − B)/(SV )
if V = R,
(7.3b)
H = 60[2 + (B − R)/(SV )]
if V = G,
(7.3c)
H = 60[4 + (R − G)/(SV )]
if V = B,
(7.3d)
H = H + 360
if H < 0.
(7.3e)
7.3 Hue-Lightness-Saturation (HLS) Space HLS space (shown in Fig. 7.3) is a double cone shape with the highest saturation at 50%. Hue has the same meaning as in the HSV model. H = 0 deg corresponds to blue. Magenta is at 60 deg, red is at 120 deg, yellow is at 180 deg, green is at 270 deg, and cyan is at 300 deg. Again, complementary colors are 180 deg apart. The vertical axis is called lightness L, indicating the darkness of the color. Pure black and pure white are converged to a point. The pure hues lie on the L = 0.5 plane, having a saturation value S = 1.
106
Computational Color Technology
Figure 7.3 HLS color space.
7.4 Lightness-Saturation-Hue (LEF) Space LEF space is derived by applying a linear transformation to the RGB color cube, then a rotation that places the black-white axis in the vertical position. On the planes perpendicular to the black-white axis, saturation and hue are represented in polar coordinates as radius and angle.3,4 LEF lightness (black-white axis) is given by the L coordinate. The LEF saturation-hue plane is given by the E coordinate that is perpendicular to the L axis, containing a hexagonal arrangement of the hue circle, and the F -coordinate is perpendicular to the L and E axes (see Fig. 7.4). The forward transformation from RGB to LEF is given in Eq. (7.4), and the reverse transformation is given in Eq. (7.5). 2/3 L E = 1 F 0
2/3 2/3 R G, −1/2 −1/2 √ √ B 3/2 − 3/2
(7.4)
0√ L 1/ √3 E . F −1/ 3
(7.5)
1/2 2/3 R G = 1/2 −1/3 B 1/2 −1/3
Equation (7.4) indicates that the LEF space is mathematically linear with respect to the RGB space and can therefore be directly used for generating juxtaposed colors
Device-Dependent Color Spaces
107
Figure 7.4 Transformed RGB cube viewed in LEF color space.4
whose sum, weighted by their respective surface coverages, should correspond to a given target color.
7.5 Cyan-Magenta-Yellow (CMY) Color Space CMY color space defines colors within a unit cube by the subtractive color-mixing model. Subtractive mixing means color stimuli for which the radiant powers in the spectra are selectively absorbed by an object such that the remaining spectral radiant power is reflected or transmitted, then received by observers or measuring devices. The object itself is not a light emitter, but a light absorber. Cyan, magenta, and yellow are subtractive primaries. This system is the complement of the additive system as shown in Fig. 7.5. The mixing of two subtractive primaries creates an additive primary. When cyan and magenta colorants are mixed, cyan absorbs the red reflection of the magenta and magenta absorbs the green reflection of the cyan. This leaves blue the only nonabsorbing spectral region. Similarly, the mixture of cyan and yellow gives green, and the mixture of magenta and yellow gives red. The point (1, 1, 1) of the subtractive cube represents black because all components of the incident light are absorbed. The origin of the cube is white (0, 0, 0). In theory, equal amounts of primary colors produce grays, locating along the diagonal line of the cube. Thus, the subtractive mixing of block dyes behaves like a logical “AND” operation; for
108
Computational Color Technology
Figure 7.5 Subtractive cyan-magenta-yellow (CMY) color space.
a given region of the visible spectrum, the output is 1 if all participated primaries are 1 at that spectral region. A good example of subtractive color mixing is color printing on paper. Most printers today add a fourth primary, the black that gives many advantages such as the enlargement of the color gamut and the saving of color ink consumption by replacing the common component with the black ink.
7.6 Ideal Block-Dye Model Device RGB and CMY color spaces are closely related to the ideal block-dye model. The ideal block-dye model is the simplest color-mixing model. Primary colorants of block dyes are assumed to have a perfect reflection (normalized to the value 1) at a portion of the visible spectrum (usually one-third for additive primaries and two-thirds for subtractive primaries) and a total absorption (assigned with the value 0) for the rest of the portions, as shown in Figs. 7.6 and 7.7 for additive and subtractive block-dye models, respectively. Additive and subtractive color mixings are different. Additive color mixing is applied to imaging systems that are light emitters, whereas subtractive mixing is for imaging systems that combine unabsorbed light. 7.6.1 Ideal color conversion The simplest model for converting from RGB to cmy is the block-dye model that a subtractive primary is the total reflectance (white or 1) minus the reflectance of the
Device-Dependent Color Spaces
109
Figure 7.6 Additive color mixing of ideal block dyes.
corresponding additive primary. Mathematically, this is expressed as c = 1 − R,
m = 1 − G,
y = 1 − B,
(7.6a)
where the total reflectance is normalized to 1. If we set a vector Υ cmy = [c, m, y]T , a vector Υ rgb = [R, G, B]T , and a unit vector U 1 = [1, 1, 1]T , we can express Eq. (7.6a) in vector space. Υ cmy = U 1 − Υ rgb .
(7.6b)
The intuitive model of ideal color conversion implies an ideal case of block dyes (see Fig. 7.8).5 This model is simple and has minimal computation cost, but it is grossly inadequate. This is because none of the additive or subtractive primaries come close to the block-dye spectra. Typical spectra of subtractive primaries contain substantial unwanted absorptions in cyan and magenta colorants.6 To minimize this problem and improve the color fidelity, a linear transform is applied to the input RGB.
110
Computational Color Technology
Figure 7.7 Subtractive color mixing of ideal block dyes.
R β11 G = β21 B β31
β12 β22 β32
R β13 β23 G , β33 B
Υ rgb = βΥ rgb ,
(7.7a)
(7.7b)
then the corrected additive primary is removed from the total reflectance to obtain the corresponding subtractive color. c = 1 − R,
m = 1 − G ,
y = 1 − B ,
Υ cmy = U 1 − Υ rgb = U 1 − βΥ rgb .
(7.8a)
(7.8b)
The coefficients βij of the transfer matrix are determined in such a way that the resulting cmy have a closer match to the original or a desired output. Generally, the diagonal elements have values near 1 and off-diagonal elements have small values,
Device-Dependent Color Spaces
111
Figure 7.8 Ideal color conversion of block dyes.
serving as the adjustment to fit the measured results. However, this correction is still not good enough because it is a well-known fact that the RGB-to-cmy conversion is not linear. A better way is to use three nonlinear functions or lookup tables for transforming RGB to R G B .
7.7 Color Gamut Boundary of Block Dyes Block dyes are similar to optimal stimuli in that they are also imaginary colorants, having a uniform spectrum of a unit reflectance within specified wavelength ranges, and zero elsewhere; the difference is that block dyes have a wider wavelength range than corresponding optimal stimuli. Again, no real colorants process this kind of spectra. We generate ideal block dyes by selecting a bandwidth and moving it from one end of the visible spectrum to the other end. We also produce block dyes with a complementary spectrum Sc (λ); that is, unit reflectance subtracts a block-dye spectrum SB (λ) across the whole visible region, Sc (λ) = 1 − SB (λ).
(7.9)
We start at a bandwidth of 10 nm at one end and move it at a 10-nm interval for generating a whole series of block dyes. We then increase the bandwidth by
112
Computational Color Technology
10 nm to generate the next set of block dyes. This procedure is repeated until the bandwidth reaches 220 nm. We compute tristimulus values of these block dyes by using the CIE standard formulation given in Eq. (1.1) and repeat it here as Eq. (7.10). X=k
E(λ)SB (λ)x(λ)λ, ¯
(7.10a)
E(λ)SB (λ)y(λ)λ, ¯
(7.10b)
E(λ)SB (λ)¯z(λ)λ, E(λ)y(λ)λ ¯ , k = 1/
(7.10c)
Y =k Z=k
(7.10d)
where SB (λ) is the spectrum of a block dye and E(λ) is the spectrum of an illuminant. We then compute CIELAB values using Eq. (5.11) and repeat it here as Eq. (7.11) to derive the gamut boundary for block dyes. L∗ = 116f (Y/Yn ) − 16 a ∗ = 500[f (X/Xn ) − f (Y /Yn )] b∗
= 200[f (Y /Yn ) − f (Z/Zn )]
L∗
0 a ∗ = 500 b∗ 0
116 −500 200
0 0 −200
or f (X/Xn ) −16 f (Y /Yn ) 0 f (Z/Zn ) 0 1
(7.11a)
and f (t) = t 1/3 = 7.787t + (16/116)
1 ≥ t > 0.008856,
(7.11b)
0 ≤ t ≤ 0.008856.
(7.11c)
The shape of the 2D gamut boundary of block dyes is pretty similar to the corresponding boundary of spectral stimuli with a much smaller gamut size (see Fig. 7.9), whereas the 3D gamut shows some similarity to the boundary of objectcolor stimuli given by Judd and Wyszecki (see Fig. 7.10).7 7.7.1 Ideal primary colors of block dyes Block dyes can be used to find ideal primary colorants with respect to color strength. The most saturated red has a spectrum with wavelength onset around 600 nm and cutoff around 680 nm. The hue is not sensitive to broadening the spectrum at the long-wavelength side because CMF is very weak at the long-wavelength end. On the short-wavelength side, we can broaden the spectrum as low as 550 nm, but hue is gradually shifted toward orange.
Device-Dependent Color Spaces
113
Figure 7.9 CIE a ∗ -b∗ plots of block dyes and spectral stimuli.
The most saturated green has a spectrum with a wavelength range between 500 and 560 nm. There are various shades of greens; the hue shifts toward cyan if we broaden the short-wavelength end of the spectrum and the hue shifts toward yellow if we broaden the long-wavelength end. The most saturated blue has a spectrum of [400, 470] nm. By shifting a blue spectrum with a fixed bandwidth to higher wavelengths, the hue gradually changes to cyan. We still get blue color when the long wavelength ends around 510 nm. Similar to shifting, the hue gradually changes to cyan by broadening the spectrum at the long-wavelength side. However, broadening at the short-wavelength side is not sensitive to hue shift. This is because CMF is very weak at the blue end. We still get blue color with a bandwidth of [390, 520] nm. The most saturated cyan has a spectrum of [400, 560] nm. By broadening the cyan spectrum at the long-wavelength side, the hue shifts toward green. It is still considered as cyan with a bandwidth of [400, 610] nm. The change at the shortwavelength side is not sensitive to hue shift. However, the lower bound should be no higher than 430 nm; otherwise the hue will be too greenish. In order to produce a wider range of greens, the cyan range should be extended to [390, 580] nm. The most saturated magenta has a spectrum of [400, 460] and [600, 700] nm. By extending the short-wavelength side of the red component, the hue shifts from purple/blue through magenta toward red. By broadening the long-wavelength
114
Computational Color Technology
side of the blue component, the hue remains as magenta color with a diminished chroma. By reducing the blue component, the hue shifts toward red. The most saturated yellow has a spectrum of [540, 620] nm. By broadening the yellow spectrum at the long-wavelength side, the hue becomes warmer (toward red). It is still considered as yellow with [540, 700] nm bandwidth. By broadening the short-wavelength side, the hue becomes cooler (toward green). We still get yellow with a bandwidth of [490, 700] nm. To make a broad range of greens, especially the darker bluish-greens, the yellow spectrum should be extended to lower wavelengths. Thus, the cool yellows are preferred. The recommended spectral ranges for RGB and CMY block dyes are given in Table 7.1 and are used for the subsequent color-mixing computations. These the-
Figure 7.10 Three-dimensional gamut boundary of block dyes in CIELAB space.
Table 7.1 Block-dye sets used in the computation of the gamut size.
RGB set 1
RGB set 2
CMY set 1
CMY set 2
Blue/Cyan Green/Magenta
[400, 470] nm [500, 560] nm
[390, 500] nm [500, 600] nm
Red/Yellow
[600, 680] nm
[600, 720] nm
[400, 560] nm [400, 460] and [600, 700] nm [540, 620] nm
[390, 590] nm [390, 490] and [590, 750] nm [490, 750] nm
Device-Dependent Color Spaces
115
oretical spectral ranges of block dyes may serve as useful guidance for designing and producing real colorants. Interestingly, chromaticity coordinates of RGB block dyes are pretty close to certain standard RGB primaries such as NTSC/RGB or sRGB (see Table 7.2). This seems to imply that behind a simple chromaticity representation of a primary, there is an associated block-dye spectrum. This association is not surprising because many RGB primaries are spectral stimuli, such as CIE primaries. The chromaticity coordinates of a primary can be matched by a block dye if we finely tune the spectrum on a wavelength-by-wavelength basis. 7.7.2 Additive color mixing of block dyes We compute the color mixing of the most saturated RGB block dyes (RGB set 1) to obtain the color gamut. For comparison purposes, we perform the same additive mixing on RGB set 2 and CMY set 2 with broader spectra (see Table 7.1). Equation (7.12) gives the formula of the additive mixing; it is a linear combination of block dyes at a given wavelength. P (λ) = wr Pr (λ) + wg Pg (λ) + wb Pb (λ),
(7.12)
where wr , wg , and wb are the weights or concentrations of red, green, and blue components, respectively, in the mixture, and Pr , Pg , and Pb are the respective reflectances of red, green, and blue dyes. The computation indicates that RGB set 1 indeed has the largest color gamut. Two-color mixtures lie perfectly in the lines of a triangle, indicating that the additive mixing obeys Grassmann’s law regardless of the type of block dyes, whether RGB or CMY (see Fig. 7.11). Converting to CIELAB, the data no longer lie in a straight line (see Fig. 7.12), indicating that the common practice of connecting R, Y, G, C, B, and M primary colors in straight lines is not a correct way to define color gamut size in a projected CIELAB a ∗ -b∗ plot. 7.7.3 Subtractive color mixing of block dyes We also compute the color gamut formed by the most saturated CMY block dyes (CMY set 1) and CMY set 2 in subtractive mixing, where the reflectances of Table 7.2 The similarity between block dyes and standard RGB primaries.
Block RGB set 1 NTSC/RGB Block RGB set 2 sRGB
Red x
y
Green x
y
Blue x
y
0.6787 0.670 0.6791 0.640
0.3211 0.330 0.3207 0.330
0.2105 0.210 0.3323 0.300
0.7138 0.710 0.6224 0.600
0.1524 0.140 0.1393 0.150
0.0237 0.080 0.0521 0.060
116
Computational Color Technology
Figure 7.11 Two-dimensional gamut boundaries of block dyes in chromaticity diagram.
Figure 7.12 Two-dimensional gamut boundaries of block dyes in CIELAB space.
Device-Dependent Color Spaces
117
three components are converted to densities by taking the logarithm base 10 (see Chapter 15 for definition of density), weighted by their corresponding fractions, then sum the three components together. The resulting total density is converted back to reflectance by taking the antilogarithm. The logarithm conversion from reflectance to optical density poses a problem for block dyes because they have zero reflectance at many wavelengths. Mathematically, the logarithm of zero is undefined. Therefore, a density value must be artificially assigned to zero reflectance. We choose to give a maximum density of 4, which is high enough for most, if not all, practical applications. The individual densities of subtractive primaries are weighted and combined to give the density of the mixture at a given wavelength. Finally, the density is converted back to reflectance for computing the tristimulus and CIELAB values via Eq. (7.11). Using a maximum density of 4, we compute the color gamut of the CMY block dye sets 1 and 2 under D65 in CIEXYZ and CIELAB spaces. In CIEXYZ space, CMY set 2 forms a nearly perfect triangle with vertices located in the R, G, and B regions (see Fig. 7.13). All two-color mixtures lie on lines of the triangle. CMY set 1 does not give a triangle; instead, it gives a pentagon, where two-color mixtures fall on lines connecting the R, G, C, B, and M vertices. The resulting color gamut closely resembles the chromaticity diagram of primaries employed in Donaldson’s six-primary colorimeter.8,9 The difference between CMY set 1 and 2 may be attributed to the fact that the complementary spectra of CMY set 1 are overlapped, whereas complementary spectra of CMY set 2 form a continuous white spectrum
Figure 7.13 Two-dimensional gamut boundaries of subtractive block dyes in chromaticity diagram.
118
Computational Color Technology
with no overlapping. These computations indicate that Grassmann’s additivity is followed, if not strictly obeyed, for block dyes, even in subtractive mixing. By transforming to CIELAB, both dye sets give a rather curved boundary with six vertices (see Fig. 7.14). These results reaffirm that the straight-line connection of six primaries will give a misled color gamut in CIELAB space because it is the projection of a 3D color gamut as shown in Fig. 7.15 for CMY set 1. In addition, we also compare the computed block-dye color gamut with two measured real inks. The real inks give a pretty straight hexagon shape (with some slight deviations) in the chromaticity diagram (see Fig. 7.16), indicating that the practice of connecting six primaries in straight lines is a reasonable approximation. They give a slightly curved polygon in CIELAB (see Fig. 7.17), indicating that they do not obey Grassmann’s law, but they can be modeled by other colormixing theories that take the complex phenomena of absorption, reflection, and transmission into account.10 As a summary, spectral and optimal stimuli obey Grassmann’s law of color mixing. Likewise, block dyes, either a RGB or CMY set, obey Grassmann’s law of additive color mixing. Surprisingly, subtractive block dyes in subtractive color mixing follow Grassmann’s law closely, whereas the real inks do not. From this computation, the common practice of connecting six primaries in CIELAB space to give a projected 2D color gamut is not a strictly correct way of defining a color gamut. However, it is a pretty close approximation for real colorants. To have a better definition of the color gamut, more two-color mixtures should be measured and plotted in CIELAB space.
Figure 7.14 Two-dimensional gamut boundaries of subtractive block dyes in CIELAB space.
Device-Dependent Color Spaces
119
Figure 7.15 Three-dimensional gamut boundary of subtractive block dye set 1 in CIELAB space.
Figure 7.16 Two-dimensional gamut boundaries of inks in a chromaticity diagram.
120
Computational Color Technology
Figure 7.17 Two-dimensional gamut boundaries of inks in CIELAB space.
7.8 Color Gamut Boundary of Imaging Devices The device color gamut boundary is important in color reproduction for producing both accurate and pleasing outputs. For accurate color reproduction, we need to establish the relationship between device signals with device-independent color specifications (preferably CIE specifications) for in-gamut rendering. For pleasing color renditions from devices with different color gamut boundaries, the gamut boundary is the essential information required for color gamut mapping. The accurate description of the color gamut is a necessary component for the simulation of printing and proofing, and the optimization of color output for display. An inaccurate color gamut boundary can cause color mismatches that create image artifacts and color errors. Color gamut size of imaging devices is not as well defined as the ideal block dyes or CIE color boundaries. Each device has its own color boundary, depending on many factors such as the physical properties of the medium, the absorption characteristics of the colorants, the viewing conditions, the halftone technique, and the imaging process. Moreover, color gamuts are often represented in two dimensions, such as the chromaticity diagram or CIELAB a∗ -b∗ plot. This obscures the real three-dimensionality of the color gamut, and it is the 3D description of the gamut that is useful. The 2D plot omits the range of lightness, which is an important di-
Device-Dependent Color Spaces
121
mension of the color gamut. Sometimes, this omission causes the misjudgment of out-of-gamut colors as in-gamut when they appear to be inside the projected 2D gamut but actually are not. A chromaticity diagram shows the boundary of the color gamut in a 2D plot. It is a projected color gamut because the luminance (or lightness) axis is not presented. This horseshoe shape is the ideal gamut formed by the purest colors. In the real world, these colors do not exist. Real color devices have much smaller gamuts. Figure 7.18 depicts color gamuts of a typical monitor, printer, and film in a chromaticity diagram.11 A large portion of the monitor and printer gamuts overlap, but there are areas that the monitor can display that the printer cannot render and vise versa. This poses a problem in color reproduction; some kind of gamut mapping is needed. Color gamut mapping addresses one of the most difficult problems in color reproduction. Therefore, it is not surprising that numerous methods for determining the color gamut boundary have been proposed. Generally, the method consists of two parts: a properly designed test target and a device gamut model or interpolation method.
Figure 7.18 Color gamuts of a typical monitor, printer, and film in a chromaticity diagram.11
122
Computational Color Technology
7.8.1 Test target of color gamut The color gamut is defined by colors of the full-strength primary colors and their two-color mixtures. A typical test target (or gamut-boundary descriptor) contains a series of color patches (or coordinates) with known CIE specifications that define a set of points on the boundary surface. It can be as simple as eight colors, having white, red, green, blue, cyan, magenta, yellow, and black in the solid area coverage, or as complex as several thousand colors. Ideally, the points should be spaced with some perceptual uniformity. The larger the number of points, the more accurate the boundary descriptor can be. However, oversampling the boundary may place some points very close together such that the inherent uncertainty in the color rendition and color measurement may cause problems for interpolation and subsequent gamut mapping. There are several standard test targets, such as ISO 12640 (IT8.7/3) and ISO 12641 (IT8.7/1) designed for the device characterization.12,13 They have a limited number of patches at the colorant boundary and limited steps in lightness and hue. In view of these deficiencies, Green has designed a test target specifically for determining the color gamut boundary.14 The test target consists of eighteen columns, having constant proportions of the primary colorants for each column, and 24 rows with approximately constant lightness. In a given column, each patch contains the maximum available chroma at the lightness level of the row. A total of 24 lightness steps were chosen between the smallest printable dot and a tertiary overprint with 100% of the dominant color, 50% of the complementary, and 100% of black. The layout of the CMYK and RGB targets can be found in Green’s paper. 7.8.2 Device gamut model and interpolation method The second component is the device gamut model or interpolation method. For printing devices, the gamut model can be based on physical models of color mixing such as the Neugebauer equations,15 the Yule-Neilsen model, the Beer-LambertBorguer law, or the Kubelka-Munk theory.16,17 These physical models will be discussed in Chapters 15–18 of this book. In addition, several analytical gamut models, such as the dot-gain model18–21 or mathematical formula,22,23 are proposed for general usage of input, display, and output devices. Gustavson developed analytical models for physical and optical dot gains.18–21 The optical dot model includes nearly all paths of light interacting with a substrate as well as the wavelength dependence. And the physical dot model uses the realistic imperfect, noncircular dot. The model is comprehensive but extremely complex. Herzog and Hill developed a mathematical representation for any device color gamut.22 The method is based on the general characteristics of the source and destination gamuts. All color signals of a device are contained in a cube of unit strength for each primary and called the kernel gamut. The kernel gamut surface is mapped onto the destination gamut surface in a manner such that the eight corners, twelve edges, and six planes of the kernel gamut come to lie at the corresponding
Device-Dependent Color Spaces
123
corners, edges, and planes of the destination gamut. The mapping is achieved by using analytical functions to distort the kernel gamut in closed forms. Mahy proposed a printer model by assuming that there exists a continuous function between device space (e.g., CMY or CMYK) and device-independent color space (e.g., CIE spaces or colorimetric RGB space).23 He employed the Beer-Lambert-Bouger law as the printer model for the photographic process and used a quadratic function for cellar Neugebauer equations. He also took ink limitation into consideration. Physical and mathematical models allow the use of fewer color patches in the test target. The problem is that none of these models are perfect in describing the color mixing and color gamut size. Therefore, the use of a device model leads to errors in the prediction of the color-space coordinates, whose magnitude depends on the model used. Often, a model tends to give the largest errors at the gamut boundary and for dark colors. A more accurate prediction comes from experimental measurements of surface colors together with an interpolation technique, provided that the test target has an adequate number of surface colors. A variety of methods for calculating the color gamut boundary have been proposed. Several methods are briefly discussed; detailed information on these methods can be found in the original articles. Kress and Stevens measured a large set of samples spanning the printable range of the device and used a spline interpolation to locate the gamut surface.24 This method could be used to compute gamuts of images and media. Braun and Fairchild used a triangulation and interpolation process to convert nonuniform color data from a device RGB cube into a CIELAB L∗ C∗ab h∗ab representation of the color gamut.25 They took advantage of the fact that gamut mapping and visualization are better or more efficiently performed in cylindrical coordinates such as CIELAB L∗ C∗ab h∗ab . Triangulation of the data was performed by projecting the nonlinearly spaced L∗ C∗ab h∗ab data from the device RGB onto the L∗ h∗ab plane, grouping them into triangles using the inherent connectivity associated with the points from the RGB cube. The vertices of this mesh were measured or modeled from the surface of the RGB cube. A uniform L∗ h∗ab grid of C∗ab values was interpolated using triangular linear interpolation from the data provided by the triangle list. This method provided a computational process for gamut-surface fitting from measured data that is independent of the gamut concavity or convexity. This also provided a goodness-of-fit measure to test the fitting of the gamut surface. For some CRT gamuts tested, the goodness expressed as an average Eab value was about one. Computational methods were also developed to find the line gamut boundary (LGB), that is, the interactions between a gamut plane and a line along which mapping is to be carried out.25–28 Morovic and Luo28 summarized principal features of computing the LGB in a plane of constant hue and compared color gamuts of different media as follows:28–31 (1) Determine the 2D L∗ -C ∗ gamut boundary at the hue angle of interest h∗ using the equation at this angle.
124
Computational Color Technology
(2) Find the pair of nearest neighboring points that encompass the hue angle in the gamut-boundary descriptor (GBD). (3) For each pair, calculate the intersection of the L∗ -C ∗ plane and the line connecting the two GBD points. (4) Calculate the points on the L∗ axis where the surface defined by the GDB matrix intersects it. This procedure results in a set of boundary points that form a polygon for a given hue angle. The intersection of a given line and the polygon is determined as follows: (1) For each pair of neighboring points in the polygon, calculate the formula of the boundary line between them. (2) For each of these lines, calculate their intersection point with the given line. If it lies between the two points from the polygon, then it is an LGB point.
7.9 Color Gamut Mapping With the gamut differences among a wide range of images that are being acquired, displayed, and printed on various imaging devices, color gamut mapping is becoming ever more important. The need for understanding the scope of the color gamut mapping and for coming up with an acceptable universal gamut mapping has been recognized by CIE, which formed the CIE Technical Committee 8-03 on color gamut mapping led by Morovic and charged it with investigating this issue. In 1999, the committee published the comprehensive report “Survey of Gamut Mapping Algorithms,” reviewing 57 papers that appeared between 1977 and the first quarter of 1999.32 Morovic also wrote a chapter named “Gamut Mapping” in the book “Digital Color Imaging Handbook,” edited by Sharma.33 The chapter contains various aspects of color gamut mapping such as color gamut definition, gamut description and visualization, gamut boundary computation, and gamut-mapping algorithms. It gives an overview of the recent developments and future directions, and is an excellent reference for research and development. Based on CIE definitions, color gamut mapping is a method for assigning colors from the reproduction medium to colors from the original medium or image, where the reproduction medium is defined as a medium for displaying, capturing, or printing color information (e.g., CRT monitor, digital camera, scanner, printer with associated substrate). The aim of color gamut mapping is to ensure a good correspondence of overall color appearance between the original and the reproduction by compensating for the mismatch in size, shape, and location between the original and reproduction gamuts.33,34 The difficulties are (i) there is no estab-
Device-Dependent Color Spaces
125
lished model for quantifying the appearance of complex images and (ii) there is no established measure for quantifying the difference between original and reproduction. Nonetheless, some empirical criteria are established for assessing image quality and are given in Section 7.9.3. 7.9.1 Color-mapping algorithm In general, the color-mapping algorithms consist of two components—a directional strategy and a mapping algorithm. The directional strategy decides which color space to perform the color mapping, determines the reference white, computes the gamut surface, and decides what color channel to hold constant and what channel to compress first, or to do them simultaneously.35 A gamut-mapping algorithm provides the means for transforming input out-ofgamut colors to the surface or inside of the output color gamut. There are two ways of mapping—clipping and compression. Gamut-clipping algorithms only change the out-of-gamut colors and leave in-gamut colors untouched. Clipping is characterized by the mapping of all out-of-gamut colors to the surface of the output gamut, and no change is made to input colors that are inside the output gamut. This will map multiple colors into the same point (many-to-one mapping) that may lose fine details and may cause shading artifacts in some images. This phenomenon is known as “blocking.” However, clipping tends to maintain the maximum image saturation. Gamut-compression algorithms are applied to all colors from the input image to distribute color differences caused by gamut mismatch across the entire input gamut range. Several compression methods are in use: linear, piecewise linear, nonlinear, and high-order polynomial compression.32,35 Sometimes, a combination of different compression methods is used. Linear compression can be expressed as L∗o = t + sL∗i ,
(7.13a)
where t = MIN(L∗o ),
(7.13b)
s = MAX(L∗o ) − MIN(L∗o ) / MAX(L∗i ) − MIN(L∗i ) ,
(7.13c)
and MIN is the minimum operator and MAX is the maximum operator, and L∗i and L∗o are the lightness for the input and output, respectively. A similar expression can be obtained for chroma at a constant hue angle. Other linear compressions in the CIELUV and CIEXYZ spaces have been suggested.36,37 Piecewise linear compression is a variation of linear compression in which the whole range is divided into several regions. Each region is linearly compressed
126
Computational Color Technology
with its own compression ratio (or slope). Unlike simple linear compression that applies a global, uniform ratio to all colors, piecewise linear compression provides different ratios depending on the attributes of input colors to which they are applied. Nonlinear compression, in principle, can have any functions such as the cubic, spline, or a high-order polynomial. In practice, however, the middle tone is usually retained, while the shadow and highlight regions are nonlinearly mapped. Good results are obtained by using a knee function as proposed by Wallace and Stone.38 It is a soft clipping, accomplished by using a tangent to a linear function near the gray axis, where it then approaches a horizontal line near the maximum output saturation. This is designed to minimize the loss of detail that occurs with clipping, while retaining the advantage of reproducing most of the common gamut colors accurately. Nonlinear mappings maintain the shading, but can cause an objectionable decrease in saturation.
7.9.2 Directional strategy Color gamut mapping is most effectively performed in color spaces where the luminance and chrominance are independent of each other, such as CIELAB and CIELUV. Popular directional strategies for CIELAB or CIELUV are as follows: Lines of constant perceptual attribute predictors As an example, we present the sequential L∗ and C∗ mapping at constant h∗ .35 A point p of the input color (see Fig. 7.19) located outside of the output color gamut (solid lines) is to be compressed into the output gamut. L∗ is first mapped to the compressed L∗ (dotted lines). If clipping is used, the point will lie on the dashed line. If a linear compression is used, the mapped point pl will be inside the dotted line. Some researchers have stated that linear lightness mapping is the best technique.37,39,40 Jorgensen, however, had a different opinion. He suggested achieving this by selecting an area of interest within the image, reproducing the range of lightness within that area with an equal range of lightness on the print, and compressing elsewhere.41 Wallace and Stone also noted the necessity of different lightness mappings for each image.38 After the lightness mapping from point p to p1 , the mapped color p1 is then moved horizontally in the L∗ -C ∗ diagram to the final destination for the chroma compression. It is desirable to maintain hue constancy although it has been noted that CIELAB and CIELUV do not exhibit perfect hue constancy.38,42 If clipping is used, the mapped color pm will be located at the boundary of the output color gamut. If a linear or nonlinear compression is used, the compressed color pn will be located somewhere inside the output color gamut (see Fig. 7.19). The location depends on the slope and intercept for linear mapping and the equation or lookup table used in the nonlinear mapping. Viggiano and Wang performed an experiment in CIELAB where lightness and chroma could be varied independently, and
Device-Dependent Color Spaces
127
Figure 7.19 Sequential L∗ and C ∗ mapping at constant h∗ .
found that the linear compression in chroma with lightness compression was not preferred.37 Lines toward a single center of gravity A simultaneous L∗ and C ∗ mapping to a fixed anchor point L∗ = 50 at constant h∗ is given as an example. Figure 7.20 gives the mapping to the anchor point L∗ = 50 and C ∗ = 0.35 If clipping is used, the out-of-gamut color will be located at the interception of the output boundary and the line that connects the out-of-gamut color and the anchor point. If linear compression is used, one draws the line connecting the anchor point and the point of interest, then makes the line intersect both input and output boundaries. Thus, the distances from output and input boundaries to the anchor point are obtained. One can then calculate the ratio of the distances. The L∗ and C ∗ of the out-of-gamut color are weighted by this ratio. For nonlinear compression, the location is dependent on the function employed. Meyer and Barth found that this technique has a tendency to lighten shadows.43 Lines toward variable centers of gravity A good example of a variable center of gravity is the lightness compression from center toward the lightness of the cusp on the lightness axis, where the cusp varies with the hue angle; thus, the center of gravity has to change accordingly.
128
Computational Color Technology
Figure 7.20 Simultaneous L∗ and C ∗ mapping to an anchor point at constant h∗ .
Lines toward the nearest color in the reproduction gamut Simultaneous L∗ , C ∗ , and h∗ mapping to minimize the color difference between two gamuts.39,44 Liang has developed an optimum algorithm—modified vector shading—to minimize the matching error and to perform neighborhood gamut compression.45 Image-dependent gamut mapping The gamut of a given image is compressed to a device rather than mapping all images from one device onto another device. This approach is less general but has the flexibility to tune the color reproduction for this particular image; therefore, it produces better results. All of the directional strategies mentioned above can be used for image-dependent gamut mapping. However, they require maintaining some form of image-gamut data such as the maximum and minimum values of chrominance values during the processing.36 Stone, Cowan, and Beatty developed an interactive gamut-mapping technique by using computer and human judgment.46
Device-Dependent Color Spaces
129
7.9.3 Criteria of gamut mapping A set of criteria for assessing the image-quality aspect of color gamut mapping is proposed as follows, based on traditional color reproduction and psychophysical principles:46,47 (1) The neutral axis of the image should be preserved. (2) Maximum luminance contrast is desirable. (3) Few colors should lie outside the destination gamut to reduce the number of out-of-gamut colors by excluding some extremes. (4) Hue and saturation shifts should be minimized. (5) It is better to increase than to decrease the color saturation by preserving chroma differences presented in the original. (6) It is more important to coordinate the relationship between colors present than their precise value.
7.10 CIE Guidelines for Color Gamut Mapping The report from the CIE TC 8-03 committee, “Survey of Gamut Mapping Algorithms,” reviewed a wide variety of gamut-mapping strategies together with some evaluations of color gamut mapping techniques.32 Four salient trends in color gamut mapping were identified as follows: (1) Image-dependent compression techniques are preferred to image-independent methods. For large amounts of compression, the preferred technique is image dependent.35 (2) Clipping algorithms are preferred to compression methods, given the same constant color attributes—specifically, the clipping of chroma to the border of the realizable output gamut at constant lightness and hue.38 For small amounts of compression, Hoshino and Berns find the preferred technique is a soft clipping algorithm that maps the upper 95% without adjustment and compresses the rest linearly. This mapping algorithm is most similar to clipping. (3) A vast majority of algorithms start with uniform overall lightness compression and hue preservation, suggesting that lightness and hue are more important than saturation. (4) The use of different mapping methods for different parts of the color space. For example, Spaulding and colleagues describe a method for specifying different color-mapping strategies in various regions of the color space, while providing a mechanism for smooth transitions between the different regions.48 Because of the importance, difficulty, and complexity of gamut mapping, CIE Technical Committee 8-03 has published a technical report, “Guidelines for the
130
Computational Color Technology
Evaluation of Gamut-Mapping Algorithms,” to provide guidance for the evaluation of the performance of gamut-mapping algorithms that will lead to the development and recommendation of an optimal solution for cross-device and cross-media image reproduction.49 The CIE committee provides guidance and supporting material for the following: (1) (2) (3) (4) (5) (6) (7) (8)
The test images to be used The media on which they are to be reproduced The viewing conditions to be employed The measurement procedures to be followed The gamut-mapping algorithms to be applied The way gamut boundaries are to be calculated The color spaces in which the mapping is to be done, and The experimental method for carrying out the evaluation.
The guidelines also contain example work flows that show how they are to be applied under different circumstances and psychophysical evaluation processes.
References 1. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Edition, Wiley, New York, p. 118 (1982). 2. Color Encoding Standard, XNSS 288811, Xerox Corp., Xerox Systems Institute, Sunnyvale, CA (1989). 3. N. Rudaz, R. D. Hersch, and V. Ostromoukhov, Specifying color differences in a linear color space (LEF), Proc. IS&T/SID 97 Color Imaging Conf., Scottsdale, AZ, Nov. 17–20, pp. 197–202 (1997). 4. N. Rudaz and R. D. Hersch, Protecting identity documents by microstructure color difference, J. Electron. Imaging 13 (2), pp. 315–323 (2004). 5. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, p. 30 (1997). 6. H. R. Kang, Water-based ink-jet ink. I. Formulation, J. Imag. Sci. 35, pp. 179– 188 (1991). 7. D. B. Judd and G. Wyszecki, Color in Business, Science and Industry, 3rd Edition, Wiley, New York, p. 332 (1975). 8. R. Donaldson, Spectrophotometry of fluorescent pigments, Brit. J. Appl. Phys. 5, pp. 210–224 (1954). 9. D. B. Judd and G. Wyszecki, Color in Business, Science and Industry, 3rd Edition, Wiley, New York, pp. 195–197 (1975). 10. H. R. Kang, Kubelka-Munk modeling of ink jet ink mixing, J. Imaging Sci. Techn. 17, pp. 76–83 (1991).
Device-Dependent Color Spaces
131
11. AGFA, The Secrets of Color Management, AGFA Educational Publ., Randolph, MA, p. 9 (1997). 12. ISO 12640: 1997 graphic technology—Prepress digital data exchange— CMYK standard colour image data (SCID). 13. ISO 12641: 1997 graphic technology—Prepress digital data exchange—colour targets for input scanner calibration (SCID). 14. P. J. Green, A test target for defining media gamut boundaries, Proc. SPIE 4300, pp. 105–113 (2000). 15. M. Mahy, Calculation of color gamuts based on the Neugebauer model, Color Res. Appl. 22, pp. 365–374 (1997). 16. P. Engeldrum and L. Carreira, The determination of the color gamut of dye coated paper layers using Kubelka-Munk theory, Soc. Photo. Sci. and Eng. Annual Conf., pp. 3–5 (1984). 17. P. Engeldrum, Computing color gamuts of ink-jet printing systems, SID 85 Digest, pp. 385–388 (1985). 18. S. Gustavson, The color gamut of halftone reproduction, Proc. IS&T/SID Color Imaging Conf., Scottsdale, AZ, Vol. 4, pp. 80–85 (1996). 19. S. Gustavson, Dot gain in color halftones, Linköping Studies in Science and Technology, Dissertation No. 492, Image Processing Laboratory, Dept. of Electrical Engineering, Linköping University, Sweden (1997). 20. S. Gustavson, Color gamut of halftone reproduction, J. Imaging Sci. Techn. 41, pp. 283–290 (1997). 21. H. R. Kang, Color mixing models, Digital Color Halftoning, SPIE Press, Bellingham, WA, Chap. 6, pp. 83–111 (1999). 22. P. G. Herzog and B. Hill, A new approach to the representation of color gamuts, Proc. IS&T/SID Color Imaging Conf., Scottsdale, AZ, Vol. 3, pp. 78– 81 (1995). 23. M. Mahy, Gamut calculation of color reproduction devices, Proc. IS&T/SID Color Imaging Conf., Scottsdale, AZ, Vol. 4, pp. 145–150 (1996). 24. W. Kress and M. Stevens, Derivation of 3-dimensional gamut descriptors for graphic arts output devices, TAGA Proc., Sewickley, PA, pp. 199–214 (1994). 25. G. Braun and M. D. Fairchild, Techniques for gamut surface definition and visualization, Proc. IS&T/SID Color Imaging Conf., Scottsdale, AZ, Vol. 5, pp. 147–152 (1997). 26. P. G. Herzog, Analytical color gamut representations, J. Imaging Sci. Techn. 40, pp. 516–521 (1996). 27. P. G. Herzog, Further development of the analytical color gamut representations, Proc. SPIE 3300, pp. 118–128 (1998). 28. J. Morovic and M. R. Luo, Developing algorithms for universal colour gamut mapping, Colour Engineering: Vision and Technology, L. W. MacDonald (Ed.), Wiley, New York, pp. 253–283 (1999). 29. J. Morovic and M. R. Luo, Calculating medium and image gamut boundaries for gamut mapping, Color Res. Appl. 25, pp. 394–401 (2000).
132
Computational Color Technology
30. J. Morovic and P.-L. Sun, How different are colour gamuts in cross-media color reproduction? Proc. Conf. Colour Image Science, John Wiley & Sons, Ltd., Chichester, West Sussex, England, pp. 169–182 (2000). 31. J. Morovic and P.-L. Sun, The influence of image gamuts on cross-media color image reproduction, Proc. IS&T/SID Color Imaging Conf., Scottsdale, Vol. 8, pp. 324–329 (2000). 32. J. Morovic and M. R. Luo, The fundamentals of gamut mapping: A survey, J. Imaging Sci. Techn. 45, pp. 283–290 (2001). 33. J. Morovic, Gamut mapping, Digital Color Imaging Handbook, G. Sharma (Ed.), CRC Press, Boca Raton, pp. 639–685 (2003). 34. J. Morovic, To Develop a Universal Gamut Mapping Algorithm, Ph.D. thesis, University of Derby (1998). 35. T. Hoshino and R. S. Berns, Color gamut mapping techniques for color hard copy images, Proc. SPIE 1909, pp. 152–165 (1993). 36. J. Gordon, R. Holub, and R. Poe, On the rendition of unprintable colors, Proc. 39th Annual TAGA Conf. San Diego, TAGA, Sewickley, PA, pp. 186–195 (1987). 37. J. A. S. Viggiano and C. J. Wang, A comparison of algorithms for mapping color between media of different luminance ranges, TAGA Proc. 1992, TAGA, Sewickley, PA, Vol. 2, pp. 959–974 (1992). 38. W. E. Wallace and M. C. Stone, Gamut mapping computer generated imagery, Image Handling and Reproduction Systems Integration, Proc. SPIE 1460, pp. 20–28 (1991). 39. E. G. Pariser, An investigation of color gamut reduction techniques, IS&T’s 2nd Symp. on Electronic Prepress Technology and Color Proofing, pp. 105– 107 (1991). 40. A. Johnson, Techniques for reproducing images in different media: Advantages and disadvantages of current methods, TAGA Proc., Sewickley, PA, pp. 739–755 (1992). 41. G. W. Jorgensen, Improved black and white halftones, GATF Research Project Report No. 105 (1976). 42. P. Hung, Non-linearity of hue loci in CIE color spaces, Konica Tech. Report 5, pp. 78–83 (1992). 43. J. Meyer and B. Barth, Color gamut matching for hard copy, SID 89 Digest, pp. 86–89 (1989). 44. R. S. Gentile, E. Walowit, and J. P. Allebaach, A comparison of techniques for color gamut mismatch compensation, J. Imaging Tech. 16, pp. 176–181 (1990). 45. Z. Liang, Generic image matching system (GIMS), Color hard copy and graphic arts, Proc. SPIE 1670, pp. 255–265 (1992). 46. M. C. Stone, W. B. Cowan, and J. C. Beatty, Color gamut mapping and the printing of digital color images, ACM Trans. Graphics 7, pp. 249–292 (1988). 47. L. W. MacDonald, Gamut mapping in perceptual color space, Proc. 1st IS&T/SID Color Imaging Conf., Scottsdale, AZ, Vol. 1, pp. 193–196 (1993).
Device-Dependent Color Spaces
133
48. K. E. Spaulding, R. N. Ellson, and J. R. Sullivan, Ultracolor: A new gamut mapping strategy, Device-independent color imaging II, Proc. SPIE 2414, pp. 61–68 (1995). 49. CIE, Guidelines for the evaluation of gamut mapping algorithms, Technical Report 15x (2003).
Chapter 8
Regression Converting a color specification from one space to another requires finding the links of the mapping. A frequently used link is the polynomial method. Polynomial regression is based on the assumption that the correlation between color spaces can be approximated by a set of simultaneous equations. This chapter describes the mathematical formulation of the regression method using matrix notation. Examples of the forward and backward color transforms using the regression method are given, and the extension to spectral data is discussed. Finally, the method is tested and conversion accuracies are reported.
8.1 Regression Method The schematic diagram of the regression method is depicted in Fig. 8.1. Sample points in the source color space are selected and their color specifications in the destination space are measured. An equation is chosen for linking the source and destination color specifications; examples of polynomials with three independent variables (x, y, z) are given in Table 8.1. A regression is performed on selected points with known color specifications in both source and destination spaces for deriving the coefficients of the polynomial. The only requirement is that the number of points should be higher than the number of polynomial terms; otherwise, there are no unique solutions to the simultaneous equations because there are more unknown variables than equations. Once the coefficients are derived, one can plug the source specifications into the simultaneous equations to compute the destination specifications. The so-called polynomial regression is, in fact, an application of the multiple linear regression of m variables, where m is a number greater than the number of independent variables.1 The general approach of the linear regression with m variables is given as follows: pi (q) = c1 q1i + c2 q2i + · · · + cm qmi .
(8.1a)
Polynomials can be expressed in the vector form. pi = Qi T C = C T Qi . 135
(8.1b)
136
Computational Color Technology
Figure 8.1 Schematic diagram of the regression method.
Table 8.1 The polynomials for color space conversion.
p(x, y, z) = c1 x + c2 y + c3 z p(x, y, z) = c0 + c1 x + c2 y + c3 z p(x, y, z) = c1 x + c2 y + c3 z + c4 xy + c5 yz + c6 zx p(x, y, z) = c0 + c1 x + c2 y + c3 z + c4 xy + c5 yz + c6 zx + c10 xyz p(x, y, z) = c1 x + c2 y + c3 z + c4 xy + c5 yz + c6 zx + c7 x 2 + c8 y 2 + c9 z2 p(x, y, z) = c0 + c1 x + c2 y + c3 z + c4 xy + c5 yz + c6 zx + c7 x 2 + c8 y 2 + c9 z2 + c10 xyz 7. p(x, y, z) = c0 + c1 x + c2 y + c3 z + c4 xy + c5 yz + c6 zx + c7 x 2 + c8 y 2 + c9 z2 + c10 xyz + c11 x 3 + c12 y 3 + c13 z3 8. p(x, y, z) = c0 + c1 x + c2 y + c3 z + c4 xy + c5 yz + c6 zx + c7 x 2 + c8 y 2 + c9 z2 + c10 xyz + c11 x 3 + c12 y 3 + c13 z3 + c14 xy 2 + c15 x 2 y + c16 yz2 + c17 y 2 z + c18 zx 2 + c19 z2 x 1. 2. 3. 4. 5. 6.
Vector Qi has m elements indicating the number of terms in the polynomial; each element represents an independent variable or a multiplication of independent variables. Vector C is the corresponding coefficient vector. An example of applying the polynomial regression to three independent variables, R, G, and B, with nine polynomial terms can have the form of q1 = R, q2 = G, q3 = B, q4 = RG, q5 = GB, q6 = BR, q7 = R 2 , q8 = G2 , and q9 = B 2 . These q values are derived from inputs of the three independent variables, where output response pi is given by the corresponding color value in the destination space.
Regression
137
An explicit expression of Eq. (8.1) is given as follows: p1 = c1 q11 + c2 q21 + c3 q31 · · · + cj qj 1 · · · + cm qm1 p2 = c1 q12 + c2 q22 + c3 q32 · · · + cj qj 2 · · · + cm qm2 p3 = c1 q13 + c2 q23 + c3 q33 · · · + cj qj 3 · · · + cm qm3 ···
···
···
···
···
···
···
···
···
···
···
···
pk = c1 q1k + c2 q2k + c3 q3k · · · + cj qj k · · · + cm qmk .
(8.2a)
The scalar k is the number of responses (k > m). Equation (8.2a) can be put into vector-matrix notation. q11 q21 q31 · · · qm1 p1 q22 q32 · · · qm2 c1 q p2 12 q13 q23 q33 · · · qm3 c2 p3 (8.2b) = · · · · · · · · · · · · · · · c3 ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· c m pk q1k q2k q3k · · · qmk or P = QT C.
(8.2c)
Vector P has k elements, matrix Q has a size of m × k, and C is a vector of m elements. If the number of responses in vector P is less than the number of unknowns in vector C, k < m, Eq. (8.2) is underconstrained and there is no unique solution. The number of elements in P must be greater than or equal to the unknowns in order to have a unique solution. If the number of responses is greater than the number of unknowns, this type of estimation is overconstrained. Because any measurement always contains errors or noises, the unique solutions to the overconstrained estimation may not exist. If the measurement noise of the response is Gaussian and the error is the sum of the squared differences between the measured and estimated responses, there are closed-form solutions to the linear estimation problem.2 This is the least-squares fit, where we want to minimize the sum of the squares of the difference between the estimated and measured values as given in Eq. (8.2). (8.3) p = [pi − (c1 q1i + c2 q2i + · · · + cm qmi )]2 . The summation carries from i = 1, 2, . . . , k. Equation (8.3) can also be given in the matrix form p = P − QT C T P − QT C . (8.4)
138
Computational Color Technology
The least-squares fit means that the partial derivatives with respect to cj (j = 1, 2, . . . , m) are set to zero, resulting in a new set of equations.3 QQT C = QP.
(8.5)
If the number of samples k is greater than (or equal to) the number of coefficients m, the product of (QT Q) is nonsingular and can be inverted, such that the coefficients are obtained by −1 C = QQT (QP).
(8.6)
With k sets of inputs, Q is a matrix of size m × k, where m is the number of terms in the polynomial. QT is the transpose of the matrix Q that is obtained by interchanging the rows and columns of the matrix Q; therefore, it is a matrix of size k ×m. The product of QQT is an m×m symmetric matrix. A six-term equation given in Table 8.1 with eight data sets is used to illustrate this technique. p(x, y, z) = c1 x + c2 y + c3 z + c4 xy + c5 yz + c6 zx,
x1 y1 z Q= 1 x1 y1 y z 1 1 z1 x1
x2 y2 z2 x2 y2 y2 z2 z2 x2
x3 y3 z3 x3 y3 y3 z3 z3 x3
x4 y4 z4 x4 y4 y4 z4 z4 x4
x5 y5 z5 x5 y5 y5 z5 z5 x5
x6 y6 z6 x6 y6 y6 z6 z6 x6
x7 y7 z7 x7 y7 y7 z7 z7 x7
(8.7)
x8 y8 z8 , x8 y8 y8 z8 z8 x8
(8.8)
where the triplet (xi , yi , zi ) represents the input values of the ith point. The product [QQT ] is a 6 × 6 symmetric matrix. QQT 2 x
i xy i i xi zi = x 2 yi i xyz
i 2i i xi zi
xy
i 2i y
i yi zi
x y2
i2 i y z
i i xi yi zi
xz
i i yz
i2i z
i xyz
i i2i yz
i i2 xi zi
2 x y
i 2i xy
i i xi yi zi
2 2 x y
i 2i xy z
i2 i i xi yi zi
xyz
i 2i i y z
i 2i yz
i 2i xy z
i 2i 2 i y z
i i2 xi yi zi
2 x z
i i xyz
i i2i xz
2i i . xi yi zi
x y z2
i 2 i 2i xi zi (8.9)
Regression
139
The summations in Eq. (8.9) carry from i = 1 to 8. The product of Q with vector P is p1 p2 x2 x3 x4 x5 x6 x7 x8 x1 y2 y3 y4 y5 y6 y7 y8 p3 y1 z2 z3 z4 z5 z6 z7 z8 p4 z QP = 1 x1 y1 x2 y2 x3 y3 x4 y4 x5 y5 x6 y6 x7 y7 x8 y8 p5 y z y z y z y z y z y z y z y z p 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 6 z x z x z x z x z x z x z x z x p 1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
7
p8
xi pi yi pi zp = i i . xi yi pi yzp
i i i xi zi pi
(8.10)
The most computationally intensive part is to invert the [QQT ] matrix; the cost increases as the matrix size increases. A matrix is invertible if and only if the determinant of the matrix is not zero. detQQT = 0.
(8.11)
There are several ways to invert a matrix; we choose the Gaussian elimination for its lower computational cost. Gaussian elimination is the combination of the triangularization and back substitution. The triangularization will make all matrix elements in the lower left of the diagonal line zero. Consequently, the last row in the matrix contains only one element, which is the solution for the last coefficient. This solution is substituted back into the front rows to calculate other coefficients (for details of the Gaussian elimination, see Appendix 5). After obtaining [QQT ]−1 and [QP], we can calculate the coefficient C via Eq. (8.6).
8.2 Forward Color Transformation Equation (8.6) is derived for a single component and gives the polynomial coefficients for one component of the color specifications, such as the X of the tristimulus values from an input RGB. One needs to repeat the procedure twice to get coefficients for Y and Z. Or one can generalize Eq. (8.6) by including all three components for trichromatic systems or n (n > 3) components for multispectral devices, such that P becomes a matrix of k × 3 (or k × n for a multispectral device) and C becomes a matrix of m × 3 (or m × n). Considering the example of an RGB-to-CIEXYZ transformation using a six-term polynomial with eight data sets,
140
Computational Color Technology
we have a P matrix with 8 × 3 elements, as given in Eq. (8.12), containing the data of the tristimulus values. X1 Y1 Z1 X2 Y2 Z2 X3 Y3 Z3 X Y4 Z4 P = 4 (8.12) . X5 Y5 Z5 X6 Y6 Z6 X Y Z 7 7 7 X8 Y8 Z8 For the forward color transformation from RGB to XYZ, the regression is applied to the RGB data (independent variables or inputs) and tristimulus values P (dependent variable or output response) to compute the coefficients of the polynomial. The matrix Q, containing the data of the input RGB, is given in Eq. (8.13). The first three rows are the input data and the next three rows are the multiplications of two variables. R2 R3 R4 R5 R6 R7 R8 R1 G2 G3 G4 G5 G6 G7 G8 G1 B2 B3 B4 B5 B6 B7 B8 B1 Q= . R1 G 1 R2 G 2 R3 G 3 R4 G 4 R5 G 5 R6 G 6 R7 G 7 R8 G 8 G B G B G B G B G B G B G B G B 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 B1 R1 B2 R2 B3 R3 B4 R4 B5 R5 B6 R6 B7 R7 B8 R8 (8.13) Matrix [QQT ] of Eq. (8.9) and the vector [QP] of Eq. (8.10) are given in Eqs. (8.14) and (8.15), respectively. QQT R2
i Ri Gi RB = 2i i Ri Gi RGB
i
i
Ri2 Bi
i
RG
i 2i G
i GB
i 2i Ri Gi
2 G B
i i Ri Gi Bi
RB
i i Gi Bi
2 Bi
Ri Gi Bi
G B2
i i2 Ri Bi
2 R G
i 2i RG
i i RGB
i 2 i 2i R G
i 2i Ri Gi Bi
2 Ri Gi Bi
RGB
i 2i i G B
i 2i GB
i 2i Ri Gi Bi
2 2 G B
i i2 Ri Gi Bi
2 R B
i i RGB
i i2i RB
2i i , R GB
i i 2i RGB
i 2 i 2i Ri Bi
(8.14)
Ri X i G i Xi BX QP = i i Ri Gi Xi GBX
i i i Ri Bi Xi
Ri Yi
Gi Yi
Bi Yi
Ri Gi Yi
Gi Bi Yi Ri Bi Yi
Ri Zi
Gi Z i
Bi Z i .
Ri Gi Z i
Gi Bi Zi Ri Bi Zi
(8.15)
Regression
141
The summations in Eqs. (8.14) and (8.15) carry from i = 1 to 8. Using Eq. (8.6) and multiplying matrices [QQT ] and [QP], we obtain the coefficient C matrix with a size of 6 × 3. The explicit formulas are given in Eq. (8.16). X = cx,1 R + cx,2 G + cx,3 B + cx,4 RG + cx,5 GB + cx,6 BR,
(8.16a)
Y = cy,1 R + cy,2 G + cy,3 B + cy,4 RG + cy,5 GB + cy,6 BR,
(8.16b)
Z = cz,1 R + cz,2 G + cz,3 B + cz,4 RG + cz,5 GB + cz,6 BR,
(8.16c)
or
X cx,1 Y = cy,1 cz,1 Z
cx,2 cy,2 cz,2
cx,3 cy,3 cz,3
cx,4 cy,4 cz,4
cx,5 cy,5 cz,5
R
G cx,6 B cy,6 . RG cz,6 GB BR
(8.16d)
8.3 Inverse Color Transformation The color conversion is able to go in either direction—forward or backward. For many conversion techniques, it is easier to implement in one direction than in the other. However, this is not the case for polynomial regression. The inverse color transform using regression is simple and straightforward. All one needs to do is exchange the positions of the input and output data for the regression program. For the inverse color transformation of XYZ to RGB, the regression is applied to the tristimulus data (independent variables) and RGB values (dependent variable) in order to compute a new set of coefficients with the same polynomial order. The matrix [QQT ] and the vector [QP] of the inverse transformation are given in Eqs. (8.17) and (8.18), respectively, for a six-term polynomial. QQT X2
i Xi Yi XZ = i2 i Xi Yi XYZ
i i
Xi2 Zi
i
XY
i2i Y
i Yi Zi
X Y2
2i i Y Z
i i Xi Yi Zi
XZ
i i YZ
i 2i Zi
XYZ
i i2i YZ
i i2 X i Zi
2 X Y
i 2i Xi Yi
XYZ
i 2 i 2i X Y
i 2i Xi Yi Zi
2 Xi Yi Zi
XYZ
i2i i Y Z
i 2i YZ
i 2i XY Z
i 2i 2 i Y Z
i i2 Xi Yi Zi
2 X Z
i i XYZ
i i 2i XZ
2i i , X YZ
i i 2i XYZ
i 2 i 2i X i Zi
(8.17)
142
Computational Color Technology
Xi R i Yi R i ZR QP = i i Xi Yi Ri YZR
i i i Z i X i Ri
X i Gi
Yi G i
Z i Gi
Xi Yi Gi
Yi Zi Gi Z i Xi Gi
Xi Bi
Yi Bi
Zi Bi .
Xi Yi Bi
Yi Zi Bi Zi Xi Bi
(8.18)
Again, using Eq. (8.6) and multiplying matrices [QQT ] and [QP], we obtain the coefficients c´ for the inverse transform. The explicit formulas are given in Eq. (8.19). R = c´r,1 X + c´r,2 Y + c´r,3 Z + c´r,4 XY + c´r,5 Y Z + c´r,6 ZX,
(8.19a)
G = c´g,1 X + c´g,2 Y + c´g,3 Z + c´g,4 XY + c´g,5 Y Z + c´g,6 ZX,
(8.19b)
B = c´b,1 X + c´b,2 Y + c´b,3 Z + c´b,4 XY + c´b,5 Y Z + c´b,6 ZX,
(8.19c)
or
R c´r,1 G = c´g,1 c´b,1 B
c´r,2 c´g,2 c´b,2
c´r,3 c´g,3 c´b,3
c´r,4 c´g,4 c´b,4
c´r,5 c´g,5 c´b,5
X
Y c´r,6 Z c´g,6 . XY c´b,6 YZ ZX
(8.19d)
This method is particularly suitable to irregularly spaced sample points. If a remapping is needed, the regression method works for any packing of sample points, either uniform or nonuniform. Points outside the gamut are extrapolated. Because the polynomial coefficients are obtained by a global least-squares error minimization, the polynomial may not map the sample points to their original values.
8.4 Extension to Spectral Data Herzog and colleagues have extended the polynomial regression to spectral data.8 Equation (8.6) becomes −1 T QS . C = QQT
(8.20)
Matrix S contains the spectral data and is explicitly given in Eq. (8.21) with a size of n × k, where n is the sample number of the spectrum and k is the number of spectra used in the regression. The transpose of S is a k × n matrix and Q is an m × k matrix; therefore, the product (QST ) has a size of m × n. The resulting C
Regression
143
matrix has the size of m × n because (QQT )−1 has a size of m × m.
s1 (λ1 ) s1 (λ2 ) S = s1 (λ3 ) ··· s1 (λn )
s2 (λ1 ) s2 (λ2 ) s2 (λ3 ) ··· s2 (λn )
s3 (λ1 ) · · · sk (λ1 ) s3 (λ2 ) · · · sk (λ2 ) s3 (λ3 ) · · · sk (λ3 ) . ··· ··· ··· s3 (λn ) · · · sk (λn )
(8.21)
They applied the spectral polynomial regression to several sets of spectral data acquired by a digital camera. As expected, the average color difference decreases with increasing number of polynomial terms. Using a three-term linear equation, they obtain average color differences ranging from 4.9 to 8.5Eab with threechannel sensors. By using a 13-term polynomial, the color difference decreases to the range of 3.9 to 6.8Eab . Therefore, it is a trade-off between the accuracy and computational cost. There is another type of trade-off between the computational accuracy and the number of sensors. With a six-channel sensor, the average color differences drop below 1Eab .4 However, the computational cost in terms of memory size and arithmetical operations is increased accordingly.
8.5 Results of Forward Regression To test the proposed empirical regression method, we perform the forward conversion from Xerox/RGB to CIELAB. Four polynomials of Table 8.1 with 4, 8, 14, and 20 terms, respectively, are used for the regression. Table 8.2 lists the average color differences using these polynomials. The training data are a set of nine-level, equally spaced lattice points (729 points) and a set of nine-level, unequally spaced lattice points in the RGB space. The testing data consist of 3072 points selected around the entire RGB color space, with the emphasis on the difficult, dark colors. The uniform training set gives higher average Eab values for testing data of all four polynomials than the nonuniform training set (see columns 3 and 6 of Table 8.2), but the nonuniform training set gives higher Eab values for the training data (see columns 2 and 5 of Table 8.2). However, the overall errors, including the training and testing data, are about the same for both the equally and nonequally Table 8.2 The average Eab of 3072 test points from a Xerox/RGB to CIELAB transform using a training data set that consists of nine levels in each RGB axis.
Equally spaced training data
Unequally spaced training data
Matrix
Training Eab
Testing Eab
Total Eab
Training Eab
Testing Eab
Total Eab
4×3 8×3 14 × 3 20 × 3
12.18 11.44 3.98 2.63
17.86 15.43 6.06 4.77
16.77 14.66 5.66 4.36
18.76 17.19 6.95 4.91
15.78 14.48 5.68 4.59
16.35 15.00 5.92 4.65
144
Computational Color Technology
spaced data partitions. This indicates that the generalization from training to testing by the regression method is well behaved with no significant deviation from the norm. As expected, the results show that the average color difference decreases as the number of terms in the polynomial increases. The Eab distributions for the equally spaced data are plotted in Fig. 8.2; as the number of terms in the polynomial increases, the error distribution becomes narrower and shifts toward smaller Eab values. The unequally spaced data show a similar trend as in Fig. 8.2, with a slightly narrower band for a given polynomial size (see Fig. 8.3). A substantial improvement can be gained if the gray balancing to L∗ or Y is performed prior to the polynomial regression by using a gray-balance curve such as the one given in Fig. 8.4 for Device/RGB values that do not undergo a gamma correction. Table 8.3 shows the results of the polynomial regression with gray balancing under the same conditions as those of no gray balancing. Compared to the results of no gray balancing (Table 8.2), the average color differences are improved by at least 25%; in some cases, the improvements are as high as a factor of two for high-order polynomials. Figure 8.5 shows the error distributions of a 14-term polynomial with and without gray balance. With gray balance, the error distribution shifts toward lower values and the error band becomes narrower than the corresponding distribution without gray balancing. Other polynomials behave similarly.
Figure 8.2 Color-error distributions of four different polynomials using an equally spaced 729 training data set.
Regression
145
Figure 8.3 Color-error distributions of a 14-term polynomial using two different training data sets; one is equally spaced and the other is unequally spaced, both with 729 data points.
Figure 8.4 Relationship between Device/RGB (R = G = B) and lightness L∗ .
146
Computational Color Technology
Table 8.3 The average color differences of 3072 test points from a Xerox/RGB-to-CIELAB transform with gray balancing.
Equally spaced training data
Unequally spaced training data
Matrix
Training Eab
Testing Eab
Total Eab
Training Eab
Testing Eab
Total Eab
4×3 8×3 14 × 3 20 × 3
11.59 10.45 2.80 0.96
13.18 8.70 4.64 2.33
12.88 9.04 4.29 2.07
12.55 9.17 4.82 2.08
10.60 8.00 4.04 1.73
10.97 8.22 4.19 1.80
Figure 8.5 Color-error distributions of a 14-term polynomial with and without gray balance.
8.6 Results of Inverse Regression The average errors d, which are the Euclidean distances between the calculated and measured RGB values for the color-space transformation from CIELAB to Xerox/RGB using 3072 test points, are given in Table 8.4. The 14-term and 20-term polynomials of Table 8.1, having cubic terms in the equation, fit the data very well; the 20-term is practically an exact fit. The d error distributions are given in Fig. 8.6 for 4 × 3, 8 × 3, and 14 × 3 transfer matrices (there are 1542 points with d > 31 for the 3 × 4 matrix and 770 points for the 8 × 3 matrix that are not shown in Fig. 8.6) and the maximum d values are well
Regression
147
Table 8.4 The average errors d of 3072 test points from a CIELAB-to-Xerox/RGB transform.
Equally spaced training data
Unequally spaced training data
Matrix
Training d
Testing d
Total d
Training d
Testing d
Total d
4×3 8×3 14 × 3 20 × 3
31.80 22.80 2.49 0.03
42.59 30.36 3.74 0.04
40.52 28.91 3.50 0.04
40.78 27.62 3.73 0.04
32.78 23.49 3.20 0.03
34.31 24.28 3.30 0.03
Figure 8.6 The d error distributions of 4 × 3, 8 × 3, and 14 × 3 transfer matrices.
beyond 60. There is a distinct difference in the error distribution of the 14 × 3 matrix; it peaks at d = 3 with a high amplitude and a rather narrow band as compared to the 4 × 3 and 8 × 3 matrices that peak around d = 21 with a small amplitude. For the 20×3 matrix, the distribution is even better; all 3072 points have errors less than one device unit of an 8-bit system. From the CIE definitions, we know that the XYZ-to-L∗ a∗ b∗ transform is a function of the cubic root; therefore, the inverse transform will be a cubic function. Thus, it is not surprising that the 14term and 20-term polynomials, containing variables of cubic power (see Table 8.1), fit the data so well.
148
Computational Color Technology
It is a different story in the case of generalization. Results are given in Tables 8.5 and 8.6. By using a 6 × 3 matrix, the total average color difference increases no more than 0.8 units with a training set as small as 34, and a testing set as large as 202. In most cases, the average color differences of testing sets are about the same as the training sets. For a 14 × 3 matrix, the largest increase in the total average color difference is 2.1, and the highest color difference ratio of the testing to training is 2.8. These results indicate that the generalization of the polynomial regression is well behaved. For a given polynomial, the training and testing results are not necessarily worse when the number of training colors decreases (see columns 4 and 5 of Table 8.5 or 8.6). This implies that the position of the color used for training, not the number of colors, is more important in the color interpolation within a given gamut.
8.7 Remarks The regression technique has been applied for the color camera, scanner, and printer characterizations and calibrations.3,5–8 The adequacy of the method depends on the relationship between the source and destination spaces, the number and location of the points chosen for the regression, the number of terms in the Table 8.5 Testing results of Q60 using a 3 × 6 matrix.
Q60 Test 1 Test 2 Test 3 Test 4 Test 5 Test 6
Training patches
Testing patches
Training Eab
Testing Eab
Total Eab
236 172 105 70 58 46 34
0 64 131 166 178 190 202
2.52 2.31 2.77 3.03 3.37 2.72 2.99
– 4.07 3.08 3.06 2.97 3.11 3.32
2.52 2.79 2.94 3.05 3.07 3.03 3.27
Table 8.6 Testing results of Q60 using a 3 × 14 matrix
Q60 Test 1 Test 2 Test 3 Test 4 Test 5 Test 6
Training patches
Testing patches
Training Eab
Testing Eab
Total Eab
236 172 105 70 58 46 34
0 64 131 166 178 190 202
1.85 1.78 2.11 2.39 2.18 2.16 2.41
– 5.03 4.16 4.94 4.91 5.55 4.48
1.85 2.66 3.25 4.18 4.24 4.89 4.18
Regression
149
polynomial, and the measurement errors. It is ideal for transforms with a linear relationship. For nonlinear color-space conversion, this regression method does not guarantee a uniform accuracy across the entire color gamut; some regions, for example dark colors, have higher errors than other areas.5 In general, the accuracy improves as the number of terms in the equation increases.6,7 The trade-offs are the higher computation cost and lower processing speed. The main advantages of the regression method are: (i) that the inverse conversion is simple, (ii) it takes the statistical fluctuation of the measurement into account, and (iii) the sample points need not be uniformly spaced.
References 1. A. A. Afifi and S. P. Azen, Statistical Analysis, Academic Press, New York, Chap. 3, p. 108 (1972). 2. B. A. Wandell, Foundations of Vision, Sinauer Assoc., Sunderland, MA, pp. 431–436 (1995). 3. P. H. McGinnis, Jr., Spectrophotometric color matching with the least squares technique, Color Eng. 5, pp. 22–27 (1967). 4. P. G. Herzog, D. Knipp, H. Stiebig, and F. Konig, Colorimetric characterization of novel multiple-channel sensors for imaging and metrology, J. Electron. Imaging 8, pp. 342–353 (1999). 5. H. R. Kang, Color scanner calibration, J. Imaging Sci. Techn. 36, pp. 162–170 (1992). 6. H. R. Kang, Color scanner calibration of reflected samples, Proc. SPIE 1670, pp. 468–477 (1992). 7. H. R. Kang and P. G. Anderson, Neural network applications to the color scanner and printer calibrations, J. Electron. Imag. 1, pp. 125–135 (1992). 8. J. de Clippeleer, Device independent color reproduction, Proc. TAGA, Sewickley, PA, pp. 98–106 (1993).
Chapter 9
Three-Dimensional Lookup Table with Interpolation Color space transformation using a 3D lookup table (LUT) with interpolation is used to correlate the source and destination color values in the lattice points of a 3D table, where nonlattice points are interpolated by using the nearest lattice points. This method has been used in many applications with quite satisfactory results, and incorporated into the ICC profile standard.1 In this chapter, the structure of the 3D-LUT approach is discussed and the mathematical formulations of interpolation methods are given. These methods are tested using several sets of data points. The similarities and differences of these interpolation methods are discussed.
9.1 Structure of 3D Lookup Table The 3D lookup method consists of three parts—packing (or partition), extraction (or find), and interpolation (or computation).2 Packing is a process that partitions the source space and selects sample points for the purpose of building a lookup table. The extraction step is aimed at finding the location of the input pixel and extracting color values of the nearest lattice points. The last step is interpolation where the input signals and the extracted lattice points are used to calculate the destination color specifications for the input point. 9.1.1 Packing Packing is a process that divides the domain of the source space and populates it with sample points to build the lookup table. Generally, the table is built by an equal step sampling along each axis of the source space, as shown in Fig. 9.1, of a five-level LUT. This will give (n − 1)3 cubes and n3 lattice points, where n is the number of levels. The advantage of this arrangement is that it implicitly supplies information about which cell is next to which. Thus, one needs only to store the starting point and the spacing for each axis. Generally, a matrix of n3 color patches at the lattice points of the source space is made and the destination color specifications of these patches are measured. The corresponding values from the source and destination spaces are tabulated into a lookup table. 151
152
Computational Color Technology
Figure 9.1 A uniformly spaced five-level 3D packing.
Nonuniformly spaced LUTs are also used extensively. They lose the simplicity of the implementation edges, but gain the versatility and conversion accuracy as discussed in Section 9.7. 9.1.2 Extraction Nonlattice points are interpolated by using the nearest lattice points. This is the step where the extraction performs a search to select the lattice points necessary for computing the destination specification of the input point. A well-packed space can make the search simpler. In an 8-bit integer environment, for example, if the axis is divided into 2j equal sections where j is an integer smaller than 8, then the nearest lattice points are given in the most significant j bits (MSBj ) of the input color signals. In other words, the input point is bounded between the lattice points p(MSBj ) and p(MSBj + 1). To find the point of interest requires the computer operations of the masking byte and shifting bits that are significantly faster than the comparison operations. For unequally spaced packing, a series of comparisons are needed to locate the nearest lattice points. Further search within the cube may be needed, depending on the interpolation technique employed to compute the color values of nonlattice points. There are two interpolation methods: the geometrical method and cellular regression. Cellular regression does not require a search within the cube. All geometric interpolations
Three-Dimensional Lookup Table with Interpolation
153
except the trilinear approach require a search mechanism to find the subdivided structure where the point resides. These search mechanisms are inequality comparisons. 9.1.3 Interpolation Interpolation uses the input signals and the extracted lattice points that contain the destination specifications to calculate the destination color specifications for the input point. Interpolation techniques are mathematical computations that employ geometrical relationships or cellular regression. Geometrical interpolations exploit the ways of subdividing a cube. There are four geometrical interpolations, trilinear, prism, pyramid, and tetrahedral. The first 3D interpolation that appeared in the literature is the trilinear interpolation, disclosed in a 1974 British patent by Pugsley.3 The prism scheme was published in 1992 by Kanamori, Fumoto, and Kotera.4 This prism architecture has been made into a single-chip color processor by Matsushita Research Institute Tokyo, Inc.5,6 The pyramid interpolation was patented by Flanklin in 1982.7 The idea of linear interpolation using tetrahedral segmentation of a cube was published as early as 1967 by Iri.8 A similar concept of a linear interpolation by searching for the nearest four neighbors that enclose the point of interest and form a tetrahedron was applied to compute dot areas of color scanners by Korman and Yule in 1971.9 The application of tetrahedral interpolation to color-space transformation was later patented by Sakamoto and Itooka in U.S. Patent No. 4,275,413 (1981) and related worldwide patents.10–12 The extensive activities in developing and patenting interpolation techniques during the 1980s show the importance of the technique, the desire of dominating market share by the manufacturers, and the subsequent financial stakes.
9.2 Geometric Interpolations Basically, 3D interpolation is the multiple application of the linear interpolation; therefore, we start with the linear interpolation, then extend to 2D (bilinear) and 3D (trilinear) interpolations. A linear interpolation is depicted in Fig. 9.2; a point p on the curve between the lattice points p0 and p1 is to be interpolated. The interpolated value pc (x) is linearly proportional to the ratio of (x − x0 )/(x1 − x0 ), where (x1 − x0 ) is the projected length of the line segment connecting points p0 and p1 , and (x − x0 ) is the projected distance of the line connecting points p and p0 . pc (x) = p(x0 ) + [(x − x0 )/(x1 − x0 )][p(x1 ) − p(x0 )].
(9.1)
As shown in Eq. (9.1), the major computational operation in the interpolation is to calculate the projected distances. In view of the implementation, using a uniform 8-bit LUT, the projected distance at each axis of an input is simply p(LSB8−j ),
154
Computational Color Technology
Figure 9.2 Linear interpolation.
where the LSBs are the least significant bits. This is a simple byte-masking operation that significantly lowers the computational cost and increases speed. The interpolation error is given as δ = p(x) − pc (x).
(9.2)
9.2.1 Bilinear interpolation In two dimensions, we have a function of two variables p(x, y) and four lattice points p00 (x0 , y0 ), p01 (x0 , y1 ), p10 (x1 , y0 ), and p11 (x1 , y1 ) as shown in Fig. 9.3. To obtain the value for point p, we first hold y0 constant and apply the linear interpolation on lattice points p00 and p10 to obtain p0 . p0 = p00 + (p10 − p00 )[(x − x0 )/(x1 − x0 )].
(9.3)
Similarly, we calculate p1 by keeping y1 constant. p1 = p01 + (p11 − p01 )[(x − x0 )/(x1 − x0 )].
(9.4)
After obtaining p0 and p1 , we again apply the linear interpolation to them by keeping x constant. p(x, y) = p0 + (p1 − p0 )[(y − y0 )/(y1 − y0 )].
(9.5)
Three-Dimensional Lookup Table with Interpolation
155
Figure 9.3 Bilinear interpolation.
Substituting Eqs. (9.3) and (9.4) into Eq. (9.5), we obtain p(x, y) = p00 + (p10 − p00 )[(x − x0 )/(x1 − x0 )] + (p01 − p00 )[(y − y0 )/(y1 − y0 )] + (p11 − p01 − p10 + p00 )[(x − x0 )/(x1 − x0 )] × [(y − y0 )/(y1 − y0 )].
(9.6)
9.2.2 Trilinear interpolation The trilinear equation is derived by applying the linear interpolation seven times (see Fig. 9.4); three times each to determine the points p1 and p0 as illustrated in the 2D bilinear interpolation, then one more time to compute the point p. The general expression for the trilinear interpolation is given in Eq. (9.7). p(x, y, z) = c0 + c1 x + c2 y + c3 z + c4 xy + c5 yz + c6 zx + c7 xyz,
(9.7a)
where x, y, and z are the relative distances of the point with respect to the starting point p000 in the x, y, and z directions, respectively, as shown in Eq. (9.7b). x = (x − x0 )/(x1 − x0 );
y = (y − y0 )/(y1 − y0 );
z = (z − z0 )/(z1 − z0 ). (9.7b)
156
Computational Color Technology
Figure 9.4 Trilinear interpolation.
Coefficients cj are determined from the values of the vertices. c0 = p000 ; c1 = (p100 − p000 ); c2 = (p010 − p000 ); c3 = (p001 − p000 ); c4 = (p110 − p010 − p100 + p000 ); c5 = (p011 − p001 − p010 + p000 ); c6 = (p101 − p001 − p100 + p000 ); c7 = (p111 − p011 − p101 − p110 + p100 + p001 + p010 − p000 ).
(9.7c)
Equation (9.7a) can be written in vector-matrix form as p = C T Q1
or
p = QT1 C,
(9.7d)
where C is the vector of coefficients, C = [c0
c1
c2
c3
c4
c5
c6
c7 ]T ,
(9.8)
and Q1 is the vector of distances related to x, y, and z. Q1 = [1 x
y
z
xy
yz
zx
xyz]T .
(9.9)
Three-Dimensional Lookup Table with Interpolation
157
Note that the sizes of vectors Q1 and C must be the same. The coefficients C can be put into vector-matrix form as shown in Eq. (9.10a) by expanding Eq. (9.7c). c0 1 0 0 c1 −1 0 0 1 c2 −1 0 c −1 1 0 3 = 0 −1 c4 1 c5 1 −1 −1 c 1 −1 0 6 c7 −1 1 1
0 0 0 1 0 0 0 0 0 −1 1 0 0 −1 −1 1
0 0 0 0 0 0 1 −1
0 0 0 0 1 0 0 −1
0 p000 0 p001 0 p010 0 p011 , 0 p100 0 p101 0 p110 p111 1
(9.10a)
or C = B 1P ,
(9.10b)
where vector P is a collection of vertices, P = [p000
p001
p010
p011
p100
p101
p110
p111 ]T ,
(9.11)
and the matrix B 1 , given in Eq. (9.10a), represents a matrix of binary constants, having a size of 8 × 8. Substituting Eq. (9.10b) into Eq. (9.7d), we obtain the vector-matrix expression for calculating the destination color value of point p. p = C T Q1 = P T B T1 Q1 ,
(9.12a)
p = QT1 C = QT1 B 1 P .
(9.12b)
Equation (9.12) is exactly the same as Eq. (9.7), only expressed differently. There is no need for a search mechanism to find the location of the point because the cube is used as a whole. But the computation cost, using all eight vertices and having eight terms in the equation, is higher than other 3D geometric interpolations. 9.2.3 Prism interpolation If one cuts a cube diagonally into two halves as shown in Fig. 9.5, one gets two prism shapes. A search mechanism is needed to locate the point of interest. Because there are two symmetric structures in the cube, a simple inequality comparison is sufficient to determine the location: if x > y, then the point is in Prism 1, otherwise the point is in Prism 2. For x = y, the point is laid on the diagonal plane, and either prism can be used for interpolation.
158
Computational Color Technology
Figure 9.5 Prism interpolation.
The equation has six terms and uses six vertices of the given prism for computation. Equation (9.13) gives prism interpolation in vector-matrix form.
p1 p2 =
p000 p000
(p100 − p000 ) (p110 − p100 ) (p110 − p010 ) (p010 − p000 )
(p101 − p001 − p100 + p000 ) (p111 − p011 − p110 + p010 ) 1 x y × . z xz yz
(p001 − p000 ) (p001 − p000 )
(p111 − p101 − p110 + p100 ) (p011 − p001 − p010 + p000 )
(9.13)
By setting Q2 = [1 x
y
z
xz
yz]T ,
(9.14)
Eq. (9.13) can be expressed in vector-matrix form as given in Eq. (9.15). p1 = P T B T21 Q2 = QT2 B 21 P ,
(9.15a)
p2 = P T B T22 Q2 = QT2 B 22 P ,
(9.15b)
Three-Dimensional Lookup Table with Interpolation
159
where vector P is given in Eq. (9.11), and B 21 and B 22 are binary matrices, having a size of 6 × 8, given as follows:
1 0 0 0 0 0 0 0 0 −1 0 0 1 0 0 0 0 −1 0 1 0 B 21 = 0 0 −1 1 0 0 0 1 −1 0 0 −1 1 0 0 0 0 0 1 −1 −1 1 0 0 0 0 0 0 0 −1 0 0 0 1 0 1 0 0 0 0 −1 0 B 22 = −1 1 0 0 0 0 0 0 0 1 −1 0 0 −1 1 −1 −1 1 0 0 0
0 0 0 , 0 0 1 0 0 0 . 0 1 0
The location of the data point is determined by the following IF-ELSE construct: If x > y, else
p = p1 , p = p2 .
9.2.4 Pyramid interpolation For pyramid interpolation, the cube is sliced into three pieces; each one takes a face as the pyramid base, having its corners connected to a vertex in the opposite side as the apex (see Fig. 9.6). A search is required to locate the point of interest. The equation has five terms and uses five vertices of the given pyramid to compute the value. Equation (9.16) gives the vector-matrix form of the pyramid interpolation.
Figure 9.6 Pyramid interpolation.
160
Computational Color Technology
p 1 p2 p3
p000 = p000 p000
(p111 − p011 ) (p100 − p000 ) (p100 − p000 )
(p010 − p000 ) (p111 − p101 ) (p010 − p000 )
(p001 − p000 ) (p001 − p000 ) (p111 − p110 )
0 (p011 − p001 − p010 + p000 ) 0 0 (p110 − p100 − p010 + p000 ) 0
0 (p101 − p001 − p100 + p000 ) 0
1 x y z × xy . yz zx
(9.16)
By setting Q3,1 = [1
x
y
z
yz]T ,
(9.17a)
Q3,2 = [1
x
y
z
zx]T ,
(9.17b)
Q3,3 = [1
x
y
z
xy]T .
(9.17c)
Equation (9.16) can be expressed in vector-matrix form as given in Eq. (9.18). p1 = P T B T31 Q3,1 = QT3,1 B 31 P ,
(9.18a)
p2 = P T B T32 Q3,2 = QT3,2 B 32 P ,
(9.18b)
p3 = P T B T33 Q3,3 = QT3,3 B 33 P ,
(9.18c)
where B 31 , B 32 , and B 33 are binary matrices, having a size of 5 × 8, given as follows:
1 0 B 31 = −1 −1 1 1 −1 B 32 = 0 −1 1
0 0 0 1 −1 0 0 0 1 −1
0 0 0 0 0 −1 0 0 1 0 0 0 0 0 0 0 −1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 −1 0 0 0 0 0 0 −1 1
0 0 0 0 0 0 0 0 0 0
0 1 0, 0 0 0 0 1, 0 0
Three-Dimensional Lookup Table with Interpolation
1 −1 B 33 = −1 0 1
161
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0. 0 0 0 0 0 −1 1 0 −1 0 −1 0 1 0
The location of the data point is determined by the following IF-THEN-ELSE construct: If (y > x and z > x), else if (x > y and z > y),
then p = p1 , then p = p2 , else p = p3 .
9.2.5 Tetrahedral interpolation The tetrahedral interpolation slices a cube into six tetrahedrons; each has a triangle base as shown in Fig. 9.7.
Figure 9.7 Tetrahedral interpolation.
162
Computational Color Technology
The vector-matrix expression of the tetrahedral interpolation is given in Eq. (9.19).
p1 p000 p2 p000 p3 p000 = p4 p000 p p 5 000 p6 p000
(p100 − p000 ) (p100 − p000 ) (p101 − p001 ) (p110 − p010 ) (p111 − p011 ) (p111 − p011 )
(p110 − p100 ) (p111 − p101 ) (p111 − p101 ) (p010 − p000 ) (p010 − p000 ) (p011 − p001 )
(p111 − p110 ) (p101 − p100 ) 1 (p001 − p000 ) x . (p111 − p110 ) y (p011 − p010 ) z (p001 − p000 ) (9.19)
By setting Q4 = [1
x
y
z]T ,
(9.20)
Equation (9.19) can be expressed in vector-matrix form as given in Eq. (9.21). p1 = P T B T41 Q4 = QT4 B 41 P ,
(9.21a)
p2 = P T B T42 Q4 = QT4 B 42 P ,
(9.21b)
p3 = P T B T43 Q4 = QT4 B 43 P ,
(9.21c)
p4 = P T B T44 Q4 = QT4 B 44 P ,
(9.21d)
p5 = P T B T45 Q4 = QT4 B 45 P ,
(9.21e)
p6 = P T B T46 Q4 = QT4 B 46 P ,
(9.21f)
where B 41 , B 42 , B 43 , B 44 , B 45 , and B 46 are binary matrices, having a size of 4 × 8, given as follows:
1 0 0 0 0 −1 0 0 0 1 B 41 = 0 0 0 0 −1 0 0 0 0 0 1 0 0 0 0 −1 0 0 0 1 B 42 = 0 0 0 0 0 0 0 0 0 −1 1 0 0 0 0 0 −1 0 0 0 B 43 = 0 0 0 0 0 −1 1 0 0 0 1 0 0 0 0 0 0 −1 0 0 B 44 = −1 0 1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 −1 0 0 0 0 −1 0 1 0 0 0 1 0 −1 0 0 0 0 0 0 1 0 0 0 −1
0 0 , 0 1 0 0 , 1 0 0 0 , 1 0 0 0 , 0 1
Three-Dimensional Lookup Table with Interpolation
163
1 0 0 0 0 0 0 0 −1 0 B 45 = −1 0 1 0 0 0 0 −1 1 0 1 0 0 0 0 0 0 −1 0 0 B 46 = 0 −1 0 1 0 −1 1 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 1 , 0 0 0 1 . 0 0
The location of the data point is determined by the following IF-THEN-ELSE construct: If (x > y > z), else if (x > z > y), else if (z > x > y), else if (y > x > z), else if (y > z > x), else
then then then then then
p = p1 , p = p2 , p = p3 , p = p4 , p = p5 , p = p6 .
Having four linear terms and using four vertices, it has the lowest computational cost. 9.2.6 Derivatives and extensions The difference among various geometrical interpolations lies in how one slices the cube. There are only three ways of slicing a cube into multiple 3D structures with equal numbers of vertices. They are the prism (six vertices), pyramid (five vertices), and tetrahedron (four vertices). Any substructure with fewer than four vertices is no longer 3D. And it is not possible to slice a cube equally into multiple seven-vertex structures. However, many variations do exist to the geometric slicing of a cube such as cutting a cube from a different angle (or orientation),13 the subdivision into 24 isomorphic tetrahedrons with the body center and face centers as the vertices and selectively combining two, three, or four tetrahedrons to from a tetrahedron, pyramid, prism, cube, or other 3D shapes,11 and the combination of tetrahedrons across the cell boundary.13 In any case, it is recommended that the main diagonal axis of the substructure is aligned with the neutral axis of the color space. It is interesting to point out that the use of the average value of eight vertices in a cube for the body center and the use of the average value of four corners for face centers are the special cases of the trilinear and bilinear interpolations, respectively. A face center or body center is located midway between two lattice points; therefore, (x − x0 )/(x1 − x0 ) = (y − y0 )/(y1 − y0 ) = (z − z0 )/(z1 − z0 ) = 1/2.
(9.22)
164
Computational Color Technology
Substituting Eq. (9.22) into Eq. (9.6) of the bilinear interpolation, we obtain the value for a face-centered point that is the average of the four corner points. p(1/2, 1/2) = p00 + (p10 − p00 )/2 + (p01 − p00 )/2 + (p11 − p01 − p10 + p00 )/4 = (p00 + p01 + p10 + p11 )/4. Similarly, Eq. (9.7) of the trilinear interpolation becomes p(1/2, 1/2, 1/2) = (p000 + p001 + p010 + p011 + p100 + p101 + p110 + p111 )/8. This means that the face centers and body center are obtained by the primary interpolation and the point of interest interpolated from face-centered and bodycentered points is obtained by the secondary interpolation, which uses interpolated vertices for interpolation. The secondary interpolation will cause further error propagation. If one corrects this problem by taking measurements for the face centers and body center, then it becomes the same as the doubling of the sampling frequency. Moreover, the interpolation accuracy of the face center and body center is dependent on the location of the cube in the color space; the interpolation error increases rapidly as the device value decreases.13
9.3 Cellular Regression Three-dimensional interpolation using cellular regression is a combination of the 3D packing and polynomial regression.13–15 The idea is to apply regression to a small lattice cell instead of the entire color space for the purpose of increasing the interpolation accuracy. The eight vertices of a cube are used to derive the coefficients of a selected equation. There are several variations to the cellular regression such as selections with respect to the polynomials, the regression points, and the cell sizes and shapes. Compared to the geometric interpolation, this has the following advantages: (1) There is no need to find the position of the interpolation point within the cube. (2) There is no need for uniform packing; it can apply to any 3D structure such as distorted hexahedra. (3) It can accommodate any arithmetical expressions such as square root, logarithm, and exponential terms. (4) It can have any number of terms in the equation as long as the number does not exceed the number of vertices in the cube, which means that the number of terms cannot exceed eight. The last constraint can be overcome by sampling the color space in a finer division than the desired levels. In the case of a double sampling rate, one has 27 data
Three-Dimensional Lookup Table with Interpolation
165
points in the cube instead of 8; therefore, one can have a maximum of 26 terms. The drawback is that about eight times the samples and measurements are needed, which are time consuming and costly. If one cannot afford these extra costs, there is another way to get around this problem. One can include the neighboring cubes and weigh them differently from the cube of interest when performing the regression. For example, one can include six more cubes adjacent to each face of the cube of interest. The 8 vertices of the center cube are weighted—say, by 4—and the other 24 vertices are weighted by one. The regression is then performed on these 32 weighted vertices via a selected polynomial that can accommodate as many as 31 terms. With these extensions and variations, cellular regression provides the additional flexibility and accuracy not offered by geometrical interpolations. If the process speed is the prime concern, one can use a couple of linear terms for interpolation to ease the computation time and cost. If the color quality is the main concern, one can use all allowed terms and tailor the terms to the characteristic of the device by selecting suitable arithmetical functions.
9.4 Nonuniform Lookup Table The discussion so far has been centered on the standard way of implementing LUT; that is, the source color space is equally spaced with respect to the sampling rate. This results in an uneven and irregular destination space for those color conversions that are nonlinear. Many techniques have been proposed to work on nonuniform data.2,15–19 A very simple example of nonuniform packing is shown in Fig. 9.8. With this packing, each subcell is no longer a cube, but a rectangular shape. The lattice points of the source RGB space can be selected, for example, by using the gray-balance curve of RGB with respect to the lightness (see Fig. 8.4) such that the resulting L∗ spacing in the destination space is approximately equal. Because of this change, the inequality rules of the geometric interpolations are no longer valid. They have to be modified by substituting x, y, and z with the relative distances xr , yr , and zr , where xr = (x − xi )/(xi+1 − xi ); zr = (z − zi )/(zi+1 − zi ),
yr = (y − yi )/(yi+1 − yi ); (9.23)
where the subscript i indicates the LUT level. The normalization transforms a rectangular shape to a cube. This implementation is basically the same as putting three 1D LUTs to linearize the incoming RGB signals in front of an equally spaced 3D LUT. The nonuniform LUT reduces the implementation cost and simplifies the design without adding to the computational cost. The real benefit, which will be shown in Section 9.7, is the improvement in the interpolation accuracy and more uniform error distribution.
166
Computational Color Technology
Figure 9.8 A five-level unequal sampling of the input color space.
9.5 Inverse Color Transform As mentioned in Chapter 8, some transformation techniques are easier to implement in one direction than the other. Three-dimensional interpolation is one. A good example is the CIELAB-to-printer/cmy transform. It is difficult to preset the desired CIELAB lattice points for the forward transformation, but the desired cmy values are readily available in the inverse direction from printer/cmy → CIELAB. Therefore, the general approach is to print an electronic file with known printer/cmy values, then measure the output L∗ a ∗ b∗ values. If the destination cmy space is uniformly sampled, the source CIELAB space will not be uniformly sampled because of the nonlinear relationship between cmy and L∗ a ∗ b∗ . This introduces some complications to the color conversion in the areas of data storage and search. Therefore, a remapping to an equally spaced packing in the source space is often needed. The need of remapping arises in many instances; it is not limited to the inverse transform. For example, the scanner calibration from RGB to CIELAB is a forward transform. But, the remapping is required because the color specifications of test targets are not likely to fall exactly onto the equally spaced grid points of the source color space. The only transform that does not require remapping is perhaps the forward transform of monitor/RGB to other color spaces. Usually, a remapping of the source space to a uniform sampling is performed by using the existing sample points. The repacking can be achieved in many ways as follows:
Three-Dimensional Lookup Table with Interpolation
167
(1) The new lattice points are computed from known analytical formulas such as those provided by the CIE and Xerox Color Encoding Standard. For example, the lattice points for CIELAB → Xerox/RGB can be calculated using the known transform of CIELAB → CIE/XYZ [see Eq. (5.15)] followed by the known linear transform of CIEXYZ → Xerox/RGB20 such that the corresponding [L∗ , a ∗ , b∗ ] and [R, G, B] values are established. These formulas are ideal because they give no color-conversion error at the lattice points; therefore, they are useful for color-simulation studies. However, these ideal cases are rarely encountered in practical applications. (2) The new lattice points can be evaluated from a polynomial regression as described in Chapter 8. This works for any packing of sample points, either uniform or nonuniform. Points outside the gamut are extrapolated. Because the polynomial coefficients are obtained by a global least-squares error minimization, the polynomial may not map the sample points to their original values. (3) The reshaping can be obtained by a weighted vector averaging. Rolleston has successfully applied d −4 weighted averaging to color-space conversion where d is the distance between the point of interest and neighboring points.19 All sample points are weighted by d −4 , then added together. Because of the inverse fourth power, the contribution to the sum from sample points vanishes quickly with distance. Like the polynomial evaluation, the method is able to do the extrapolation and to process irregularly spaced data. (4) The remapping can be interpolated by a piecewise inversion of the space. The idea is to divide a color space into a set of tetrahedrons such that the nonlinear mapping of the entire space is approximated by a number of local linear transformations. The search for the enclosing tetrahedron is harder for nonuniform packing; often a special search technique is needed.16 The interpolated values are bounded by the given sample points; there is no extrapolation. Points that do not reside within the tetrahedron cannot be evaluated. The packing of an inversed 3D LUT is critical for the accuracy of the interpolation. The conventional approach is a uniform spacing in all three axes of the color space, such as the one shown in Fig. 9.1; the size of the new LUT is the bounding box enclosing the destination color gamut such as the CIELAB of the printer/cmy → CIELAB transform. These boundaries are the anticipated maximum and minimum values of L∗ , a ∗ , and b∗ normalized to the bit depth of the internal representation (usually, an 8-bit integer). It is apparent that this implementation has a lot of waste; valid data occupy a small fraction of the total space. A more efficient packing is the nonuniform space, such as the one depicted in Fig. 9.9. The color space is first dissected on the L∗ axis to layers of unequal thickness by using the relationship of L∗ -RGB. The bounding box (shown as dashed lines in Fig. 9.9) of each L∗ layer is set as close to the a ∗ and b∗ color gamut as possible.
168
Computational Color Technology
Figure 9.9 A nonuniformly spaced lookup table for scaled CIELAB space (to 8-bit integer).
9.6 Sequential Linear Interpolation The biggest drawback in the 3D-LUT approach is the inefficient use of the available color space, as discussed in the previous section. Due to the nonlinear relationship, the inverse interpolation creates a large empty space when a bounding box is placed in the destination space. Allebach, Chang, and Bouman proposed an efficient way, called sequential linear interpolation (SLI), to implement these nonlinear transformations.17,18 Sequential linear interpolation optimally allocates grid points according to the characteristics of the function. Since the characteristics of the function are not known in advance, they propose a design procedure that iteratively estimates the characteristics of functions and constructs the SLI structure with increasing accuracy. This procedure is depicted in Fig. 9.10. An initial set of printer measurements is made first. They then construct an initial SLI structure so that the distance between the measured output points and the grid locations is minimized. They use the sequential scalar quantization (SSQ) method to initialize this structure. Next, the necessary characteristics of the inverse printer transfer function are estimated. These estimates are then used to guide the selection of new printer measurement points so that the mean squared error is minimized. Since the new measurement points are approximately estimated by the initial SLI structure, the actual measured output points in the CIELAB space will not exactly have the desired SLI
Three-Dimensional Lookup Table with Interpolation
169
Figure 9.10 Iterative design procedure of the sequential linear interpolation.
structure. Therefore, one needs to perform SSQ on the output data again to obtain a new SLI structure based on the new measurement points. This process requires iterations with an increasing number of measurement points to obtain more accurate SLI structures. The regularly spaced interpolation grid is a special case of the sequential interpolation grid where the grid lines and the grid points are distributed uniformly and the domain is regular. As in the case with the regular interpolation grid, the sequential interpolation scheme will produce a continuous function, since all the 1D interpolations are continuous. The sequential interpolation grid automatically tracks the domain of the function (i.e., the printer gamut) by placing all the grid points inside the domain. If the domain of the function is not rectangular, then a regular grid will waste grid points outside the domain. More importantly, when the number of grid points is limited, the sequential interpolation grid allows the implementer to arbitrarily allocate grid lines and points to minimize the interpolation error. Chang, Bouman, and Allebach applied SLI to data of CIELAB values measured from printed 9 × 9 × 9 color patches uniformly distributed in the printer RGB space using an Apple color printer. Results show that the SLI grid always outperforms the uniform grid as indicated by the average color difference; and it does better in maximum color difference in all cases except for 5 × 5 × 5 grid points. In general, the color difference for the SLI grid is smaller and its distribution smoother than that of the uniform grid. The advantage of SLI is due to the fact that no grid points are wasted outside the printer gamut. The inefficiency of the uniform grids is shown in their data, the fraction of grid points falling within the printer gamut ranges being from 40% for a 5 × 5 × 5 LUT to 22% for a 65 × 65 × 65 LUT. These results indicate that the uniform grids are not efficient; many grid points are wasted. They
170
Computational Color Technology
have shown that SLI definitely has advantages over the uniform LUT with respect to the interpolation accuracy. The trade-offs are the complexity, computation cost, and speed.
9.7 Results of Forward 3D Interpolation This section provides experimental results of testing several 3D-LUT packings to show the accuracy of the 3D-LUT methods. Five test conditions are used: Test 1 is a 5-level, equally spaced LUT (125 lattice points); Test 2 is a 9-level, equally spaced LUT (729 lattice points); Test 3 is a 17-level, equally spaced LUT (4913 lattice points); Test 4 is a 5-level, unequally spaced LUT (125 lattice points); Test 5 is 9-level, unequally spaced LUT (729 lattice points). Table 9.1 lists the interpolation errors of the geometric techniques along the neutral axis. Relationships between the interpolation error and 255 neutral colors (in 8-bit Xerox/RGB value) that are converted from Xerox/RGB to CIELAB using four LUT packings are plotted in Fig. 9.11 for trilinear interpolation. Other interpolation schemes behave similarly. This figure reveals the following important characteristics of the geometric interpolation: (1) The interpolation error peaks at the center and diminishes at the nodes (lattice points). This implies that the assumption of using the average values of vertices for the body center and face centers is a poor one. (2) The error amplitude decreases as the number of the level increases. (3) The highest amplitude occurs at the lowest level (dark colors). For equally spaced LUTs, the amplitude damps quickly as the level increases. (4) Unequally spaced LUTs have a much lower fundamental peak but the errors are rippled to higher levels; this gives a more even error distribution and a better average value. Table 9.2 lists the average color differences of 12 interpolation techniques under five different conditions using 3072 test points. The first four techniques are the geometrical approach and the rest are the cellular regression approach. Results in Tables 9.1 and 9.2 confirm that the interpolation accuracy improves as the Table 9.1 Comparisons of interpolation accuracies in terms of the average Eab for 255 neutral colors.
LUT level
5-level
9-level
17-level
5-level
9-level
LUT packing
Equal spacing
Equal spacing
Equal spacing
Unequal spacing
Unequal spacing
Trilinear Prism Pyramid Tetrahedral
2.23 3.01 3.08 2.95
0.90 1.18 1.20 1.06
0.38 0.45 0.46 0.41
1.21 1.47 1.27 1.31
0.38 0.43 0.36 0.36
Three-Dimensional Lookup Table with Interpolation
171
Figure 9.11 Trilinear interpolation errors of 255 neutral colors using four different LUTs from Xerox/RGB to CIELAB under D50 illumination.
Table 9.2 Comparisons of interpolation accuracies in terms of the average Eab using 3072 data points.
LUT level
5-level
9-level
17-level
5-level
9-level
LUT packing
Equal spacing
Equal spacing
Equal spacing
Unequal spacing
Unequal spacing
Cubic (Trilinear) Prism Pyramid Tetrahedral 3 × 3 matrix (8 points) 3 × 4 matrix (8 points) 3 × 6 matrix (8 points) 3 × 7 matrix (8 points) 3 × 3 matrix (27 points) 3 × 4 matrix (27 points) 3 × 6 matrix (27 points) 3 × 7 matrix (27 points)
5.81 6.38 6.29 6.84 9.04 5.84 6.09 5.81 8.47 4.48
2.50 2.77 2.74 2.99 4.28 2.51 2.75 2.51 3.94 1.76 2.11 1.62
0.92 1.02 1.01 1.11 2.08 0.91 0.98 0.92
1.74 1.81 1.76 1.86 10.28 1.88 4.36 1.74
0.46 0.47 0.45 0.49 5.36 0.48 1.10 0.46
4.22
172
Computational Color Technology
sampling rate increases. At each LUT packing, the interpolation accuracies are about the same for various geometrical techniques. The differences in computational accuracy become even smaller as LUT size increases or nonuniform packing is used. The same conclusion could be drawn from Kotera’s study and Kasson’s results.21–23 Using 8-bit integer data for computation, Kotera and coworkers reported that the trilinear interpolation is the best and prism is the second for 5-level and 9-level LUTs. Similarly, they found that the difference in interpolation accuracy is reduced as the size of the LUT increases. The 9-level LUT gives one Erms difference from the best (trilinear) to the worse (tetrahedral). Using floating-point computation, we obtained errors about half of their sizes. For larger 17-level and 33-level LUTs, the accuracy is about the same for all four geometrical interpolations.21,22 Kasson, Plouffe, and Nin compared the trilinear interpolation with two tetrahedral interpolations and a disphenoid tetrahedral interpolation, which is a tetrahedron formed by spanning two cubes; the resulting average color differences are 1.00, 1.24, 1.01, and 0.99, respectively.23 These numbers are very close, if not the same, indicating that there is little difference in their interpolation capabilities. They also showed that the interpolation accuracy improves as the sampling rate increases. If the sampling rate is high enough, the linear interpolation becomes a very good approximation for computing a point that is not a lattice point. However, the accuracy improvement levels off at high sampling rates. A further increase in the sampling rate is not necessary because the gain in the accuracy will be small. However, the cost of the storage is increased by about eight times for each increment in LUT size. From this simulation, we believe that a 9-level or 17-level LUT will provide an adequate accuracy for most color conversions. In addition, we also determined the error distribution. For a given interpolation method, the Eab distributions improve as the LUT size increases, as shown in Fig. 9.12 for the trilinear interpolation and Fig. 9.13 for the tetrahedral interpolation, where the distribution bandwidth becomes narrower and the color difference shifts to smaller values in the left-hand side of the diagram. Prism and pyramid interpolations behave similarly. For a given LUT size, the distributions from various interpolation techniques are about the same as shown in Fig. 9.14 for a uniform 5-level LUT, Fig. 9.15 for a uniform 9-level LUT, Fig. 9.16 for a uniform 17-level LUT, and Fig. 9.17 for a nonuniform 5-level LUT. As shown in Table 9.2, the accuracy improvement is dramatic for nonuniform LUTs. Results of the color difference showed that a 5-level nonuniform LUT is about 35% better than a 9-level uniform LUT, and a 9-level nonuniform LUT, having over 96.16% of points within 1 Eab , is about a factor of two better than a 17-level uniform LUT. Better yet, the error distribution is almost uniform and most points, if not all, have errors less than two units. These results demonstrated that, with a proper selection of the sampling points along the principle axes, we can gain a big saving in memory cost and a great improvement in interpolation accuracy as well as the error distribution. Similar computations were performed on the conversion from sRGB to CIELAB under D65 illumination. The average color difference in Eab units of
Three-Dimensional Lookup Table with Interpolation
Figure 9.12 Error distributions of the trilinear interpolation.
Figure 9.13 Error distributions of the tetrahedral interpolation.
173
174
Computational Color Technology
Figure 9.14 Error distributions of a uniform 5-level LUT.
Figure 9.15 Error distributions of a uniform 9-level LUT.
Three-Dimensional Lookup Table with Interpolation
Figure 9.16 Error distributions of a uniform 17-level LUT.
Figure 9.17 Error distributions of a nonuniform 5-level LUT.
175
176
Computational Color Technology
5832 equally spaced colors in sRGB space for four interpolation methods under four different LUTs are given in Table 9.3, where Test 1 uses a 5-level equally spaced LUT, Test 2 uses a 9-level equally spaced LUT, Test 3 uses a 5-level unequally spaced LUT, and Test 4 uses a 9-level unequally spaced LUT. The error distributions of neutral colors under four different LUTs are plotted in Fig. 9.18. These results contradict the data obtained for a Xerox/RGB-to-CIELAB transform Table 9.3 Comparisons of interpolation accuracies in terms of the average Eab for sRGBto-CIELAB transform.
LUT level
5-level
9-level
5-level
9-level
LUT packing
Equal spacing
Equal spacing
Unequal spacing
Unequal spacing
Trilinear Prism Pyramid Tetrahedral
1.92 1.67 2.01 1.29
0.48 0.42 0.49 0.33
2.94 2.54 3.14 1.80
0.77 0.66 0.82 0.47
Figure 9.18 Trilinear interpolation errors of 255 neutral colors using four different LUTs from sRGB to CIELAB under D65 illumination.
Three-Dimensional Lookup Table with Interpolation
177
in two areas. First, the interpolation accuracies are not the same; the tetrahedral interpolation is better than other methods. However, the differences are not big. Second, the equally spaced LUTs give better accuracy than the corresponding nonuniform LUTs. This is the most significant contradiction that can be explained by the gamma correction of the sRGB formulation [see Eq. (A4.21) of Appendix 4]; the gamma correction linearizes the sRGB digital count with respect to luminance Y as shown in Fig. 9.19, whereas the nonlinear LUT in Xerox/RGB → CIELAB transform mimics this behavior. These results indicate that the RGB encoding with gamma correction is already optimal with respect to the luminance; therefore, the linear-spaced LUT gives the best results, where the nonlinear adjustment makes an already linear relationship nonlinear, giving much worse conversion accuracies. Thus, the nonlinear-spaced LUT should only be used for Device/RGB or RGB encoding without gamma correction.
9.8 Results of Inverse 3D Interpolation Results of the 3D LUT with interpolation for a CIELAB-to-Xerox/RGB transform are given in Table 9.4. The nonuniform 3D LUTs improve the interpolation accuracy by about 20%. Similar to the forward interpolation, the accuracy of the
Figure 9.19 Relationship of gamma-corrected sRGB and luminance Y.
178
Computational Color Technology
inverse interpolation increases with the sampling rate or the size of the LUT (see Fig. 9.20), and the accuracies for all four geometric interpolations are about the same (see Fig. 9.21). The error distributions of the uniform and nonuniform LUTs for the trilinear interpolation at 5-level are shown in Fig. 9.22; the nonuniform LUT has a narrower band and peaks earlier. Other geometric interpolations show a similar trend.
Figure 9.20 Error distributions of the trilinear interpolation using an inverse 3D LUT.
Table 9.4 The average errors, d, of 3072 test points from a CIELAB-to-Xerox/RGB transform using a 3D lookup table with geometric interpolations.
Uniform 5-level from known formula Uniform 5-level from 20-term regression Nonuniform 5-level from known formula Uniform 9-level from known formula Uniform 9-level from 20-term regression Nonuniform 9-level from known formula Uniform 17-level from known formula Uniform 17-level from 20-term regression
Cubic
Prism
Pyramid
Tetrahedral
10.2 10.0 8.6 2.8 2.6 2.3 1.1 1.0
12.6 12.3 10.5 3.4 3.2 2.8 1.2 1.1
10.5 10.2 9.1 2.9 2.7 2.5 1.1 1.0
11.3 11.0 9.5 3.1 2.8 2.7 1.2 1.0
Three-Dimensional Lookup Table with Interpolation
179
Figure 9.21 Error distributions of a 9-level inverse 3D-LUT.
Figure 9.22 Error distributions of the trilinear interpolation using a uniformly spaced and a nonuniformly spaced inverse 3D LUT.
180
Computational Color Technology
9.9 Remarks The differences among various geometrical interpolations lie in how the cube is subdivided. This then leads to differences in the extractions and the equations for computation. Simulation results of the Xerox/RGB ← → CIELAB conversions indicate that the precision of approximating a true value by geometrical interpolations is very good; even the lowest 5-level LUT has precision of less than 7 Eab units. The magnitude of the error decreases as the number of the level increases; at 17-level, the errors are about 1 Eab unit. Proper packing will increase the precision further; for example, the precision is less than 0.5 Eab for a nonuniform 9-level LUT. Moreover, the interpolation errors of various geometrical techniques are about the same; the differences from the best to the worst are small; they range from about 1 Eab for a 5-level uniform LUT to less than 0.05 for a 9-level nonuniform packing. The error peaks at the center of the cube and diminishes at the lattice points. The highest amplitude occurs at the lowest level (darker colors) in the forward transformation. For equally spaced LUTs, the amplitude damps quickly. For unequally spaced LUTs, the fundamental peak is lower but the errors ripple to higher levels, resulting in a more even error distribution. In the case of RGB encoding standards that have gamma correction, the highest accuracies are obtained from uniform 3D LUTs because the gamma correction linearizes the RGB values to the luminance Y. The 3D lookup table with interpolation has numerous applications in scanner, monitor, and printer calibrations. Compared to other transformation techniques, the 3D-LUT approach provides better accuracy because it has the advantage that the color space can always be further divided by increasing the sampling rate to improve accuracy. If the sampling rate is high enough, the linear interpolation becomes a very good approximation for computing a point that is not a lattice point. For the interpolation techniques, the tetrahedral interpolation has the lowest computation and implementation costs, highest processing speed, and a simpler analytical scheme to obtain the inverse lookup table. This method has been applied successfully to the device characterizations and calibrations, and color renditions of electronic images.24–32
References 1. InterColor Consortium, InterColor Profile Format, Version 3.0 (1994). 2. J. M. Kasson, W. Plouffe, and S. I. Nin, A tetrahedral interpolation technique for color space conversion, Proc. SPIE 1909, pp. 127–138 (1993). 3. P. C. Pugsley, Image reproduction methods and apparatus, British Patent No. 1,369,702 (1974). 4. K. Kanamori, T. Fumoto, and H. Kotera, A color transformation algorithm using prism interpolation, IS&T 8th Int. Congress on Advances in Non-Impact Printing Technologies, pp. 477–482 (1992).
Three-Dimensional Lookup Table with Interpolation
181
5. K. Kanamori, H. Kotera, O. Yamada, H. Motomura, R. Iikawa, and T. Fumoto, Fast color processor with programmable interpolation by Small Memory (PRISM), J. Electron. Imag. 2, pp. 213–224 (1993). 6. H. Kotera, K. Kanamori, T. Fumoto, O. Yamada, H. Motomura, and M. Inoue A single chip color processor for device independent color reproduction, 1st IS&T/SID’s Color Imaging Conf.: Transforms and Transportability of Color, pp. 133–137 (1993). 7. P. Flanklin, Interpolation methods and apparatus, U.S. Patent No. 4,334,240 (1982). 8. M. Iri, A method of multi-dimensional linear interpolation, J. Info. Processing Soc. Japan 8, pp. 33–36 (1968). 9. N. I. Korman and J. A. C. Yule, Digital computation of dot areas in a colour scanner, Proc. 11th Int. Conf. of Printing Research Institutes, Canandaigua, NY, Edited by W. H. Banks, pp. 93–106 (1971). Hensenstamm: P. Keppler (1973). 10. T. Sakamoto and A. Itooka, Interpolation method for memory devices, Japanese Patent Disclosure 53-123201 (1978). 11. T. Sakamoto and A. Itooka, Linear Interpolator for Color Correction, U.S. Patent No. 4,275,413 (1981). 12. T. Sakamoto, Interpolation method for memory devices, Japanese Patent Disclosure 57-208765 (1982). 13. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, Chaps. 4 and 6 (1997). 14. H. R. Kang, Comparisons of Three-Dimensional Interpolation Techniques by Simulations, Device-independent color imaging II, Proc. SPIE 2414, pp. 104– 114 (1995). 15. H. R. Kang, Printer-related color processing techniques, Color hard copy and graphic arts III, Proc. SPIE 2413, pp. 410–419 (1995). 16. I. E. Bell and W. Cowan, Characterizing printer gamuts using tetrahedral interpolation, 1st IS&T/SID’s Color Imaging Conf.: Transforms and Transportability of Color, pp. 108–113 (1993). 17. J. P. Allebach, J. Z. Chang, and C. A. Bouman, Efficient implementation of nonlinear color transformations, 1st IS&T/SID’s Color Imaging Conf.: Transforms and Transportability of Color, pp. 143–148 (1993). 18. J. Z. Chang, C. A. Bouman, and J. P. Allebach, Recent results in color calibration using sequential linear interpolation, IS&T’s 47th Annual Conf./ICPS, pp. 500–505 (1994). 19. R. Rolleston, Using Shepard’s interpolation to build color transformation tables, 2nd IS&T/SID’s Color Imaging Conf.: Color Science, Systems, and Applications, pp. 74–77 (1994). 20. XNSS 288811, Color Encoding Standard, Xerox Corporation. 21. K. Kanamori, H. Kotera, O. Yamada, H. Motomura, R. Iikawa, and T. Fumoto, Fast color processor with programmable interpolation by Small Memory (PRISM), J. Electron. Imag. 2, pp. 213–224 (1993).
182
Computational Color Technology
22. H. Kotera, K. Kanamori, T. Fumoto, O. Yamada, H. Motomura, and M. Inoue, A single chip color processor for device independent color reproduction, 1st IS&T and SID’s Color Imaging Conference: Transforms and Transportability of Color, pp. 133–137 (1993). 23. J. M. Kasson, W. Plouffe, and S. I. Nin, A Tetrahedral Interpolation Technique for Color Space Conversion, Proc. SPIE 1909, pp. 127–138 (1993). 24. D. A. Clark, D. C. Strong, and T. Q. White, Method of color conversion with improved interpolation, U.S. Patent No. 4,477,833 (1984). 25. H. Ikegami, New direct color mapping method for reducing the storage capacity of look-up table memory, Proc. SPIE 1075, pp. 1075–1105 (1989). 26. K. Kanamori, H. Kawakami, and H. Kotera, A novel color transformation algorithm and its applications, Image Processing Algorithm and Techniques, Proc. SPIE 1244, pp. 272–281 (1990). 27. K. Kanamori and H. Kotera, A method for selective color control in perceptual color space, J. Imaging Sci. Techn. 35(5), pp. 307–316 (1991). 28. Po-Chieh Hung, Colorimetric calibration for scanners and media, Proc. SPIE 1448, pp. 164–174 (1991). 29. K. Kanamori and H. Kotera, Color correction technique for hard copies by 4neighbors interpolation method, J. Imaging Sci. Techn. 36, pp. 73–80 (1992). 30. S. I. Nin, J. M. Kasson, and W. Plouffe, Printing CIELAB Images on a CMYK printer using tri-linear interpolation, Color hard copy and graphic arts, Proc. SPIE 1670, pp. 316–324 (1992). 31. P.-C. Hung, Colorimetric calibration in electronic imaging devices using a look-up-table model and interpolations, J. Electron. Imag. 2, pp. 53–61 (1993). 32. K. D. Gennetten, RGB to CMYK conversion using 3D barycentric interpolation, Device-independent color imaging and imaging systems integration, Proc. SPIE 1909, pp. 116–126 (1993).
Chapter 10
Metameric Decomposition and Reconstruction
This chapter presents the applications of the matrix R theory for spectrum decomposition and reconstruction. We apply the method to spectra of seven illuminants and fourteen spectra used in the color rendering index (CRI) under the CIE 1931 or CIE 1964 standard observer. The common characteristics are derived and discussed. Based on these characteristics, we develop two methods for deriving two basis vectors that can be used to reconstruct various illuminants to some degree of accuracy. The first method uses the intuitive approach of averaging to generate basis vectors. The second method uses input tristimulus values to obtain the fundamental metamer via orthogonal projection, and the metameric black is obtained from a set of coefficients to scale the average metameric black. The coefficients are derived from ratios of input tristimulus values to average tristimulus values. These methods are applied to reconstruct 7 illuminants and 14 CRI spectra. The application of the metameric spectral reconstruction to the estimation of the fundamental metamer from an RGB or XYZ color scanner for accessing skin-tone reproducibility is also discussed.
10.1 Metameric Spectrum Decomposition In Section 3.2, we showed that any spectrum ηi could be decomposed to a fundamental and a metameric black using the matrix R.1–3 T T T R = A(AT A)−1 AT = AM −1 a A = AM e A = M f A
(10.1)
´ M f AT ηi = M f Υ = A(AT A)−1 Υ = η,
(10.2)
where Υ = AT ηi is a 3 × 1 vector of tristimulus values. Matrix R has a size of n × n because M f is n × 3 and AT is 3 × n, where n is the number of elements in vector ηi . But R has a rank of three only because it is derived solely from matrix A, having three independent columns. It decomposes the spectrum of the stimulus into two components, the fundamental η´ and the metameric black κ, as given in 183
184
Computational Color Technology
Eqs. (10.3) and (10.4), respectively, where the fundamental is common within any group of mutual metamers, but metameric blacks are different. η´ = Rηi ,
(10.3)
κ = ηi − η´ = ηi − Rηi = (I − R)ηi .
(10.4)
and
Figures 10.1 and 10.2 show the metameric decompositions of spectral power distributions (SPDs) of illuminants D65 and A, respectively. Inversely, the stimulus spectrum can be reconstructed if the fundamental and metameric black are known.1,4 ηi = η´ + κ = Rηi + (I − R)ηi .
(10.5)
To show the performance of the spectrum reconstruction using Eq. (10.5), we use the SPDs of the illuminants and fourteen spectra of the color rendering index. This set is small, yet contains a very different spectral shape for testing the reconstruction method. The set is small; thus, it is easy to analyze in detail without losing
Figure 10.1 Metameric decomposition of illuminant D65 .
Metameric Decomposition and Reconstruction
185
Figure 10.2 Metameric decomposition of illuminant A.
oneself in a sea of data, such as the Munsell chip set. Also, this set is in the public domain and is readily available to users who are interested in duplicating the results and verifying the algorithm. It provides a good learning practice, which is not available by using private data. Applying the method of spectrum decomposition to a set of 7 illuminants and 14 CRI spectra, we derive the fundamental metamers and metameric blacks of illuminants A, B, C, D50 , D55 , D65 , and D75 as shown in Figs. 10.3 and 10.4, and CRI spectrum decompositions in Figs. 10.5 and 10.6. Results reaffirm Cohen’s observations as follows: (1) The broadband and smoothly varying spectrum gives a fundamental metamer of positive values (see Figs. 10.3 and 10.5). (2) The fundamental metamers cross the input spectrum three or four times (see Figs. 10.4 and 10.6). (3) The fundamental and metameric black are mirror images of each other, where the peak of one component is the valley of the other and vice versa (see Figs. 10.7 and 10.8).1
186
Computational Color Technology
Figure 10.3 Fundamental metamers of seven illuminants and average under CIE 1931 CMF.
Figure 10.4 Metameric blacks of seven illuminants and average under CIE 1931 CMF.
Metameric Decomposition and Reconstruction
187
Figure 10.5 Fundamental metamers of 14 CRI spectra and average under CIE 1931 CMF.
Although the magnitudes of spectra are not the same, the general shapes are similar in that the peaks and valleys occur approximately at the same wavelengths. In particular, all spectra of the metameric blacks in Figs. 10.4 and 10.6, including the average spectrum, cross over the x-axis exactly four times at exactly the same points of 430, 470, 538, and 610 nm; it seems that their shapes differ in magnitude only by a scaling factor. The same crossover points are shown in Cohen’s study of illuminants. Another interesting point is that the average (or sum) of metameric blacks is still a metameric black, as shown in Eq. (10.6), that is an extension of the matrix R property 9 given in Chapter 3. AT κ¯ = (1/m)AT (κ 1 + κ 2 + · · · + κ m ) = (1/m) AT κ 1 + AT κ 2 + · · · + AT κ m = 0.
(10.6)
In fact, the normalized spectral distributions of all illuminants are identical. η´ A (λ)/E A (λ) = η´ B (λ)/E B (λ) = η´ C (λ)/E C (λ) = η´ D50 (λ)/E D50 (λ) = η´ D55 (λ)/E D55 (λ) = η´ D65 (λ)/E D65 (λ) = η´ D75 (λ)/E D75 (λ)
(10.7a)
188
Computational Color Technology
Figure 10.6 Metameric blacks of 14 CRI spectra and average under CIE 1931 CMF.
κ A (λ)/E A (λ) = κ B (λ)/E B (λ) = κ C (λ)/E C (λ) = κ D50 (λ)/E D50 (λ) = κ D55 (λ)/E D55 (λ) = κ D65 (λ)/E D65 (λ) = κ D75 (λ)/E D75 (λ).
(10.7b)
This is because ηi (λ) = Ei (λ) = η´ i (λ) + κi (λ),
(10.8)
where Ei (λ) is the SPD of an illuminant i. As a result, the normalization by Ei (λ), gives 1 = η´ i (λ)/Ei (λ) + κi (λ)/Ei (λ).
(10.9)
Equation (10.9) represents an equal-energy illuminant; Fig. 10.7 gives the power distributions of the normalized equal-energy illuminant under CIE 1931 CMF and CIE 1964 CMF.
Metameric Decomposition and Reconstruction
189
Figure 10.7 The normalized spectral power distribution of seven illuminants under two CIE standard observers.
10.2 Metameric Spectrum Reconstruction A spectrum can be faithfully or metamerically reconstructed via Eq. (10.5) if the fundamental and metameric black are known. This is the basic property of metamer reconstruction. The task that we want to address is: can we reconstruct a spectrum without knowing its components? The similarity in fundamentals and metameric blacks among different illuminants leads to finding a single set of two basis vectors that can be used to represent all illuminants involved. This finding makes it possible to reconstruct a spectrum without knowing its components. Two methods are proposed to recover the input spectrum from the fundamental and the metameric black. 10.2.1 Spectrum reconstruction from the fundamental and metameric black The first method is an intuitive one, where we simply average the fundamental ¯´ j ) and metameric blacks κ(λ ¯ j ) of all illuminants of interest. metamers η(λ
190
Computational Color Technology
Figure 10.8 The average spectral power distribution of seven illuminants under two CIE standard observers.
K ¯´ j ) = 1 η(λ η´ i (λj ), K i=1
κ(λ ¯ j) =
K 1 κi (λj ), K
(10.10)
i=1
where K is the number of illuminants (or spectra). We then use them as the basis vectors for spectrum reconstruction. Figure 10.8 gives the average spectral power distribution (SPD) of all seven illuminants under two different CMFs. These spectra are used to find the weights in Eq. (10.11) for reconstruction. ¯´ 1 ) ¯´ 1 ) η(λ η(λ κ(λ ¯ 1) η(λ1 ) ¯ ¯ ¯ 2 ) η(λ ´ 2) ´ 2) κ(λ η(λ2 ) η(λ ¯ ¯ ) ) η(λ κ(λ ¯ ´ 3) ´ 3) 3 3 = w1 η(λ = η(λ + w2 ... ... ... ... ... ... ... ... ¯η(λ ¯´ n ) ) η(λn ) κ(λ ¯ n ´ n) η(λ
κ(λ ¯ 1) κ(λ ¯ 2) w1 κ(λ ¯ 3) , . . . w2 ... κ(λ ¯ n) (10.11a)
Metameric Decomposition and Reconstruction
191
where wi is the weight or coefficient of a given basis vector. This explicit expression in Eq. (10.11a) can be represented compactly in matrix-vector notation as η = w1 η¯´ + w2 κ¯ = BW ,
(10.11b)
where B is an n × m matrix and w is a vector of m elements (in this case, m = 2 and n is the number of sample points in the spectrum or SPD). If matrix B is known, we can derive the weights for a given input-object spectrum by using the pseudo-inverse transformation. W = (B T B)−1 B T η.
(10.12)
Matrix B T has a size of m × n; therefore, (B T B) has a size of m × m. Because only two components are used in spectrum reconstruction, m is much smaller than n to ensure a nonsingular matrix for (B T B). The reconstructed spectrum ηc is then given as ηc = BW .
(10.13)
10.2.2 Spectrum reconstruction from tristimulus values The second method uses the input tristimulus values Υ to obtain the fundamental via Eq. (10.2) because the matrix M f of fundamental primaries is known for a given color-matching function (see property 10 in Chapter 3). Once we obtain the fundamental, we presumably can invert Eq. (10.3) to recover the spectrum. The problem with this approach to recover a spectrum is that the matrix R has a size of n × n but a rank of only 3, where n 3. Therefore, R is singular and cannot be inverted. We need other ways of finding the metameric black from the input tristimulus values. The average spectrum of metameric blacks is a good starting point, perhaps with some weighting. The metameric blacks of seven illuminants are similar in the sense that they all cross over at the same wavelengths (see Fig. 10.4). This is also true for fourteen CRI spectra (see Fig. 10.6). Moreover, the normalized “average metameric black” of seven illuminants almost coincides with the average CRI metameric black, except in two extremes of the visible range as shown in Fig. 10.9. Differences in the two extremes may not cause serious problems because two extremes are visually the least sensitive. Judging from the same crossing points and remarkable similarity in shape, it is possible to find the weighting factor with respect to the input tristimulus values. Therefore, it is possible to represent the metameric black of any spectra by an average with weights as shown in Eq. (10.14). ¯ η = η´ + κ = M f Υ + β κ,
(10.14a)
192
Computational Color Technology
Figure 10.9 Comparison of the average metameric blacks from illuminants and CRI spectra.
or explicitly, η(λ ´ 1) β1 η(λ1 ) η(λ2 ) η(λ ´ 2) 0 η(λ3 ) η(λ ´ ) 0 . . . = . . .3 + . . . ... ... ... η(λn ) η(λ ´ n) 0
κ(λ ¯ 1) 0 0 κ(λ ¯ 2) 0 κ(λ ¯ 3) . ... ... ... ... βn κ(λ ¯ n) (10.14b) The element βi is the ratio of the metameric black to the average at the ith wavelength. The weight vector β can be derived from input tristimulus values; each element is viewed as the linear combination of tristimulus ratios, X r , Y r , and Z r .
X r = Xj /X avg ,
0 0 0 0 0 0 β2 0 0 0 β3 0 ... ... ... ... ... ... ... ... 0 0 0 ...
Y r = Yj /Y avg ,
... ... ... ... ... 0
Z r = Zj /Z avg ,
(10.15)
where X avg , Y avg , and Z avg are the average tristimulus values of a training set, and Xj , Yj , and Zj are the tristimulus of j th element. βi = αi1 X r + αi2 Y r + αi3 Z r + αi4 X r Y r + αi5 Y r Z r + αi6 Z r X r + · · · .
(10.16)
Metameric Decomposition and Reconstruction
193
For all β values sampled across the visible range, we can put them in a matrixvector form as given in Eq. (10.17) for a six-term polynomial.
β1 α11 β2 α21 β3 α31 β4 α41 β5 α51 = β6 α61 β7 α71 ... ... ... ... βn αn1
α12 α22 α32 α42 α52 α62 α72 ... ... αn2
α13 α23 α33 α43 α53 α63 α73 ... ... αn3
α14 α24 α34 α44 α54 α64 α74 ... ... αn4
α15 α25 α35 α45 α55 α65 α75 ... ... αn5
α16 α26 α36 Xr α46 Y r α56 Z r α66 X r Y r α76 Y r Z r . . . Z r Xr ... αn6
(10.17a)
or β = αΥ r ,
(10.17b)
where Υ r is a vector of tristimulus ratios and their higher polynomial terms. To derive coefficients in matrix α, we get them one wavelength at a time by using the training set. For j sets of tristimulus ratios, by employing Eq. (10.16), we have βij = αi1 Xr,j + αi2 Yr,j + αi3 Zr,j + αi4 Xr,j Yr,j + αi5 Yr,j Zr,j + αi6 Zr,j Xr,j + · · · . (10.18) For a six-term polynomial, we have
βi1 Xr,1 βi2 X r,2 βi3 X r,3 βi4 X r,4 βi5 X r,5 = βi6 X r,6 βi7 X r,7 ... ... ... ... βij Xr,j
Y r,1 Y r,2 Y r,3 Y r,4 Y r,5 Y r,6 Y r,7 ... ... Yr,j
Z r,1 Z r,2 Z r,3 Z r,4 Z r,5 Z r,6 Z r,7 ... ... Zr,j
X r,1 Y r,1 X r,2 Y r,2 X r,3 Y r,3 X r,4 Y r,4 X r,5 Y r,5 X r,6 Y r,6 X r,7 Y r,7 ... ... Xr,j Yr,j
Y r,1 Z r,1 Y r,2 Z r,2 Y r,3 Z r,3 Y r,4 Z r,4 Y r,5 Z r,5 Y r,6 Z r,6 Y r,7 Z r,7 ... ... Yr,j Zr,j
Z r,1 X r,1 Z r,2 X r,2 Z r,3 X r,3 αi1 Z r,4 X r,4 αi2 Z r,5 X r,5 αi3 Z r,6 X r,6 αi4 Z r,7 X r,7 αi5 . . . αi6 ... Zr,j Xr,j (10.19a)
or β i = Υ r,j α i .
(10.19b)
The matrix Υ r,j , in this case, is the tristimulus ratios of all j training samples; it is known (or can be calculated) for a given set of samples. The vector β i at a given wavelength can also be computed. Therefore, vector α i of coefficients can be obtained by inverting Eq. (10.19b) using pseudo-inversion. Note that the number of
194
Computational Color Technology
the training samples j must be greater than (or equal to) the number of polynomial terms in vector Υ r in order to have a unique solution for Eq. (10.20). −1 T Υ r,j β i . α i = Υ Tr,j Υ Tr,j
(10.20)
Equation (10.20) must perform n times for all wavelengths sampled in the visible range, where matrix Υ r,j is the same for all wavelengths. Once α is obtained, we can compute β from input tristimulus vector Υ r using Eq. (10.17). The resulting β is then used in Eq. (10.14) to obtain the metameric black for the input tristimulus values. 10.2.3 Error measures The spectral difference η is computed by η = (Σ|ηc − η|)/n.
(10.21)
The summation carries over all n sample points, and the standard deviation ηstd can also be computed via Eq. (10.22). ηstd =
1/2 Σ|ηc − η|2 /n .
(10.22)
Furthermore, the input and computed spectra are converted to tristimulus values and CIELAB values under a selected illuminant such that the color difference in CIELAB space can be calculated as a measure of the goodness of the spectrum reconstruction.
10.3 Results of Spectrum Reconstruction In this section, we present the results of spectrum reconstruction using two different methods. The first method uses the average spectra of fundamental and metameric black and the second method uses tristimulus values to reconstruct the spectrum. 10.3.1 Results from average fundamental and metameric black Table 10.1 lists the weights of basis vectors and reconstruction accuracies. The spectrum reconstruction accuracy is good for D50 , D55 , and B, marginally acceptable for D65 and C, and poor for D75 and A. The plots of seven illuminants and their reconstructed spectra are given in Figs. 10.10–10.16. The accuracy improves for D65 and D75 if only D illuminants are used for deriving the basis vectors (see Table 10.2). It is quite apparent that the reconstructed spectrum does not closely match the original (what would you expect from only two basis vectors?). Note that the use of average spectra of fundamental and metameric black for reconstruction
Metameric Decomposition and Reconstruction
195
Table 10.1 The weights of the basis vectors and spectrum reconstruction accuracies using the basis vectors derived from seven illuminants.
Weight
Spectrum
Illuminant
Observer
1
2
η
ηstd
D50
CIE 1931 CIE 1964 CIE 1931 CIE 1964 CIE 1931 CIE 1964 CIE 1931 CIE 1964 CIE 1931 CIE 1964 CIE 1931 CIE 1964 CIE 1931 CIE 1964
0.9610 0.9607 0.9854 0.9868 1.0341 1.0385 1.0789 1.0854 0.8941 0.8810 0.9712 0.9696 1.0753 1.0780
0.9431 0.9435 0.9060 0.9005 0.8735 0.8588 0.8706 0.8492 1.5363 1.5846 0.9810 0.9852 0.8895 0.8782
0.044 0.044 0.040 0.037 0.132 0.127 0.211 0.205 0.422 0.404 0.049 0.049 0.130 0.127
0.054 0.054 0.046 0.044 0.145 0.141 0.233 0.229 0.458 0.441 0.061 0.061 0.147 0.144
D55 D65 D75 A B C
Figure 10.10 Comparison of illuminant D50 and its reconstructed spectra using two basis vectors.
196
Computational Color Technology
Figure 10.11 Comparison of illuminant D55 and its reconstructed spectra using two basis vectors.
Figure 10.12 Comparison of illuminant D65 and its reconstructed spectra using two basis vectors.
Metameric Decomposition and Reconstruction
197
Figure 10.13 Comparison of illuminant D75 and its reconstructed spectra using two basis vectors.
Figure 10.14 Comparison of illuminant A and its reconstructed spectra using two basis vectors.
198
Computational Color Technology
Figure 10.15 Comparison of illuminant B and its reconstructed spectra using two basis vectors.
Figure 10.16 Comparison of illuminant C and its reconstructed spectra using two basis vectors.
Metameric Decomposition and Reconstruction
199
Table 10.2 The weights of the basis vectors and spectrum reconstruction accuracies using the basis vectors derived from four D illuminants.
Weight
Spectrum
Illuminant
Observer
1
2
η
ηstd
D50 D55 D65 D75
CIE 1931 CIE 1931 CIE 1931 CIE 1931
0.9394 0.9674 1.0220 1.0712
1.0193 0.9945 0.9847 1.0016
0.117 0.055 0.047 0.126
0.130 0.062 0.051 0.140
Table 10.3 The weights of basis vectors and spectrum reconstruction accuracies using the basis vectors derived from 14 CRI spectra.
Weight
Spectrum
Sample
Observer
1
2
η
ηstd
CRI #1 CRI #2 CRI #3 CRI #4 CRI #5 CRI #6 CRI #7 CRI #8 CRI #9 CRI #10 CRI #11 CRI #12 CRI #13 CRI #14
CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931
1.0690 0.9101 0.8400 0.8633 1.0828 1.2393 1.2710 1.3076 0.4835 1.7039 0.5723 0.3738 1.9479 0.3356
1.1570 0.7968 0.6444 0.4704 0.6290 0.9085 1.3515 1.8034 1.8925 1.6261 0.4062 0.2169 1.8174 0.2798
0.048 0.046 0.069 0.071 0.106 0.147 0.115 0.081 0.148 0.186 0.071 0.089 0.082 0.026
0.058 0.055 0.084 0.089 0.118 0.164 0.142 0.095 0.180 0.207 0.089 0.110 0.089 0.030
does not necessarily produce a metamer that crosses over the original three or four times as shown in Figs. 10.12–10.14, where there is only one crossover. The same process is applied to fourteen CRI spectra, where the average fundamental and metameric black of these fourteen spectra are used, and are shown in Figs. 10.5 and 10.6, respectively. Results of the spectrum reconstruction are given in Table 10.3; the accuracies are on the same order as the reconstruction of illuminants. 10.3.2 Results of spectrum reconstruction from tristimulus values Results of spectrum reconstruction from tristimulus values are given in Tables 10.4 and 10.5 for illuminants and CRI spectra reconstruction, respectively. The accuracies are comparable to, perhaps slightly better than, the reconstruction from average fundamental and metameric black. Moreover, there is a unique feature in that the reconstructed spectrum is always the metamer of the original. This is the basic property of the metamer reconstruction from tristimulus values.
200
Computational Color Technology
Table 10.4 The spectrum reconstruction accuracies using tristimulus values from 7 illuminants.
Spectrum Illuminant
Observer
η
ηstd
D50 D55 D65 D75 A B C
CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931
0.050 0.048 0.048 0.053 0.151 0.040 0.052
0.088 0.076 0.065 0.064 0.189 0.049 0.065
Table 10.5 The spectrum reconstruction accuracies using tristimulus values from 14 CRI spectra.
Spectrum Sample
Observer
η
ηstd
CRI #1 CRI #2 CRI #3 CRI #4 CRI #5 CRI #6 CRI #7 CRI #8 CRI #9 CRI #10 CRI #11 CRI #12 CRI #13 CRI #14
CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931 CIE 1931
0.055 0.028 0.030 0.036 0.034 0.041 0.049 0.074 0.101 0.037 0.049 0.058 0.039 0.013
0.067 0.047 0.041 0.042 0.041 0.058 0.073 0.081 0.124 0.044 0.064 0.072 0.048 0.018
10.4 Application Kotera and colleagues applied metameric decomposition to the spectrum reconstruction of a color scanner with the intent to estimate the skin-tone reproducibility. For the RGB scanner, they built an n × 3 matrix Ar containing the rgb spectral sensitivity [r(λ), g(λ), b(λ)] of the scanner, similar to the tristimulus matrix A.5
r(λ1 ) r(λ2 ) r(λ ) 3 Ar = ... ... r(λn )
g(λ1 ) g(λ2 ) g(λ3 ) ... ... g(λn )
b(λ1 ) r1 g1 b1 b(λ2 ) r2 g2 b2 b(λ3 ) r3 g3 b3 . ... ... ... ... ... ... ... ... b(λn ) rn gn bn
(10.23)
Metameric Decomposition and Reconstruction
201
The first method that they proposed to obtain the fundamental from input RGB signals Υ p = [R, G, B] was to perform an orthogonal projection directly by substituting Ar for A in Eq. (10.2). η´ r = Ar (ATr Ar )−1 Υ p .
(10.24)
Other methods used the corrected RGB signals Υ c = M c Υ p ; the input RGB signals were transformed by a 3 × 3 matrix M c to minimize the mean-square error between the RGB signals and the tristimulus values for a set of test color chips. This matrix M c could be viewed as the nonsingular transformation matrix M of Eq. (3.22) that ensures invariance in R (see Chapter 3). In a method that they called corrected pseudo-inverse projection. The RGB spectral sensitivity matrix Ar was corrected by M c , ATc = M c ATr . After the correction, the fundamental is given as η´ r = Ac (ATc Ac )−1 Υ p .
(10.25)
Again, Eq. (10.25) is a substitution of Eq. (10.2). In yet another method, called colorimetric pseudo-inverse projection, they estimated the fundamental by using Eq. (10.2) directly on the corrected RGB input signals Υ c . η´ r = A(AT A)−1 Υ c = A(AT A)−1 M c Υ p .
(10.26)
They proceeded to propose several more methods by incorporating a smoothing matrix because direct inversion from scanner RGB signals often resulted in an irregular spectral shape (see Ref. 5 for more details). These methods were compared for estimating skin tones. Results indicated that the fundamental metamer was best recovered by Eq. (10.26), the colorimetric pseudo-inverse projection.
10.5 Remarks With using only two components, the reconstructed spectrum is not very close to the original spectrum. It is not realistic to expect it to be so. Nonetheless, these methods provide a means to reconstruct a spectrum at a minimal cost. The first method of spectrum reconstruction requires information about the input spectrum. This method makes little sense because if one has the spectrum already, why would one need to reconstruct it? The application lies in the image transmission, where the basis vectors are stored in both the source and destination. At the source, the input spectrum is converted to weights; then, only the weights are transmitted. At the destination, the received weights are converted back to spectrum using the stored basis vectors. Depending on the sample rate of the spectrum, the savings in transmission speed and bandwidth are significant. For example, a 10-nm sampling of a visible spectrum to give 31 data points can be represented by only two weights. The compression ratio is about 15:1. The second method is powerful. One can get the spectrum by knowing only the tristimulus values. It can also be used in image transmission by sending only tristimulus values.
202
Computational Color Technology
References 1. J. B. Cohen and W. E. Kappauf, Metameric color stimuli, fundamental metamers, and Wyszecki’s metameric blacks, Am. J. Psychology 95, pp. 537– 564 (1982). 2. J. B. Cohen and W. E. Kappauf, Color mixture and fundamental metamers: Theory, algebra, geometry, application, Am. J. Psychology 98, pp. 171–259 (1985). 3. J. B. Cohen, Color and color mixture: Scalar and vector fundamentals, Color Res. Appl. 13, pp. 5–39 (1988). 4. H. J. Trussell, Applications of set theoretic methods to color systems, Color Res. Appl. 16, pp. 31–41 (1991). 5. H. Kotera, H. Motomura, and T. Fumoto, Recovery of fundamental spectrum from color signals, 4th IS&T/SID Color Imaging Conf., pp. 141–144 (1994).
Chapter 11
Spectrum Decomposition and Reconstruction It has been shown that the illuminant and object spectra could be approximated to a very high degree of accuracy by linearly combining a few principal components. As early as 1964, Judd, MacAdam, and Wyszecki reported that various daylight illuminations could be approximated by three components1 (see Section 1.5) and Cohen showed that the spectra of Munsell color chips could be accurately represented by a few principal components.2 Using principal component analysis (PCA), Cohen reported that the first basis vector alone accounted for 92.72% of the cumulative variance, and merely three or four vectors accounted for 99% variance or better. As a result, principal-component analysis became an extremely powerful tool for the computational color technology community. These findings led to the establishment of a finite-dimensional linear model. Combining with the rich contents of linear algebra and matrix theory, the model provides powerful applications in color science and technology. Many color scientists and researchers have contributed to the building and applying of this model to numerous color-image processing areas such as color transformation, white-point conversion, metameric pairing, indexing of metamerism, object spectrum reconstruction, illuminant spectrum reconstruction, color constancy, chromatic adaptation, and targetless scanner characterization. In this chapter, we present several methods for spectrum decomposition and reconstruction, including orthogonal projection, smoothing inverse, Wiener inverse, and principal component analysis. Principal components from several publications are compiled and evaluated by using a set of fourteen spectra employed for the color rendering index. Their similarities and differences are discussed. New methods of spectrum reconstruction directly from tristimulus values are developed and tested.
11.1 Spectrum Reconstruction Many methods have been developed for spectrum reconstruction. They are classified into two main groups: interpolation and estimation methods. Interpolation methods include the linear, cubic, spline, discrete Fourier transform, and discrete sine transform. We have discussed a few interpolation methods in Chapter 9. Es203
204
Computational Color Technology
timation methods include polynomial regression, Moore-Penrose pseudo-inverse, smoothing inverse, Wiener inverse, principal component analysis, and others. As pointed out in Chapter 1, a major advantage in the definition of tristimulus values is the approximation from integration to summations3 such that linear algebra can be applied to the vector-matrix representations of tristimulus values given in Eq. (11.1) for spectrum decomposition and reconstruction. Υ = k AT E S = kÆT S, ÆT = AT E,
(11.1) (11.2)
where Υ = [X, Y, Z]T represents the tristimulus values. The scalar k is a normalizing constant. Matrix A is a sampled CMF with a size of n × 3, where the column number of three is due to the trichromatic nature of human vision and the row number n is the number of sample points. Matrix A has three independent columns; therefore, it has a rank of three, spanning a 3D color-stimulus space. Vector E is the sampled SPD of an illuminant represented as a diagonal matrix with a size of n × n. Matrix Æ can be viewed as the viewing conditions or a weighted CMF. It gives an n × 3 matrix, containing elements of the products of illuminant and colormatching functions. Parameter S is a vector of n elements obtained by sampling the object spectrum at the same rate as the illuminant and CMF. Equation (11.1) is the forward transform from the object spectrum to tristimulus value defined by CIE, where the dimensionality is reduced from n to three (n is usually much larger than three), a process of losing a large amount of information. The spectrum reconstruction utilizes the inverse transform from tristimulus values to the object spectrum, where the dimensionality increases from three to n, a process of creating information via a prior knowledge. Conceivably, one can take advantage of the matrix-vector representation and linear algebra to obtain the object spectrum by using a direct pseudo-inverse transform as given in Eq. (11.3). −1 S = k −1 ÆÆT ÆΥ .
(11.3)
Matrix Æ has a size of n × 3 with a rank of three (three independent columns). The product of (ÆÆT ) is an n × n symmetric matrix with three independent components (n 3). Therefore, matrix (ÆÆT ) is singular and cannot be inverted. As a result, there is no unique solution for Eq. (11.3).
11.2 General Inverse Method Linear algebra provides methods for inverse problems such as the one posted in Eq. (11.1) by minimizing a specific vector norm S N , where 1/2 , S N = SN S T
(11.4)
Spectrum Decomposition and Reconstruction
205
and N is the norm matrix. The optimal solution S of the minimal norm is given as −1 S = k −1 N −1 Æ ÆT N −1 Æ Υ .
(11.5)
Depending on the content of the norm matrix N , one can have orthogonal projection, smoothing inverse, or Wiener inverse. 11.2.1 Spectrum reconstruction via orthogonal projection If the identity matrix I is used as the norm matrix N , Eq. (11.5) becomes −1 S = k −1 Æ ÆT Æ Υ = k −1 Æ+ Υ ,
(11.6)
to give the solution of the minimum Euclidean norm, where Æ+ = Æ(ÆT Æ)−1 is the Moore-Penrose pseudo-inverse of ÆT . Unlike (ÆÆT ) of Eq. (11.3), the product (ÆT Æ) is a 3 × 3 symmetric matrix; with three independent columns in Æ, matrix (ÆT Æ) is not singular and can be inverted. Note that matrix Æ+ has the same structure as matrix M f of Eq. (3.9), which is the matrix used in orthogonal projection for metameric decomposition, if we substitute A with Æ. Results of applying Eq. (11.6) to reconstruct CRI spectra are given in Table 11.1, where ηstd is the standard deviation between the original and reconstructed spectra (see Section 10.2 for the definition of ηstd ) and Υ is the distance between the original and reconstructed tristimulus values. There are several interesting results: First, the spectrum reconstruction via orthogonal projection does not give a good estimate of the original spectrum, but it gives excellent agreements to the tristimulus values and small or no color difference. Second, this method is not sensitive to the illuminants tested in this study (see Figs. 11.1–11.3): different illuminants give similar reconstructed spectra. Generally, a reconstructed spectrum gives a twin-peak shape as shown in Figs. 11.1–11.3 because it is the orthogonal projection of a spectrum onto tristimulus space, just like the metameric decomposition of illuminants given in Fig. 10.1. As a result, this method will not give close estimates to original spectra. Because this is basically a metameric decomposition, the resulting spectrum is the metamer of the original. Therefore, the tristimulus values are identical for the original and reconstructed spectra and there is no color error; except in some cases, where out-of-range values are calculated by using Eq. (11.6) and are clipped as shown in Fig. 11.3 for the reconstructed spectra in the range from 480 to 550 nm. The clipping of the out-of range reflectance is due to the fact that the physically realizable spectrum cannot be negative. Moreover, this method is sensitive to noise.4 With these problems, the orthogonal projection is not well suited for spectrum reconstruction. 11.2.2 Spectrum reconstruction via smoothing inverse The smoothing inverse is closely related to orthogonal projection. It minimizes the “average squared second differences,” which is a measure of the spectrum curva-
CRI spectra 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Illuminant A ηstd Υ 0.217 0 0.152 0 0.134 0 0.112 0 0.151 0 0.202 0 0.281 0 0.345 0 0.364 3.19 0.322 0 0.103 0.01 0.057 0.06 0.343 0 0.059 0 Eab 0 0 0 0 0 0 0 0 14.71 0 0.04 0.64 0 0
D50 ηstd 0.226 0.157 0.132 0.106 0.151 0.206 0.286 0.356 0.380 0.330 0.096 0.063 0.357 0.058 Υ 0 0 0 0 0 0 0 0 3.19 0 0 0.38 0 0
Eab 0 0 0 0 0 0 0 0 17.82 0 0.01 2.52 0 0
D65 ηstd 0.229 0.160 0.133 0.104 0.150 0.204 0.286 0.359 0.385 0.335 0.093 0.066 0.363 0.058 Υ 0 0 0 0 0 0 0 0 3.24 0 0 0.54 0 0
Eab 0 0 0 0 0 0 0 0 18.79 0 0.01 3.04 0 0
D75 ηstd 0.231 0.161 0.133 0.104 0.149 0.204 0.286 0.360 0.387 0.337 0.092 0.067 0.365 0.058
Table 11.1 Results of reconstructed CRI spectra under four illuminants using orthogonal projection.
Υ 0 0 0 0 0 0 0 0 3.24 0 0 0.61 0 0
Eab 0 0 0 0 0 0 0 0 19.00 0 0 3.10 0 0
206 Computational Color Technology
Spectrum Decomposition and Reconstruction
207
Figure 11.1 Reconstructed CRI #1 spectra using orthogonal projection under four illuminants.
Figure 11.2 Reconstructed CRI #3 spectra using orthogonal projection under four illuminants.
208
Computational Color Technology
Figure 11.3 Reconstructed CRI #9 spectra using orthogonal projection under four illuminants.
ture. This criterion achieves smooth reconstructed spectra and leads to the following equation and norm matrix:4,5 T −1 −1 S = k −1 N −1 Υ, s Æ Æ Ns Æ 1 −2 1 0 0 −2 5 −4 1 0 1 −4 6 −4 1 1 −4 6 −4 0 ··· ··· ··· ··· ··· Ns = · · · · · · · · · · · · · · · ··· ··· ··· ··· ··· 1 −4 0 ··· 0 1 0 ··· ··· 0 0 ··· ··· ··· 0 0 ··· ··· ··· ···
··· ··· ··· 1 ··· ··· ··· 6 −4 1 0
··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· −4 1 6 −4 −4 5 1 −2
0 0 0 0 ··· ··· . ··· 0 1 −2 1
(11.7)
(11.8)
Unfortunately, the norm matrix N s is singular and cannot be inverted. Therefore, it must be modified by adding values to the diagonal elements; one way of modifying it is using Eq. (11.9). ´ s = N s + εI , N
(11.9)
Spectrum Decomposition and Reconstruction
209
where I is the identity matrix and ε is a small positive constant; Herzog and colleagues used a value of 10−10 for ε that works well.5 11.2.3 Spectrum reconstruction via Wiener inverse Spectrum reconstruction is possible using the conventional Wiener inverse, where there exists a matrix H that provides the spectrum of the object belonging to matrix Æ. S = k −1 H Υ
(11.10)
−1 H = µÆ ÆT µÆ ,
(11.11)
and
where µ is a correlation (or covariance) matrix of S, which is related to a priori knowledge about the object spectrum and is modeled as the first-order Markov covariance matrix of the form4,6 1 µ µ2 · · · · · · · · · · · · µn−1 1 µ µ2 · · · · · · · · · µn−2 µ 2 µ 1 µ µ2 · · · · · · µn−3 µ µ = ··· (11.12) ··· ··· ··· ··· ··· ··· ··· . ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· n−1 n−2 2 µ ··· ··· ··· µ µ 1 µ Parameter µ is the adjacent-element correlation factor that is within the range of [0, 1] and can be set by the experimenter; for example, Uchiyama and coworkers used µ = 0.999 in their study of a unified multispectral representation.6 The covariance matrix has a size of n × n, matrix Æ is n × 3, and its transpose is 3 × n; this gives the product (ÆT µÆ) and its inverse a size of 3 × 3. The size of matrix H is equal to n × 3 because it is the product of three matrices with µ(n × n), Æ(n × 3), and (ÆT µÆ)(3 × 3). Once the covariance matrix is selected, matrix H can be calculated because Æ is known if the CMF and illuminant are selected. The object spectrum is then estimated by substituting H into Eq. (11.10). Results of using the Wiener inverse to reconstruct CRI spectra are given in Table 11.2. With µ = 0.999, this method gives much better agreement with the original as compared to the orthogonal projection; the standard deviation is about an order of magnitude smaller than the corresponding results from the orthogonal projection. Figures 11.4–11.6 give the plots of reconstructed CRI spectra using the Wiener inverse under different illuminants; they fit the shapes of the originals much better than the orthogonal projection. Like the orthogonal projection, they are less sensitive to the illumination and give identical tristimulus values, unless there exist out-of-range values that must be clipped (see CRI #9 in Table 11.2).
CRI spectra 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Illuminant A ηstd Υ 0.015 0 0.010 0 0.051 0 0.043 0 0.031 0 0.072 0 0.034 0 0.094 0 0.143 1.37 0.034 0 0.066 0 0.096 0 0.047 0 0.027 0 Eab 0 0 0 0 0 0 0 0 6.63 0 0 0 0 0
D50 ηstd 0.012 0.011 0.047 0.034 0.026 0.074 0.042 0.113 0.180 0.035 0.063 0.096 0.046 0.025 Υ 0 0 0 0 0 0 0 0 1.31 0 0 0 0 0
Eab 0 0 0 0 0 0 0 0 7.82 0 0 0 0 0
D65 ηstd 0.012 0.011 0.047 0.030 0.024 0.075 0.046 0.120 0.193 0.037 0.062 0.094 0.045 0.025 Υ 0 0 0 0 0 0 0 0 1.28 0 0 0.03 0 0
Eab 0 0 0 0 0 0 0 0 7.93 0 0 0.22 0 0
D75 ηstd 0.012 0.011 0.047 0.028 0.023 0.076 0.047 0.123 0.199 0.037 0.061 0.093 0.045 0.024
Table 11.2 Results of reconstructed CRI spectra under four illuminants using the Wiener inverse.
Υ 0 0 0 0 0 0 0 0 1.25 0 0 0.10 0 0
Eab 0 0 0 0 0 0 0 0 7.89 0 0 0.54 0 0
210 Computational Color Technology
Spectrum Decomposition and Reconstruction
211
Figure 11.4 Reconstructed CRI #1 spectra using Wiener inverse under four illuminants.
Figure 11.5 Reconstructed CRI #3 spectra using Wiener inverse under four illuminants.
212
Computational Color Technology
Figure 11.6 Reconstructed CRI #9 spectra using Wiener inverse under four illuminants.
11.3 Spectrum Decomposition and Reconstruction Methods The methods that can perform both spectrum decomposition and reconstruction are orthogonal projection and PCA. Cohen and Kappauf used an orthogonal projector, projecting onto 3D color-stimulus space, to decompose stimuli into a fundamental metamer and a metameric black.7–9 Kotera and colleagues applied orthogonal projection together with the pseudo-inversion of matrices to reconstruct input spectra from scanner RGB inputs and filter spectral sensitivity functions.10 Kang proposed a method of converting tristimulus values to spectra using the fundamental and metameric black, and a method of spectrum reconstruction by using two basis vectors derived from the averages of fundamentals and metameric blacks (see Chapter 10). The orthogonal projection gives poor estimates for spectrum reconstruction. A more accurate method is PCA.
11.4 Principal Component Analysis In 1964, Cohen used the “linear component analysis by the centroid” method to decompose 150 Munsell spectra and obtained a set of four basis vectors (or “centroid components,” as called by Cohen) that accurately reconstructed spectra of 433 Munsell color chips.2 This method is the first application of PCA to color science. Since Cohen’s finding, PCA has been used extensively in color computations and analyses. In this section, we review this powerful method of principal component
Spectrum Decomposition and Reconstruction
213
analysis and its applications to object spectrum decomposition and reconstruction. There are two levels of object spectrum reconstruction from a set of basis vectors: one is from the input object spectra and the other is from the tristimulus values. The formulations for these two approaches are given. Results of using these formulations are compared by using available basis sets. From these results, we assess the quality of the spectrum reconstruction. According to Jolliffe, the earliest descriptions of principal component analysis (PCA) appear to have been given by Pearson in 1901 and Hotelling in 1933 for discrete random sequences.11 The central theme of PCA is to reduce the dimensionality of a data set while retaining as much as possible of the variation present in the data set. This reduction of a large number of interrelated variables is accomplished by transforming to a new set of variables, which are uncorrelated such that the first few principal components retain most of the variation. The Hotelling transform uses Lagrange multipliers and ends with an eigenfunction problem. Karhunen, in 1947, and Loéve, in 1948, published papers that are now called the KL transform. Originally, the KL transform was presented as a series expansion for a continuous random process. This is the continuous version of the discrete random sequences of the Hotelling transform. Therefore, principal component analysis is also known as the discrete KL transform or Hotelling transform; it is based on statistical properties of an image or signal.11–13 In the case of object reflection under an illumination, multiple spectra S i (i = 1, 2, 3, . . . , m) are taken and the mean S¯ is computed; each spectrum is sampled to a n × 1 vector S, where index j = 1, 2, 3, . . . , n. S i = [si (λ1 ) si (λ2 ) si (λ3 ) · · · si (λj ) · · · si (λn )]T = [si1 si2 si3 · · · sij · · · sin ]T
i = 1, 2, . . . , m
(11.14)
S¯ = [¯s (λ1 ) s¯ (λ2 ) s¯ (λ3 ) · · · s¯ (λj ) · · · s¯ (λn )]T = [¯s1 s¯2 s¯3 · · · s¯j · · · s¯n ]T , (11.15) and s¯ (λj ) = (1/m)
m
si (λj ),
(11.16)
i=1
where m is the number of input spectra. The basis vectors of the KL transform are given by the orthonormalized eigenvectors of its covariance matrix Ω. Let us set δsi (λj ) = si (λj ) − s¯ (λj ) = sij − s¯j .
(11.17)
δS i = S i − S¯
(11.18)
Then
214
Computational Color Technology
and we have Ω = (1/m)
m
(δS i )(δS i )T .
(11.19)
i=1
The result of Eq. (11.19) gives a symmetric matrix. Now, let bj and ωj , j = 1, 2, 3, . . . , n, be the eigenvectors and corresponding eigenvalues of Ω, where the eigenvalues are arranged in decreasing order. ω1 ≥ ω2 ≥ ω3 ≥ · · · ≥ ωn , then the transfer matrix B is given as an n × n matrix whose columns are the eigenvectors of Ω.
b11 b12 b B = 13 ··· ··· b1n
b21 b22 b23 ··· ··· b2n
b31 b32 b33 ··· ··· b3n
· · · bi1 · · · bi2 · · · bi3 ··· ··· ··· ··· · · · bin
· · · bn1 · · · bn2 · · · bn3 , ··· ··· ··· ··· · · · bnn
(11.20)
where bij is the j th component of the ith eigenvector. Each eigenvector bi is a principal component of the spectral reflectance covariance matrix Ω. Matrix B is a unitary matrix, which reduces matrix Ω to its diagonal form Λ. B ∗T ΩB = .
(11.21)
The KL or Hotelling transform is the multiplying of a centralized spectrum vector, ¯ by the transfer matrix B. S − S, ¯ U = B(S − S).
(11.22)
11.5 Basis Vectors Using principal component analysis, Cohen reported a set of four basis vectors that are derived from 150 randomly selected Munsell color chips. The basis vectors plotted in Fig. 11.7 are applied to 433 Munsell chips. The first basis vector accounts for 92.72% of the cumulative variance, the second vector 97.25%, the third vector 99.18%, and the fourth vector 99.68%.2 He showed data for two reconstructed spectra; the match between original and reconstruction are excellent as shown in Fig. 11.8. He indicated that other Munsell chips used in his study gave equally accurate reconstructions. Since Cohen’s publication, many basis sets of principal components have been reported. They are given in the order of their appearance in literature.
Spectrum Decomposition and Reconstruction
215
Figure 11.7 Cohen’s basis vectors. (Reprinted with permission of John Wiley & Sons, Inc.)2
Figure 11.8 Reconstructed spectra from Cohen’s basis vectors. (Reprinted with permission of John Wiley & Sons, Inc.)2
216
Computational Color Technology
Parkkinen and coworkers measured 1257 Munsell chips and used them to derive a set of ten basis vectors via the KL transform.14 The first four principal components are given in Fig. 11.9. They determined the goodness of fit by computing the differences between the reconstructed spectrum and the original, wavelength by wavelength. They then found the error band, which was bounded by the maximum positive and the maximum negative differences in the reflectance scale. The data gave a rather uniform variation across the whole visible spectrum, indicating that the reconstruction error was almost independent of the wavelength. Therefore, the final measure of the goodness of fit is the average reconstruction error over the wavelength region of interest. Using four basis vectors, all 1257 reconstructed spectra were below the error limit of 0.10, but only 22.8% below 0.01. As expected, the reconstruction error decreases with increasing number of basis vectors. For six vectors, there were 44.8% of spectra below 0.01 and 72.0% below 0.01 for eight vectors. Drew and Funt reported a set of five basis functions derived from 1710 synthetic natural color signals. The color signals were obtained as the product of five standard daylights (correlated color temperatures range from 4,800 K to 10,000 K) with 342 reflectance spectra from the Krinov catalogue.15 Vrhel and Trussell reported four sets of basis vectors for four major printing techniques—lithographic printing, the electrophotographic (or xerographic) process, ink-jet, and thermal dye
Figure 11.9 Parkkinen and coworkers’ basis vectors. (Reprinted with permission of John Wiley & Sons, Inc.)14
Spectrum Decomposition and Reconstruction
217
diffusion (or D2 T2 ). The variation of these basis vectors was computed by using the eigenvalues from matrix B, where the percent variation was defined as16 j =3 j =n ev = 100 ωj ωj . j =1
(11.23)
j =1
Lithographic printing used 216 spectra from R. R. Donnelley for deriving principal components; the first three principal components are plotted in Fig. 11.10, which account for 99.31% of the variation. The electrophotographic copier used 343 spectra from Cannon; the first three principal components are plotted in Fig. 11.11, which account for 98.65% of the variation. The ink-jet printer used 216 spectra from Hewlett-Packard; the first three principal components are plotted in Fig. 11.12, which account for 97.48% of the variation. The thermal dye diffusion printer used 512 spectra from Kodak; the first three principal components are plotted in Fig. 11.13, which account for 97.61% of the variation.16 Eem and colleagues reported a set of eight basis vectors that were obtained by measuring 1565 Munsell color chips (glossy collection); the first four vectors are plotted in Fig. 11.14, which account for 99.66% of the variation (the variation is slightly lower if all eigenvalues are accounted for).17
Figure 11.10 Lithographic basis vectors from Vrhel and Trussell. (Reprinted with permission of John Wiley & Sons, Inc.)16
218
Computational Color Technology
Figure 11.11 Electrophotographic basis vectors from Vrhel and Trussell. (Reprinted with permission of IS&T.)16
Figure 11.12 Ink-jet basis vectors from Vrhel and Trussell. (Reprinted with permission of IS&T.)16
Spectrum Decomposition and Reconstruction
219
Figure 11.13 Thermal dye diffusion basis vectors from Vrhel and Trussell. (Reprinted with permission of IS&T.)16
Figure 11.14 Eem and colleagues’ basis vectors. (Reprinted with permission of IS&T.)17
220
Computational Color Technology
Figure 11.15 Lee and coworkers’ basis vectors.19
Garcia-Beltran and colleagues reported a set of basis functions derived from 5,574 samples using acrylic paints on paper.18 Lee and colleagues derived a set of basis functions using 1269 Munsell spectra provided by the Information Technology Dept., Lappeenranta university of Technology.19,20 The first three basis vectors are given in Fig. 11.15. These basis sets were independently derived using different sets of color patches, but the general shapes of the normalized vectors of the first three components are pretty close, as shown in Figs. 11.16–11.18, respectively. The normalization is performed by dividing each element in the basis vector by the sum of all the elements. For comparison purposes, the sign of some vectors is changed by negating the vector; this negation has no effect on the spectra reconstruction because the weight will change accordingly. Considering the vast differences in the material and measurement techniques of the input spectra, these similarities indicate the underlying general characteristics of the first three basis vectors. The first vector is the mean, corresponding to the gray component, or brightness. The second vector has positive values in the blue and green regions (or cyan), but negative values in the red region. The third vector is positive in green, but negative in blue and red.
11.6 Spectrum Reconstruction from the Input Spectrum Spectrum reconstruction is the inverse of spectrum decomposition, where a spectrum can be represented by a linear combination of a few principal components
Spectrum Decomposition and Reconstruction
Figure 11.16 Comparisons of the first vectors normalized from the original data.
Figure 11.17 Comparisons of the second vectors normalized from the original data.
221
222
Computational Color Technology
Figure 11.18 Comparisons of the third vectors normalized from the original data.
(also known as basis or characteristic vectors) Bj (λ), j = 1, 2, 3, . . . , m, with m being the highest number of the principal component used in the reconstruction. s(λ ) b (λ ) b (λ ) 1 1 1 2 1 s(λ2 ) b1 (λ2 ) b2 (λ2 ) s(λ ) b (λ ) b (λ ) 3 1 3 2 3 = w1 + w2 ··· ··· ··· ··· ··· ··· s(λn ) b1 (λn ) b2 (λn ) b (λ ) b (λ ) 3 1 m 1 b3 (λ2 ) bm (λ2 ) b (λ ) b (λ ) 3 3 m 3 + w3 + · · · + wm ··· ··· ··· ··· b3 (λn )
bm (λn )
(11.24a)
Spectrum Decomposition and Reconstruction
223
or
s(λ1 ) b1 (λ1 ) s(λ2 ) b1 (λ2 ) s(λ3 ) b1 (λ3 ) = ··· ··· ··· ··· s(λn ) b1 (λn )
· · · · · · bm (λ1 ) w1 · · · · · · bm (λ2 ) w · · · · · · bm (λ3 ) 2 w , ··· ··· ··· 3 ··· ··· ··· ··· wm · · · · · · bm (λn ) (11.24b) where wi is the weight or coefficient of the ith principal component. For simplicity, we eliminate the wavelength by setting si = s(λi ) and bij = bi (λj ).
s1 b11 s2 b12 s3 b13 = ··· ··· ··· ··· sn b1n
b21 b22 b23 ··· ··· b2n
b2 (λ1 ) b2 (λ2 ) b2 (λ3 ) ··· ··· b2 (λn )
b31 b32 b33 ··· ··· b3n
b3 (λ1 ) b3 (λ2 ) b3 (λ3 ) ··· ··· b3 (λn )
··· ··· ··· ··· ··· ···
· · · · · · bm1 w1 · · · · · · bm2 w · · · · · · bm3 2 w . ··· ··· ··· 3 ··· ··· ··· ··· wm · · · · · · bmn
(11.24c)
The explicit expression in Eq. (11.24c) can be represented compactly in the matrix notation S = BW ,
(11.24d)
where B is an n × m matrix and W is a vector of m elements. If matrix B of the principal components is known, we can derive the weights W for a given object spectrum by using the pseudo-inverse transform: −1 W = B T B B T S.
(11.25)
Matrix B T has a size of m × n; therefore, (B T B) has a size of m × m. Because only a few principal components are needed in spectrum reconstruction, m is much smaller than n, which ensures a nonsingular matrix for (B T B) that can be inverted. The reconstructed spectrum S c is given as S c = BW .
(11.26)
11.7 Spectrum Reconstruction from Tristimulus Values This method has been enhanced by many researchers, such as Horn, Wandell, and Trussell, among others, and applied to many areas of color science and technology. By substituting Eq. (11.24d) into Eq. (11.1), we have Υ = kÆT BW .
(11.27)
224
Computational Color Technology
Because ÆT has only three rows and Υ has only three components, we have a constraint of m ≤ 3. As in Eq. (11.3), there is no unique solution for m > 3. If we set m = 3, the explicit expression of Eq. (11.27) becomes b31 b32 X s1 x¯1 s2 x¯2 s3 x¯3 w1 b33 Y = k s1 y¯1 s2 y¯2 s3 y¯3 w2 . ··· s1 z¯ 1 s2 z¯ 2 s3 z¯ 3 w3 Z ··· b3n (11.28) In this case, the product (ÆT B) is a 3 × 3 matrix and the weights W can be determined by inverting matrix (ÆT B).
b11 b12 · · · sn x¯n b · · · sn y¯n 13 ··· · · · sn z¯ n ··· b1n
b21 b22 b23 ··· ··· b2n
W = k −1 (ÆT B)−1 Υ .
(11.29)
The reconstructed spectrum S τ of input tristimulus values Υ is S τ = BW .
(11.30)
11.8 Error Metrics The spectral error s is computed by s =
|S c − S| . n
(11.31)
The summation carries over all n sample points; and the standard deviation sstd is computed by using Eq. (11.32). sstd =
|S c − S|2 n
!1/2 .
(11.32)
Furthermore, with the reconstructed spectrum, the tristimulus and CIELAB values can be computed for comparison with the input spectrum.
11.9 Results and Discussions Seven sets of principal components are used to reconstruct 14 CRI spectra. The number of basis vectors is varied to observe its effect on the reconstruction accuracy. We determine spectral errors and color differences of reconstructed spectra with respect to measured values.
Spectrum Decomposition and Reconstruction
225
11.9.1 Spectrum reconstruction from the object spectrum Results of the individual spectrum reconstructions using various basis sets are given in Appendix 6. The quality of the reproduced spectra is indicated by the absolute difference and standard deviation measures given in the last two columns of the table there. The average color difference Eavg , the standard deviation of the color difference Estd , the spectral difference s, and the standard deviation of the spectral difference sstd of all fourteen spectra are summarized in Table 11.3. Figures 11.19–11.21 show the selected plots of reconstructed CRI spectra from several basis sets. Generally, the spectrum difference becomes smaller as the number of basis vectors increases. However, there are oscillations at the low and middle wavelengths of the computed spectrum using eight basis vectors as shown in Fig. 11.19, indicating that the higher number of vectors may increase the noise. Another problem of PCA is that we may get negative values for some reconstructed spectra, as shown in Fig. 11.21, between 470 and 550 nm. Usually, if there are very low reflectances somewhere in the spectrum, the chances of getting negative values are high. In these cases, clipping is performed because physical realizable spectra cannot be negative. The clipping introduces additional errors to the spectrum and tristimulus values. Moreover, the metrics of the spectrum difference do not correlate well to the color difference measure of Eab . In fact, the spectrum difference measures are a rather poor indication of the quality of the spectrum construction. Personally, I believe that the spectrum difference should be weighted by visual sensitivity, such as the CMF, to give a better indication. Second, at a given number of basis vectors, the average performance of various sets of basis vectors is rather close (see Fig. 10.22 and Table 11.3), but the fitting to an individual spectrum may be quite different (see Figs. 10.19–10.21), particularly in the case of using a small number of vectors. The individual difference is primarily due to the shape of the input spectrum, Table 11.3 Average spectral and color errors of fourteen CRI spectra.
Basis vector
# of basis vectors
Eavg
Estd
s
sstd
Cohen Eem Cohen Eem Copier Thermal Ink-jet Lithographic Cohen Eem Eem Eem
2 2 3 3 3 3 3 3 4 4 5 8
29.17 29.36 7.00 6.93 6.01 6.76 6.15 5.24 4.30 2.85 2.86 0.79
17.54 18.04 5.36 5.64 5.25 3.82 4.00 4.32 5.66 3.96 3.79 0.83
0.063 0.063 0.029 0.030 0.034 0.031 0.052 0.031 0.022 0.021 0.018 0.010
0.034 0.036 0.018 0.017 0.021 0.013 0.028 0.020 0.015 0.012 0.011 0.006
226
Computational Color Technology
Figure 11.19 Comparisons between reconstructed and measured spectra of CRI #1.
Figure 11.20 Comparisons between reconstructed and measured spectra of CRI #3.
Spectrum Decomposition and Reconstruction
227
Figure 11.21 Comparisons between reconstructed and measured spectra of CRI #9.
Figure 11.22 Comparisons of color differences in CIELAB of various basis sets for spectrum reconstruction from input spectra.
228
Computational Color Technology
where a different basis set has different characteristics depending on the initial set of the training spectra resulting in a preference toward certain spectrum shapes. Generally, any set of basis vectors can be used to give a satisfactory matching, but it would be nice to have a metric that can provide information on the goodness of fit. 11.9.2 Spectrum reconstruction from the tristimulus values This method has a limitation on the number of principal components; for trichromatic space, we can only use the first three vectors for reconstruction. Results of the individual spectrum reconstructions using two different basis sets are given in Appendix 7. If there is no clipping, the computed spectrum is a metamer of the object color where the tristimulus and CIELAB values are identical to those shown in the table of Appendix 7 and in Fig. 11.23. The average spectral and color errors of fourteen reconstructed spectra with respect to measured values are summarized in Table 11.4. The quality of the reproduced spectrum is indicated by the absolute difference and standard deviation measures given in the last two columns of the table. Generally, there is a reasonable fit between the measured and calculated spectra by either Cohen’s or Eem’s basis set, but not a very good fit because only three basis vectors are used. However, the beauty is that there is no (or small) color difference because this method gives a metameric reconstruction.
Figure 11.23 Comparisons of color differences in CIELAB of various basis sets for spectrum reconstruction from tristimulus values.
Spectrum Decomposition and Reconstruction
229
Table 11.4 Average spectral and color errors of fourteen reconstructed spectra from tristimulus values with respect to measured values.
Basis vector
Eavg
Estd
s
sstd
Cohen Eem
0.40 0.42
1.25 1.24
0.036 0.038
0.026 0.025
Finlayson and Morovic have developed a metamer-constrained color correction by projecting a set of characterized RGB values from a camera onto a CIEXYZ color-matching function.21 This projection gives many sets of XYZ values; any one of these sets may be the correct answer for the RGB to XYZ transform. A good color transform results by choosing the middle of the set.
11.10 Applications Spectrum decomposition/reconstruction is an extremely powerful tool for color imaging in understanding color science and developing color technology. In the areas of color science, Maloney, Wandell, Trussell, Brill, West, Finalayson, Drew, Funt, and many others have developed and applied spectrum decomposition/reconstruction to color transformation, white-point conversion, metameric pairing, metamerism indexing, color constancy, and chromatic adaptation. These topics will be discussed in subsequent chapters. In the areas of technology development, Mancill has used the Wiener estimation for digital color-image restoration;22 Hubel and coworkers have used simple linear regression, pseudo-inverse, and Wiener estimation for estimating the spectral sensitivity of a digital camera;23 Partt and Mancill have used the Wiener estimation for spectral calibration of a color scanner;24 and Sherman and Farrell have used PCA for scanner color characterization.25 Utilizing the PCA approach, Sharma developed a color scanner characterization method for photographic input media that does not require any test target.26 First, he used the characteristic spectra measured from the photographic IT8 target to obtain basis vectors by employing principal component analysis. Together with a spectral model for the medium and a scanner model, he was able to convert scanner RGB signals from images to spectra by reconstructing from the basis set. The simulation results showed that the average and maximum errors were 1.75 and 7.15 Eab , respectively, for the Kodak IT8 test target scanned by a UMAX scanner. These results are on the same order of color characterizations using test targets, maybe even slightly better. Thus, this method was shown to provide a means for spectral scanner calibration, which can readily be transformed into a color calibration under any viewing illumination. Baribean used PCA to design a multispectral 3D camera (or scanner) with optimal wavelengths that could be used to capture the color and shape of 3D objects such as fine arts and archeological artifacts.27 Vilaseca and colleagues used PCA for processing near-infrared (NIR) multispectral signals obtained from a CCD camera. The multispectral signals were transformed and mapped to the first three principal
230
Computational Color Technology
components, creating pseudo-color images for visualization (NIR is invisible to the human eye). This method provides a means of discriminating images with similar visible spectra and appearance, but differs in the NIR region.28
References 1. D. B. Judd, D. L. MacAdam, and G. Wyszecki, Spectral distribution of typical daylight as a function of correlated color temperature, J. Opt. Soc. Am. 54, pp. 1031–1040 (1964). 2. J. Cohen, Dependency of the spectral reflectance curves of the Munsell color chips, Psychon. Sci. 1, pp. 369–370 (1964). 3. Colorimetry, CIE Publication No. 15.2, Central Bureau of the CIE, Vienna (1986). 4. F. Konig and W. Praefcke, A multispectral scanner, Colour Imaging Vision and Technology, L. W. MacDonald and M. R. Luo (Eds.), pp. 129–143 (1999). 5. P. C. Herzog, D. Knipp, H. Stiebig, and F. Konig, Colorimetric characterization of novel multiple-channel sensors for imaging and metrology, J. Electron. Imaging 8, pp. 342–353 (1999). 6. T. Uchiyama, M. Yamaguchi, H. Haneishi, and N. Ohyama, A method for the unified representation of multispectral images with different number of bands, J. Imaging Sci. Techn. 48, pp. 120–124 (2004). 7. J. B. Cohen and W. E. Kappauf, Metameric color stimuli, fundamental metamers, and Wyszecki’s metameric blacks, Am. J. Psychology 95, pp. 537– 564 (1982). 8. J. B. Cohen and W. E. Kappauf, Color mixture and fundamental metamers: Theory, algebra, geometry, application, Am. J. Psychology 98, pp. 171–259 (1985). 9. J. B. Cohen, Color and color mixture: Scalar and vector fundamentals, Color Res. Appl. 13, pp. 5–39 (1988). 10. H. Kotera, H. Motomura, and T. Fumoto, Recovery of fundamental spectrum from color signals, 4th IS&T/SID Color Imaging Conf., pp. 141–144 (1996). 11. I. T. Jolliffe, Principal Component Analysis, Springer-Verlag, New York (1986). 12. A. K. Jain, Fundamental of Digital Image Processing, Prentice-Hall, Englewood Cliffs, NJ, pp. 163–176 (1989). 13. R. C. Gonzalez and P. Wintz, Digital Image Processing, Addison-Wesley, Reading, MA, pp. 122–130 (1987). 14. J. P. S. Parkkinen, J. Hallikainen, and T. Jaaskelainen, Characteristic spectra of Munsell colors, J. Opt. Soc. Am. A 6, pp. 318–322 (1989). 15. M. S. Drew and B. V. Funt, Natural metamers, CVGIP 56, pp. 139–151 (1992). 16. M. J. Vrhel and H. J. Trussell, Color correction using principal components, J. Color Res. Appl. 17, pp. 328–338 (1992).
Spectrum Decomposition and Reconstruction
231
17. J. K. Eem, H. D. Shin, and S. O. Park, Reconstruction of surface spectral reflectance using characteristic vectors of Munsell colors, 2nd IS&T/SID Color Imaging Conf., pp. 127–130 (1994). 18. A. Garcia-Beltran, J. L. Nieves, J. Hernandez-Andres, and J. Romero, Linear bases for spectral reflectance functions of acrylic paints, Color Res. Appl. 23, pp. 39–45 (1998). 19. C.-H. Lee, B.-J. Moon, H.-Y. Lee, E.-Y. Chung, and Y.-H. Ha, Estimation of spectral distribution of scene illumination from a single image, J. Imaging Sci. Techn. 44, pp. 308–320 (2000). 20. http://www.it.lut.fi/research/color/lutcs_database.html. 21. G. D. Finlayson and P. M. Morovic, Metamer constrained color correction, J. Imaging Sci. Techn. 44, pp. 295–300 (2000). 22. C. E. Mancill, Digital Color Image Restoration, Ph.D. Thesis, University of Southern California, Los Angeles, California (1975). 23. P. M. Hubel, D. Sherman, and J. E. Farrell, A comparison of methods of sensor spectral sensitivity estimation, IS&T and SID’s 2nd Color Imaging Conf., pp. 45–48 (1994). 24. W. K. Pratt and C. E. Mancill, Spectral estimation techniques for the spectral calibration of a color image scanner, Appl. Optics 15, pp. 73–75 (1976). 25. D. Sherman and J. E. Farrell, When to use linear models for color calibration, IS&T and SID’s 2nd Color Imaging Conf., pp. 33–36 (1994). 26. G. Sharma, Targetless scanner color calibration, J. Imaging Sci. Techn. 44, pp. 301–307 (2000). 27. R. Baribeau, Application of spectral estimation methods to the design of a multispectral 3D Camera, J. Imaging Sci. Techn. 49, pp. 256–261 (2005). 28. M. Vilaseca, J. Pujol, M. Arjona, and F. M. Martinez-Verdu, Color visualization system for near-infrared multispectral images, J. Imaging Sci. Techn. 49, pp. 246–255 (2005).
Chapter 12
Computational Color Constancy Color constancy is a visual phenomenon wherein colors of objects remain relatively the same under changing illumination. A red apple gives the same red appearance under either a fluorescent or incandescent lamp, although the lights that the apple reflects to the eye are quite different. The light reflected from an object into the human visual pathway is proportional to the product of the illumination incident on the surface and the invariant spectral reflectance properties of the object. The fact that humans possess approximate color constancy indicates that our visual system does attempt to recover a description of the invariant spectral reflectance properties of the object. Often, color constancy and chromatic adaptation are used interchangeably. However, Brill and West seem to suggest otherwise. Using Hunt’s demonstration: a yellow cushion looks yellow when the whole scene is covered by a blue filter, but the cushion looks green when it is covered by the blue filter cut to the exact shape of the cushion. They stated that the yellowness of the cushion in the first instance is seen immediately despite the bluish cast of the whole slide; then the bluish cast diminishes after several seconds of chromatic adaptation. The difference in time dependence suggests that chromatic adaptation may be a different phenomenon from color constancy.1 With the similarity and difference in mind, we turn to computational color constancy. Computational color constancy is built on the belief that the way to achieve color constancy is by mathematically recovering or estimating the illuminantinvariant surface reflectance. By doing so, it not only achieves color constancy but also recovers spectra of the surface and illumination. With these added benefits, the computational color constancy becomes a powerful tool for many applications, such as artwork analysis, archives, reproduction, remote sensing, multispectral imaging, and machine vision. This chapter reviews the vector-space representation of computational color constancy by first presenting the image irradiance model, then several mathematical models such as the neutral interface reflection (NIR) model, finite-dimensional linear model, dichromatic reflection model, lightness/retinex theory, and spectral sharpening.
12.1 Image Irradiance Model The image irradiance model is basically the trichromatic visual system expanded into the spatial domain. Trichromatic value Υ is the integration of the input sig233
234
Computational Color Technology
nal η(λ) with the three types of cone response functions V (λ). The input color signal, in turn, is the product of the illuminant SPD E(λ) and the surface spectral reflectance function S(λ), where λ is the wavelength (see Section 1.1). (12.1) Υ = V (λ)η(λ) dλ = V T η = V T ES. Function V (λ) can be any set of sensor sensitivities from cone photoreceptors, such as V1 (λ) represents a long-wavelength sensor, V2 (λ) represents a middlewavelength sensor, and V3 (λ) represents a short-wavelength sensor. Thus, matrix V is an n × 3 matrix, containing the sampled cone response functions in the visible range, where n is the number of samples in the range.
v1 (λ1 ) v1 (λ2 ) v1 (λ3 ) V = ··· ··· ··· v1 (λn )
v2 (λ1 ) v2 (λ2 ) v2 (λ3 ) ··· ··· ··· v2 (λn )
v3 (λ1 ) v3 (λ2 ) v3 (λ3 ) ··· . ··· ··· v3 (λn )
(12.2)
E is usually expressed as an n × n diagonal matrix, containing the sampled illuminant SPD. 0 0 ··· ··· 0 e(λ1 ) 0 ··· ··· 0 e(λ2 ) 0 0 0 e(λ3 ) 0 · · · 0 (12.3) E = ··· ··· ··· ··· ··· ··· . ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· 0 ··· ··· · · · 0 e(λn ) S is a vector of n elements, consisting of the sampled surface spectral reflectance. S = [s(λ1 )
s(λ2 ) s(λ3 )
···
s(λn )]T .
(12.4)
Υ is a vector of three elements that represent the tristimulus values [X, Y, Z]. 12.1.1 Reflection phenomenon Equation (12.1) implicitly assumes that a surface reflects only one type of light. This assumption is an oversimplification of a very complex surface reflection phenomenon. An excellent review of physical phenomena influencing color, such as surface reflection, light absorption, light scattering, multiple-internal reflection, and substrate reflection, is given by Emmel;2 readers interested in this subject are referred to Ref. 2 for more detail. A simplified model considers two types of sur-
Computational Color Constancy
235
face reflection. One is body (or subsurface) reflection in which the light crosses the interface and enters the body of the object; it is then selectively absorbed by the material, partially scattered by the substrate, and then reflected diffusely in all directions. It is assumed that the spectral composition of the diffused lights is the same for all angles. This type of surface reflection depends on the chemical characteristics of the material. For optically inhomogeneous materials such as prints and films, the light that they reflect is dominated by body reflection. Thus, it is the light from the body reflection that contributes to the color constancy of the object. Another type of reflection is the interface reflection that arises from the airmaterial interface; the light does not enter the object, but is immediately reflected at the interface, and is directed to a narrow range of viewing angles. For smooth surfaces, the interface reflection is called specular. This type of reflection is caused by the difference in the refractive indices between air and the material and is governed by Fresnel’s law. For materials like metals and crystals, having highly smooth and homogeneous surfaces, the light that they reflect is dominated by interface reflection. For matte and inhomogeneous materials, the SPD of reflected light is a function of the reflective index of the material, wavelength, and viewing geometry. Many types of materials serving as vehicles for pigments and dyes, such as oil, have virtually constant indices of refraction with respect to wavelength. It is assumed that the specular reflection is invariant, except for the intensity change with respect to viewing geometry. Fresnel’s equation for specular reflection does vary with angle; it is, however, believed that this variation is small. Therefore, the interface reflection from inhomogeneous materials takes on the color of the illuminant. Lee and coworkers termed this phenomenon the neutral interface reflection (NIR) model.3 Lee and coworkers tested the validity of these assumptions by measuring the SPD of the reflected light from a variety of inhomogeneous materials at several viewing angles with respect to the reflected light from an ideal diffuser (pressed barium-sulphate powder). They found that the SPD changes in magnitude but not in shape for plants, paints, oils, and plastics.3 In other words, SPD curves are linearly related to one another at different viewing angles for a variety of materials. This means that the brightness (or luminance) of the body reflection from inhomogeneous materials changes, but the hue remains the same with respect to the viewing angle, indicating that the body spectral reflectance is independent of the viewing geometry. A plot of the chromaticities of the reflected light at different angles indicates that the NIR model holds, even for paper. In the following derivations, we assume the surface is matte with perfect light diffusion in all directions for the purpose of simplifying the extremely complex surface phenomenon. This assumption is an important concept in photometric computations and is called the Lambertian surface, having a uniformly diffusing surface with a constant luminance. The luminous intensity of a Lambertian surface in any direction is the cosine of the angle between that direction and the normal to the surface.4
236
Computational Color Technology
12.2 Finite-Dimensional Linear Models Finite-dimensional linear models are based on the fact that illuminant SPD and object reflectance can be approximated accurately by a linear combination of a small number of basis vectors (or functions). It is a well-known fact that daylight illuminants can be computed by using three basis vectors (see Chapter 1); and numerous studies show that object surface reflectance can be reconstructed by a few principal components (three to six) that account for 99% or more of the variance (see Chapter 11). Therefore, Sällströn and Buchsbaum proposed approximations for surface reflection and illumination as the linear combination of basis functions (or vectors).5,6 S(λ) ∼ Sj (λ)ρj , (12.5) = or
s1 (λ1 ) s2 (λ1 ) s1 (λ2 ) s2 (λ2 ) s1 (λ3 ) s2 (λ3 ) ∼ S = Sj ρ = · · · ··· ··· ··· ··· ··· s1 (λn ) s2 (λn ) s11 s21 s12 s22 s13 s23 = ··· ··· ··· ··· ··· ··· s1n s2n
s3 (λ1 ) s3 (λ2 ) s3 (λ3 ) ··· ··· ··· s3 (λn ) s31 · · · s32 · · · s33 · · · ··· ··· ··· ··· ··· ··· s3n · · ·
· · · sj (λ1 ) · · · sj (λ2 ) ρ1 · · · sj (λ3 ) ρ2 ··· ··· ··· ··· ··· ··· ··· · · · ρj · · · sj (λn ) sj 1 sj 2 ρ1 sj 3 ρ2 · · · ρ3 . ··· ··· · · · ρj sj n
(12.6)
The matrix S j has a size of n × j and the vector ρ has j elements, where j is the number of the principal components (or basis vectors) used in the construction of the surface reflectance. Similarly, the illumination can be expressed as (12.7) E(λ) ∼ Ei (λ)εi , = where i is the number of basis functions used. Equation (12.7) can be expressed in a vector-matrix form. e1 (λ1 ) e2 (λ1 ) · · · ei (λ1 ) e1 (λ2 ) e2 (λ2 ) · · · ei (λ2 ) ε1 e1 (λ3 ) e2 (λ3 ) · · · ei (λ3 ) ε E∼ ··· ··· ··· 2 = Ei ε = · · · ··· ··· ··· ··· ··· εi ··· ··· ··· ··· e1 (λn ) e2 (λn ) · · · ei (λn )
Computational Color Constancy
237
e11 e12 e13 = ··· ··· ··· e1n
e21 e22 e23 ··· ··· ··· e2n
· · · ei1 · · · ei2 ε1 · · · ei3 ε ··· ··· 2 . ··· ··· ··· εi ··· ··· · · · ein
(12.8)
For the purpose of adhering to the diagonal matrix expression for illuminants, we have
0 ··· ··· 0 e11 0 0 e12 0 · · · · · · 0 0 e13 0 · · · 0 0 E∼ = E i ε = ε1 · · · · · · · · · · · · · · · · · · ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· 0 · · · · · · · · · 0 e1n 0 ··· ··· 0 e21 0 0 e22 0 · · · · · · 0 0 e23 0 · · · 0 0 + ε2 · · · · · · · · · · · · · · · · · · ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· 0 · · · · · · · · · 0 e2n 0 ··· ··· 0 ei1 0 0 ei2 0 · · · · · · 0 0 ei3 0 · · · 0 0 + · · · + εi · · · · · · · · · · · · · · · · · · , ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· 0 · · · · · · · · · 0 ein
E=
ei1 εi 0 0 ··· ··· ··· 0
0 ei2 εi 0 ··· ··· ··· ···
0 0 ei3 εi ··· ··· ··· ···
··· ··· 0 ··· ··· ··· ···
··· 0 ··· 0 ··· 0 ··· ··· . ··· ··· · · · · · · 0 ein εi
(12.9a)
(12.9b)
238
Computational Color Technology
Matrix E has the size of n × n and the summation in Eq. (12.9b) carries from 1 to i. Substituting Eqs. (12.6) and (12.9) into Eq. (12.1), we have
Υ∼ = V T (E i ε)(S j ρ) = V T (E i ε)S j ρ = Lρ,
(12.10)
L = V T (E i ε)S j .
(12.11)
where
Matrix L is called the lighting matrix by Maloney.7,8 To obtain the lighting matrix, we need to determine the product of [(E i ε)S j ] first. The product is an n × j matrix because (E i ε) is n × n and S j is n × j , and we have ( ei1 εi )s21 ( ei2 εi )s22 ( ei3 εi )s23 ··· ··· ··· ( ein εi )s2n
( ei1 εi )s11 ( ei2 εi )s12 ( ei3 εi )s13 [(E j ε)S i ] = ··· ··· ··· ( ein εi )s1n
( ei1 εi )s31 ( ei2 εi )s32 ( ei3 εi )s33 ··· ··· ··· ( ein εi )s3n
· · · ( ei1 εi )sj 1 · · · ( ei2 εi )sj 2 · · · ( ei3 εi )sj 3 ··· ··· . ··· ··· ··· ··· · · · ( ein εi )sj n (12.12)
Knowing the product [(E i ε)S j ], we can obtain the lighting matrix L. The explicit expression is given in Eq. (12.13). L = [V T (E i ε)S j ] = v ( e ε )s 1n in i 1n v1n ( ein εi )s2n v1n ( ein εi )s3n · · · v1n ( ein εi )sj n v2n ( ein εi )s1n v2n ( ein εi )s2n v2n ( ein εi )s3n · · · v2n ( ein εi )sj n v3n ( ein εi )sj n . v3n ( ein εi )s2n v3n ( ein εi )s3n · · · v3n ( ein εi )s1n
··· ein εi )s1n
vhn (
··· ein εi )s2n
vhn (
··· ein εi )s3n
vhn (
··· ···
··· ein εi )sj n
vhn (
(12.13) The lighting matrix L has the size of h × j , where h is the number of sensors in the V matrix and j is the number of basis vectors for the reflectance. The surface (k, l) element in the lighting matrix L has the form of [ vkn ( ein εi )sln ], where the row number k ranges from 1 to h with h being the number of sensors, and the column number l ranges from 1 to j with j being the number of basis vectors used for approximating the surface reflectance. The inner summation carries from 1 to i with i being the number of basis vectors used for approximating the illuminant SPD, and the outer summation carries from 1 to n with n being the number of samples in the visible spectrum. Therefore, the lighting matrix L is dependent on the illumination vectors ε. It is a linear transform from the j -dimensional space
Computational Color Constancy
239
of surface reflectance ρ into the h-dimensional space of sensor responses. Equation (12.10) is the general expression for the finite-dimensional linear model; theoretically, it works for any number of sensors.9 Normally, h is equal to three because human color vision has only three different cone photoreceptors. Alternately, Eq. (12.10) can be expressed as
´ Υ∼ (12.14) = V T (S j ρ)(E i ε) = V T (S j ρ)E i ε = Lε, and ´ = V T (S j ρ)E i , L
(12.15)
by changing the association; this is possible because E i is a diagonal matrix; therefore, it is commutative. In matrix-vector form, we have ´= L v ( s ρ )ε 1n j n j 1n v1n ( sj n ρj )ε2n v1n ( sj n ρj )ε3n · · · v1n ( sj n ρj )εin v2n ( sj n ρj )ε1n v2n ( sj n ρj )ε2n v2n ( sj n ρj )ε3n · · · v2n ( sj n ρj )εin v3n ( sj n ρj )ε2n v3n ( sj n ρj )ε3n · · · v3n ( sj n ρj )εin . v3n ( sj n ρj )ε1n
vhn (
··· sj n ρj )ε1n
vhn (
··· sj n ρj )ε2n
vhn (
··· sj n ρj )ε3n
··· ···
vhn (
··· sj n ρj )εin
(12.16) ´ can be viewed as the visually adjusted surface reflection. By substituting Matrix L Eq. (12.16) into Eq. (12.14), we have Υ= v ( s ρ )ε 1n j n j 1n v1n ( sj n ρj )ε2n v1n ( sj n ρj )ε3n · · · v1n ( sj n ρj )εin v2n ( sj n ρj )ε1n v2n ( sj n ρj )ε2n v2n ( sj n ρj )ε3n · · · v2n ( sj n ρj )εin v3n ( sj n ρj )ε2n v3n ( sj n ρj )ε3n · · · v3n ( sj n ρj )εin v3n ( sj n ρj )ε1n
vhn (
··· sj n ρj )ε1n
ε1 ε × 2 . ··· εi
vhn (
··· sj n ρj )ε2n
vhn (
··· sj n ρj )ε3n
··· ···
vhn (
··· sj n ρj )εin
(12.17)
The inner summation of Eq. (12.16) carries from 1 to j and the outer summation carries from 1 to n. For trichromatic vision, Eq. (12.10) may be solved for ρ, the coefficients for basis vectors of the surface reflection, independently for each of the three chromatic channels. The problem is that there are only three equations but (i + j ) unknowns. To obtain a unique solution, the sum (i + j ) connot exceed 3. First, let us consider the case where the ambient lighting on the scene is known. In this case, the vector ε is known and the lighting matrix L is also known. Therefore, the surface reflectance or the vector ρ can be recovered by inverting the lighting matrix when h = j (this gives a square matrix) or by pseudo-inverting the
240
Computational Color Technology
lighting matrix when h > j . However, there is still no unique solution if h < j because Eq. (12.13) is underconstrained. Second, we consider the case where both lighting and surface reflectance are unknown. Various daylights (e.g., CIE D illuminants) can be accurately represented by three basis vectors with two coefficients (the first vector has the coefficient of 1 for daylight illuminants), whereas other illuminants may need more basis vectors. Surface reflectance requires three to six basis vectors in order to have acceptable accuracy. Therefore, in almost all cases (i + j ) > 3; thus, no unique solution is possible without additional constraints imposed on the lighting and surfaces.
12.3 Three-Two Constraint Maloney and Wandell proposed a solution by setting h = j + 1, which means that the number of basis vectors for the surface reflectance is one less than the number of sensors. With this constraint, one will have m(j + 1) known observations from m different spatial locations, mj unknown surface reflections, and i unknown illuminant components, assuming that the lighting is the same at all spatial locations involved. One can choose the number of locations to satisfy the condition of m(j + 1) > (mj + i) or m > i for a unique solution that simultaneously obtains vectors ε and ρ.8–11 Now, let us make a few computations to see how many patches are needed for a unique solution. We know h = 3, therefore j = 2. If i = 3, m must be greater than three locations (or patches) in order to meet the inequality condition. The constraint of i = 3 and j = 2 is the three-two (3-2) constraint or 3-2 world assumption that allows an illuminant to have three components and a surface spectrum to have two principal components; the explicit expressions in two different ways are given in Eq. (12.18). v1n ( ein εi )s1n Υ = V T (E i ε)S j ρ = v2n ( ein εi )s1n v3n ( ein εi )s1n
v1n ( ein εi )s2n ρ1 , v2n ( ein εi )s2n ρ2 v3n ( ein εi )s2n (12.18a)
or v1n e1n s1n v1n e1n s2n ρ1 Υ = ε1 v2n e1n s1n v2n e1n s2n ρ2 v3n e1n s1n v3n e1n s2n v1n e2n s1n v1n e2n s2n ρ1 + ε2 v2n e2n s1n v2n e2n s2n ρ2 v3n e2n s1n v3n e2n s2n v e s 1n 3n 1n v1n e3n s2n + ε3 v2n e3n s1n v2n e3n s2n . v3n e3n s1n v3n e3n s2n
(12.18b)
Computational Color Constancy
241
The inner summations of Eq. (12.18a) carry from i = 1 to 3 and the outer summations carry from n = 1 to n. The elements in all three 3 × 2 matrices of Eq. (12.18b) are known and can be precomputed. If we set lij k = vkn ein sj n , Eq. (12.18b) becomes X = ε1 (l111 ρ1 + l121 ρ2 ) + ε2 (l211 ρ1 + l221 ρ2 ) + ε3 (l311 ρ1 + l321 ρ2 ),
(12.19a)
Y = ε1 (l112 ρ1 + l122 ρ2 ) + ε2 (l212 ρ1 + l222 ρ2 ) + ε3 (l312 ρ1 + l322 ρ2 ),
(12.19b)
Z = ε1 (l113 ρ1 + l123 ρ2 ) + ε2 (l213 ρ1 + l223 ρ2 ) + ε3 (l313 ρ1 + l323 ρ2 ).
(12.19c)
To solve for ε and ρ, we need at least four distinct color patches (m > i) such that we can set up 12 equations with 12 known (Xm , Ym , Zm ) values to solve for 11 unknowns, ε1 , ε2 , ε3 , ρ1m , and ρ2m (m = 1, 2, 3, and 4). X1 (l111 ρ11 + l121 ρ21 ) (l211 ρ11 + l221 ρ21 ) (l311 ρ11 + l321 ρ21 ) Y1 (l112 ρ11 + l122 ρ21 ) (l212 ρ11 + l222 ρ21 ) (l312 ρ11 + l322 ρ21 ) Z1 (l113 ρ11 + l123 ρ21 ) (l213 ρ11 + l223 ρ21 ) (l313 ρ11 + l323 ρ21 ) X2 (l111 ρ12 + l121 ρ22 ) (l211 ρ12 + l221 ρ22 ) (l311 ρ12 + l321 ρ22 ) Y2 (l112 ρ12 + l122 ρ22 ) (l212 ρ12 + l222 ρ22 ) (l312 ρ12 + l322 ρ22 ) ε Z2 (l113 ρ12 + l123 ρ22 ) (l213 ρ12 + l223 ρ22 ) (l313 ρ12 + l323 ρ22 ) 1 = ε X3 (l111 ρ13 + l121 ρ23 ) (l211 ρ13 + l221 ρ23 ) (l311 ρ13 + l321 ρ23 ) 2 ε3 Y3 (l112 ρ13 + l122 ρ23 ) (l212 ρ13 + l222 ρ23 ) (l312 ρ13 + l322 ρ23 ) Z3 (l113 ρ13 + l123 ρ23 ) (l213 ρ13 + l223 ρ23 ) (l313 ρ13 + l323 ρ23 ) X (l ρ + l ρ ) (l ρ + l ρ ) (l ρ + l ρ ) 4 111 14 121 24 211 14 221 24 311 14 321 24 Y (l ρ + l ρ ) (l ρ + l ρ ) (l ρ + l ρ ) 4 112 14 122 24 212 14 222 24 312 14 322 24 Z4 (l113 ρ14 + l123 ρ24 ) (l213 ρ14 + l223 ρ24 ) (l313 ρ14 + l323 ρ24 ) (12.20a) or Υ m = Lρ ε.
(12.20b)
Vector Υ m has 12 elements, matrix Lρ has a size of 12 × 3, and vector ε has 3 elements. If the selected patches are truly distinct, then vector ε can be expressed as functions of ρ by pseudo-inversing Eq. (12.20). −1 T ε = Lρ T Lρ Lρ Υ m .
(12.21)
Equation (12.21) is substituted back into Eq. (12.20a) for obtaining vector ρ. If more patches are available, we can have optimal results in the least-squares sense. After obtaining ε and ρ, we can proceed to recover the illumination using vector ε and four surface reflectances for four ρm vectors. The general solution to the world of i illuminant components and j surface components with (j + 1) sensors is attributed to the different characteristics of the vectors ε and ρ. The illumination vector ε specifies the value of the lighting
242
Computational Color Technology
matrix L that is a linear transformation from the j -dimensional space of surface reflectance ρ into the (j + 1)-dimensional space of the sensor responses. Equation (12.10) shows that the sensor response to any particular surface is the weighted sum of the j column vectors of L. Consequently, the sensor response must fall into a subspace of the sensor space determined by L and, therefore, by the illumination vector ε. Generally, the computational method consists of a two-step procedure. First, one determines the plane spanning the sensor response that permits one to recover the illumination vector. Second, once the illumination vector is known, one can compute the lighting matrix L. Knowing L, one can obtain the surface vector ρ by simply inverting L.8,9 The finite-dimensional linear model has salient implications to human color vision. First, it suggests that computationally accurate color constancy is possible only if illumination and reflectance can be represented by a small number of basis functions. The human visual system is known to have better color constancy over some types of illumination than others. This formulation provides a means of experimentally determining the range of ambient illuminations and surfaces over which human color constancy will suffice.8 Second, The number of active photoreceptors in color vision limits the number of degrees of freedom in surface reflection that can be recovered. With only three different cone photoreceptors, one can recover surface reflectance with, at most, two degrees of freedom. Two basis vectors, in general, are insufficient for accurately estimating surface reflectance, precluding perfect color constancy. Third, to meet the criterion of a unique solution, m(j + 1) > (mj + i), one must have m > i number of distinct surfaces (or locations) in the scene to permit recovery. At least two distinct surfaces are needed to specify the plane (which must pass through the origin) that determines the light. And, at least (h − 1) distinct surfaces are needed in order to uniquely determine the illumination vector ε. In the presence of deviations from the linear models of illumination and surface reflection, an increase in the number of distinct surfaces will, in general, improve the estimates of the illumination and the corresponding surface reflectance. An analysis of the brightness constancy suggests that color constancy should improve with the number of distinct surfaces in a scene.12 Fourth, the twocomponent surface reflectance and i-component illumination model are solvable under the assumption that the ambient lighting is constant in the spatial domain. In a real scene, the spectral composition of ambient illumination varies with spatial location. The computation given above can be extended to estimate a slowly varying illumination.8
12.4 Three-Three Constraint Most computational models for color constancy use three basis vectors for both illumination and surface reflectance. This is a pragmatic choice because three vectors provide better approximations to illumination and surface reflectance. Major ones are the Sällströn-Buchsbaum model, various dichromatic models, Brill’s volumetric model, and retinex theory.
Computational Color Constancy
243
For a three-three (3-3) world, Eq. (12.10) becomes
Υ = V T (E i ε)S i ] ρ = Lρ v1n ( ein εi )s1n v1n ( ein εi )s2n = v2n ( ein εi )s1n v2n ( ein εi )s2n v3n ( ein εi )s1n v3n ( ein εi )s2n
ρ1 v1n ( ein εi )s3n ( e ε )s ρ v 2 . 2n in i 3n ρ3 v3n ( ein εi )s3n (12.22)
The inner summation of Eq. (12.22) carries from i = 1 to 3, and the outer summation carries from n = 1 to n. From the foundation of the trichromatic visual system, it is not possible to have three or more surface basis vectors regardless of the number of spatial locations taken. This is because mh is always less than (mj + i) if j ≥ h. To have three or more surface reflectance vectors, additional information is needed or constraints must be imposed. Additional information may come from interface reflections or additional sensors, such as the 1951 scotopic function, to have four sensors in Eq. (12.13) for sustaining a three-basis surface reflectance.13,14 Wandell and Maloney proposed a method of using four photosensors.15 They estimated reflectance parameters by using many surfaces, then obtained ε and ρ by a linearization argument. Constraints may come from two areas, the spatial variation of the signal intensity and spectral normalization of the surface reflectance. Spatial variation assumes that the effective irradiance varies slowly and smoothly across the entire scene and is independent of the viewer’s position.16,17 Spectral normalization assumes that the average reflectance of a scene is a gray. 12.4.1 Gray world assumption The assumption that the average reflectance of a scene in each chromatic channel is the same, giving a gray (or the average of the lightest and darkest naturally occurring surface reflectance values) is called “gray world assumption.”6,13,18 If the gray world assumption holds, then the lightness of a patch is an accurate and invariant measure of its surface reflectance. If the normalizing factor is obtained by averaging over the entire scene, giving equal weight to areas close and far from the point of interest (e.g., a gray patch), then the color of a gray patch will not change when the color patches around it are merely shuffled in position. This means that the local effect of the simultaneous color contrast will disappear in the global computation of constant colors. In reality, a gray patch does change color as its surroundings are shuffled; it looks gray when surrounded by a random array of colors and yellowish when surrounded by bluish colors.18,19 These results indicate that the gray world assumption plays a role in spectral normalization, but it is not the only factor. In extreme cases of biased surroundings, the gray world assumption predicts larger color shifts than those observed.18
244
Computational Color Technology
12.4.2 Sällströn-Buchsbaum model Sällströn and Buchsbaum proposed that both illuminant and reflectance spectra are linear combinations of three known basis vectors; and color constancy is adapted to gray or white by using the “gray world assumption” that Υ 0 is inferred from a spatial average over all object colors in the visual field or is obtained from a reference white area.5,6 A reference white or gray in the visual field has a reflectance spectrum S0 (λ), which is known a priori, thus Υ 0 = [X0 , Y0 , Z0 ] is also known. Knowing S0 (λ), we can express the tristimulus values of the gray as v1n e1n s0n T Υ 0 = V E i S 0 ε = L0 ε = v2n e1n s0n v3n e1n s0n
v1n e2n s0n v2n e2n s0n v3n e2n s0n
ε1 v1n e3n s0n ε2 . v2n e3n s0n ε3 v3n e3n s0n (12.23)
The summation of Eq. (12.23) carries from 1 to n with n being the number of samples in the visible spectrum. Equation (12.23) can be solved for vector ε because the sensor responses V and reflectance S 0 are known and the basis vectors for illumination E i are predetermined. This means that every element in matrix L0 is known and can be precomputed. Matrix L0 is a square 3 × 3 matrix with a rank of three because it has three independent rows; therefore, it is not singular and can be inverted. ε = L−1 0 Υ 0.
(12.24)
Knowing ε, we can estimate the illuminant by using Eq. (12.8), then insert it into Eq. (12.22) to compute the lighting matrix L. With the gray (or white) world assumption, we now know every element in the 3 × 3 matrix L and can obtain vector ρ by inverting matrix L as given in Eq. (12.25). ρ = L−1 Υ .
(12.25)
Using measured tristimulus values Υ of a surface as input, we compute ρ and then estimate the surface reflectance by using Eq. (12.6). With the gray world assumption and one reference patch, we obtain both the surface reflectance and SPD of the illuminant. Unfortunately, the gray world assumption does not always hold and the scene does not always have a white area for estimating the illumination. To circumvent these problems, Shafer, Lees, and others use highlights, the bright colored surfaces, for estimating the illumination.3,20 This becomes a major component of dichromatic reflection models.
Computational Color Constancy
245
12.4.3 Dichromatic reflection model Recognizing the complex nature of a surface reflection that consists of two components—interface (specular) and body (diffuse) reflections—researchers have proposed color-constancy models that take into account both reflections and utilize the additional information given by the specular reflection to estimate the illumination. This type of light-reflection model is called the dichromatic reflection model, where the reflected light η(λ, x) of an inhomogeneous material is the sum of the interface light ηs (λ, x) and body light ηd (λ, x).3,20–32 η(λ, x) = ηd (λ, x) + ηs (λ, x).
(12.26)
The parameter x accounts for the pixel location and reflection geometry, such as the incident and viewing angles. From Lee’s study, it is possible to separate wavelength from angular dependence because the luminance of the reflected light changes, but the hue remains the same with respect to the viewing geometry.3,23 η(λ, x) = α(x)ηd (λ) + β(x)ηs (λ),
(12.27)
where α and β are the position and geometric scaling factors. The reflected light η is the product of the surface reflectance and the SPD of the illuminant.23,24 η(λ, x) = α(x)S d (λ)E(λ) + β(x)S s (λ)E(λ).
(12.28)
Many materials have constant reflective indices over the visible region, such that the specular reflection S s (λ) can also be viewed as a constant. In this case, we can lump Ss (x) into the scaling factor β(x) and make the resulting factor β s (x) a function of only the pixel location. η(λ, x) = α(x)S d (λ)E(λ) + β s (x)E(λ).
(12.29)
Now, we introduce the finite-dimensional linear model for both S d (λ) and E(λ) as given in Eqs. (12.5) and (12.7), respectively. Equation (12.29) becomes.28
η(λ, x) = α(x)
Ei (λ)εi
Ei (λ)εi . Sj (λ)ρj + β s (x)
(12.30)
Substituting Eq. (12.30) into Eq. (12.1), we derive the sensor responses as Υ (x) = V (λ)η(λ, x) dλ ∼ Sj (λ)ρj dλ Ei (λ)εi = α(x) V (λ) Ei (λ)εi dλ. (12.31) + β s (x) V (λ)
246
Computational Color Technology
In vector-matrix notation, Eq. (12.31) becomes
´ (12.32) Υ (x) ∼ = α(x) V T (E i ε)S j ρ + β s (x) V T E i ε = α(x)Lρ + β s (x)Æε. The lighting matrix L is exactly ´ is given as follows: matrix Æ v1n e1n
v2n e1n ´ = V TEi = Æ v3n e1n ··· vhn e1n
the same as the one given in Eq. (12.13), and
· · · v1n ein · · · v2n ein ··· v3n ein . ··· ··· ··· vhn ein (12.33) For trichromatic vision, h = 3 with a 3-3 world constraint on ε and ρ; the explicit expression of Eq. (12.32) is v1n ( ein εi )s1n v1n ( ein εi )s2n v1n ( ein εi )s3n Υ (x) = α(x) v2n ( ein εi )s1n v2n ( ein εi )s2n v2n ( ein εi )s3n v3n ( ein εi )s1n v3n ( ein εi )s2n v3n ( ein εi )s3n ε1 ρ1 v1n e1n v1n e2n v1n e3n × ρ2 + β s (x) v2n e1n v2n e2n v2n e3n ε2 . (12.34) ρ3 ε3 v3n e1n v3n e2n v3n e3n v1n e2n v2n e2n v3n e2n ··· vhn e2n
v1n e3n v2n e3n v3n e3n ··· vhn e3n
For multispectral sensors such as a six-channel digital camera, for example, under a 3-3 world constraint, we have v1n ( ein εi )s1n v1n ( ein εi )s2n v1n ( ein εi )s3n v2n ( ein εi )s1n v2n ( ein εi )s2n v2n ( ein εi )s3n v ( e ε )s v ( e ε )s v ( e ε )s Υ (x) = α(x) 3n in i 1n 3n in i 2n 3n in i 3n v4n ( ein εi )s1n v4n ( ein εi )s2n v4n ( ein εi )s3n v ( e ε )s 5n in i 1n v5n ( ein εi )s2n v5n ( ein εi )s3n v6n ( ein εi )s1n v6n ( ein εi )s2n v6n ( ein εi )s3n ε1 ρ1 v1n e1n v1n e2n v1n e3n × ρ2 + β s (x) v2n e1n v2n e2n v2n e3n ε2 . (12.35) ρ3 ε3 v3n e1n v3n e2n v3n e3n
12.4.4 Estimation of illumination The dichromatic reflection model of Eq. (12.32) indicates that the sensor response ´ Υ (x) at any spatial position x is a linear combination of two vectors, Lρ and Æε, that form a 2D plane in h-dimensional vector space, where h is the number of sensors in the visual system or an imaging system. This result is based on two assumptions: (i) the additivity of Eq. (12.26) holds, and (ii) the illumination is constant
Computational Color Constancy
247
[see Eq. (12.29)]. Tominaga and Wandell developed a method to evaluate illumination by using several object surfaces that included specular reflection. If m objects are observed under the same illumination, they argue that the m image-signal ´ Based on planes must intersect because they all contain a common vector Æε. this reasoning, they proposed that if the intersection is found, then the illuminant ´ by a matrix inversion vector ε can be estimated from the intersection vector Æε ´ is not a square ´ is a square matrix) or a pseudo-matrix inversion Æ ´ + (if Æ (if Æ 23,24,28 matrix). To find the intersection of the color-signal planes, they first measure m color signals reflected from an object surface to give an n × m matrix, where each measurement ηm is normalized to unity.
η1 (λ1 ) η1 (λ2 ) η1 (λ3 ) η = ··· ··· ··· η1 (λn )
η2 (λ1 ) · · · ηm (λ1 ) η2 (λ2 ) · · · ηm (λ2 ) η2 (λ3 ) · · · ηm (λ3 ) ··· ··· ··· , ··· ··· ··· ··· ··· ··· η2 (λn ) · · · ηm (λn )
(12.36)
and [ηm ]T ηm =
[ηm (λn )]2 = 1.
(12.37)
The second step is to perform the singular-value decomposition (SVD) on matrix η. The SVD is a method of decomposing a rectangular matrix into two orthogonal matrices Φ and Ψ and a diagonal matrix Λ. η = ΦΛΨ T .
(12.38)
It starts by creating a symmetric and positive matrix of [ηT η], having a size of m × m because η is n × m. Since the matrix is symmetric and positive, the eigenvalues are all positive. Furthermore, if the matrix [ηT η] has a rank rˇ, then there are rˇ nonzero eigenvalues. The elements σi of the diagonal matrix Λ are the square roots of eigenvalues of the matrix [ηT η] with the singular values σi in decreasing order σi ≥ σi+1 . The matrix Ψ is the eigenvectors of the matrix [ηT η], having a size of m × m, and matrix Φ is the eigenvectors of the matrix [ηηT ], having a size of n × m. The explicit expression of Eq. (12.38) is given in Eq. (12.39).
ϕ11 ϕ12 ϕ η = 13 ··· ··· ϕ1n
ϕ21 ϕ22 ϕ23 ··· ··· ϕ2n
ϕ31 ϕ32 ϕ33 ··· ··· ϕ3n
· · · ϕm1 σ1 · · · ϕm2 0 · · · ϕm3 0 ··· ··· ··· ··· ··· 0 · · · ϕmn
0 0 σ2 0 0 σ3 ··· ··· ··· ···
··· ··· 0 ··· ···
··· ··· ··· ··· 0
0 0 0 ··· σm
248
Computational Color Technology
ψ11 ψ12 ψ21 ψ22 × ψ31 ψ32 ··· ··· ψm1 ψm2 ϕj 1 σj ψj 1 ϕj 2 σj ψj 1 ϕj 3 σj ψj 1 η= ··· ··· ϕj n σj ψj 1
ψ13 · · · ψ1m ψ23 · · · ψ2m ψ33 · · · ψ3m , ··· ··· ··· ψm3 · · · ψmm ϕj 1 σj ψj 2 ϕj 1 σj ψj 3 ϕj 2 σj ψj 2 ϕj 2 σj ψj 3 ϕj 3 σj ψj 2 ϕj 3 σj ψj 3 ··· ··· · · · ··· ϕj n σj ψj 2 ϕj n σj ψj 3
(12.39a) · · · ϕj 1 σj ψj m · · · ϕj 2 σj ψj m ··· ϕj 3 σj ψj m . ··· ··· ··· ··· ··· ϕj n σj ψj m (12.39b)
The summation in Eq. (12.39b) carries from j = 1 to m. SVD gives the rank of the matrix η that is the number of nonzero eigenvalues; this in turn gives the dimension of the space spanned by the measured color signals. If the assumption of Eq. (12.26) holds, then we get σ1 ≥ σ2 > 0 and σ3 = σ4 = · · · = σm = 0. In practice, this condition is not strictly obeyed because of measurement and round-off errors. Thus, Tominaga and Wandell designed a measure rˇ (j ) to estimate the rank of the matrix η. rˇ (j ) =
j i=1
σi2
m i=1
σi2
=
j
σi2
/m.
(12.40)
i=1
The summation in the numerator sums from 1 to j and the summation in the denominator sums from 1 to m, with m > j . If the measured color signal is indeed 2D, we get rˇ (2) = 1.0. For j = 1, if rˇ (1) = 1, the signal is 1D. If rˇ (2) 1, then the signal has a higher dimension than two. In this case, one must consider whether the surface is a homogeneous material or the dichromatic model is in error.23 They tested this hypothesis by measuring three different surfaces. A red cup was measured nine times at various angles to obtain a 31 × 9 matrix of η, where the spectra were sampled at 10-nm intervals from 400 to 700 nm to get 31 values. SVD is performed on this matrix η, to give rˇ (2) = 0.9998. A green ashtray with eight measurements gives rˇ (2) = 0.9999, and fruits with ten measurements give rˇ (2) = 0.9990. These results indicate that the hypothesis of the 2D color signal space is valid.23 The first two vectors of matrix Φ are the basis vectors that span a 2D plane and the measured SPD is the linear combination of ϕ 1 and ϕ 2 . η j = ω j 1 ϕ 1 + ωj 2 ϕ 2 ,
j = 1, 2, 3, . . . , m.
(12.41)
Now, let us measure two object surfaces under the same illumination at various geometric arrangements. The resulting two η matrices are decomposed using SVD to get [ϕ 1 , ϕ 2 ] and [ϕ 1 , ϕ 2 ] vectors for surface 1 and surface 2, respectively. Note
Computational Color Constancy
249
that these vectors do not correspond to the finite-dimensional components defined in Eq. (12.5) or Eq. (12.7). To estimate the illuminant spectrum, we need to find the intersection line that lies in both planes with the following relation: ω1 ϕ 1 + ω2 ϕ 2 = ω´ 1 ϕ 1 + ω´ 2 ϕ 2 ,
(12.42a)
[ϕ 1 , ϕ 2 , ϕ 1 , ϕ 2 ][ω1 , ω2 , −ω´ 1 , −ω´ 2 ]T = 0.
(12.42b)
or
The explicit expression is
ϕ11 ϕ12 ϕ13 ··· ··· ϕ1n
ϕ21 ϕ22 ϕ23 ··· ··· ϕ2n
ϕ11 ϕ12 ϕ13 ··· ··· ϕ1n
ϕ21 ϕ22 ω1 ϕ23 ω2 =0 · · · −ω´ 1 −ω´ 2 ··· ϕ2n
(12.43a)
or Φ 4 ω = 0.
(12.43b)
The matrix Φ 4 is n×4 and the vector ω is 4×1. A nontrivial solution of Eq. (12.43) defines the intersection of the planes. A reliable method is to apply SVD to the matrix Φ 4 , and we have
γ1 0 Φ 4 = [ς 1 ς 2 ς 3 ς 4 ] 0 0
0 γ2 0 0
0 0 γ3 0
τ11 0 0 τ21 0 τ31 τ41 γ4
τ12 τ22 τ32 τ42
τ13 τ23 τ33 τ43
τ14 τ24 , τ34 τ44
(12.44)
where the definitions of ς m , γ m , and τ m (m = 1, 2, 3, 4) correspond to those of ϕ m , σ m , and ψ m in Eq. (12.39). If γ4 = 0 and γ3 > 0, we have a rank of three, where the planes intersect in a line. Thus, the vector τ 4 is a solution for the intersection. The intersection line is given as √ 2[τ41 ϕ 1 (λ) + τ42 ϕ 2 (λ)],
(12.45a)
√ E 2 (λ) = − 2[τ43 u´ 1 (λ) + τ44 u´ 2 (λ)].
(12.45b)
E 1 (λ) = or
The line vectors are normalized as E j 2 = [E j T E j ] = 1. The signs of the coefficients τ 42 are chosen so that the illuminant vectors are positive in order to to meet
250
Computational Color Technology
the requirement that the illuminants are physically realizable. E 1 and E 2 can be regarded as the estimates of the illuminant SPD.23 In a practical application, the value of γ4 is not exactly zero, but it is usually small enough to satisfy the second assumption that the specular reflectance is nearly constant. It is recommended that one get the illuminant spectrum by taking the mean of Eq. (12.46). E 1 (λ) + E 2 (λ) ¯ . E(λ) = 2
(12.46)
Tominaga and Wandell used this method and the ϕ vectors derived from the red cup and green ashtray to estimate a floor lamp. The estimated spectrum agrees pretty well with the measured spectrum. Similar agreement is obtained for an illumination of a slide projector. Their results indicate that the dichromatic reflection model is adequate for describing color signals from some inhomogeneous materials. With the knowledge of only two surfaces, this algorithm infers the illuminant spectrum with good precision. The method outlined from Eq. (12.41) to Eq. (12.43) can readily be expended to cases with three or more surfaces. For three planes, we have.28 ω1 ϕ 1 + ω2 ϕ 2 = ω´ 1 ϕ 1 + ω´ 2 ϕ 2 ,
(12.47a)
ω1 ϕ 1 + ω2 ϕ 2 = ω1 ϕ 1 + ω2 ϕ 2 , ω´ 1 ϕ 1 + ω´ 2 ϕ 2 = ω1 ϕ 1 + ω2 ϕ 2 ,
(12.47b) (12.47c)
or
ϕ1 0 ϕ1
ϕ2 0 ϕ2
−ϕ 1 ϕ 1 0
−ϕ 2 ϕ 2 0
0 −ϕ 1 −ϕ 1
ω 1 ω2 0 ω´ 1 −ϕ 2 ω´ = 0. 2 −ϕ 2 −ω 1 −ω2
(12.47d)
Once the illuminant spectrum is obtained, we substitute it into Eq. (12.32) to calculate the lighting matrix L. The surface reflectance can then be computed as ρ = L+ Υ (x),
(12.48)
where L+ = LT [LLT ]−1 is the Moore-Penrose inverse of the lighting matrix L, and Υ (x) is the sensor responses.28 12.4.5 Other dichromatic models D’zmura and Lennie proposed a finite-dimensional color-constancy model that takes into account the interface and body reflections in the spatial domain. Using three basis functions Sj (λ), j = 1, 2, or 3, for body reflection together with
Computational Color Constancy
251
the interface reflectance S0 (λ), they expressed the surface reflectance S(λ, x) at a position x as21 S(λ, x) ∼ = f s (x)S0 (λ) + f b (x)
Sj (λ)ρj ,
(12.49)
where function f s (x) is the intensity variation (or weight) of the interface reflection in the spatial domain and f b (x) is the corresponding variation of the body reflection. Again, using Lee’s results, the spatial and spectral dependences are separated on the right-hand side of Eq. (12.49), where the intensity variation functions are dependent only on the geometric variables, and the surface reflectances are dependent only on the wavelength.3 This model is built on the foundation of trichromatic vision with opponent color theory. The first basis function of the body reflection is assigned as the luminance (light-dark) channel, the second as the red-green chrominance channel, and the third as the yellow-blue chrominance channel. They further assume that the interface reflectance S0 (λ) is a scaled luminance channel, the same as the first basis function S1 (λ). With these assumptions, they combine the first two terms in Eq. (12.49) to give S(λ, x) ∼ = f L (x)S1 (λ) + f b (x)ρ2 S2 (λ) + f b (x)ρ3 S3 (λ),
(12.50)
and f L (x) = f s (x) + f b (x)ρ1 .
(12.51)
Equation (12.50) indicates that color constancy depends on the weights of f L (x), f b (x)ρ2 , and f b (x)ρ3 for the luminance, red-green, and yellow-blue basis functions, respectively. They can be extracted if the spectral properties of the illuminant can be discounted. The illuminant is approximated by three basis functions given in Eq. (12.7). With known photoreceptor responses, we obtain an equation that is very similar to Eq. (12.22).
Υ = V T (E i ε)S i f = Lf =
v1n ( ein εi )s1n v2n ( ein εi )s1n v3n ( ein εi )s1n
v1n ( ein εi )s2n v2n ( ein εi )s2n v3n ( ein εi )s2n
f L (x) v1n ( ein εi )s3n f d (x)ρ2 . v2n ( ein εi )s3n f d (x)ρ3 v3n ( ein εi )s3n
(12.52) The lighting matrix L, having three independent columns, can be inverted to obtain weights only if the illuminant can be discounted by finding vector ε. They suggested the use of highlights to derive the interface reflection.18,20,21 The computational method is the same as those outlined in Eqs. (12.23)–(12.25). To discount the residual effects of the illuminant is to incorporate the effects of scaling
252
Computational Color Technology
with a diagonal matrix Λ. ΛΥ = ΛLf .
(12.53)
Klinker and coworkers proposed a way of determining the illumination vector by finding characteristic cluster shapes in a 3D plot of pixel color values from an image.18,20 Lee uses a similar technique, called the chromaticity convergence algorithm, to find the illumination spectrum. This approach is based on the assumption that pixel values of any one highlight color under a single illumination source with area specular variation lies on a line connecting the coordinates of the illuminant and the object color, if one plots pixel color values in the CIE chromaticity space (or an equivalent 2D space with coordinates ηi /ηj and ηi /ηk that are the ratios of the image irradiance values in different color channels to factor out the absolute illumination level). The illumination source is considered as the white point, and the effect of a specular reflection is to get more white light into the visual pathway to effectively reduce the saturation of the highlight color. This moves the coordinates of the reflected color toward the coordinates of the illuminant. One can obtain line plots of several different highlight colors and plot them together in one chromaticity diagram; the result is a set of lines that intersect at a point or converge to a small area, indicating the location of the illuminant.3,18 Since then, several modifications and improvements have been reported.30–32 Kim and colleagues developed an algorithm of the illuminant estimation using highlight colors. The algorithm consists of the following:32 (1) The means to find highlight regions in the image by computing a luminance-like value from input RGB values, then comparing to a threshold value (2) The method of converting RGB to chromaticity coordinates and luminance Y (3) The sorting of chromaticity coordinates with respect to Y (4) The method of sampling and subdivision of the highlight color area to get moving averages of the subdivision (5) The line-fitting method and line parameter computation (6) The method of determining the illuminant point The problem with the chromaticity convergence algorithm is that it is difficult to decide the final intersection point from many intersection points. To avoid this problem and enhance the chance of finding the correct illuminant point, they developed a perceived illumination algorithm for estimating a scene’s illuminant chromaticity. This algorithm is an iterative method; it first computes a luminous threshold. If a pixel value is larger than the threshold value, it is excluded in the next round of computations. The input RGB values are converted to XYZ values, and the average tristimulus values and a new luminous threshold are computed. If the new threshold is within the tolerance of the old threshold, it has reached convergence and the illuminant chromaticity coordinates can be calculated. If not, they
Computational Color Constancy
253
repeat the process by computing average tristimulus values of reduced pixels and threshold until convergence is reached. The combination of these two algorithms has the advantages of stability from the perceived illumination and accuracy from the highlight algorithm. The three closest line intersection points obtained from the highlight chromaticity convergence algorithm are compared to the chromaticity coordinates obtained from the perceived illumination; the closest one to the perceived illumination point is selected as the illuminant chromaticity.32 Once the illumination is determined, it is used to calculate the surface reflectance of the maximum achromatic region using the three basis vectors derived from a set of 1269 Munsell chips.31 Next, the computed surface reflectance is fed into the spectral database to find the closest match. The spectral database is composed of the 1269 Munsell spectra multiplied by six illuminants (A, C, D50 , D65 , green, and yellow), having a total of 7314 spectra. Finally, color-biased images are recovered by dividing the SPD of the reflected light to the matched surface reflectance.32 The method recovers color-biased images by illuminants A, C, D50 , green, or yellow light quite nicely when compared with the original. The recovered image from a color-biased image using illuminant A is lighter than the original, but the color is very close to the original. Images biased on other illuminants show a similar trend (the original and recovered images can be found in Ref. 32). 12.4.6 Volumetric model Brill proposed a model of color constancy that does not estimate the illumination, but makes use of the illuminant invariance to estimate surface reflectance directly.1 A simplified version, called the volumetric model of color constancy, uses a finitedimensional linear approximation with i basis vectors for illumination and three vectors for surface reflectance, together with a residual term S r (λ).33–36 Without estimating the illumination, it allows one to have as many basis vectors for surface reflectance as the number of sensors. S(λ) =
Sj (λ)ρj + S r (λ),
(12.54a)
or S = Sj ρ + S r.
(12.54b)
The residual S r (λ) is orthogonal to the 3i products V (λ)Ei (λ). V (λ)Ei (λ)S r (λ) = 0.
(12.55)
For trichromatic vision, h = 3 and we have V T E 1 S r = V T E 2 S r = V T E 3 S r = · · · = V T E i S r = [0, 0, 0]T .
(12.56)
254
Computational Color Technology
Thus, surface reflectances differing by S r (λ) should match under any illumination. Because S r (λ), hence S(λ), is subject to the 3i constraints of Eq. (12.56), it follows that the more degrees of freedom allowed in the illumination, the more constrained will be the surface reflectances. In the limiting case of i →∝, S r (λ) must be zero and S(λ) is just a linear combination of the three known reflectances Sj (λ) as given in Eq. (12.5). This method requires three reference surfaces (e.g., the red, white, and blue of an American flag), where any test surface reflectance is assumed to be the linear combination of these three reflectances. Under a given illumination E, the tristimulus values of the three reference surfaces, Υ 1 = [X1 Y1 Z1 ]T , Υ 2 = [X2 Y2 Z2 ]T , and Υ 2 = [X3 Y3 Z3 ]T are known and are given in Eq. (12.57). Υ 1 = V T ES 1 ,
Υ 2 = V T ES 2 ,
Υ 3 = V T ES 3 .
(12.57)
Employing Eq. (12.5) for approximating the surface reflection and combining with Eq. (12.57), we obtain the tristimulus values of the test surface as Υ j ρj = Ωρ. Υ = V T ES = V T ES j ρ = V T E(S 1 ρ1 + S 2 ρ2 + S 3 ρ3 ) = (12.58) Equation (12.59) gives the explicit expression.
X X1 Y = Y1 Z1 Z
X2 Y2 Z2
X3 Y3 Z3
ρ1 ρ2 . ρ3
(12.59)
Matrix Ω given in Eq. (12.59) consists of the vectors of three reference tristimulus values, forming a tristimulus volume. Comparing to Eq. (12.22), one can see that matrix Ω is a form of the lighting matrix L, or a simple linear transform away from it. Matrix Ω, having three independent vectors, can be inverted to solve for vector ρ if Υ is known. Let us set V 123 as the determinant of the matrix Ω.
X1 V 123 = Y1 Z1
X2 Y2 Z2
X3 Y3 . Z3
(12.60)
By applying Cramer’s rule, the solution to Eq. (12.59) is
X X2 X 3 Y Y2 Y3 , Z Z2 Z3 X1 X 2 X ρ3 = V −1 Y2 Y . 123 Y1 Z 1 Z2 Z
ρ1 = V −1 123
ρ2 = V −1 123
X1 Y1 Z1
X Y Z
X3 Y3 , Z3 (12.61)
Knowing vector ρ, we have an estimate of the surface reflectance. This approach does not use illumination information, it only assumes that the illuminant is invariant; therefore, it can have as many unknowns as there are sensors.
Computational Color Constancy
255
Note that the name “volumetric model” comes from the fact that the solutions in Eq. (12.61) are ratios of the determinant, which in turn is a 3D volume of tristimulus values. For application to color recognition, Υ and Ω are the inputs to the color recognizer. Comparing with stored coefficients for reflectance vectors of known materials under a known illuminant provides the object color recognition.
12.5 Gamut-Mapping Approach Forsyth developed a color constancy approach by interpreting the color of an object as what it would have looked like under a canonical illuminant instead of the surface reflectance from the illuminant used. Under this interpretation, the color of a surface is described by its appearance under the canonical illuminant E c (λ). For an image illuminated by a different source E d (λ) with colored light, color constancy involves the prediction of its appearance had it been illuminated by the canonical illuminant E c (λ).37 Forsyth believes that the prediction is possible by constructing a function χ d to account for the receptor responses generated by the image under colored light of E d (λ). Using the association of sensor responses with the illuminant [see also Eq. (1.2)], we have !
χd
Æc (λ)S(λ) dλ =
Æd (λ)S(λ) dλ.
(12.62)
For human trichromatic vision, Æc has three components Æc,l (λ), where l = 1, 2, or 3; other devices such as a camera may have a different number of sensors (l > 3 for a multispectral camera). Each component of Æc and Æd can be decomposed as the linear combination of the orthonormal basis set. Similarly, the surface spectrum S(λ) can also be expanded in terms of the basis set.
Æc,l (λ) =
j =L
αlj æl (λ),
(12.63)
j =1
Æd,l (λ) =
j =L
α´ lj æl (λ) + δd,l (λ) =
j =1
S(λ) =
i=L
=L i=L j
rlj αj i æl (λ) + δd,l (λ), (12.64)
i=1 j =1
βi æi (λ) + s´ (λ).
(12.65)
i=1
The functions δd,l (λ) and s´ (λ) are residue orthogonal terms of æl (λ). Substituting Eqs. (12.63), (12.64), and (12.65) into Eq. (12.62) and utilizing the properties of
256
Computational Color Technology
" " orthonormal functions, æi æi dλ = 1 and æi æj dλ = 0 when i = j , we have
χd,n
j =L
αij βj
j =1
=
=L i=L j
rni αj i βj +
δd,n (λ)´s(λ) dλ.
(12.66)
i=1 j =1
The function χd,n is the nth component of the function χ d . For the color constancy to work, Forsyth assumed that the residual terms are zero. Thus, Eq. (12.66) becomes χd,n
j =L
αij βj
j =1
=
=L i=L j
rni αj i βj .
(12.67)
i=1 j =1
Equation (12.67) states that the image gamut under illuminant t is a linear map of the gamut under the canonical illuminant. Therefore, it is possible to use geometrical properties of the gamut to estimate the linear map and to determine the illuminant. The algorithm is given as follows:37 (1) Construct the canonical gamut by observing as many surfaces as possible under a single canonical illuminant. The canonical gamut is approximated by taking the convex hull of the union of the gamuts obtained by these observations. (2) Construct a feasible set of linear maps for any patch imaged under another illuminant. The convex hull of the observed gamut is computed. For each vertex of this hull, a diagonal map that takes the vertex of the observed gamut to a point inside the canonical gamut is computed. Intersect all the sets to give the feasible set. (3) Use some estimator to choose a map within this feasible set that corresponds most closely to the illuminant. (4) Apply the chosen map to the receptor responses to obtain color descriptors that are the estimate of the image appearance under the canonical illumination.
12.6 Lightness/Retinex Model The lightness/retinex theory developed by Land and colleagues is special and unique. It is special because it was the first attempt to develop a computational model to account for the human color constancy phenomenon. It is unique in many ways. First, it takes the surrounding objects into account by using Mondrian patterns, a clear intention to include the simultaneous contrast. A Mondrian is a flat 2D surface that is composed of a 2D array of color patches with matte surface and rectangular shape. It is so called by Land because the 2D color array resembles a painting by Piet Mondrian. Second, unlike other deterministic models, the retinex
Computational Color Constancy
257
theory is stochastic in nature. In this chapter, we give a brief introduction to the theory; more details can be found elsewhere.18,38–43 The lightness/retinex algorithm starts by taking inputs from an array of photoreceptor responses for each location (or pixel) in the image. The input data can be viewed as three separate arrays (or planes) of data, one for each different photoreceptor. Each of these spatial planes contains responses of a single photoreceptor for each pixel in the image. The algorithm transforms the spatial array of photoreceptor responses Υ h into a corresponding spatial array of lightness values l h . A central principle of the lightness/retinex algorithm is that the lightness values at any pixel are calculated independently for each photoreceptor. The algorithm estimates the spatial array of lightness values for each plane by computing a series of paths. Each path is computed as follows: (1) Select a starting pixel. (2) Randomly select a neighboring pixel. (3) Calculate the difference of the logarithms of the sensor responses at the two positions. (4) Add the difference into an accumulator for position 2. (5) Increment a counter for position 2 to indicate that a path has crossed this position. The path calculation proceeds iteratively with the random selection of a neighboring pixel, where the accumulator and counter are updated accordingly. Note that the sensor response of the first element of the path plays a special role in the accumulation for that path calculation: It is used as a normalizing term at every point on the path. After the first path has been computed, the procedure is repeated for a new path that starts at another randomly chosen position. After all paths have been completed, the lightness value for each pixel is computed by simply dividing the accumulated values by the value in the corresponding counter. The purpose of the lightness/retinex algorithm is to compute lightness values that are invariant under changing illumination, much as human performance is roughly invariant under similar changes. At each pixel, the lightness triplet should depend only on the surface reflectance and not on the SPD of the ambient light or the surface reflectance of the surrounding patches in the Mondrian. The retinex algorithm always tries to correct for the illuminant by means of a diagonal matrix Λ(m, n), where (m, n) indicates the pixel location. l(m, n) = Λ(m, n)Υ (m, n).
(12.68)
The diagonal matrix depends on the SPD of the ambient light, the location, and other surrounding surfaces in the image. As the path length increases, the algorithm converges toward using a single global matrix Λ for all positions, where the diagonal elements approach the inverse of the geometric mean of the photoreceptor responses.42
258
Computational Color Technology
12.7 General Linear Transform In the general linear transform, the estimated tristimulus values Υ˜ B of an object under illuminant B can be approximated from the tristmulus values Υ A under illuminant A via a 3 × 3 matrix M. Υ˜ B = MΥ A .
(12.69)
The matrix M can be derived for a set of test reflectance spectra using a meansquare-error minimization in the sensor space. For tristimulus values, we are under the CIEXYZ space, where Υ A = AT E A S = ÆA T S
and
Υ B = AT E B S = ÆB T S.
(12.70)
For a set of m input spectra, S is no longer a vector, but a matrix containing all input spectra, one in each column, having a size of n× m with n being the number of spectrum sampling points. Matrix Æ is still the weighted CMF with a size of n × 3 (see Section 1.1). Therefore, resulting matrices Υ A and Υ B have a size of 3 × m. s1 (λ1 ) s2 (λ1 ) · · · sm (λ1 ) s1 (λ2 ) s2 (λ2 ) · · · sm (λ2 ) s1 (λ3 ) s2 (λ3 ) · · · sm (λ3 ) S = ··· (12.71) ··· ··· ··· , ··· ··· ··· ··· ··· ··· ··· ··· s1 (λn ) s2 (λn ) · · · sm (λn )
X1 Υ = Y1 Z1
X2 Y2 Z2
X3 Y3 Z3
· · · Xm · · · Ym . · · · Zm
(12.72)
The least-squares solution for matrix M is obtained by the pseudo-inverse of Eq. (12.69). −1 M = Υ BΥ AT Υ AΥ AT .
(12.73)
Substituting Eq. (12.70) into Eq. (12.73), we obtain −1 M = ÆB T SST ÆA ÆA T SST ÆA .
(12.74)
By setting the term SST as the spectral correlation matrix µ, Eq. (12.74) becomes the Wiener inverse estimation (see Section 11.2).44,45 The correlation matrix µ has a size of n × n because S is an n × m matrix. In order to become independent from a specific set of input spectra, Praefcke and Konig model the covariance matrix as a
Computational Color Constancy
259
Toeplitz structure with µ|k| on the kth secondary diagonal. A value of 0.99 is given to the correlation coefficient µ, which leads to only slightly inferior results when compared to a measured correlation matrix.45 −1 H = µÆA ÆA T µÆA .
(12.75)
M = ÆB T H .
(12.76)
Equation (12.74) becomes
Substituting Eq. (12.76) into Eq. (12.69), we obtain the estimated tristimulus values Υ˜ B = MΥ A = ÆB T H Υ A .
(12.77)
Finlayson and Drew called this approach “nonmaximum ignorance.”44
12.8 Spectral Sharpening Spectral sharpening is a method developed for the sensor transformation, where a set of sensor sensitivity functions is converted into a new set to improve the performance of any color-constancy algorithm that is based on the independent and individual adjustment of sensor response channels. New sensor sensitivities are constructed as linear combinations of the original sensitivities. Spectral sharpening has been applied to chromatic adaptations.46–50 The first chromatic adaptation using spectral sharpening was the Bradford transform by Lam.46 With the addition of the incomplete adaptation, the CIECAM97s color appearance model adopted this spectrally sharpened chromatic adaptation. Other developments of spectral sharpening can be found in publications by Finlayson and coworkers,47–49 and Calabria and colleagues.50 Independent and individual adjustment of multiplicative coefficients corresponds to the application of a diagonal-matrix transform (DMT) to the sensor response vector. It is a common feature of many chromatic-adaptation and colorconstancy theories such as the von Kries adaptation, lightness/retinex algorithm, and Forsyth’s gamut-mapping approach. Υc ∼ = Λd Υ d .
(12.78)
Υ c is the chromatic values observed under a fixed canonical illuminant, Υ d is the chromatic values observed under a test illuminant, and Λd is the diagonal matrix for mapping the test to the canonical illumination. The sharpening transform performs a linear transform on both sets of sensor responses prior to the diagonal transform. It effectively generalizes diagonal-matrix theories of color constancy by maintaining the inherent simplicity of many colorconstancy algorithms.47–49 M dΥ c ∼ = Λd M d Υ d .
(12.79)
260
Computational Color Technology
12.8.1 Sensor-based sharpening Sensor-based sharpening focuses on the production of new sensors with their spectral sensitivities concentrated as much as possible within a narrow band of wavelengths.48 This technique determines the linear combination of a given sensor set that is maximally sensitive to subintervals of the visible spectrum. It does not consider the characteristics of illuminants and surface reflectances; it only considers the sharpness of the resulting sensors. The sensor response V (λ) is the most sensitive in the wavelength interval [λ1 , λ2 ] if the following condition is met: 2 2
Q = V bTC + µ V TC − 1 .
(12.80)
Matrix V b represents sampled elements with wavelengths outside the sharpening band, matrix V encompasses the whole visible range, C is a coefficient vector, and µ is a Lagrange multiplier. Sensor response [V b T C] is the most sensitive in [λ1 , λ2 ] if the percentage of its norm within the interval is the highest with respect to all other sensors. One can determine vector C by minimizing Eq. (12.80); the Lagrange multiplier guarantees a nontrivial solution. Partial differentiation of Eq. (12.80) with respect to µ yields the constraint equation. 2 ∂Q/∂µ = 0 = V T C − 1.
(12.81)
For each component, Eq. (12.81) becomes (V i T V i )ci2 = 1
(12.82a)
or ci =
V i TV i
−1 1/2
.
(12.82b)
Under the constraint of Eq. (12.82), we can solve Eq. (12.80) by partial differentiating Q with respect to C, and find the minimum by setting the resulting differentiation to zero. ∂Q/∂C = 0 = 2V b V b T C + 2µV V T C
(12.83a)
or −1 VVT V b V b T C = −µC.
(12.83b)
Equation (12.83b) is an eigenfunction. For a trichromatic response, V and V b are n × 3; thus, (VV T )−1 and (V b V b T ) are both 3 × 3 matrices that in turn give a 3 × 3 matrix for the product of (VV T )−1 (V b V b T ). C is a vector of three elements
Computational Color Constancy
261
such that there are three solutions for Eq. (12.83b), each solution corresponding to an eigenvalue that minimizes (V b T C)2 . Equation (12.83b) indicates that C is a real-valued vector because the matrices (V V T )−1 and (V b V b T ) are positive definite, and eigenvalues of the product of two positive-definite matrices are real and nonnegative. This implies that the sharpened sensor is a real-valued function. Solving for C in each of three wavelength intervals yields the matrix M d for use in Eq. (12.79). Matrix M d , derived from the sensor-based sharpening, is not dependent on the illuminant because it deals only with the sensor spectra; no illuminant is involved. Finlayson and colleagues have sharpened two sets of sensor-response functions, the cone absorptance function measured by Bowmaker and Dartnell51 and the cone fundamentals derived by Vos and Walraven.52 The sharpening matrix M d for VosWalraven fundamentals is given as follows:
2.46 M d = −0.66 0.09
−1.97 1.58 −0.14
0.075 −0.12 . 1.00
Results showed that the two sets of sensors are indeed sharpened significantly in the long-wavelength cone, marginally in the medium-wavelength cone, and slightly in the short-wavelength cone. The peak of the sharpened long-wavelength function is shifted toward a longer wavelength, the medium-wavelength is shifted toward a lower wavelength, and the short-wavelength remains essentially the same (see Figs. 12.1–12.3). Note that the sharpened curves contain negative values representing the consequence of negative coefficients in the computation, but not the negative physical sensitivities.48 12.8.2 Data-based sharpening Data-based sharpening extracts new sensors by optimizing the ability of a DMT to account for a given illumination change. It is achieved by examining the sensorresponse vectors obtained from a set of surfaces under two different illuminants.48 If the DMT-based algorithms suffice for color constancy, then a set of surfaces observed under a canonical illuminant E c should be approximately equivalent to those surfaces observed under another illuminant E d via a DMT transform. ψc ∼ = Λd ψ d ,
(12.84)
where ψ c is a 3 × m matrix containing trichromatic values observed under a fixed canonical illuminant of m surfaces, ψ d is another 3 × m matrix containing trichromatic values observed under a test illuminant of the same m surfaces, and Λd is the diagonal matrix for mapping the test to the canonical illumination. Again, Finalayson and colleagues introduced a 3 × 3 transfer matrix M d to improve the computational color constancy. M dψ c ∼ = Λd M d ψ d .
(12.85)
262
Computational Color Technology
Figure 12.1 The sharpening of the long-wavelength sensor.
Figure 12.2 The sharpening of the middle-wavelength sensor.
Computational Color Constancy
263
Figure 12.3 The sharpening of the short-wavelength sensor.
Λd can be optimalized in the least-squares sense by performing the Moore-Penrose inverse. Λd = M d ψ c [M d ψ d ]+ .
(12.86)
The superscript + denotes the Moore-Penrose inverse of M + = M T [MM T ]−1 ; therefore, we have
−1 [M d ψ d ]+ = M d ψ d T (M d ψ d )(M d ψ d )T .
(12.87)
The matrix [M d ψ d ] is 3 × m because M d is 3 × 3 and ψ d is 3 × m; this gives the inverted matrix [(M d ψ d )(M d ψ d )T ]−1 a size of 3 × 3 and matrix [M d ψ d ]+ a size of m × 3. The method of choosing M d to ensure that Λd is diagonal is given in Eq. (12.88). −1 + M −1 d Λd M d = M d M d ψ c [M d ψ d ] M d
−1 = ψ c [M d ψ d ]T (M d ψ d )(M d ψ d )T M d
−1 = ψ cψ dTM dT M dψ dψ dTM dT M d
−1
−1 = ψ cψ dTM dT M dT ψ d ψ d T M −1 d Md
264
Computational Color Technology
−1 = ψ cψ dT ψ dψ dT = ψ cψ d+.
(12.88)
The diagonal and transfer matrices, Λd and M d , can be found by the diagonalization of matrix [ψ c ψ d + ] giving a real square matrix with a size of 3 × 3. Let matrix φ = ψ c ψ d + be a real matrix; then, there exists an orthogonal matrix U d −1 such that Λd = U −1 d ϕU d is diagonal. It follows that U d Λd U d = φ. Comparing to Eq. (12.88), we obtain a unique M d by equating to U −1 d . The sharpening matrix 48 M d for Vos-Walraven fundamentals is given as follows:
2.46 M d = −0.58 0.07
−1.98 1.52 −0.13
0.10 −0.14 . 1.00
It is obvious that the sharpening matrix derived from input data depends on the selection of the input data and the size of the data. The input data, in turn, are affected by the illuminant. The test of five different illuminants by Finalayson and colleagues showed that the sharpened Vos-Walraven fundamentals are remarkably similar, indicating that data-based sharpening is relatively independent of the illuminant. Therefore, the method can be represented by the mean of these sharpened sensors. Moreover, the mean sensors are very similar to those derived from sensorbased sharpening. This is not surprising, cosidering the closeness of the derived sharpening matrices. 12.8.3 Perfect sharpening Perfect sharpening provides a unique and optimal sharpening transform using a 2-3 world of the finite-dimensional model for illumination and surface reflectance, respectively.47,48 For the 2-3 world, there are two illumination vectors, E 1 and E 2 , and a surface matrix S of three components; hence, Eq. (12.10) becomes
Υ = ε1 AT E 1 S ρ + ε2 AT E 2 S ρ = ε1 L1 ρ + ε2 L2 ρ.
(12.89)
Finlayson and colleagues define the first illuminant basis function as the canonical illuminant and the second basis function as the test illuminant. It follows that the color response under the second basis function L2 is a linear transform M of the first basis function L1 . L2 ρ = ML1 ρ,
(12.90)
L2 = ML1 ,
(12.91)
or
Computational Color Constancy
265
or M = L2 L−1 1 .
(12.92)
Υ = (ε1 I + ε2 M)L1 ρ,
(12.93)
Equation (12.89) becomes
where I is the identity matrix. There exists a generalized diagonal transform, mapping surface color responses between illuminants, that follows the eigenvector decomposition of matrix M. M = M −1 d ΛM d .
(12.94)
Substituting Eq. (12.94) into Eq. (12.93), we have −1 Υ = ε1 M −1 d I M d + ε2 M d ΛM d L1 ρ.
(12.95)
Multiplying both sides of Eq. (12.95) by M d , we have M d Υ = (ε1 I M d + ε2 ΛM d )L1 ρ = (ε1 I + ε2 Λ)M d L1 ρ.
(12.96)
Finally, we invert the matrix (ε1 I + ε2 Λ) to give Eq. (12.97). (ε1 I + ε2 Λ)−1 M d Υ = M d L1 ρ.
(12.97)
Equation (12.97) shows that in the 2-3 world, a diagonal transform supports perfect color constancy after an appropriate sharpening M d . Using the Munsell spectra under six test illuminants and employing the principal component analysis, they constructed lighting matrices and derived the transfer matrix for Vos-Walraven fundamentals.
2.44 M d = −0.63 0.08
−1.93 1.55 −0.13
0.11 −0.16 . 1.00
All three methods give very similar M d matrices; therefore, the shapes of the sharpened sensors are very close, which in turn give a similar performance. For each illuminant, the sharpened sensors give a better performance than the unsharpened ones as evidenced by the measure of the cumulative “normalized fitting distance.”48 Generally, the performance difference increases as the color temperatures of illuminants become wider apart.
266
Computational Color Technology
12.8.4 Diagonal transform of the 3-2 world Finlayson and colleagues extended the diagonal approach of the 2-3 world to Maloney-Wandell’s 3-2 world. They showed that if the illumination is three-vector and the surface reflectance is two-vector, then there exists a sensor transform M d for which a diagonal matrix supports a perfect color constancy.49 Employing Eq. (12.14), they showed that
´ = ρ1 L ´ 1 ε + ρ2 L ´ 2 ε, Υ∼ = V T (S j ρ)E i ε = Lε
(12.98)
´ 1 ε. M d Υ = (ρ1 I + ρ2 Λ)M d L
(12.99)
This shows the sharpening of the short-wavelength sensor. Equation (12.99) states that diagonal invariance holds between the canonical surface and other surfaces, given the sharpening transform M d . They proceeded to show that diagonal invariance holds between any two surfaces.49
12.9 Von Kries Color Prediction As given in Section 4.1, the von Kries hypothesis states that trichromatic vision is independently adapted. Based on the von Kries hypothesis, Praefcke and Konig developed a white adaptation via different color spaces.45 For an object under two different illuminants, E A and E B , one obtains two sets of tristimulus values, Υ A and Υ B . If the von Kries hypothesis holds, the normalized tristimulus values of the respective tristimulus values of the white points should give the same appearance. Υ A = [X A /X W,A , Y A /Y W,A , Z A /Z W,A ]T ,
(12.100)
Υ B = [X B /X W,B , Y B /Y W,B , Z B /Z W,B ]T ,
(12.101)
Υ A = Υ B .
(12.102)
and
Within the same color space, the estimated tristimulus values under illuminant E B are achieved by a diagonal matrix given in Eq. (12.103). Υ˜ B = Υ W,B Υ −1 W,A Υ A
(12.103)
or
X W,B Υ˜ B = 0 0
0 Y W,B 0
0 0 Z W,B
X W,A 0 0
0 Y W,A 0
0 0 Z W,A
−1 ,
Computational Color Constancy
267
X W,B /X W,A ΥA = 0 0
0 Y W,B /Y W,A 0
0 Υ A. 0 Z W,B /Z W,A
(12.104)
To transform into another color space Γ , there exists a 3 × 3 matrix M p for the source-tristimulus and white-point conversions. Γ A = M pΥ A,
Γ W,A = diag(M p Υ W,A ),
Γ W,B = diag(M p Υ W,B ). (12.105) Like Υ W,A and Υ W,B , matrices Γ W,A and Γ W,B are diagonal matrices. The estimated color values under illuminant E B in space Γ is and
Γ˜ B = Γ W,B Γ −1 W,A Γ A .
(12.106)
Reentering the initial color space, we have the estimated color values −1 −1 ˜ Υ˜ B = M −1 p Γ B = M p Γ W,B Γ W,A M p Υ A .
(12.107)
Equation (12.107) gives the estimated color values for the von Kries adaptation in different color spaces. The key for using this estimation lies in finding the 3 × 3 transfer matrix M p . There is no analytical solution for M p ; therefore, it is obtained by optimization. To reduce the complexity of the optimization problem, Praefcke and Konig fixed the diagonal elements of M p to unity, thus reducing the number of variables to six. 1 p1 p2 M p = p3 1 p4 . (12.108) p5 p6 1 They started with pj = 0, j = 1, 2, . . . , 6 for M p . After selecting the initial M p , they computed Γ W,A and Γ W,B via Eq. (12.105) because Υ W,A and Υ W,B are known, and then substituted Γ W,A , Γ W,B , and M p into Eq. (12.107) to estimate Υ˜ B from the known Υ A . The difference between estimated Υ˜ B and measured Υ B is calculated for each reflectance spectrum. Then, the average color difference over all test spectra is calculated to serve as the error measure, which is minimized iteratively by the standard gradient method. Praefcke and Konig compared several approaches, including the general leastsquares method, perfect sharpened sensors (Finlayson, et al., see Section 12.7), individual optimal sensors, and mean optimal sensors.45 Results for the von Kries adaptation in different color spaces between daylight illuminants range from 0.271 to 0.292 in E∗94 units for mean values with maximum color difference ranges from 4.77 to 5.24 in E∗94 units. For estimations between illuminants D65 , F11 , A, and Xe, the mean color error ranges from 0.888 to 1.290, with maximum color difference ranges from 9.18 to 11.70 in E∗94 units. These results indicate that the sharpened and optimized sensors and the least-squares method have comparable accuracy in predicting the color values under different illumination via different color spaces.
268
Computational Color Technology
12.10 Remarks The finite-dimensional linear model is an extremely powerful tool in that it can recover (or estimate) the illuminant SPD and object reflectance. Surface reflectance and illuminant SPD are each represented by a finite coefficient vector, where the imaging process is an algebraic interaction between the surface coefficients and illuminant coefficients. The richness and complexity of these interactions indicate that the simple von Kries type correction of diagonal matrix coefficients (or coefficient rule) is inadequate. However, Forsyth’s study demonstrated that the simple coefficient rule has merit,37 and it is supported by subsequent studies of Finalayson and colleagues.47–49 Many color constancy theories have some uncanny similarities. Most, if not all, models are based on the von Kries hypothesis that sensor sensitivities are independent and can be adjusted individually. They all use linear combinations and transforms. Using the spectral sharpening in a 2-3 world, with the first illumination coefficient of 1 such that E(λ) = E 1 (λ) + εE2 (λ), Brill has shown that the von Kries adapted tristimulus values are illuminant invariant. This result reaffirms the unusual stature of the von Kries transform in securing illuminant invariance. He further showed that the Judd adaptation can be illuminant invariant only when the illuminant basis functions are constrained to be metameric.53 This result fits Cohen’s R-matrix decomposition perfectly.54 The volume matrix of Brill’s volumetric theory is certainly related to the lighting matrix of the Maloney-Wandell algorithm. Data-based sharpening can be viewed as a generalized volumetric theory.48 In the case where the sample number is three, data-based sharpening reduces to the volumetric theory. As a color-constancy algorithm, data-based sharpening has the advantage that it is optimal with respect to the least-squares criterion, at the expense of the requirement that all surface reflectances must appear in the image, not to mention the added computational cost.
References 1. M. H. Brill and G. West, Chromatic adaptation and color constancy: A possible dichotomy, Color Res. Appl. 11, pp. 196–227 (1986). 2. P. Emmel, Physical models for color prediction, Digital Color Imaging Handbook, G. Sharma (Ed.), CRC Press, Boca Raton, pp. 173–237 (2000). 3. H. C. Lee, E. J. Breneman, and C. P. Schulte, Modeling light reflection for computer color vision, Technical Report, Eastman Kodak Company (1987). 4. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Edition, Wiley, New York, pp. 273–274 (1982). 5. P. Sällströn, Colour and physics, University of Stockholm Institute of Physics Report 73-09, Stockholm (1973). 6. G. Buchsbaum, A spatial processor model for object colour perception, J. Franklin Inst. 310, pp. 1–26 (1980).
Computational Color Constancy
269
7. L. T. Maloney, Evaluation of linear models of surface spectral reflectance with small number of parameters, J. Opt. Soc. Am. A 3, pp. 1673–1683 (1986). 8. L. T. Maloney, Computational approaches to color constancy, Standard Applied Psychology Lab. Tech. Report 1985-01, Standard University, Standard, CA (1985). 9. L. T. Maloney and B. A. Wandell, Color constancy: a method for recovering surface spectral reflectance, J. Opt. Soc. Am. A 3, pp. 29–33 (1986). 10. B. A. Wandell, Color constancy and the natural image, Physica Scripta 39, pp. 187–192 (1989). 11. D. H. Marimont and B. A. Wandell, Linear models of surface and illuminant spectra, J. Opt. Soc. Am. A 9, pp. 1905–1913 (1992). 12. R. B. MacLeod, An experimental investigation of brightness constancy, Arch. Psychol. 135, 5–102 (1932). 13. H. C. Lee, Method for computing the scene-illuminant chromaticity from specular highlights, J. Opt. Soc. Am. A 3, pp. 1694–1699 (1986). 14. W. S. Stiles and G. Wyszecki, Intersections of the spectral reflectances curves of metameric object color, J. Opt. Soc. Am. 58, pp. 32–41 (1968). 15. L. T. Maloney and B. A. Wandell, Color Constancy: a method for recovering surface spectral reflections, J. Opt. Soc. Am. A 3, pp. 29–33 (1986). 16. A. C. Hurlbert, The computation of color, MIT Technical Report 1154 (1990). 17. B. A. Wandell, Foundations of Vision, Sinauer Assoc., pp. 301–306 (1995). 18. A. C. Hurlbert, The computation of color, MIT Industrial Liaison Program Report (1990). 19. P. Brou, T. R. Sciascia, L. Linden, and J Y. Lettvin, The colors of things, Sci. Am. 255, pp. 84–91 (1986). 20. S. A. Shafer, G. J. Klinker, and T. Kanade, Using color to separate reflection components, Color Res. Appl. 10, pp. 210–218 (1985). 21. M. D’Zmura and P. Lennie, Mechanisms of color constancy, J. Opt. Soc. Am. A 3, pp. 1663–1672 (1986). 22. G. J. Klinker, S. A. Shafer, and T. Kanade, The measurement of highlights in color images, Int. J. Comput. Vision 2, pp. 7–32 (1988). 23. S. Tominaga and B. A. Wandell, Standard surface reflectance model and illuminant estimation, J. Opt. Soc. Am. A 6, pp. 576–584 (1989). 24. S. Tominaga and B. A. Wandell, Component estimation of surface spectral reflectance, J. Opt. Soc. Am. A 7, pp. 312–317 (1990). 25. M. D’Zmura, Color constancy: surface color from changing illumination, J. Opt. Soc. Am. A 9, pp. 490–493 (1992). 26. M. D’Zmura and G. Iverson, Color constancy II: Results for two-stage linear recovery of spectral descriptions for lights and surfaces, J. Opt. Soc. Am. A 10, pp. 2166–2176 (1993). 27. M. D’Zmura and G. Iverson, Color constancy III: General linear recovery of spectral descriptions for lights and surfaces, J. Opt. Soc. Am. A 11, pp. 2389– 2400 (1994).
270
Computational Color Technology
28. S. Tominaga, Realization of color constancy using the dichromatic reflection model, IS&T & SID’s 2nd Color Imaging Conf., pp. 37–40 (1994). 29. A. P. Petrov, C. Y. Kim, Y. S. Seo, and I. S. Kweon, Perceived illuminant measured, Color Res. Appl. 23, pp. 159–168 (1998). 30. F. H. Cheng, W. H. Hsu, and T. W. Chen, Recovering colors in an image with chromatic illuminant, IEEE Trans. Image Proc. 7, pp. 1524–1533 (1998). 31. C. H. Lee, J. H. Lee, H. Y. Lee, E. Y. Chung, and Y. H. Ha, Estimation of spectral distribution of scene illumination from a single image, J. Imaging Sci. Techn. 44, pp. 308–314 (2000). 32. Y.-T. Kim, Y.-H. Ha, C.-H. Lee, and J.-Y. Kim, Estimation of chromatic characteristics of scene illumination in an image by surface recovery from the highlight region, J. Imaging Sci. Techn. 48, pp. 28–36 (2004). 33. M. H. Brill, A device performing illuminant-invariant assessment of chromatic relations, J. Theor. Biol. 71, pp. 473–478 (1978). 34. M. H. Brill, Further features of the illuminant-invariant trichromatic photosensor, J. Theor. Biol. 78, pp. 305–308 (1979). 35. M. H. Brill, Computer simulation of object-color recognizers, MIT Research Laboratory of Electronics Progress Report No. 122, Cambridge, pp. 214–221 (1980). 36. M. H. Brill, Computer simulation of object color recognizers, MIT Progress Report No. 122, pp. 214–221 (1980). 37. D. A. Forsyth, A novel algorithm for color constancy, Int. J. Comput. Vision 5, pp. 5–35 (1990). 38. E. H. Land and J. J. McCann, Lightness and retinex theory, J. Opt. Soc. Am. 61, pp. 1–11 (1971). 39. J. J. McCann, S. P. McKee, and T. H. Taylor, Quantitative studies in retinex theory: a comparison between theoretical predictions and observer responses to the color Mondrian experiments, Vision Res. 16, pp. 445–458 (1976). 40. E. H. Land, Recent advances in retinex theory and some implications for cortical computation: color vision and the natural image, Proc. Natl. Acad. Sci. USA 80, pp. 5163–5169 (1983). 41. J. J. McCann and K. Houston, Calculating color sensations from arrays of physical stimuli, IEEE Trans. Syst. Man. Cybern. SMC-13, pp. 1000–1007 (1983). 42. E. H. Land, Recent advances in retinex theory, Vision Res. 26, pp. 7–22 (1986). 43. D. H. Brainard and B. A. Wandell, Analysis of the retinex theory of color vision, J. Opt. Soc. Am. A 3, pp. 1651–1661 (1986). 44. G. D. Finlayson and M. S. Drew, Constrained least-squares regression in colour spaces, J. Electron. Imaging 6, pp. 484–493 (1997). 45. W. Praefcke and F. Konig, Colour prediction using the von Kries transform, in Colour Imaging: Vision and Technology, L. W. MacDonald and M. R. Luo (Eds.), pp. 39–54 (1999). 46. K. M. Lam, Metamerism and Color Constancy, Ph.D. Thesis, University of Bradford (1985).
Computational Color Constancy
271
47. G. D. Finlayson, M. S. Drew, and B. V. Funt, Color constancy: Enhancing von Kries adaptation via sensor transformations, Proc. SPIE 1913, pp. 473–484 (1993). 48. G. D. Finlayson, M. S. Drew, and B. V. Funt, Spectral sharpening: sensor transformations for improved color constancy, J. Opt. Soc. Am. A 11, pp. 1553–1563 (1994). 49. G. D. Finalayson, M. S. Drew, and B. V. Funt, Color constancy: Generalized diagonal transforms suffice, J. Opt. Soc. Am. A 11, pp. 3011–3019 (1994). 50. A. J. Calabria and M. D. Fairchild, Herding CATs: A comparison of linear chromatic-adaptation transforms for CIECAM97s, Proc. IS&T/SID 9th Color Imaging Conf., IS&T, Scottsdale, AZ, pp. 174–178 (2001). 51. J. K. Bowmaker and H. J. A. Dartnell, Visual pigments of rods and cones in the human retina, J. Physiol. 298, pp. 501–511 (1980). 52. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulas, 2nd Edition Wiley, New York, p. 806 (1982). 53. M. H. Brill, Can color-space transformation improve color computation other than Von Kries, Proc. SPIE 1913, pp. 485–492 (1993). 54. J. B. Cohen and W. E. Kappauf, Metamer color stimuli, fundamental metamers, and Wyszecki’s metameric black, Am. J. Psychology 95, pp. 537– 564 (1982).
Chapter 13
White-Point Conversion Device color-space characteristics and transformations are dependent on the illuminants used. The mismatch of white points is a frequently encountered problem. It happens in situations where the measuring and viewing of an object are under different illuminants, the original and reproduction use different illuminants, and the different substrates are under the same illuminant. To correct these problems, the transform of white points is needed. White-point conversion techniques are developed for converting between different illuminants strictly on the physical quantities, without any appearance transform. In this context, white-point conversion is different from chromatic adaptation or color constancy in which the illumination difference is treated with an appearance transform (see Chapter 3). For white-point conversion, we are asking the question: What are the tristimulus values (or other colorimetric specifications) of an object under illuminant A if the only information available is under illuminant B? Thus, it is strictly a mathematical transform. In this chapter, we present four methods of white-point conversion. The first method is based on the transform between CIEXYZ and colorimetric RGB. By using a colorimetric RGB space as the intermediate connection between two white points, the white-point conversion is scaled by the ratios of the proportional constants of red, green, and blue primaries.1 The second method performs the white point-conversion via tristimulus ratios.2 The third method uses the spectral difference of the white points. Source tristimulus values are corrected from the whitepoint difference to obtain destination tristimulus values. The fourth method uses polynomial regression. Theory and derivation are given in detail for each method. Conversion accuracies of these methods are compared using a set of 135 data points. Advantages and disadvantages of these methods are discussed.
13.1 White-Point Conversion via RGB Space Xerox Color Encoding Standards (XCES) provide a method for white-point conversion, utilizing an intermediate colorimetric RGB space because tristimulus values are a linear transform of the colorimetric RGB, as shown in Section 6.2.1 First, the source tristimulus values Xs , Ys , and Zs are transformed to RGB via a simple 273
274
Computational Color Technology
conversion matrix α. α11 Rs Gs = α21 Bs α31
α12 α22 α32
Xs α13 α23 Ys , α33 Zs
(13.1a)
or Υ p,s = αΥ s .
(13.1b)
Resulting RGB values are converted to the destination tristimulus values Xd , Yd , and Zd via another matrix β.
Xd β11 Yd = β21 Zd β31
β12 β22 β32
Rd β13 β23 Gd , β33 Bd
(13.2a)
or Υ d = βΥ p,d .
(13.2b)
By assuming that source RGB values Υ p,s and destination RGB values Υ p,d represented by the same intermediate RGB space are equal, [ Rs
Gs
Bs ]T = [ Rd
Gd
Bd ]T
or
Υ p,s = Υ p,d ,
(13.3)
Equation (13.3) provides the connection between the source and destination white points; therefore, we can substitute Eq. (13.1) into Eq. (13.2) to give β11 Xd Yd = β21 Zd β31
β12 β22 β32
β13 α11 β23 α21 β33 α31
α12 α22 α32
α13 Xs α23 Ys , α33 Zs
(13.4a)
or Υ d = βαΥ s .
(13.4b)
Both matrices α and β are usually known or can be determined experimentally or mathematically, and we can combine them into one matrix by using matrix multiplication. Still, the computational cost is quite high (9 multiplications and 6 additions). Interestingly, this seemingly complex equation masks an extremely simple relationship between the source and destination white points. Mathematically, Eq. (13.4) can be reduced to a very simple form by relating matrix coefficients to tristimulus values of the intermediate RGB primaries. Colorimetric RGB primaries
White-Point Conversion
275
are related to tristimulus values via Eq. (13.5).1 X = xr Tr R + xg Tg G + xb Tb B Y = yr Tr R + yg Tg G + yb Tb B
(13.5a)
Z = zr Tr R + zg Tg G + zb Tb B, or xr X Y = yr zr Z
xg yg zg
Tr xb yb 0 zb 0
0 Tg 0
R 0 0 G, B Tb
(13.5b)
or Υ = Γ T Υ p,
(13.5c)
where (xr , yr , zr ), (xg , yg , zg ), and (xb , yb , zb ) are the chromaticity coordinates of the red, green, and blue primaries, respectively. Parameters Tr , Tg , and Tb are the proportional constants of the red, green, and blue primaries, respectively, under an adapted white point.1 Equation (13.5) can be solved for Tr , Tg , and Tb by using a known condition of a gray-balanced and normalized RGB system; that is, when R = G = B = 1, a reference white point (Xn , Yn , Zn ) of the device is produced. Using this condition, Eq. (13.5) becomes
xr yr zr
xg yg zg
Tr xb yb 0 zb 0
0 Tg 0
Xn 0 0 = Yn , Zn Tb
(13.6a)
or Γ T = Υ n.
(13.6b)
For the case of the same RGB primaries but different white points used for the source and reproduction, we can use relationships given in Eqs. (13.5) and (13.6) to determine tristimulus values of the reproduction under a destination illuminant if we know tristimulus values of the object under a source illuminant. Under the source illuminant, we first compute RGB values using Eq. (13.5) because the tristimulus values under the source illuminant are known and the conversion matrix, having three independent columns, can be inverted.
R xr Tr,s G = yr Tr,s B zr Tr,s
xg Tg,s yg Tg,s zg Tg,s
−1 Xs xb Tb,s yb Tb.s Ys , zb Tb,s Zs
(13.7a)
276
Computational Color Technology
or Υ p = (Γ T s )−1 Υ s .
(13.7b)
Equation (13.7) is the inverse of Eq. (13.5). Compared to Eq. (13.1), we have
α11 α21 α31
α12 α22 α32
xr Tr,s α13 α23 = yr Tr,s α33 zr Tr,s
xg Tg,s yg Tg,s zg Tg,s
−1 xb Tb,s yb Tb.s , zb Tb,s
(13.8a)
or α = (Γ T s )−1 . From Eqs. (13.2) and (13.5), we have xr Tr,d β11 β12 β13 β21 β22 β23 = yr Tr,d β31 β32 β33 zr Tr,d
(13.8b)
xg Tg,d yg Tg,d zg Tg,d
xb Tb,d yb Tb.d , zb Tb,d
(13.9a)
or β = Γ T d.
(13.9b)
Substituting Eqs. (13.8a) and (13.9b) into Eq. (13.4b), we have −1 Υ d = Γ T d (Γ T s )−1 Υ s = Γ T d T −1 Υ s = Γ Γ −1 T d (T s )−1 Υ s = T d (T s )−1 Υ s s Γ (13.10a) or Xs Xd (Tr,d /Tr,s ) 0 0 Ys . Yd = 0 0 (Tg,d /Tg,s ) (13.10b) Zd Zs 0 0 (Tb,d /Tb,s )
Equation (13.10) simplifies the method of white-point conversion from a matrix multiplication [see Eq. (13.4)] to a constant scaling via a colorimetrical RGB space. It reduces the computational cost, requiring only three multiplications. The assumption for this derivation is that the colorimetric RGB values remain the same under different white points. Based on this assumption, Eq. (13.10) states that the white points are converted by multiplying ratios of RGB proportional constants from destination illuminant to source illuminant. This simple relationship of Eq. (13.10) is basically the von Kries type of coefficient rule. Ratios of A → C, A → D50 , A → D65 , C → D50 , C → D65 , and D50 → D65 are given in Table 13.1 for three different RGB spaces, where column 3 contains the destination-to-source ratios of the red component, column 4 contains the ratios of the green component, and column 5 contains the ratios of the blue component. For the backward con-
White-Point Conversion
277
Table 13.1 Ratios of proportional constants from destination illuminant to source illuminant.
Transform
Primary
Tr,d /Tr,s
Tg,d /Tg,s
Tb,d /Tb,s
A→C
RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB
1.754 1.764 1.200 1.567 1.536 1.204 1.845 1.823 1.244 0.871 0.893 1.003 1.033 1.052 1.037 1.187 1.178 1.034
0.848 0.870 0.919 0.848 0.890 0.918 0.827 0.864 0.906 1.023 0.999 0.999 0.993 0.975 0.986 0.970 0.975 0.987
0.212 0.296 0.301 0.323 0.425 0.431 0.233 0.322 0.327 1.437 1.523 1.432 1.087 1.100 1.086 0.756 0.723 0.758
A → D50 A → D65 C → D50 C → D65 D50 → D65
versions, the ratios are the inverse of the corresponding values given in the table; for example, C → A conversion ratios are the inverse of the A → C ratios. Note that the ratios obtained via different RGB spaces give different values; for example, (Tr,d /Tr,s ) ratios involving illuminant A give smaller values via ROMM/RGB space than the other two RGB spaces. These results indicate that there are gamut differences in the RGB primary sets, which reveal the suitability of the intermediate RGB space used for deriving the proportional constants. A set of 135 data points was obtained from an electrophotographic (or xerographic) print of color patches that contained step wedges of primary CMYK colors, secondary CM, MY, and CY mixtures, and three-color CMY mixtures. The spectra of these 135 patches were measured; then, tristimulus values were calculated under illuminants A, C, D50 , D65 , and D75 using Eq. (1.1) at 10-nm intervals. These results were used as the standards for comparison with results of the whitepoint conversions. Figures (13.1)–(13.3) show the goodness of the simple coefficient rule of Eq. (13.10) to fit the measured data for D50 → D65 conversion on a set of 135 data points. Figure 13.1 is the plot of X ratios (X measured under D50 divides X measured under D65 ) as a function of the X value under D65 . Figures 13.2 and 13.3 are the corresponding plots for Y and Z ratios, respectively. If Eq. (13.10) is true, the plot of the tristimulus ratio as a function of the tristimulus value should fall into a horizontal line with a constant value. In other words, the tristimulus ratios of all data points should be the same, regardless of the magnitude of the tristimulus value. The figures, however, show that the ratio diverges as the tristimulus
278
Computational Color Technology
Figure 13.1 Plot of XD50 /XD65 as a function of XD65 .
Figure 13.2 Plot of YD50 /YD65 as a function of YD65 .
value decreases, reaching maximum scattering in the dark region (<20), then converges again. In spite of the data scattering in the low-tristimulus region, one can still draw a straight line through all data points to obtain the white-point ratio. The constant value obtained from the graph is pretty close to the ratio computed from Eq. (13.10), except for those data points involving illuminants A and Tr of D50 (see Table 13.1). Other white-point conversions such as D50 ↔ C and D65 ↔ C behave similarly.
White-Point Conversion
279
Figure 13.3 Plot of ZD50 /ZD65 as a function of ZD65 .
Table 13.2 lists the accuracies of white-point conversions between four illuminants, A, C, D50 , and D65 , using Eq. (13.10) on the set of 135 data points via three sets of primaries (RGB709, CIE1931/RGB, and ROMM/RGB). Results in CIEXYZ space are not good measures for evaluating the conversion accuracy because it is not a visually linear space; a small difference in CIEXYZ may not give a small visual difference. Therefore, for the purpose of comparing color differences, the measured and calculated tristimulus values are further converted to CIELAB values using CIE formulation for the purpose of computing color differences in CIELAB space.3 Table 13.2 indicates that any conversions involving illuminant A are not acceptable; the maximum error can go as high as a 109 Eab value. For other conversions involving C, D50 , and D65 , this method is marginal in conversion accuracy; the average color differences in CIELAB space range from 12 to 22 Eab units, and the maximum values are below 31 Eab units. Errors are smaller when ROMM/RGB primaries are used for computing the transformation, where CIE1931/RGB and RGB709 are comparable in conversion accuracy with a factor of three or four higher in conversion error than those obtained from ROMM/RGB. These data reveal that the conversion error depends on the relative distance between white points in the chromaticity coordinates. Figure 13.4 shows the positions of illuminants in the chromaticity diagram, and Fig. 13.5 depicts the average color difference as a function of the distance between illuminants. The errors are smaller in D65 ↔ C conversions than in D50 ↔ C and D50 ↔ D65 conversions because the distance between D65 and C is smaller than the distances between D50 and C and between D50 and D65 in the chromaticity diagram. Generally, the larger the distance between illuminants in the chromaticity diagram, the larger the color difference.
280
Computational Color Technology
Table 13.2 Conversion accuracies between illuminants A, C, D50 , and D65 on a set of 135 measured data points from three sets of primaries (RGB709, CIE1931, and ROMM/RGB).
Source illuminant
Destination illuminant
RGB primary
CIEXYZ Average
Maximum
CIELAB Average
Maximum
A
C
C
A
A
D50
D50
A
A
D65
D65
A
C
D50
D50
C
C
D65
D65
C
D50
D65
D65
D50
RGB709 CIE1931 ROMM RGB709 CIE1931 ROMM RGB709 CIE1931 ROMM RGB709 CIE1931 ROMM RGB709 CIE1931 ROMM RGB709 CIE1931 ROMM RGB709 CIE1931 ROMM RGB709 CIE1931 ROMM RGB709 CIE1931 ROMM RGB709 CIE1931 ROMM RGB709 CIE1931 ROMM RGB709 CIE1931 ROMM
24.27 15.01 6.89 23.85 23.66 6.81 16.35 10.72 5.41 16.61 14.71 5.37 23.17 14.73 7.02 25.15 23.76 7.02 5.22 6.05 1.66 5.17 5.36 1.78 1.26 0.48 0.68 1.29 0.49 0.69 5.38 5.24 1.65 5.96 6.11 1.64
52.73 31.89 13.23 53.52 53.20 13.42 34.86 22.73 10.13 36.74 32.67 9.95 49.87 31.27 13.28 56.27 53.28 13.26 11.88 13.60 4.09 11.66 11.88 4.18 2.71 1.03 1.44 2.75 1.07 1.48 11.94 11.61 3.37 13.35 13.68 3.43
68.70 65.61 21.56 75.07 72.77 21.49 54.73 46.72 18.63 57.39 49.60 18.45 72.87 66.18 23.26 79.62 73.27 23.09 16.10 21.38 4.63 15.48 20.47 4.61 4.92 1.46 2.27 4.91 1.46 2.27 19.67 21.00 4.94 20.49 21.90 4.95
93.05 89.10 44.73 102.00 98.97 46.82 74.56 63.59 32.59 78.34 67.56 30.95 99.30 90.24 42.91 108.77 100.02 44.49 26.81 30.88 15.35 25.52 29.12 15.27 8.71 3.43 4.91 8.71 3.43 4.90 26.85 28.76 13.04 27.98 30.00 13.14
Note that the average color differences, as well as maximum differences for the forward and backward transformations under a given RGB space, are about the same. For example, the C → D50 conversion under ROMM/RGB gives an average of 4.63 Eab and a maximum of 15.35 Eab , where the inverse D50 → C gives an
White-Point Conversion
281
Figure 13.4 Chromaticity coordinates of illuminants.
Figure 13.5 Average color difference as a function of the distance between illuminants.
average of 4.61 Eab and a maximum of 15.27 Eab ; other conversions such as C D65 conversions are even closer (almost identical). Moreover, the conversion accuracy is dependent on the intermediate RGB space employed. The RGB709, having a very small color gamut, gives the worst accuracy in most cases, whereas
282
Computational Color Technology
ROMM/RGB, having the largest color gamut, gives the best accuracy. In summary, this method is unacceptable for any conversions involving illuminant A. The accuracy is marginal for C D50 and D50 D65 via ROMM space, and the accuracy is acceptable or good for C D65 via all three RGB spaces. The poor agreement is attributed to the deviations from the constant values shown in Figs. (13.1) to (13.3). It is unfortunate that the worst deviations occur in the dark region where the sensitivity in CIELAB color difference is very high. The conversion accuracy can be improved by merely applying a scaling factor to the Tr of D50 . A general expression for the scaling correction is given in Eq. (13.11). 0 fr (Tr,d /Tr,s ) Xd Yd = 0 fg (Tg,d /Tg,s ) Zd 0 0
Xs Ys , Zs fb (Tb,d /Tb,s ) 0 0
(13.11)
where fr , fg , and fb are the scaling factors for tristimulus values X, Y , and Z, respectively. The optimal scaling factor can be found by plotting the scaling factor as a function of the average color difference Eab , as shown in Fig. 13.6 for illuminant C to D50 conversion from three RGB spaces, where the optimal scaling factor is the minimum of the curve. The optimal ratios of RGB proportional constants
Figure 13.6 The scaling factor as a function of the average color difference Eab for illuminant C to D50 conversion from three RGB spaces, where the optimal scaling factor is the minimum of the curve.
White-Point Conversion
283
for conversions between illuminants A, C, D50 , and D65 are listed in Table 13.3. It is interesting to note that they are extremely close to the corresponding tristimulus ratios (also given in Table 13.3 for comparisons). Table 13.4 gives white-point conversion errors using optimal ratios; they indeed give the smallest color differences (by a factor of two or more) as compared to the corresponding conversion errors given in Table 13.2. Even with the optimal ratios, the conversion accuracy is still not acceptable for transforms involving illuminant A; it is marginal, acceptable for C ↔ D50 , and acceptable for C ↔ D65 and D50 ↔ D65 . Because of the scattering and deviations in the dark region, it is difficult to improve the conversion accuracy further. Moreover, there are different consequences of the scaling effect with respect to RGB primaries. Unlike RGB709 and CIE1931/RGB, ROMM/RGB does not need the scaling and gives very satisfactory agreements. Using ROMM/RGB, the scaling makes conversion errors larger, not smaller. In a few cases where there is an improvement, the improvement is marginal and the scaling factor is very close to 1.
13.2 White-Point Conversion via Tristimulus Ratios of Illuminants Viewing the agreements between the ratio of proportional constants and the ratio of tristimulus values (see Table 13.3), Kang proposed another empirical method that builds on the known color transfer matrix of a given illuminant.2 When the illuminant changes, a white-point conversion matrix M w is computed and weighted to the corresponding elements of the color-transfer matrix. Specifically, the conversion matrix is the product of two vectors: a column vector of tristimulus values of the destination white point and a row vector of reciprocal tristimulus values of Table 13.3 Optimal ratios of RGB proportional constants and rations of tristimulus values for conversions between illuminants A, C, D50 , and D65 .
Transform C→A D50 → A D65 → A D50 → C D65 → C D65 → D50
Ratios of proportional constants (Td /Ts ) Ratios of tristimulus values (Υ d /Υ s ) Ratios of proportional constants (Td /Ts ) Ratios of tristimulus values (Υ d /Υ s ) Ratios of proportional constants (Td /Ts ) Ratios of tristimulus values (Υ d /Υ s ) Ratios of proportional constants (Td /Ts ) Ratios of tristimulus values (Υ d /Υ s ) Ratios of proportional constants (Td /Ts ) Ratios of tristimulus values (Υ d /Υ s ) Ratios of proportional constants (Td /Ts ) Ratios of tristimulus values (Υ d /Υ s )
Red
Green
Blue
1.128 1.120 1.133 1.138 1.153 1.155 1.016 1.017 1.033 1.032 1.010 1.015
0.994 1.000 0.992 1.000 0.988 1.000 1.002 1.000 0.999 1.000 0.995 1.000
0.300 0.301 0.430 0.431 0.328 0.327 1.440 1.432 1.089 1.086 0.759 0.758
284
Computational Color Technology
Table 13.4 Conversion accuracies between illuminants A, C, D50 , and D65 on a set of 135 measured data using optimal proportional constants.
Source illuminant
Destination illuminant
CIEXYZ Average
Maximum
CIELAB Average
Maximum
A C A D50 A D65 C D50 C D65 D50 D65
C A D50 A D65 A D50 C D65 C D65 D50
5.28 5.26 3.58 3.73 5.09 5.23 1.62 1.75 0.40 0.40 1.49 1.49
13.27 14.45 9.91 10.74 13.23 14.56 5.09 5.03 1.04 1.03 4.15 4.36
11.61 11.63 7.44 7.42 10.93 10.92 4.25 4.32 1.26 1.21 3.49 3.50
37.26 37.40 22.91 22.88 34.44 34.45 14.01 14.57 3.87 4.07 11.11 11.10
the source white point.
XN,d
M w = YN,d 1/XN,s 1/YN,s 1/ZN,s ZN,d XN,d /XN,s XN,d /YN,s XN,d /ZN,s = YN,d /XN,s YN,d /YN,s YN,d /ZN,s . ZN,d /XN,s ZN,d /YN,s ZN,d /ZN,s
(13.12)
If we know the tristimulus values of the illuminants involved (which are readily available), we can compute the conversion matrix M w . Note that the diagonal elements of M w in Eq. (13.12) are exactly the ratios of tristimulus values between the destination and source white points. Matrix M w provides additional corrections via off-diagonal elements. This matrix is used to scale the transfer matrix from source to destination illuminants, where elements of the conversion matrix M w are multiplied by the corresponding matrix elements of the color-transfer matrix given in Eq. (13.1) to give the destination RGB values.
Rd α11 (XN,d /XN,s ) Gd = α21 (YN,d /XN,s ) Bd α31 (ZN,d /XN,s )
α12 (XN,d /YN,s ) α13 (XN,d /ZN,s ) Xs α22 (YN,d /YN,s ) α23 (YN,d /ZN,s ) Ys . α32 (ZN,d /YN,s ) α33 (ZN,d /ZN,s ) Zs (13.13)
The resulting RGB values are converted to destination tristimulus values by multiplying the inverse matrix of Eq. (13.1) under the source illuminant; the overall
White-Point Conversion
285
conversion is given in Eq. (13.14). −1 α11 α12 α13 Xd Yd = α21 α22 α23 Zd α31 α32 α33 α11 (XN,d /XN,s ) α12 (XN,d /YN,s ) × α21 (YN,d /XN,s ) α22 (YN,d /YN,s ) α31 (ZN,d /XN,s ) α32 (ZN,d /YN,s )
Xs α13 (XN,d /ZN,s ) α23 (YN,d /ZN,s ) Ys . α33 (ZN,d /ZN,s ) Zs (13.14)
This method uses the source transfer matrix only, where the white-point difference is taken into account in Eq. (13.13); there are no destination transfer matrices involved. For a given white-point conversion, transfer matrices from different RGB spaces are pretty close, particularly for diagonal elements. This may be attributed to the fact that the formula does not involve the destination matrix. The best conversion matrix for each white-point conversion is given as follows: A to C 0.0082 1.0032 −0.0026
0.8903 −0.0076 0.0009
1.1271 0.0386 0
C to A −0.0199 0.9928 0
0.9776 −0.0154 −0.0009
1.0152 −0.0080 0
0.1156 0.0097 3.3215
−0.0241 −0.0012 0.3010
A to D50 0.0073 −0.0147 1.0026 0.0012 0 2.3204
0.8760 −0.0126 0
1.1459 0.0392 0
D50 to A −0.0199 −0.0345 0.9929 −0.0018 0 0.4310
C to D50 0.0163 −0.0230 1.0057 0.0009 0.0024 0.6986
0.9653 −0.0198 0
C to D65 0.0102 1.0037 0
0.0046 0.0006 0.9211
D50 to C 0.0041 1.0015 0
1.0303 −0.0081 0
D65 to C 0.0041 1.0015 0
0.0071 0.0003 1.0856
0.0092 0.0004 1.4317
0.8620 −0.0177 0
1.1630 0.0398 0
A to D65 0.0103 1.0037 0
0.0150 0.0018 3.0602
D65 to A −0.0198 −0.0261 0.9929 −0.0014 0 0.3268
D50 to D65 0.9814 0.0102 0.0065 −0.0202 1.0038 0.0009 0 0 1.3189
1.0089 −0.0157 −0.0010
D65 to D50 0.0162 −0.0250 1.0057 0.0010 0.0025 0.7584
Note that the diagonal elements of the conversion matrix are very close to the corresponding optimal ratios (or the tristimulus ratios) given in Table 13.3. Therefore, it is not surprising that the conversion accuracy is on the order of the accuracy obtained from the optimal ratios of the first method. This method gives quite satisfactory results to conversions among illuminants C, D50 , and D65 in SMPTEC/RGB space; the average color differences range from 2.2 to 4.2 Eab units. However, it is not adequate for conversions that involve illuminant A; the errors
286
Computational Color Technology
are about 10 Eab units.2 Additional testing results of this method under other RGB spaces are given in Table 13.5. Results indicate that the conversion accuracy is less sensitive to the RGB primaries used to derive the conversion matrix. Unlike the first method where the forward and reverse transforms have similar conversion accuracies, the second method gives very different accuracies. This is because only one transfer matrix (the source) is involved; thus, no correlation between the source and destination white points is accounted for. The data also reconfirm previous observations that the adequacy of this white-point conversion method depends on the difference between correlated color temperatures of white points; the larger the temperature difference, the less accurate the approximation. The relationship between the color differences and relative positions of illuminants with respect to illuminant D93 in CIELAB space is shown in Fig. 13.7. The accuracy, however, can be improved by adding nonlinear terms to the transfer matrix.4
13.3 White-Point Conversion via Difference in Illuminants Tristimulus values are computed using the object spectrum S(λ) and illuminant SPD E(λ) together with the color-matching functions (CMF), x(λ), ¯ y(λ), ¯ z¯ (λ), as
Figure 13.7 Plot of average color differences versus relative positions of illuminants in CIELAB space.
White-Point Conversion
287
Table 13.5 Conversion accuracies of the second method of white-point conversion using different RGB primaries to derive the conversion matrix.
Source Destination RGB illumination illumination space
XYZ XYZ XYZ Avg. RMS Max.
LAB Avg.
LAB RMS
LAB Max.
A
C
C
A
A
D50
D50
A
A
D65
D65
A
C
D50
D50
C
C
D65
D65
C
D50
D65
D65
D50
5.43 5.50 5.27 8.10 8.32 5.60 3.93 3.70 3.51 7.51 7.69 4.16 5.10 5.24 5.00 8.09 8.33 5.52 1.95 1.61 1.70 2.27 2.29 1.77 1.69 1.71 0.90 1.86 1.75 0.59 1.99 2.11 1.63 1.80 1.48 1.52
10.81 11.02 11.02 21.02 22.08 12.73 9.14 9.32 7.84 21.87 23.82 10.04 11.40 11.47 11.06 21.40 22.68 12.44 4.75 3.02 4.45 4.77 5.54 4.20 6.23 6.72 3.83 4.10 5.49 1.78 5.83 6.22 4.51 4.10 2.53 3.64
12.67 12.44 13.65 22.60 23.08 14.18 11.38 12.14 9.73 23.01 25.76 10.76 13.00 12.88 13.25 22.75 23.76 13.72 5.53 3.55 5.55 5.34 6.00 5.13 6.70 7.44 4.19 4.27 5.80 2.04 6.38 6.68 5.06 4.69 2.85 4.41
30.10 23.64 33.32 45.69 29.91 26.08 29.30 33.54 23.98 42.72 56.56 19.81 28.01 24.57 30.87 45.26 35.02 24.60 14.53 7.84 14.01 10.17 10.16 10.98 12.70 14.92 7.98 7.22 8.88 3.95 11.18 10.91 9.85 11.74 6.05 11.26
RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB RGB709 CIE1931/RGB ROMM/RGB
6.58 6.72 6.55 9.79 9.93 6.85 4.75 4.53 4.33 8.85 8.95 4.91 6.18 6.36 6.14 9.71 9.87 6.68 2.31 2.03 2.12 2.76 2.78 2.21 1.97 2.05 1.02 2.18 2.05 0.69 2.41 2.53 1.96 2.13 1.83 1.87
13.33 13.54 13.34 15.81 15.87 14.32 9.26 9.41 9.38 14.59 14.55 10.11 12.54 12.90 12.69 15.03 15.40 14.06 4.20 4.47 4.82 5.15 5.54 5.16 3.52 3.77 1.66 4.06 3.80 1.20 4.84 4.98 4.27 3.94 3.79 3.94
defined in Eq. (13.15) by CIE.3 X=k
E(λ)S(λ)x(λ) ¯ dλ ∼ =k
E(λ)S(λ)x(λ)λ, ¯
(13.15a)
288
Computational Color Technology
Y =k Z=k
E(λ)S(λ)y(λ) ¯ dλ ∼ =k E(λ)S(λ)¯z(λ) dλ ∼ =k
k = 100/
E(λ)S(λ)y(λ)λ, ¯
(13.15b)
E(λ)S(λ)¯z(λ)λ,
(13.15c)
E(λ)y(λ) ¯ dλ ∼ = 100/
E(λ)y(λ)λ ¯ .
(13.15d)
For two different illuminants, Es (λ) and Ed (λ), of the source and destination, we can determine the illuminant difference δE(λ) between them wavelength by wavelength as given in Eq. (13.16). δE(λ) = Ed (λ) − Es (λ).
(13.16)
Knowing this relationship, we can express tristimulus values via the difference term. Xd = kd Ed (λ)S(λ)x(λ)λ ¯ = kd [Es (λ) + δE(λ)]S(λ)x(λ)λ ¯ Es (λ)S(λ)x(λ)λ ¯ + δE(λ)S(λ)x(λ)λ ¯ = kd δE(λ)S(λ)x(λ)λ ¯ = kd Xs /ks + δE(λ)S(λ)x(λ)λ. ¯ (13.17a) = (kd /ks )Xs + kd Similarly, we have Yd = (kd /ks )Ys + kd
Zd = (kd /ks )Zs + kd
δE(λ)S(λ)y(λ)λ, ¯
δE(λ)S(λ)¯z(λ)λ.
(13.17b)
(13.17c)
Equation (13.17) provides the means for white-point conversion between any two illuminants. We can compute tristimulus values (Xd , Yd , Zd ) from (Xs , Ys , Zs ) and vice versa because kd , ks , and δE(λ) are known. The only thing missing is the spectrum of the object, S(λ). Fortunately, it can be estimated in three components (not wavelength by wavelength) via the source tristimulus values because we only have three known inputs—the tristimulus values. To accommodate the trichromatic nature of the inputs for the purpose of estimating the object spectrum, we need to partition the whole visible spectrum into three bands in accordance with the red, green, and blue regions; for example, in
White-Point Conversion
289
the usual visible range of 400 to 700 nm, we can have a blue band Sb with a range of 400–500 nm, a green band Sg with a range of 500–600 nm, and a red band Sr with a range of 600–700 nm. We can segment wider ranges of the visible spectrum (e.g., 360–760 nm) by extending Sb to the low-wavelength end and Sr to the high-wavelength end of the spectrum. With partitions, Eq. (13.15) becomes X/k =
700
S(λ)E(λ)x(λ)λ ¯ = Sr Ærx + Sg Ægx + Sb Æbx ,
(13.18a)
S(λ)E(λ)y(λ)λ ¯ = Sr Æry + Sg Ægy + Sb Æby ,
(13.18b)
S(λ)E(λ)¯z(λ)λ = Sr Ærz + Sg Ægz + Sb Æbz ,
(13.18c)
λ=400
Y/k =
700 λ=400
Z/k =
700 λ=400
where Ærx =
700
E(λ)x(λ)λ, ¯
Ægx =
λ=600
600
E(λ)x(λ)λ, ¯
λ=500
Æbx =
500
E(λ)x(λ)λ, ¯
λ=400
Æry =
700
E(λ)y(λ)λ, ¯
Ægy =
λ=600
600
E(λ)y(λ)λ, ¯
λ=500
Æby =
500
E(λ)y(λ)λ, ¯
λ=400
Ærz =
700 λ=600
E(λ)¯z(λ)λ,
Ægz =
600 λ=500
E(λ)¯z(λ)λ,
290
Computational Color Technology
Æbz =
500
E(λ)¯z(λ)λ,
λ=400
or
X/k Ærx Y/k = Æry Ærz Z/k
Ægx Ægy Ægz
Sr Æbx Æby Sg . Æbz Sb
(13.18d)
The coefficients Ærx , Ægx , Æbx , Æry , Ægy , Æby , Ærz , Ægz , and Æbz in Eq. (13.18) can be computed by using the illuminant SPD and CMF. Therefore, three broad bands, Sb , Sg , and Sr , can be estimated from the source tristimulus values by inverting Eq. (13.18d) as given by Eq. (13.19) because the matrix has three independent vectors; thus, it is not singular and the determinate in Eq. (13.19b) is not zero and can be inverted.
−1 Sr Ærx Ægx Æbx Xs Sg = ks−1 Æry Ægy Æby Ys , Sb Ærz Ægz Æbz Zs Ærx Ægx Æbx det = Æry Ægy Æby = 0. Ærz Ægz Æbz
(13.19a)
(13.19b)
Similarly, we can approximate the illuminant difference E(λ) into three bands in accordance to the same ranges used in partitioning illuminant.
δX =
700
S(λ)δE(λ)x(λ)λ ¯ = Sr δÆrx + Sg δÆgx + Sb δÆbx ,
(13.20a)
S(λ)δE(λ)y(λ)λ ¯ = Sr δÆry + Sg δÆgy + Sb δÆby ,
(13.20b)
S(λ)δE(λ)¯z(λ)λ = Sr δÆrz + Sg δÆgz + Sb δÆbz ,
(13.20c)
λ=400
δY =
700 λ=400
δZ =
700 λ=400
where
δÆrx =
700 λ=600
δE(λ)x(λ)λ, ¯
δÆgx =
600 λ=500
δE(λ)x(λ)λ, ¯
White-Point Conversion
291
δÆbx =
500
δE(λ)x(λ)λ, ¯
λ=400
δÆry =
700
δE(λ)y(λ)λ, ¯
δÆgy =
λ=600
600
δE(λ)y(λ)λ, ¯
λ=500
δÆby =
500
δE(λ)y(λ)λ, ¯
λ=400
δÆrz =
700
δÆgz =
δE(λ)¯z(λ)λ,
λ=600
600
δE(λ)¯z(λ)λ,
λ=500
δÆbz =
500
δE(λ)¯z(λ)λ,
λ=400
or δÆrx δX δY = δÆry δÆrz δZ
δÆgx δÆgy δÆgz
Sr δÆbx δÆby Sg . δÆbz Sb
(13.20d)
Again, we can compute δÆrx , δÆgx , δÆbx , δÆry , δÆgy , δÆby , δÆrz , δÆgz , and δÆbz . By substituting Sb , Sg , and Sr that are obtained from Eq. (13.19) into Eq. (13.20); we derive the tristimulus differences [δX, δY, δZ] across the whole visible spectrum. We then substitute tristimulus differences into Eq. (13.17) to compute the destination tristimulus values. We can combine all these computations into one equation as Xd = (kd /ks )Xs + kd
S(λ)δE(λ)x(λ)λ ¯
= (kd /ks )Xs + kd (Sr δÆrx + Sg δÆgx + Sb δÆbx ), S(λ)δE(λ)y(λ)λ ¯ Yd = (kd /ks )Ys + kd = (kd /ks )Ys + kd (Sr δÆry + Sg δÆgy + Sb δÆby ), S(λ)δE(λ)¯z(λ)λ Zd = (kd /ks )Zs + kd = (kd /ks )Zs + kd (Sr δÆrz + Sg δÆgz + Sb δÆbz ),
(13.21a)
292
Computational Color Technology
Xs Xd δÆrx Yd = (kd /ks ) Ys + kd δÆry Zd Zs δÆrz
δÆgx δÆgy δÆgz
Sr δÆbx δÆby Sg , δÆbz Sb
Xd Xs δÆrx δÆgx Yd = (kd /ks ) Ys + (kd /ks ) δÆry δÆgy Zd Zs δÆrz δÆgz −1 Ærx,s Ægx,s Æbx,s Xs × Æry,s Ægy,s Æby,s Ys . Ærz,s Ægz,s Æbz,s Zs
(13.21b)
δÆbx δÆby δÆbz (13.21c)
Equation (13.21c) shows that the ratio (kd /ks ) is the conversion factor from the source to the destination; the source tristimulus values are then corrected by the illuminant differences in the second term on the right-hand side. The matrix of the illuminant difference and the inverse matrix of the source illuminant can be precomputed. They are multiplied together to give a 3 × 3 matrix. Finally, the ratio kd /ks is added to the diagonal elements. Table 13.6 gives the white-point conversion matrices derived from Eq. (13.21) for conversions between illuminants A, C, D50 , and D65 using two partitions of the visible range. Results of this approach are summarized in Tables 13.7 and 13.8. Generally, conversion accuracy is about a factor of 3 or better than the best results in the first and second methods. However, this method gives negative Sr , Sg , and Sb values for some input tristimulus values if their values are small or if the Z value is substantially higher than X and Y. Because of this problem, we perform the computation in stages. First, we compute the Sr , Sg , and Sb values using Eq. (13.19). Any negative values obtained in this step can be found and dealt with. The second step computes the illuminant difference using Eq. (13.20). Knowing the illuminant difference, we can compute the destination tristimulus values via Eq. (13.17). In this way, we are able to check the values of Sr , Sg , and Sb ; if any of these values is negative, we can set it to zero. Table 13.7 contains the results using the twostep computation. Table 13.8 uses the one-step conversion via the derived matrix given in Table 13.6. Generally, the two-step computation gives a smaller average error (about 15% smaller) as well as a smaller maximum error than the single-step computation because it has the advantage of checking for negative Sr , Sg , and Sb values and setting them to zero. Moreover, the RGB partition also makes a difference in the conversion accuracy. Using the partition of R:[580,700] nm, G:[490, 580] nm, and B:[400, 490] nm, we obtain better agreement as shown in both Tables 13.7 and 13.8. This is because the second partition gives fewer and smaller negative values for Sr , Sg , and Sb . For a given partition, conversion accuracies of the forward and backward transformations are about the same. Also, there is a dependency of the conversion accuracy with respect to the illuminant separation in the chromaticity diagram. For example, the C ↔ D65 transformations have the shortest distance; thus, the smallest errors. However, the dependence on the
White-Point Conversion
293
Table 13.6 White-point conversion matrices derived from illuminant spectra differences.
Source
Destination
Partition 1
Partition 2
A
C
0.4960 0.2426 −0.2960 1.2558 0.0640 −0.1393
C
A
1.8219 −0.3796 −0.2487 0.4314 0.7024 −0.0949 −0.0163 0.0352 0.2887
1.6449 −0.2173 −0.2392 0.4427 0.6904 −0.0940 −0.0331 0.0575 0.2838
A
D50
0.5882 0.1886 −0.2391 1.2008 0.0304 −0.0663
0.6407 0.1249 −0.2944 1.2633 0.0683 −0.1237
D50
A
1.6032 −0.2622 −0.1881 0.3201 0.7785 −0.0727 −0.0117 0.0253 0.4257
1.5041 −0.1671 −0.1877 0.3524 0.7494 −0.0753 −0.0247 0.0435 0.4189
A
D65
0.4874 0.2345 −0.3035 1.2623 0.0522 −0.1138
0.5628 0.1423 −0.3711 1.3397 0.1188 −0.2150
D65
A
1.8502 −0.3662 −0.2483 0.4464 0.7007 −0.0954 −0.0145 0.0313 0.3173
1.6841 −0.2174 −0.2400 0.4695 0.6810 −0.0974 −0.0306 0.0532 0.3112
C
D50
1.1483 −0.0805 −0.0799 0.0809 0.9378 −0.0257 −0.0115 0.0246 0.6775
1.0988 −0.0352 −0.0771 0.0718 0.9415 −0.0213 −0.0217 0.0374 0.6752
D50
C
0.8669 0.0717 −0.0743 1.0592 0.0174 −0.0373
0.9102 0.0299 −0.0686 1.0585 0.0331 −0.0577
C
D65
0.9819 −0.0044 −0.0130 −0.0106 1.0068 −0.0033 −0.0053 0.0113 0.9097
D65
C
D50
D65
0.5069 0.1576 3.4730
0.2920 0.0995 2.3510
0.4519 0.1420 3.1583
0.1049 0.0314 1.4767
1.0186 0.0042 0.0108 0.9932 0.0058 −0.0123
0.0146 0.0037 1.0994
D65
0.8512 0.0662 −0.0841 1.0658 0.0104 −0.0223
0.0837 0.0257 1.3430
D50
1.1683 −0.0741 −0.0714 0.0924 0.9321 −0.0236 −0.0075 0.0161 0.7447
0.5815 0.1384 −0.3539 1.3254 0.1394 −0.2522
0.9729 −0.0217 −0.0069
0.5358 0.1407 3.5576
0.3094 0.0950 2.3956
0.4786 0.1331 3.2373
0.1049 0.0256 1.4831
0.0034 −0.0122 1.0131 0.0006 0.0118 0.9106
1.0278 −0.0036 0.0137 0.0220 0.9870 −0.0004 0.0075 −0.0128 1.0983 0.8849 0.0334 −0.0893 1.0717 0.0231 −0.0403
0.0842 0.0246 1.3500
1.1281 −0.0378 −0.0696 0.0944 0.9293 −0.0228 −0.0165 0.0284 0.7412
Partition 1: R = [600, 700] nm, G = [500, 600] nm, and B = [400, 500] nm. Partition 2: R = [580, 700] nm, G = [490, 580] nm, and B = [400, 490] nm.
294
Computational Color Technology
Table 13.7 Conversion accuracies of the third method using the two-step computation.
Source Destination illuminant illuminant Ratio
XYZ XYZ XYZ LAB LAB LAB Spectrum Clip Avg. RMS Max. Avg. RMS Max. partition
A
C
1.01339 1.31 1.29 1.14 1.10
1.77 1.74 1.56 1.49
3.85 3.66 4.37 4.32
5.00 4.69 4.39 4.12
7.38 6.63 6.03 5.62
22.87 17.07 16.18 15.84
#1 #1 #1 #2
No Yes No Yes
C
A
0.98679 1.12 0.95 0.84 0.81
1.55 1.29 1.09 1.02
3.67 3.24 2.72 2.51
6.31 10.9 4.44 6.33 4.24 6.57 3.90 5.66
37.09 15.78 24.75 16.79
#1 #1 #2 #2
No Yes No Yes
A
D50
1.02706 0.71 0.70 0.65 0.62
0.94 0.94 0.85 0.81
2.13 2.14 2.17 2.13
3.79 3.47 3.49 3.31
5.77 5.01 4.70 4.47
17.85 13.14 12.75 12.42
#1 #1 #2 #2
No Yes No Yes
D50
A
0.97366 0.68 0.62 0.58 0.56
0.94 0.84 0.74 0.71
2.28 2.13 1.75 1.69
4.30 3.25 3.23 3.06
7.29 4.71 4.79 4.36
23.82 12.55 16.66 12.55
#1 #1 #2 #2
No Yes No Yes
A
D65
1.02102 1.16 1.16 1.05 1.01
1.55 1.53 1.43 1.37
3.52 3.41 3.92 3.88
5.11 4.76 4.70 4.44
7.67 6.83 6.36 6.00
23.68 17.73 16.93 16.57
#1 #1 #2 #2
No Yes No Yes
D65
A
0.97942 1.04 0.91 0.84 0.80
1.46 1.23 1.08 1.02
3.54 3.10 2.60 2.41
6.30 11.0 4.42 6.35 4.39 6.72 4.04 5.81
37.23 16.12 24.58 16.77
#1 #1 #2 #2
No Yes No Yes
C
D50
1.01349 0.43 1.30 1.36 0.34 0.43 1.09 1.01
1.40
5.67 #1 4.26 #2
Yes Yes
0.98669 0.53 1.72 1.32 0.44 0.58 1.58 1.04 0.43 0.57 1.52 1.00
1.44 1.36
5.27 #1 4.38 #2 4.01 #2
Yes No Yes
1.00753 0.28 0.66 0.57 0.23 0.28 0.60 0.47
0.56
2.74 #1 1.48 #2
Yes Yes
0.99253 0.29 0.72 0.56 0.24 0.30 0.66 0.47
0.56
2.63 #1 1.44 #2
Yes Yes
0.99412 0.37 1.07 1.27 0.31 0.43 1.22 1.09 0.34 0.44 1.03 1.13
1.52 1.64
4.34 #1 4.33 #2 4.26 #3
Yes Yes Yes
1.00592 0.32 0.95 1.26 0.27 0.35 0.94 1.08
1.52
4.21 #1 4.33 #2
Yes Yes
D50
C D65 D50
D65
C
D65 C D65
D50
Partition #1: R = [600, 700] nm, G = [500, 600] nm, and B = [400, 500] nm. Partition #2: R = [580, 700] nm, G = [490, 580] nm, and B = [400, 490] nm. Partition #3: R = [590, 700] nm, G = [500, 590] nm, and B = [400, 500] nm.
White-Point Conversion
295
Table 13.8 Conversion accuracies of the third method using a single conversion matrix.
Source illuminant
Destination illuminant
CIEXYZ Avg. RMS
Max.
CIELAB Avg. RMS
Max.
Spectrum partition
A
C
C
A
A
D50
D50
A
A
D65
D65
A
C
D50
D50
C
C
D65
D65
C
D50
D65
D65
D50
1.71 1.49 1.56 1.09 1.87 1.71 1.85 1.59 1.88 1.67 1.83 1.39 0.95 0.97 1.09 1.11 0.48 0.49 0.49 0.50 0.61 0.61 0.54 0.55
4.37 3.67 3.57 3.15 3.46 3.42 3.59 3.97 3.81 3.73 3.43 3.89 2.01 1.83 2.07 2.55 0.98 0.87 1.02 0.89 1.59 1.65 1.36 1.29
5.12 4.39 6.49 4.30 4.13 3.60 4.72 3.44 5.33 4.73 6.61 4.51 1.64 1.18 1.52 1.16 0.63 0.54 0.62 0.54 1.45 1.18 1.55 1.18
23.12 16.15 37.53 25.06 18.39 12.85 24.61 17.20 24.09 16.90 37.93 25.05 7.38 4.93 6.22 4.40 2.56 1.28 2.45 1.25 6.93 4.83 7.92 5.21
Partition 1 Partition 2 Partition 1 Partition 2 Partition 1 Partition 2 Partition 1 Partition 2 Partition 1 Partition 2 Partition 1 Partition 2 Partition 1 Partition 2 Partition 1 Partition 2 Partition 1 Partition 2 Partition 1 Partition 2 Partition 1 Partition 2 Partition 1 Partition 2
2.06 1.72 1.85 1.31 2.11 1.98 2.13 1.93 2.15 1.88 2.10 1.67 1.14 1.12 1.32 1.30 0.57 0.56 0.59 0.58 0.74 0.74 0.66 0.64
7.45 6.00 11.07 6.65 5.97 4.71 7.58 4.94 7.80 6.33 11.25 6.84 2.35 1.53 2.08 1.49 0.77 0.60 0.75 0.59 2.18 1.61 2.41 1.64
Partition 1: R = [600, 700] nm, G = [500, 600] nm, and B = [400, 500] nm. Partition 2: R = [580, 700] nm, G = [490, 580] nm, and B = [400, 490] nm.
illuminant distance is not as pronounced as in the first and second methods. This method gives very good conversion accuracies for conversions between C, D50 , and D65 . The conversion accuracy ranges from good to marginal for conversions involving illuminant A. The marginal accuracies occur in conversions that use the equal partition (partition 1) with a large distance between the source and destination illuminants in the chromaticity diagram, such as C → A and D65 → A. They become acceptable when the spectrum changes to partition 2. Compared to the first two methods, this method gives the closest agreements for any pair of white points. Also, the maximum color difference is much smaller than in other approaches.
13.4 White-Point Conversion via Polynomial Regression Polynomial regression is discussed in Chapter 8. Six polynomials (3, 4, 7, 10, 14, or 20 terms, see Table 8.1) are used for regression. The training data are 135 sets
296
Computational Color Technology
of measured values, the same sets used by the other methods. Table 13.9 gives the derived coefficients of the three-term linear regression using 135 data points Table 13.9 Derived coefficients of the three-term linear regression using 135 data points for white-point conversions between illuminants A, C, D50 , and D65 .
Source Destination illuminant illuminant CIEXYZ space A C 0.5916 0.1549 −0.3434 1.3146 0.2185 −0.3119
0.4780 0.1836 3.5109
CIELAB space 1.0024 −0.0949 −0.0367 0.0289 1.0927 −0.3284 0.0172 −0.2543 1.0274
C
A
1.6187 −0.2329 −0.2088 0.4342 0.6867 −0.0950 −0.0646 0.0780 0.2894
A
D50
0.6504 0.1483 −0.2911 1.2764 0.0916 −0.1352
D50
A
1.4711 −0.1836 −0.1573 0.3413 0.7346 −0.0788 −0.0379 0.0493 0.4168
A
D65
0.5695 0.1672 −0.3668 1.3424 0.1744 −0.2511
D65
A
1.6519 −0.2368 −0.2064 0.4622 0.6680 −0.0994 −0.0559 0.0673 0.3152
0.9935 −0.0249 −0.0245
0.1005 0.9278 0.2245
0.0629 0.2639 1.0433
C
D50
1.1033 −0.0321 −0.0709 0.0714 0.9576 −0.0223 −0.0625 0.0701 0.6905
0.9995 −0.0178 −0.0048
0.0155 1.0349 0.0509
0.0147 0.1476 1.0019
D50
C
0.9096 0.0241 −0.0658 1.0401 0.0883 −0.1026
C
D65
0.9724 −0.0268 −0.0271
D65
C
D50
D65
0.8829 0.0351 −0.0916 1.0656 0.0545 −0.0634
D65
D50
1.1317 −0.0405 −0.0629 0.0985 0.9336 −0.0252 −0.0421 0.0465 0.7536
0.2732 0.1317 2.4081
0.4258 0.1830 3.2076
0.9939 −0.0317 −0.0239
0.0957 0.9512 0.2249
0.0646 0.2967 1.0401
1.0025 −0.0808 −0.0260 0.0143 1.1033 −0.1843 0.0138 −0.1956 1.0147 0.9959 −0.0151 −0.0163
0.0778 0.9229 0.1737
0.0391 0.1653 1.0150
1.0032 −0.1023 −0.0359 0.0222 1.1190 −0.2959 0.0191 −0.2559 1.0176
0.0942 0.0268 1.4538
1.0002 −0.0147 −0.0127 0.0168 0.9688 −0.1453 0.0040 −0.0510 1.0046
0.0101 −0.0116 1.0255 0.0021 0.0302 0.9156
1.0011 −0.0069 −0.0014 −0.0083 1.0307 0.0402 0.0021 −0.0042 0.9889
1.0285 −0.0106 0.0131 0.0270 0.9749 −0.0019 0.0295 −0.0325 1.0926 0.0749 0.0280 1.3295
0.9990 0.0081 −0.0021
0.0067 0.0011 0.9697 −0.0396 0.0040 1.0110
1.0012 −0.0214 −0.0131 0.0091 0.9979 −0.1087 0.0060 −0.0543 0.9942 0.9986 −0.0097 −0.0066
0.0219 1.0054 0.0538
0.0154 0.1087 1.0111
White-Point Conversion
297
for white-point conversions between illuminants A, C, D50 , and D65 . The reverse transform matrix is the inverse of the forward transform matrix. Results of conversion accuracies for the polynomial regression are given in Appendix 8. The average errors are small compared to the previous methods. The root-mean-square error is only slightly larger than the average, indicating that there are no significant deviations from the mean as evidenced by the small maximum errors. As expected, results indicate that the higher the polynomial, the smaller the error. However, the improvement levels off around the 10-term polynomial as shown in Fig. 13.8. For a given polynomial, the conversion accuracies for forward and backward directions are about the same. The number of data points also affects the regression results, where the average error increases slightly with an increasing number of data points. There is always a lingering question about the regression fitting: How good is the regression fitting for nontraining data? We have checked all six polynomial conversions using a set of 65 data points. Results show that the average errors are slightly higher (no more than 20%) for the three-term and seven-term polynomials, where the maximum error is smaller than the training set for the three-term polynomial and about 50% higher for the seven-term polynomial. For the eleven-term polynomial, the average and maximum errors are about double that of the training
Figure 13.8 Relationships between the average color difference and the number of polynomial terms for several white-point conversions.
298
Computational Color Technology
Figure 13.9 Relationships between the average color difference and the distance between illuminants.
results, but this may not be a concern because the average and maximum errors are so small (see Appendix 8). Like the previous methods, the adequacy of this white-point conversion method depends on the distance between the source and destination illuminants; the error is smaller if two illuminants are closer in the chromaticity diagram. Figure 13.9 depicts the average color difference as a function of the distance between two illuminants for three polynomials; they have a near-linear relationship.
13.5 Remarks The first method of white-point conversion using ratios of the proportional constants of the RGB primaries is basically the von Kries type of coefficient rule. It provides the simplest conversion mechanism and the lowest computational cost, but gives the lowest conversion accuracy. The conversion accuracy of the first method depends on: (i) the intermediate RGB space—a wide-gamut RGB space such as ROMM/RGB gives the best accuracy; and (ii) the distance between illuminants in the chromaticity diagram—the smaller the distance, the better the accuracy. Minor accuracy improvement can be gained by applying an optimal scaling factor to the ratio of the proportional constant. The second method of white-point conversion, using the ratios of tristimulus values, is empirical. However, it gives better results at a higher computational cost than the first method. The conversion
White-Point Conversion
299
accuracy of the second method can only be matched by the ROMM/RGB and optimal results of the first method. The third method of white-point conversion, using differences of white points, gives very good results with reasonable computational cost. It is based on the CIE definition with a sound mathematical derivation. The resulting formula shows that it is a scaling by the ratio of (kd /ks ) together with a matrix correction of the illuminant differences. Compared to XCES and Kang’s conversions, this method gives the closest agreement for any pair of white points. Also, the maximum color difference is much smaller than the other two approaches. The results confirm that this approach is built on solid theoretical ground and may have caught the essence of white-point conversion. Polynomial regression has the highest accuracy and highest computational cost. It requires a substantial amount of training data; and the derivation of polynomial coefficients requires extensive computations. However, once matrix coefficients are obtained, the computational cost reduces to matrix-vector multiplication; for a three-term function, it is the same as the first method. The real concern regarding the regression method is that there is no guarantee that the testing is as good as the training. The limited tests show that this is not a serious problem. Thus, polynomial regression can be considered as the optimal method of white-point conversion, other than measurements of samples under destination conditions. Moreover, the number of polynomial terms can be varied to suit the accuracy requirement or the allowable computational cost. Results from the illuminant difference method (see Tables 13.7 and 13.8) are comparable to the corresponding results from linear regression (see Appendix 8). In many cases, if the RGB partition is correct, the method of illuminant difference gives a better conversion accuracy than linear regression. Note that the CIEXYZ matrices derived from illuminant difference using partition 2 are very close to the corresponding matrices of linear regression for conversions between illuminants C, D50 , and D65 ; the diagonal elements, in particular, are almost the same (the differences are no greater than a few percent), indicating that they both are near optimal. Results from all four methods reconfirm the earlier finding that the adequacy of the white-point conversion method depends on the differences of correlated color temperatures of the white points. The larger the temperature difference, the less accurate the conversion. Another characteristic is that for all except the second method, the conversion accuracies for forward and backward transformations are about the same.
References 1. Color Encoding Standard, Xerox Corp., Xerox Systems Institute, Sunnyvale, CA, p. C-3 (1989). 2. H. R. Kang, Color scanner calibration of reflected samples, Proc. SPIE 1670, pp. 468–477 (1992). 3. CIE, Colorimetry, Publication No. 15, Bureau Central de la CIE, Paris (1971). 4. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, pp. 55–62 (1996).
Chapter 14
Multispectral Imaging
A multispectral image is one in which each pixel contains information about the spectral reflectance of the scene with more channels of responses than the normal trichromatic system. By this definition, four-color and high-fidelity color printing are forms of multispectral imaging. The number of channels varies from four to several hundreds of bands for hyperspectral images. Because of its rich information content, multispectral imaging has a very wide range of applications, such as art-object analysis and archive,1,2 astronomy,3 camera and television development,4 computer graphics,5 color copying, color printing,6 medicine,8,9 and remote sensing.10 It is one of the most actively researched areas in computational color technology. A system commonly used to acquire multispectral color images consists of a monochrome digital camera coupled with a set of color filters and an imageprocessing module for spectrum reconstruction as shown in Fig. 14.1. By using a single sensor array that has high spectral sensitivity across a wide range of electromagnetic wavelengths from infrared (IR) through visible light to ultraviolet (UV), multichannel information is obtained by taking multiple exposures of a scene, one for each filter in the filter wheel.11–14 Multispectral color imaging is an expansion of the conventional trichromatic system with the number of channels (or bands), provided by different filters, greater than three. Another way of obtaining multichannel information is by using a conventional trichromatic camera (or a scanner) as shown in Fig. 14.2,15 coupled with a color filter by placing the filter between the object and camera (or scanner) to bias signals and artificially increase the number of channels by a multiple of three. The filter is not an integral part of the camera or scanner. This method has been used by Farrell and coworkers for converting a color scanner into a colorimeter.16 They introduced a color filter between the object and scanner, then made an extra scan to obtain a set of biased trichromatic signals. This effectively increases the number of color signals (or channels) by a factor of three. With the proper choice of color filter, they are able to achieve six-channel outputs from a three-sensor scanner. This approach has been applied to camera imaging.17–19 For example, Imai and colleagues have used the Kodak Wrattern filter 38 (light blue) in front of the IBM PRO/3000 digital camera to give six-channel signals with two exposures, with and without the filter.18,19 One can increase the number of signals by a multiple of three by replacing the light-blue Wrattern filter 38 with a different color filter, then 301
Figure 14.1 Schematic view of the image-acquisition system and multispectral reconstruction module.
302 Computational Color Technology
Multispectral Imaging
303
Figure 14.2 Digital camera with three-path optics to acquire color components in one exposure.15
taking another exposure to have nine-channel signals. By changing the front filter, one can create any number of signals by a multiple of three. Unlike a scanner that has a fixed lighting system, the illumination of a camera can also be changed to provide more ways of obtaining multichannel signals.17–19 The quality of a multispectral color-image acquisition system depends on many factors; important ones are the spectral sensitivity of the camera, the spectral sensitivity of each channel, the spectral radiance of the illuminant, and the performance of the imaging module. This chapter presents applications of the vector-space representation in multispectral imaging, including filter design and selection, camera and scanner spectral characterizations, spectrum reconstruction, multispectral image representation, and image quality.
14.1 Multispectral Irradiance Model An image-irradiance model of multispectral devices provides output color stimulus values γ registered by pixels that are equal to the integral of the sensor response ´ functions A(λ) multiplied by the input spectral function η(λ). The spectral function, in turn, is the product of the illuminant SPD E(λ) and the surface spectral reflectance function S(λ) where λ is the wavelength (see Section 1.1).
304
Computational Color Technology
γ =k
´ A(λ)η(λ) dλ = k
´ A(λ)E(λ)S(λ) dλ
´ T S. = k A´ T η = k A´ T ES = k Æ
(14.1)
γ = [γ1 , γ2 , γ3 , . . . , γm ]T is a vector of m elements, where m is the number of channels; for a multispectral image, m > 3. The parameter k is a constant. For simplification of the sequential expressions, we will drop the constant k; one can ´ think of it as being factored into the vector γ . The function A(λ) can be any set of sensor sensitivities from a digital camera or scanner with m channels of sensor responses such that A´ is an n × m matrix containing the sampled sensor-response functions in the spectral range of the device, where n is the number of samples in the spectral range.
a´ 1 (λ1 ) a´ 1 (λ2 ) a´ 1 (λ3 ) ´ A= ... ... ... a´ 1 (λn )
a´ 2 (λ1 ) . . . a´ m (λ1 ) a´ 2 (λ2 ) . . . a´ m (λ2 ) a´ 2 (λ3 ) . . . a´ m (λ3 ) ... ... ... . ... ... ... ... ... ... a´ 2 (λn ) . . . a´ m (λn )
(14.2)
The sensor response function is the integrated output of the spectral transmittance of the filter set Fj (λ) and the spectral sensitivity of the camera sensors V (λ), assuming that all elements in the sensor array have the same sensitivity. The filter set contains filters with different spectral ranges of transmittance in order to acquire different color components of the stimulus. Thus, each filter provides a unique spectral channel that is the product of filter transmittance and camera sensitivity. A´ j (λ) = Fj (λ)V (λi ).
(14.3)
The matrix A´ of Eq. (14.2) can also be written in the vector-matrix representation.
f1 (λ1 )v(λ1 ) f2 (λ1 )v(λ1 ) . . . fm (λ1 )v(λ1 ) f1 (λ2 )v(λ2 ) f2 (λ2 )v(λ2 ) . . . fm (λ2 )v(λ2 ) f1 (λ3 )v(λ3 ) f2 (λ3 )v(λ3 ) . . . fm (λ3 )v(λ3 ) . . . . . . . . . . . . . A´ = ... ... ... ... ... ... ... ... f1 (λn )v(λn ) f2 (λn )v(λn ) . . . fm (λn )v(λn )
(14.4)
Multispectral Imaging
305
E is usually expressed as an n × n diagonal matrix containing the sampled illuminant SPD.
e(λ1 ) 0 0 E = ... ... ... 0
0 e(λ2 ) 0 ... ... ... ...
0 ... ... 0 ... ... e(λ3 ) 0 . . . ... ... ... ... ... ... ... ... ... ... ... 0
0 0 0 ... . ... ... e(λn )
(14.5)
Usually, the sensor response matrix is combined with the illuminant matrix, ´ T = A´ T E, with an explicit expression of Æ
. . . fm (λ1 )v(λ1 )e(λ1 ) . . . fm (λ2 )v(λ2 )e(λ2 ) . . . fm (λ3 )v(λ3 )e(λ2 ) ... ... . ... ... ... ... . . . fm (λn )v(λn )e(λn ) (14.6) Surface reflectance S is a vector of n elements, S = [s(λ1 ), s(λ2 ), s(λ3 ), . . . , s(λn )]T , consisting of the sampled spectrum of an object. f1 (λ1 )v(λ1 )e(λ1 ) f1 (λ2 )v(λ2 )e(λ2 ) f1 (λ3 )v(λ3 )e(λ3 ) ´ = ... Æ ... ... f1 (λn )v(λn )e(λn )
f2 (λ1 )v(λ1 )e(λ1 ) f2 (λ2 )v(λ2 )e(λ2 ) f2 (λ3 )v(λ3 )e(λ3 ) ... ... ... f2 (λn )v(λn )e(λn )
14.2 Sensitivity and Uniformity of a Digital Camera The quality of a multispectral color-image acquisition system depends on the uniformity of the sensor array and the spectral sensitivity of the camera. The sensor of a digital camera is usually a CCD (charge-coupled device) or CMOS array that is located at the focal plane of a lens system and serves as an alternative to photographic film. Generally, sensor array size is specified by the diagonal length in millimeters; for example, an 8-mm CCD array has a width of 6.4 mm and a length of 4.8 mm. The number of photosites in a CCD array varies from 128 to 4096 or more per dimension. An 8-mm array with 720 pixels in width will have 540 pixels in height to give a total of 388,800 pixels. A commercial Quantix camera uses the Kodak KAF-6303E 2048 × 3072 sensor, which gives 6.29 M pixels. The number of photosites that can be packed into a CCD array represents the spatial resolution of the CCD camera and, in turn, affects the image quality in the spatial domain. The cell size ranges from 2.5 × 2.5 µm to 16 × 16 µm. A larger cell is able to receive more light and therefore has both a higher dynamic range and lower noise. For a typical CMOS sensor array, each photosite is a photodiode that converts light into electrons. The photodiode is a type of semiconductor; therefore, a CMOS sensor array can be fabricated by using the same manufacturing process of making
306
Computational Color Technology
silicon chips, which allows a high degree of integration to include an A/D converter, timing devices, an amplifier, and a readout control. The biggest issue with a CMOS sensor array is the noise caused by variability in readout transistors and amplifiers.20 Because of the noise problem, a CMOS sensor array has a lower dynamic range than a CCD sensor array. 14.2.1 Spatial uniformity of a digital camera In a conventional trichromatic digital camera, there are several methods of obtaining the trichromatic signals. One method is to obtain each component sequentially by taking three exposures, each with a proper filter. The second method is to obtain all color signals in one exposure, using optics to split the beam into three paths; each path has a sensor array coupled with a proper filter to detect the signal (see Fig. 14.2).15 The third method is to obtain all color signals in one exposure with a single sensor array coupled with filters in a mosaic arrangement as shown in Fig. 14.3. This mosaic filter arrangement is called the color filter array (CFA), where the filtered color components at a given photosite are obtained via interpolation from neighboring pixels containing the color component. A CFA can have various patterns in either additive RGB filters21 or complementary CMYG arrangements.22,23 Figure 14.3 shows three RGB and three CMYG patterns; some of them are intended to enhance the perceived sharpness by doubling the photosites for the green signal because it coincides with the visual sensitivity curve, containing the most luminance information. The process of obtaining the filtered color components has been referred to as “color sensor demosaicing,” “CFA interpolation,” or “color reconstruction.” Many algorithms have been developed for use with different CFA patterns.20,24 Multispectral image acquisition expands from the existing trichromatic systems. The first method is expanded to include a filter wheel with four or more filters. Multiple exposures are taken, one for each filter in the wheel, to obtain multispectral signals. The second method, which acquires all multispectral signals in one exposure, requires that a beam is split into four or more paths and each path has its own optics, filter, and detector. To have a high number of channels, this method becomes complex and expensive. In addition, the light intensity can be attenuated by the optics to the extent that it may not be detectable. The third method can be expanded into a multispectral system by designing a mosaic filter array to have the desired number of different color photosites. The CFA approach is already a stretch for a trichromatic camera; it is too coarse in spatial resolution for partitioning the photosites into many color zones. It may be acceptable in trichromatic devices to lower the cost, but it will give low resolution to acquired color signals, where color values of different channels have to be interpolated from distant pixels. This leaves the first method and the method of using a trichromatic camera coupled with a filter to acquire biased signals in a multiple of three as viable techniques of acquiring multichannel signals. These methods have simple optics and do not require interpolation; the only assumption is that the temporal variation is minimal
Figure 14.3 Mosaic filter array arrangements for a digital camera.
Multispectral Imaging 307
308
Computational Color Technology
at the short time period during multiple exposures. However, there is doubt about the independency of the biased trichromatic signals from the original trichromatic signals. Recently, there has been a new hardware development for acquiring six spectral bands. The novel multichannel sensors have three vertically integrated amorphous pin diodes. Each layer has a different thickness and is applied with a different voltage to generate a different spectral sensitivity such that the top layer gives the blue signal, the middle layer gives green, and the bottom layer gives red.25 To obtain six-channel responses, color signals are captured in two exposures by changing the bias voltages. This method is limited to six or an increment of three channels. It is not known whether the number of sensors can be increased or varied. 14.2.2 Spectral sensitivity of a digital camera Typical CCD cameras have a much broader spectral sensitivity than spectrophotometers, with sensitivity extending up to 1100 nm in the near-infrared region; and some silicon-based CCDs have good quantum response through 10 nm or lower. The highest sensitivity is in the visible spectrum. The quantum efficiency of a CCD cell is much higher than that of photographic film (about 40 times) in the spectral range of 400 to 1100 nm. In addition, the CCD signal is linear in comparison with the logarithmic response of photographic film.26 The broad spectral range permits the detection of near-infrared signals at the long-wavelength end and soft x-ray signals at the short-wavelength end. For working in the visible range, the near-infrared (IR) and ultraviolet (UV) radiations must be rejected via IR and UV cutoff filters, respectively.
14.3 Spectral Transmittance of Filters The spectral sensitivity of a digital camera is equal to the integrated effects of the sensor responsivity, optics, electronics, and filter transmittance. Given a sensor array, the spectral sensitivity of the camera is determined by the spectral transmittance of the filter. Figure 14.4 shows the spectra of several Kodak color filters. Filters operate by absorption or interference. Absorption filters, such as colored glass filters, are doped with materials that selectively absorb light by wavelength. The filter absorption obeys the Beer-Lambert-Bouger law (see Chapter 15) that transmittance decreases with increasing thickness. Filter thickness also affects the spectral bandwidth; the bandwidth decreases with increasing thickness. There are many types of absorption filters such as narrowband, wideband, and sharp-cut filters. Interference filters rely on thin layers of dielectric to cause interference between wavefronts, producing very narrow bandwidths.27 Any of these filter types can be combined to form a composite filter that meets a particular need. Multispectral imaging requires a very specific set of filters that span the spectral range to give optimal color signals. Each filter defines the spectral range of acquisition and spectral sensitivity. Therefore, filter transmittance is perhaps the most
Multispectral Imaging
309
Figure 14.4 Spectra of several Kodak color filters.
critical characteristic in determining the spectral sensitivity of a digital camera. Several methods have been developed to obtain optimal filters: (i) design a set of optimal filters based on some optimization criteria; (ii) use a set of equal-spacing filters to cover the whole spectrum of interest; (iii) select from a set of available filters by combinatorial search, and (iv) combinatorial search with optimization. 14.3.1 Design of optimal filters The design of optimal filters is one of the active areas for scanners and cameras.28–36 Here, we present the work developed by Trussell and colleagues.28–33 For scanners and cameras, the recording of a color stimulus is obtained by collecting intensities of filtered light via a set of filters (or channels). If Fj represents the transmittance of the j th filter, then the recording process can be modeled as γ F = F T E r S + ε.
(14.7)
The scanner or camera response γ F is a vector of m elements; each element records the integration of the image spectrum through a filter channel. F is an n × m matrix with m columns of filters and n sampling points of the filter transmittance in the spectral range of interest, E r is the recording illuminant, S is the spectrum of the stimulus, and ε is the additive noise uncorrelated with the reflectance spectra. The
310
Computational Color Technology
tristimulus values γ of the original image under a particular viewing illuminant E v are given in Eq. (14.8). γ = AT E v S.
(14.8)
Matrix A is a sampled CMF. The estimate γ E from a scanner is a linear function of the recorded responses γ F . γ E = W γ F + ω.
(14.9)
The vector W represents the weights or coefficients and ω is the residue. Trussell and colleagues applied a linear minimum mean-square error (LMMSE) approach to minimize the error between γ E and γ . The minimization is performed with respect to W and ω. They presented the LMMSE estimate as
−1 ´ γ E = AT E v µS E r F F T E r µS E r F + µu γ F − ε´ − F T E r S + AT E v S. (14.10) Matrices µS and µu are the covariance, or correlation, matrices of the reflectance and noise, respectively, and S´ and ε´ are the means of the reflectance spectra and noise, respectively. In the case of limited information about the reflectance spectra, the problem of finding a set of optimal filters can be formulated using a min/max method to give a maximum likelihood estimate Sˆ of the reflectance spectrum. Sˆ = (F T E r )+ γ F .
(14.11)
The term (F T E r )+ is the Moore-Penrose generalized inverse of the matrix (F T E r ). Equation (14.11) gives the minimum norm solution, which is the orthogonal projection of the spectrum S onto the range space of the matrix (F T E r ). The resulting optimal min/max filters are shown to be any set of filters, together with the recording illuminant, spanning the range space of the matrix B, where the basis vectors bj are the eigenvectors of the largest eigenvalues obtained from a singular value decomposition (SVD).31 The problem with this approach is that theoretical optimal filters may not be physically realizable. Even if they are possible to realize, the cost of practical production is usually high. 14.3.2 Equal-spacing filter set A simple and low-cost way of assembling a set of filters is to select from available filters. This method uses a set of narrowband color filters with approximately equal spacing between peak transmittances to cover the whole spectrum of interest (see Fig. 14.5, for example). It is simple and heuristic; therefore, it has been used in many multispectral imaging systems;12,37–41 for instance, the VASARI scanner implemented at the National Gallery in London used seven bands. Nonetheless,
Multispectral Imaging
311
an optimization process can be performed to determine the bandwidth and shape of the filters.39,41 Konig and Praefcke have performed a simulation using a variable number of ideal square filters with variable bandwidth. Their results indicate that the average color error of reconstructed spectra is the lowest at a bandwidth of 50 nm for six filters, 30 nm for ten filters, and 5 nm for sixteen filters.42 The results seem to indicate that there is a correlation between bandwidth and filter number needed to encompass the spectral range of visible light with a width of about 300 nm. Vilaseca and colleagues have found that filters with Gaussian transmittance profiles give good results for spectrum reconstruction in the infrared region, using three to five equally spaced Gaussian-shaped filters.43,44 14.3.3 Selection of optimal filters Another way of selecting a set of optimal filters from a larger set of available filters is by performing a brute-force exhaustive search of all possible filter combinations—the combinatorial search.1,45–47 The problem with this approach is that the cost and time required could be prohibitive because the number of combinations N c is N c = (N f )!/[(N s )!(N f − N s )!], where N f is the number of filters and N s is the number of selected filters. To select five filters from a set of twenty-seven filters takes (27!)/[(5!)(22!)] = 80, 730 combinations. Obviously, this is time-consuming and costly. An intermediate solution to the combinatorial search is found by taking into account the statistical spectral properties of objects, camera, filters, and the illuminant.46,47 The main idea is to choose filters that have a high degree of orthogonal character after projection into the vector space spanned by the most significant characteristic reflectances of the principal component analysis (PCA). It is recommended that one uses this faster method for prescreening of a large set of filters. This narrows the filter selection to a manageable number; then, the exhaustive combinatorial search can be performed on this reduced set to get the desired number of filters.
14.4 Spectral Radiance of Illuminant Under well-controlled viewing conditions, the spectral radiance of the illuminant is fixed. In this case, it can be incorporated into the spectral sensitivity of the sensors as given in Eq. (14.6). For outdoor scenes, the illumination varies. Vilaseca and colleagues studied the illuminant influence on the spectrum reconstruction in the near-infrared region. They used numerical simulation to analyze the influence of the illuminant on the quality of the reconstruction obtained by using commercially available filters that were similar to the derived theoretical optimal filters with equal spacing.48 The illuminants encompassed a wide range of color temperatures, ranging from 1000 K to 16000 K, calculated from the Planck equation,
312
Computational Color Technology
Eq. (1.10). They obtained very good results for all illuminants considered (RMS < 0.01), indicating that the spectrum reconstruction does not strongly depend on the illuminant used. They concluded that good spectrum reconstructions of various samples could be achieved under any illuminant. Another application for multispectral imaging is in the area of color constancy. If the finite-dimensional linear model is used, we can also estimate the illuminant SPD. With a number of sensors greater than three, we are no longer constrained in the 3-2 or 2-3 world (see Chapter 12). Thus, we can get more information and better estimates of the illuminant and object surface spectrum (as given in Section 12.4) of a six-channel digital camera.
´ 14.5 Determination of Matrix Æ ´ can be obtained from direct spectral measurements. The camera charMatrix Æ acteristics are determined by evaluating camera responses to monochromatic light from each sample wavelength of the spectrum.37,49,50 The direct measurement is expensive. ´ is by using a camera to acquire a number of Another way of estimating Æ color patches with known spectra. By analyzing the camera output with respect to the known spectral information, one can estimate the camera sensitivity by using either pseudo-inverse analysis or PCA. To perform the estimate, one selects p color patches and measures their spectra to obtain a matrix S´ with a size of n × p, where n is the number of sampling points of the measured spectra. s´ (λ ) 1 1 s´1 (λ2 ) s´1 (λ3 ) S´ = . . . ... ... s´1 (λn )
s´2 (λ1 ) s´2 (λ2 ) s´2 (λ3 ) ... ... ... s´2 (λn )
. . . s´p (λ1 ) . . . s´p (λ2 ) . . . s´p (λ3 ) ... ... . ... ... ... ... . . . s´p (λn )
(14.12)
Next, the camera responses of these color patches are taken to generate an m × p matrix γ p as given in Eq. (14.13); each column contains the m-channel responses of a color patch.
γ 1,1 γ 1,2 γ 1,3 γp = ... ... ... γ1,m
γ 2,1 γ 2,2 γ 2,3 ... ... ... γ2,m
γ 3,1 γ 3,2 γ 3,3 ... ... ... γ3,m
. . . γp,1 . . . γp,2 . . . γp,3 ... ... . ... ... ... ... . . . γp,m
(14.13)
Multispectral Imaging
313
´ using Eq. (14.14). ´ one can calculate matrix Æ Knowing γ p and S, ´ T S. ´ γp = Æ
(14.14)
The simplest way is to invert Eq. (14.14), which results in ´ T = γ p S´ T S´ S´ T −1 . Æ
(14.15)
The product (S´ S´ T ) and its inverse have a size of n × n; the inverse is then multiplied by the transpose of S´ to give a p × n matrix. The resulting matrix is again ´ T. multiplied by γ p to give a final size of m × n that is the size of the matrix Æ As discussed in Chapter 11, pseudo-inverse analysis is sensitive to signal noise. Considering the uncertainty associated with the color measurements and camera ´ sensitivity, this method does not give good results for estimating Æ. A better way is to use PCA by performing a Karhunen-Loeve transform on ´ 16,45,51–57 The basis vectors of the KL transform are given by the orthomatrix S. normalized eigenvectors of its covariance matrix Ω (see Chapter 11). Ω = (1/p)
p T δ S´ i δ S´ i .
(14.16)
i=1
The result of Eq. (14.16) gives a symmetric matrix. Now, let bj and ωj , j = 1, 2, 3, . . . , n be the eigenvectors and corresponding eigenvalues of Ω, where eigenvalues are arranged in decreasing order ω1 ≥ ω2 ≥ ω3 ≥ · · · ≥ ωn , then the transformation matrix B p is given as an n × n matrix whose columns are the eigenvectors of Ω.
b11 b12 B p = b13 ... ... b1n
b21 b22 b23 ... ... b2n
b31 b32 b33 ... ... b3n
... ... ... ... ... ...
bi1 bi2 bi3 ... ... bin
. . . bn1 . . . bn2 . . . bn3 , ... ... ... ... . . . bnn
(14.17)
where bij is the j th component of the ith eigenvector. Each eigenvector bi is a principal component of the spectral reflectance covariance matrix Ω. Matrix B p is a unitary matrix, which reduces matrix Ω to its diagonal form Λ. B ∗T p ΩB p = Λ.
(14.18)
314
Computational Color Technology
The analysis generates a matrix B p , containing the basis vectors arranged in the order of decreasing eigenvalues. The matrix is then estimated by ´ e = B p ΩB Tp γ p . Æ
(14.19)
The optimal number of principal eigenvectors is usually quite small (this is the major benefit of the PCA); it depends on the level of noise.46 The choice of color patches is also of great importance for the quality of the spectrum reconstruction.
14.6 Spectral Reconstruction ´ or its estimate Æ ´ e , we can perform spectrum reconstrucKnowing the matrix Æ tion. We have presented many techniques for spectra reconstruction in Chapter 11. They are classified in two categories: interpolation methods that include linear, cubic, spline, discrete Fourier transform, and modified discrete sine transform; and estimation methods, which include polynomial regression, Moore-Penrose pseudoinverse analysis, smoothing inverse analysis, Wiener estimation, and PCA. Here, we present PCA and several inverse estimates for the spectrum reconstruction of multispectral signals. 14.6.1 Tristimulus values using PCA As given in Section 11.5, the reconstructed spectrum is a linear combination of the basis vectors. S = BW .
(14.20)
Where B is the matrix of basis vectors derived from PCA, and W is the weight vector of m components (or channels). By substituting Eq. (14.20) into Eq. (14.1), we have ´ T BW . γ =Æ
(14.21)
´ T has m rows with a size of m × n, and B has m independent comBecause Æ ´ T B) is an m × m matrix; thus, the ponents with a size of n × m, the product (Æ ´ T B), provided that it is not weights W can be determined by inverting matrix (Æ singular. If the channels in the camera are truly independent, which is usually the ´ T B) is not singular and can be inverted. case, the matrix (Æ T −1 ´ B γ. W= Æ
(14.22)
The reconstructed spectrum S m of input tristimulus values γ is T −1 ´ B γ. S m = BW = B Æ
(14.23)
Multispectral Imaging
315
Generally, PCA-based methods give good results because they minimize the rootmean-square (RMS) error. As pointed out in Chapter 11, RMS is not a good measure for color reconstruction; and there are several disadvantages associated with the PCA approach, as follows: (1) Basis vectors depend on the set of training samples. The best set of basis vectors for one group might not be optimal for another group. As shown in Chapter 11, several sets of vectors fit reasonably well to a given spectrum, but differences do exist; and some basis sets are better than others. (2) It may generate negative values for a reconstructed spectrum as shown in Figs. 11.6 and 11.21. (3) It causes a wide dynamic range among coefficients of the basis vectors; some coefficients have very large values and some have very small values that stretch the dynamic range of coefficients within a W vector. Because of these problems, other methods of spectrum estimation should be examined so that we do not rely on one method too heavily. 14.6.2 Pseudo-inverse estimation The simplest way of recovering the spectrum S from an acquired multispectral signal γ is by pseudo-inverse estimation, Eq. (14.1). ´ . ´Æ ´ T −1 Æγ S= Æ
(14.24)
´ has a size of n × m with m columns, one for each camera chanMatrix Æ ´Æ ´ T ) is an nel, and n is the number of samples in the spectrum. The product (Æ ´Æ ´ T) n × n symmetric matrix with m independent components. The matrix (Æ ´ must is singular if n > m. In order to have a unique solution, the rank m of Æ be equal to n, which means that the number of channels (or filters) must be equal to or greater than the number of spectral sampling points. For m = n, this method practically measures the spectrum of the object in accordance to the sampling rate. In this case, the camera behaves like a spectroradiometer; there is no need to reconstruct the spectrum because it is already captured. This approach minimizes the Euclidian distance between the object and reconstructed signals in the camera response domain. It is very sensitive to signal noise. Considering the uncertainty associated with any CCD or CMOS camera from random noise, quantization error, computational errors, spectral measurement errors, and optics misalignment, it is not surprising that pseudo-inverse analysis does not give good results for spectrum reconstruction; the maximum color difference can go as high as 83 Eab , as shown by Konig and Praefcke.42
316
Computational Color Technology
14.6.3 Smoothing inverse estimation Linear algebra provides other methods for solving inverse problems such as the smoothing inverse and Wiener inverse estimations. The optimal solution is to minimize a specific vector norm S N , where 1/2 S N = SN S T
(14.25)
and N is the norm matrix. The solution S of the minimal norm is given as26,43 T −1 −1 ´ Æ ´ Ns Æ ´ S = N s −1 Æ γ,
1 −2 1 −2 5 −4 1 −4 6 ... ... ... Ns = ... ... ... 0 ... ... 0 ... ... 0 ... ...
0 0 ... 1 0 ... −4 1 . . . ... ... ... ... ... ... 0 1 −4 ... 0 1 ... ... 0
... ... ... ... ... ... ... ... ... ... 6 −4 −4 5 1 −2
(14.26) 0 0 0 ... ... 1 −2 1
.
(14.27)
The matrix N s is singular; it must be modified by adding noises in order to have a successful matrix inversion (see Section 11.2).25 14.6.4 Wiener estimation The nonlinear estimation method uses the conventional Wiener estimation. There exists a matrix H that provides the spectrum of the object belonging to the ma´ trix Æ. Sm = H γ ,
(14.28)
T ´ Æ ´ µÆ ´ −1 , H = µÆ
(14.29)
and
where µ is a correlation matrix of S given in Eq. (14.30).42,58
1 µ 2 µ µ = ... ... ... µn−1
µ 1 µ ... ... ... µn−2
µ2 µ 1 ... ... ... ...
... µ2 µ ... ... ... ...
... ... µ2 ... ... ... ...
... ... ... ... ... ... µ2
. . . µn−1 . . . µn−2 . . . µn−3 ... ... ... ... ... ... µ 1
.
(14.30)
Multispectral Imaging
317
The parameter µ is the adjacent-element-correlation factor that is within the range of [0, 1] and can be set by the experimenter; for example, Uchiyama and coworkers set µ = 0.999 in their study of a unified multispectral representation.58 The ´ is n × m, and its transpose correlation matrix has a size of n × n, the matrix Æ T ´ µÆ) ´ a size of m × m. The size of matrix is m × n; this gives the product (Æ H given in Eq. (14.29) is (n × n)(n × m)(m × m) = n × m. Once the correlation ´ is known for a given matrix is selected, the matrix H can be calculated because Æ digital camera. Finally, the object spectrum is estimated by substituting H into Eq. (14.28). A simple version of the Wiener estimation is given by Vilaseca and colleagues.48 Their estimate does not include the correlation matrix. Equation (14.29) becomes T −1 ´ ´ Æ ´ Æ H =Æ
(14.31)
The interesting thing is that they expand the matrix by including second- or higherorder polynomial terms.
14.7 Multispectral Image Representation There exist many kinds of multispectral devices that produce multispectral images with a different number of channels; and there are various representations for the acquired multispectral images. Sometimes, there comes the need for editing multispectral still images and video images, such as blending two or more videos with different numbers of bands for cross-media display. Therefore, a unified representation is needed to encode various multispectral images in a common space. In view of its efficiency in representing spectral information, PCA is useful in reducing the high dimensionality of the spectral information. With this method, all multispectral images are represented as coefficients of basis vectors, which are predetermined and stored for use in reconstruction. Keusen and Praefcke introduced a modified version of PCA to produce the first three basis vectors that are compatible with the conventional tristimulus curves. The remaining basis vectors are calculated with the Karhunen-Loeve transform.38 In this representation, they suggested that one can use the first three coefficients for conventional printing or displaying, whereas high-definition color reconstruction can use the whole set of coefficients. Murakami and coworkers proposed a weighted Karhunen-Loeve transform that includes human visual sensitivities to minimize the color difference between the original and the reconstruction.59 Konig and Praefcke reported a simulation study comparing color estimation accuracy using multispectral images from a virtual multispectral camera (VMSC) with varying numbers of channels between six and sixteen bands.42 Results suggested the possibility of keeping the mean error under 0.5 by using more than ten bands. In this way, representation of spectral information as an output image of a VMSC with this number of bands is reasonable for accurate color reproduction. Uchiyama and coworkers proposed a simple but useful way to define a VMSC
318
Computational Color Technology
with a certain number of bands.58 First, they transform real multispectral images with different numbers of bands from a VMSC into virtual multispectral images with the same number of bands as the VMSC. This makes the virtual multispectral images independent from the original input devices. They design virtual filters to have equal sensitivities for each band located at equal intervals over the visible range (see Fig. 14.5). This method avoids the disadvantages of the PCA-based methods described above. From Eqs. (14.1) and (14.28), we obtain Eq. (14.32) for virtual camera response γ v . ´ vTS m = Æ ´ vTH γ , γv = Æ
(14.32)
´ v is a matrix with a size of n × m that defines the sensitivities of the virtual where Æ channels (virtual filters and CCD or CMOS spectral sensitivities). The j th channel of the matrix is given in Eq. (14.33). ´ v,j (λ) = Fv,j (λ)V (λ)E(λ). Æ
(14.33)
They designed the VMSC for general usage; therefore, it is not optimized for any particular sample set. Instead, they used Gaussian curves to define the spectral sensitivity of the j th channel.
−1 Fv,j (λ) = (2π)1/2 σ exp −[λ − (λ0 + j λ)]2 / 2σ 2 ,
(14.34)
Figure 14.5 A set of equally spaced Gaussian filters calculated from Eq. (14.34). (Reprinted with permission of IS&T.)58
Multispectral Imaging
319
where λ is wavelength and σ, λ0 , and λ are constants. The center wavelength of the j th filter is given by λj = λ0 + j λ, with j = 1, 2, 3, . . . , m. They set λ0 = 380 + λa nm, and (m + 1)λ = (780 − λ0 − λb ) nm. Equation (14.34) gives equally spaced Gaussian filters as shown in Fig. 14.5 for an eight-channel filter set ´v (m = 8) with λa = 25 nm, λb = 60 nm, and σ = λ/2. All elements in matrix Æ are positive values; therefore, it does not cause negative pixel values. They used an equal-energy stimulus for E(λ) (a unit matrix for the illumi´ v = F v and the Wiener nant E) and an ideal CCD response, V (λ) = 1; thus, Æ estimate of the spectrum in the VMSC space is S v = H vγ v,
(14.35)
where H v is a matrix that corresponds to H in Eq. (14.28), but is independent from ´ Knowing Æ ´ v , we can derive H v from Eq. (14.29). the linear system matrix Æ. They experimentally demonstrated how color-reproduction accuracy changes when images with different numbers of bands are transformed into output images of the defined VMSC. Using 24 patches of the Macbeth Color Checker, they obtained average RMSEs of estimated reflectances S m and reestimated virtual reflectances S v with respect to the measured spectra at 0.047 and 0.062, respectively; the average color differences are 0.80 and 0.83 Eab , respectively. The results indicate that this virtual multispectral image representation preserves enough spectral information for accurate color reproductions.
14.8 Multispectral Image Quality Color-image quality has two main aspects: the spatial and color quality. To a large extent, the spatial quality of a digital camera is affected by the spatial resolution or the number of photosites per unit area as discussed in Section 14.1. On the other hand, the color quality is largely determined by the spectral sensitivity of the photosites and the spectrum reconstruction module. For multispectral imaging, there is an interaction between color and spatial image quality. Increasing the number of channels increases spectral and colorimetric accuracy; thus, the color quality improves. Decreasing the number of channels reduces spatial artifacts; thus, the spatial image quality improves. Day and colleagues have performed a psychophysical experiment of pair comparison to evaluate the color and spatial image quality of several multispectral image-capture techniques.60 The test targets were a watercolor print and several dioramas; they were imaged using 3-, 6-, and 31channel image-acquisition systems. Twenty-seven observers judged, successively, color and spatial image quality of color images rendered for an LCD display and compared them with objects viewed in a light booth. The targets were evaluated under simulated daylight (6800 K) and incandescent (2700 K) illumination. The first experiment evaluated color-image quality. Under simulated daylight, the subjects judged all of the images to have the same color accuracy, except the professionalcamera image, which was significantly worse. Under incandescent illumination,
320
Computational Color Technology
all of the images, including the professional-camera image, had equivalent performance. The second experiment evaluated spatial image quality. The results of this experiment were highly target-dependent. For both experiments, there was high observer uncertainty and poor data normality. They concluded that multispectral imaging performs well in terms of both color reproduction accuracy and image quality, regardless of the number of channels used in imaging and the techniques used to reconstruct the images.
References 1. H. Maitre, F. Schmitt, J. P. Crettez, Y. Wu, and J. Y. Hardeberg, Spectrophotometric image analysis of fine art painting, Proc IS&T and SID 4th Color Imaging Conf., Scottsdale, AZ, pp. 50–53 (1996). 2. F. A. Imai and R. S. Berns, High resolution multispectral image archives: A hybrid approach, Proc. IS&T SID, 6th Color Imaging Conf., Scottsdale, AZ, pp. 224–227 (1998). 3. A. Rosselet, W. Graff, U. P. Wild, C. U. Keller, and R. Gschwind, Persistent spectral hole burning used for spectrally high-resolved imaging of the sun, Proc. SPIE 2480, pp. 205–212 (1995). 4. R. Baribeau, Application of spectral estimation methods to the design of a multispectral 3D camera. J. Imaging Sci. Techn. 49, pp. 256–261 (2005). 5. M. S. Peercy, Linear color representation for full spectral rendering, Comput. Graphics Proc., pp. 191–198 (1997). 6. R. S. Berns, Challenges for color science in multimedia imaging, Proc. CIM’98: Color Imaging in Multimedia, University of Derby, Derby, England, pp. 123–133 (1998). 7. R. S. Berns, F. H. Imai, P. D. Burns, and D.-Y. Tzeng, Multi-spectral-based color reproduction research at the Munsell Color Science Laboratory, Proc. SPIE 3409, p. 14 (1998). 8. D. L. Farkas, B. T. Ballou, G. W. Fisher, D. Fishman, Y. Garini, W. Niu, and E. S. Wachman, Microscopic and mesoscopic spectral bio-imaging, Proc. SPIE 2678, pp. 200–206 (1996). 9. M. Nishibori, N. Tsumura, and Y. Miyake, Why multispectral imaging in medicine? J. Imaging Sci. Techn. 48, pp. 125–129 (2004). 10. P. H. Swain and S. M. Davis (Eds.), Remote Sensing: The Quantitative Approach, McGraw-Hill, New York (1978). 11. P. D. Burns and R.S. Berns, Analysis of multispectral image capture, Proc. 4th IS&T/SID Color Imaging Conf., Springfield, VA, pp. 19–22 (1996). 12. F. Konig and W. Praefke, The practice of multispectral image acquisition, Proc. SPIE 3409, pp. 34–41 (1998). 13. S. Tominaga, Spectral Imaging by a multi-channel camera, Proc. SPIE 3648, pp. 38–47 (1999).
Multispectral Imaging
321
14. M. Rosen and X. Jiang, Lippmann 2000: A spectral image database under construction, Proc. Int. Symp. on Multispectral Imaging and Color Reproduction for Digital Archives, Chiba University, Chiba, Japan, pp. 117–122 (1999). 15. E. J. Giorgianni and T. E. Madden, Digital Color Management, AddisonWesley Longman, Reading, MA, pp. 33–36 (1998). 16. J. Farrell, D. Sherman, and B. Wandell, How to turn your scanner into a colorimeter, Proc. IS&T 10th Int. Congress on Advances in Non-Impact Printing Technologies, Springfield, VA, pp. 579–581 (1994). 17. W. Wu, J. P. Allebach, and M. Analoui, Imaging colorimetry using a digital camera, J. Imaging Sci. Techn. 44, pp. 267–279 (2000). 18. F. H. Imai, R. S. Berns and D. Tzeng, A comparative analysis of spectral reflectance estimated in various spaces using a trichromatic camera system, J. Imaging Sci. Techn. 44, pp. 280–287 (2000). 19. F. H. Imai, D. R. Wyble, R. S. Berns, and D.-Y. Tzeng, A feasibility study of spectral color reproduction, J. Imaging Sci. Techn. 47, 543–553 (2003). 20. K. Parulski and K. Spaulding, Color image processing for digital cameras, Digital Color Imaging Handbook, G. Sharma (Ed.), CRC Press, Boca Raton, FL, pp. 727–757 (2003) 21. B. E. Bayer, An optimum method for two-level rendition of continuous-tone picture, IEEE Int. Conf. on Comm., Vol. 1, pp. 26-11–26-15 (1973). 22. H. Sigiura, et al., False color signal reduction method for single-chip color video cameras, IEEE Trans. Consumer Electron. 40, pp. 100–106 (1994). 23. R. L. Baer, W. D. Holland, J. Holm, and P. Vora, A comparison of primary and complementary color filters for CCD-based digital photography, Proc. SPIE 3650, pp. 16–25 (1999). 24. K. A. Parulski, Color filters and processing alternatives for one-chip cameras, IEEE Trans. Electron Devices ED-32(8), pp. 1381–1389 (1985). 25. P. G. Herzog, D. Knipp, H. Stiebig, and F. Konig, Colorimetric characterization of novel multiple-channel sensors for imaging and metrology, J. Electron. Imaging 8, pp. 342–353 (1999). 26. K. Simomaa, Are the CCD sensors good enough for print quality monitoring? Proc. TAGA, Sewickley, PA, pp. 174–185 (1987). 27. A. Ryer, Light Measurement Handbook, Int. Light, Newburyport, MA (1997). 28. P. L. Vora, H. J. Trussell, and L. Iwan, A mathematical method for designing a set of color scanning filters, Proc. SPIE 1912, pp. 322–332 (1993). 29. M. J. Vrhel and H. J. Trussell, Optimal scanning filters using spectral reflectance information, Proc. SPIE 1913, pp. 404–412 (1993). 30. M. J. Vrhel and H. J. Trussell, Optimal color filters in the presence of noise, IEEE Trans. Imag. Proc. 4, pp. 814–823 (1995). 31. M. J. Vrhel and H. J. Trussell, Filter considerations in color correction, IEEE Trans. Imag. Proc. 3, pp. 147–161 (1994). 32. G. Sharma and H. J. Trussell, Optimal filter design for multilluminant color correction, Proc. IS&T/OSA’s Optics and Imaging in the Information Age, Springfield, VA, pp. 83–86 (1996).
322
Computational Color Technology
33. P. L. Vora and H. J. Trussell, Mathematical methods for the design of color scanning filters, IEEE Trans. Imag. Proc. 6, pp. 312–320 (1997). 34. R. Lenz, M. Osterberg, J. Hiltunen, T. Jaaskelainen, and J. Parkkinen, Unsupervised filtering of color spectra, J. Opt. Soc. Am. A 13(7), pp. 1315–1324 (1996). 35. W. Wang, M. Hauta-Kasari, and S. Toyooka, Optimal filters design for measuring colors using unsupervised neural network, Proc. of 8th Congress of the Int. Colour Assoc., AIC Color’97, Color Science Association of Japan, Tokyo, Japan, Vol. I, pp. 419–422 (1997). 36. M. Hauta-Kasari, K. Miyazawa, S. Toyooka, and J. Parkkinen, Spectral vision system for measuring color images, J. Opt. Soc. Am. A 16(10), pp. 2352–2362 (1999). 37. P. D. Burns, Analysis of image noise in multispectral color acquisition, Ph.D. Thesis, Center for Imaging Science, Rochester Institute of Technology, Rochester, New York (1997). 38. T. Keusen and W. Praefcke, Multispectral color system with an encoding format compatible to the conventional tristimulus model, IS&T/SID’s 3rd Color Imaging Conf., Scottsdale, AZ, pp. 112–114 (1995). T. Keusen, Multispectral color system with an encoding format compatible with the conventional tristimulus model, J. Imaging Sci. Techn. 40, pp. 510–515 (1996). 39. K. Martinez, J. Cuppitt, and D. Saunders, High resolution colorimetric imaging of paintings, Proc. SPIE 1901, pp. 25–36 (1993). 40. A. Abrardo, V. Cappellini, M. Cappellini, and A. Mecocci, Artworks colour calibration using the VASARI scanner, Proc. IS&T and SID’s 4th Color Imaging Conf.: Color Science, Systems and Applications, Springfield, VA, pp. 94– 97 (1996). 41. K. Martinez, J. Cuppitt, D. Saunders, and R. Pillay, 10 years of art imaging research, Proc. IEEE 90(1), pp. 28–41 (2002). 42. F. Konig and W. Praefcke, A multispectral scanner, Colour Imaging: Vision and Technology, L. W. MacDonald and M. R. Luo (Eds.), John Wiley & Sons, Chichester, England, pp. 129–143 (1999). 43. M. Vilaseca, J. Pujol, and M. Arjona, Spectral-reflectance reconstruction in the near-infrared region by use of conventional charge-coupled-device camera measurements, Appl. Opt. 42, p. 1788 (2003). 44. M. Vilaseca, J. Pujol, M. Arjona, and F. M. Martinez-Verdu, Color visualization system for near-infrared multispectral images, J. Imaging Sci. Techn. 49, pp. 246–255 (2005). 45. Y. Yokoyama, N. Tsumura, H. Haneishi, Y. Miyake, J. Hayashi, and M. Saito, A new color management system based on human perception and its application to recording and reproduction of art paintings, Proc. IS&T and SID’s 5th Color Imaging Conf.: Color Science, Systems and Applications, Springfield, VA, pp. 169–172 (1997). 46. J. Y. Hardeberg, F. Schmitt, H. Brettel, J.-P. Crettez, and H. Maitre, Multispectral image acquisition and simulation of illuminant changes, Colour Imaging:
Multispectral Imaging
47. 48. 49.
50.
51. 52. 53. 54. 55. 56. 57.
58.
59.
60.
323
Vision and Technology, L. W. MacDonald and M. R. Luo (Eds.), John Wiley & Sons, Chichester, England, pp. 145–164 (1999). J. Y. Hardeberg, Filter selection for multispectral color image acquisition, J. Imaging Sci. Techn. 48, pp. 105–110 (2004). M. Vilaseca, J. Pujol, and M. Arjona, Illuminant influence on the reconstruction of near-infrared spectra, J. Imaging Sci. Techn. 48, pp. 111–119 (2004). S. O. Park, H. S. Kim, J. M. Park, and J. K. Elm, Development of spectral sensitivity measurement system of image sensor devices, Proc. IS&T and SID’s 3rd Color Imaging Conf.: Color Science, Systems and Applications, Springfield, VA, pp. 115–118 (1995). F. Martinez-Verdu, J. Pujol, and P. Capilla, Designing a tristimulus colorimeter from a conventional machine vision system, Proc. CIM’98: Color Imaging in Multimedia, Derby, UK, Mar. 1998, pp. 319–333 (1998). W. K. Pratt and C. E. Mancill, Spectral estimation techniques for the spectral calibration of a color image scanner, Appl. Opt. 15, pp. 73–75 (1976). G. Sharma and H. J. Trussell, Characterization of scanner sensitivity, Proc. IS&T/SID’s 1st Color Imaging Conf., Scottsdale, AZ, pp. 103–107 (1993). G. Sharma and H. J. Trussell, Set theoretic estimation in color scanner characterization, J. Electron. Imaging 5, pp. 479–489 (1996). J. E. Farrel and B. A. Wandell, Scanner linearity, J. Electron. Imaging 3, pp. 225–230 (1993). D. Sherman and J. E. Farrel, When to use linear models for color calibration, Proc. IS&T/SID’s 2nd Color Imaging Conf., Scottsdale, AZ, pp. 33–36 (1994). R. E. Burger and D. Sherman, Producing colorimetric data from film scanners using a spectral characterization target, Proc. SPIE 2170, 42–52 (1994). P. M. Hubel, D. Sherman, and J. E. Farrel, A comparison of methods of sensor spectral sensitivity estimation, Proc. IS&T/SID’s 2nd Color Imaging Conf., Scottsdale, AZ, pp. 45–48 (1994). T. Uchiyama, M. Yamaguchi, H. Haneishi, and N. Ohyama, A method for the unified representation of multispectral images with different number of bands, J. Imaging Sci. Techn. 48, pp. 120–124 (2004). Y. Murakami, H. Manabe, T. Obi, M. Yamaguchi, and N. Ohyama, Multispectral image compression for color reproduction: Weighted KLT and adaptive quantization based on visual color perception, IS&T/SID’s 3rd Color Imaging Conf., Scottsdale, AZ, pp. 68–72 (2001). E. A. Day, R. S. Beans, L. A. Taplin, and F. H. Imai, A psychophysical experiment evaluating the color and spatial image quality of several multispectral image capture techniques, J. Imaging Sci. Techn. 48, pp. 93–104 (2004).
Chapter 15
Densitometry Densitometry provides the method and instrumentation for determining the optical density of objects. There are two types of optical density measurements: transmission and reflection. Transmission densitometry measures the density of transmissive samples such as the 35-mm film and overhead transparency. Reflection densitometry measures the density of reflected samples such as photographic and offset prints. Densitometry is widely used in the printing industry because most forms of color encoding are based directly or indirectly on density readings; most input and output devices are calibrated by using density measurements, and most reflection and transmission scanners are essentially densitometers or can be converted into one.1 Optical densities of objects correspond quite closely to human visual sensibility. Therefore, density is a powerful measure of the object’s color quality because, within a relatively wide range, the density follows the proportionality and additivity of the colorant absorptivity. In theory, one can use the additivity law to predict the density of a mixture from its components. However, there are problems in achieving this goal because of the dependencies on instrumentation, imaging device, halftone technique, and media. Nevertheless, densitometry is widely used in the printing industry for print quality control and other applications. This is because of its simplicity, convenience, ease of use, and an approximately linear response to human visual sensibility. In the foreseeable future, the use of densitometry is not likely to decrease. Therefore, we present the fundamentals of densitometry, its problems, and its applications. Perhaps the most important application is the color reproduction that uses the density masking method based on density additivity and proportionality. We present the derivation of the density-masking equation and examine the validity of the assumptions. We then extend the density-masking equation to the devicemasking equation. Modifications and adjustments of tone characteristics are suggested to fit the assumptions better. We propose several methods for deriving coefficients of the device-masking equation by using the measured densities of primary color patches. The advantages and disadvantages of these methods are discussed. Digital implementations of the density and device-masking equations are given in Appendix 9. 325
326
Computational Color Technology
15.1 Densitometer Originally, densitometers were designed to make color measurements on photographic materials, aiming at applications in the photography and graphic arts printing industries.2 They were not designed to respond to color as a standard observer; thus, no color-matching functions or standard illuminants were involved. However, the densitometer does provide its own brand of color quantification in the form of a spectral density response, a density spectrum, or three integrated densities through three different color-separation filters (e.g., densities at the red, green, and blue regions; some instruments have four components by including gray). The tricolor densities at the three different visible regions resemble tristimulus values. The major problem is in attempting to compare data between densitometers and colorimeters or in treating densitometric data as if they were colorimetric data (see Section 15.1.1—the correlation is very poor). There are two types of densitometers: reflection and transmission, with some instruments capable of making both measurements. For transmission measurements, density is determined from the transmittance factor of the sample. The transmittance factor Pt is the ratio of the transmitted light intensity It , measured with the sample in place, to the incident light intensity I0 , measured without the sample. Pt = It /I0 .
(15.1)
The transmission density Dt is defined as the negative logarithm of its transmittance factor. Dt = − log Pt .
(15.2)
Similarly, the reflection density Dr is determined from the reflectance factor Pr . Pr = Ir /Id ,
(15.3)
Dr = − log P ,
(15.4)
where Ir is the light intensity reflected by a sample, and Id is the light intensity reflected by a perfect diffuse reflector. A densitometer measures the reflected or transmitted light through an optical filter that transmits a region of the light in one of the red, green, or blue regions of the visible spectrum for the purpose of obtaining the color-separated signal. Upon receiving the signal, the instrument computes the density for output. Modern densitometers use a built-in set of spectral-response curves (sometimes called response filters). The American National Standards Institute (ANSI) has specified a set of density response filters3 : Status T filters are used for reflective samples such as press proofs, off-press proofs, and press sheets. They are broadband filters as shown in Fig. 15.1. Status E filters are a European standard for reflective samples. Status A filters are used for both reflective and transmissive samples, aiming
Densitometry
327
Figure 15.1 Spectra of Status T filters.
at color photographic materials such as photographic prints, 35 mm slides, and transparencies. Status M filters are used for transmissive materials—color negative films in particular. Commercial densitometers employ these filters and other filters such as DIN, DIN NB (Gretag spectrophotometer), and Standard I filters (X-Rite densitometer). The spectra of Standard I filters are given in Fig. 15.2; they are narrowband filters with the exception of the neutral filter.4 15.1.1 Precision of density measurements Most commercial densitometers output values with an accuracy to one-hundredth of a density unit. Thus, densitometers give only three significant figures for density values greater than 1, and one or two significant figures for density values less than 1. Compared to spectrophotometers that are capable of giving five significant figures with at least three significant figures for extremely dark colors, the accuracy of densitometers is low. Moreover, the resolving power is not high either. Often, a significant difference in CIELAB measured by a spectrophotometer gives only a small difference in density values that may be within the measurement uncertainty. Table 15.1 lists the density and CIELAB measurements of CMY primary colors in 12-step wedges using a Gretag spectrophotometer that is capable of making both density and CIELAB measurements. Figure 15.3 shows the CIE a∗ -b∗ plot of the CMY step wedges. Density difference, which is the Euclidean distance between two consecutive patches, is calculated and given in column 5 of Table 15.1. Color difference of consecutive patches in CIELAB space (Eab ) is given in the last
328
Computational Color Technology
Figure 15.2 Spectra of Standard I filters.
Figure 15.3 CIE a∗ -b∗ plot of step wedges of CMY primary colorants.
Densitometry
329
column. As shown, there is a noticeable difference between samples Cyan-3 and Cyan-4 measured by the spectrophotometer (Eab = 1.24), but there is no difference measured by the densitometer (D = 0). Figure 15.4 shows the correlation between the density and colorimetric measurements using the data in Table 15.1; the correlation is poor. Because of these reasons, the densitometer is not sensitive enough for color characterization tasks. However, it is widely used in color printer calibration. 15.1.2 Applications There are many applications for densitometry. For example, the transmissive densitometer is used extensively in chemistry for determining solute concentrations, and the reflective densitometer has been used in biological measurements such as the reading of electrophoregrams. The main application of densitometry resides in the printing and related industries. Densitometers are used in printing processes and product controls such as the calibration and control of printing exposures. In most cases, the spectral response of the densitometer is tailored by filters to represent as closely as possible the spectral dye absorption peaks of the materials involved.5 It has been suggested by Dawson and Vogelsong that the variability among instruments can be reduced by standardizing the unfiltered response.6 In graphic arts printing, densitometers are used for quality control during printing on the press, evaluation of the final printed image, evaluation of the original copy for determining the separation and masking requirements, and quality control of the photographic steps encountered in prepress operations. Color-transmission
Figure 15.4 Correlation between density and color-difference measurements.
330
Computational Color Technology
Table 15.1 Precision comparisons of densitometer and spectrophotometer measurements.
Sample
Dr
Dg
Db
Cyan-1 Cyan-2 Cyan-3 Cyan-4 Cyan-5 Cyan-6 Cyan-7 Cyan-8 Cyan-9 Cyan-10 Cyan-11 Cyan-12 Magenta-1 Magenta-2 Magenta-3 Magenta-4 Magenta-5 Magenta-6 Magenta-7 Magenta-8 Magenta-9 Magenta-10 Magenta-11 Magenta-12 Yellow-1 Yellow-2 Yellow-3 Yellow-4 Yellow-5 Yellow-6 Yellow-7 Yellow-8 Yellow-9 Yellow-10 Yellow-11 Yellow-12
1.27 1.25 1.24 1.24 1.06 0.90 0.75 0.62 0.51 0.41 0.32 0.22 0.22 0.14 0.14 0.13 0.13 0.12 0.12 0.12 0.11 0.1 0.09 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08
0.55 0.53 0.52 0.52 0.44 0.38 0.32 0.28 0.24 0.2 0.17 0.13 1.28 0.88 0.78 0.69 0.62 0.55 0.49 0.42 0.34 0.24 0.2 0.14 0.14 0.15 0.14 0.14 0.13 0.11 0.11 0.11 0.1 0.1 0.1 0.09
0.37 0.36 0.36 0.36 0.33 0.3 0.27 0.25 0.22 0.2 0.18 0.14 0.73 0.52 0.48 0.42 0.39 0.35 0.32 0.28 0.23 0.17 0.15 0.11 1.07 0.91 0.81 0.68 0.6 0.53 0.48 0.42 0.34 0.28 0.22 0.12
D 0.030 0.014 0 0.199 0.173 0.164 0.137 0.121 0.110 0.097 0.115 0.459 0.108 0.109 0.076 0.081 0.067 0.081 0.095 0.117 0.046 0.073 0.160 0.101 0.130 0.081 0.073 0.050 0.060 0.081 0.060 0.060 0.101
L∗
a∗
b∗
49.31 50.40 50.64 50.64 55.71 60.14 64.97 69.13 73.18 76.97 80.86 85.97 48.48 58.25 60.87 63.57 66.01 68.56 71.34 73.73 77.88 83.08 85.59 89.4 88.3 87.6 88.47 88.57 88.92 90.36 90.76 90.84 91.2 91.37 91.57 92.3
–21.09 –22.17 –22.35 –23.02 –24.69 –24.26 –23.43 –20.70 –17.47 –14.74 –11.49 –6.97 66.09 56.69 51.84 47.7 42.99 39.05 34.76 29.12 23.72 16.03 12.05 6.48 –6.78 –4.65 –5.21 –4.69 –4.38 –5.74 –5.73 –4.79 –4.08 –2.52 –1.11 1.09
–50.33 –49.79 –49.40 –48.36 –43.38 –38.71 –33.57 –27.82 –22.72 –18.15 –13.26 –8.29 2.59 –1.85 –2.39 –3.82 –3.68 –4.46 –4.6 –5.4 –5.05 –4.88 –4.11 –3.89 70.7 61.81 56.55 48.46 43.36 39.47 35.62 30.56 23.75 17.24 11.13 1.29
Eab 1.63 0.49 1.24 7.30 6.45 7.10 7.60 7.27 6.53 7.04 8.44 14.27 5.54 5.15 5.31 4.76 5.11 6.18 6.82 9.28 4.77 6.75 9.17 5.36 8.11 5.12 4.37 3.87 5.15 6.86 6.70 6.27 10.11
densitometry is confined mostly to the evaluation of original transparencies and color duplicates. Quality control during printing and evaluation of the final product is nearly always done using reflection measurements. The major differences between graphic-arts densitometry and photographic densitometry are in the wide diversity of substrates and pigments used in the graphic-arts industry and the fact
Densitometry
331
that the scattering characteristics of the pigments are more significant than in photographic dyes.5 To complicate the matter further, there is the device value. Device value, area coverage, and density all shape the rendition of color images that are used in densitometry. Device value is usually represented in an 8-bit depth with 256 levels. It is a device-dependent parameter, where two devices with an identical set of device values may not look the same, even if they are the same type and from the same manufacturer. The density measurement, on the other hand, is universal and deviceindependent. Two densitometers with different geometries, filter sets, or calibration standards may give different density readings for a given print. However, for a given densitometer, the density value is not dependent on imaging devices. Usually, the area coverage is calculated from the density measurement. The area coverage (or dot gain) depends strongly on the substrate and halftone screen used. To have high color fidelity, the relationships between density, area coverage, and device value must be established. Moreover, it is useful to separate device-dependent and device-independent parts of the printing process. This can be achieved by using the area coverage as the intermediate exchange standard between device value and density value. Relationships to the area coverage from device value and density are individually established. The device value to area coverage relationship contains mostly device-related characteristics, while the area coverage to density relationship is sheltered from device dependency.
15.2 Beer-Lambert-Bouguer Law The Beer-Lambert-Bouguer law governs quantitative interpretations in densitometry. The law relates the light intensity to the quantity of the absorbent, based on the proportionality and additivity of the colorant absorptivity. For a single colorant viewed in transmission mode, such as a transparency, the absorption phenomenon follows the Beer-Lambert-Bouguer law, which states that the density D(λ) at a given wavelength λ is proportional to the concentration c (usually in the unit of moles per liter or grams per liter) and thickness b (usually in the unit of centimeter) of the colorant layer. D(λ) = ξ(λ)bc,
(15.5)
where ξ(λ) is the absorption coefficient at wavelength λ. Equation (15.5) is valid for any monochromatic light or within a narrowband of wavelengths. Equation (15.5) is often used in chemical analysis, where the experimenter obtains the relationship between the chemical concentration and optical density. The procedure includes preparation of a series of solutions with varying concentrations of the chemical, ranging from the maximum concentration possible to zero concentration (solvent alone). Densities of these solutions, stored in a glass or quartz rectangular cell with a fixed length, are measured at a fixed wavelength (usually at the peak of the absorption band). The plot of the absorbance (or density) versus
332
Computational Color Technology
concentration is called the calibration curve. Any unknown concentration of the chemical solution is determined by measuring the density and plugging into the calibration curve to find the concentration.
15.3 Proportionality The Beer-Lambert-Bouguer law can also be used in color imaging by employing the concepts of proportionality and additivity. The proportionality of a colorant refers to the property that the densities, measured through three color-separation filters, remain proportional to each other as the amount of the colorant is varied. The colorant amount can be modulated by changing the film thickness for continuoustone printers, or by changing the area coverage for binary devices via a halftone process. For two different wavelengths λ1 and λ2 , we have D(λ1 ) = ξ(λ1 )bc
and
D(λ2 ) = ξ(λ2 )bc.
(15.6)
The density ratio at these two wavelengths is D(λ1 )/D(λ2 ) = ξ(λ1 )/ξ(λ2 ),
(15.7)
because the thickness b and concentration c are the same for a given color patch or object. This means that the ratio of densities at two (or more) different wavelengths is constant if the colorant concentration and thickness remain the same. Moreover, the ratio should remain constant as the concentration is varied. In other words, the proportionality should be obeyed by a color-transmission measurement.1 This can be shown as follows: At concentration c1 , D1 (λ1 ) = ξ(λ1 )bc1 ,
D1 (λ2 ) = ξ(λ2 )bc1 ,
and D1 (λ1 )/D1 (λ2 ) = ξ(λ1 )/ξ(λ2 ).
(15.8)
At concentration c2 , D2 (λ1 ) = ξ(λ1 )bc2 ,
D2 (λ2 ) = ξ(λ2 )bc2 ,
and D2 (λ1 )/D2 (λ2 ) = ξ(λ1 )/ξ(λ2 ).
(15.9)
At any arbitrary concentration ci , Di (λ1 ) = ξ(λ1 )bci ,
Di (λ2 ) = ξ(λ2 )bci ,
and
Di (λ1 )/Di (λ2 ) = ξ(λ1 )/ξ(λ2 ). (15.10)
Densitometry
333
Thus, the density ratios of λ1 and λ2 at various concentrations are the same. D1 (λ1 )/D1 (λ2 ) = D2 (λ1 )/D2 (λ2 ) = · · · = Di (λ1 )/Di (λ2 ) = · · · = ξ(λ1 )/ξ(λ2 ) = α12 , (15.11) where α12 is a proportional constant representing the ratio of ξ(λ1 ) over ξ(λ2 ). This means that for all densities, D(λ1 ) = α12 D(λ2 ).
(15.12)
This means that a plot of density ratio α12 as a function of either the density D(λ1 ) or D(λ2 ) will give a horizontal line. If we measure densities of a cyan patch at one wavelength each in red, green, and blue regions (or through a set of narrowband RGB separation filters), we have the following relationships: Dc,g = αgr Dc,r
and
Dc,b = αbr Dc,r ,
(15.13)
where Dc,r , Dc,g , and Dc,b are the densities of the red, green, and blue components, respectively, of the cyan ink; αgr is the proportional constant of the green density over the red density; and αbr is the proportional constant of the blue density over the red density. The red density is used as the common denominator because it is the strongest density in cyan ink. Similarly, for magenta and yellow inks under the same measuring conditions, we have Dm,r = αrg Dm,g Dy,r = αrb Dy,b
and and
Dm,b = αbg Dm,g , Dy,g = αgb Dy,b ,
(15.14) (15.15)
where Dm,r , Dm,g , and Dm,b are the densities of the red, green, and blue components, respectively, of the magenta ink; αrg is the proportional constant of the red density over the green density; and αbg is the proportional constant of the blue density over the green density. The green density, the strongest one in magenta ink, is used as the common denominator. For yellow ink, Dy,r , Dy,g , and Dy,b are the densities of the red, green, and blue components, respectively; αrb is the proportional constant of the red density over the blue density, and αgb is the proportional constant of the green density over the blue density. The blue density, the strongest one in yellow ink, is used as the common denominator. Relationships given in Eqs. (15.5) and (15.12) are strictly obeyed with monochromatic light in transmission rather than reflection, and by contone rather than by halftone images. However, in color printing, we often deal with reflected light from halftone images that are measured with a broadband densitometer. Consequently, the proportionality is not rigorously obeyed.
334
Computational Color Technology Table 15.2 Density ratios of the Canon CLC500 primary toners.
Region
Measured solid density Cyan Magenta Yellow
Density ratio Cyan Magenta
Yellow
Red Green Blue Max. OD
1.446 0.610 0.283 1.446
1.000 0.422 0.196 1.446
0.010 0.050 1.000 1.115
0.060 1.022 0.388 1.022
0.011 0.056 1.115 1.115
0.059 1.000 0.380 1.022
15.3.1 Density ratio measurement Density ratios can be measured by a densitometer; a simple procedure is given as follows:6 (1) Print primary colorants in steps (e.g., 10 to 20 steps) that cover the whole range of device values. (2) Measure RGB three-component densities of each color patch. (3) Compute ratios αij as defined in Eqs. (15.13)–(15.15) for each patch. (4) Compute the average αij value of a color component within a given primary color. (a) Select the darkest k patches, where k is set arbitrarily to prevent the inclusion of the highly scattered data in the light-color region (see Fig. 15.7). (b) Take the average of these selected patches. Table 15.2 gives density ratios of primary toners used in a commercial color device. As one would expect, this procedure gives a very high experimental uncertainty because the measured densities depend on the instrument and the filter used, and the use of mean values from scattered data. However, they are the building blocks of the density-masking equation.
15.4 Additivity The additivity rule states that the density of a print from combined inks should be equal to the sum of the individual ink densities.7 Ds,r = Dc,r + Dm,r + Dy,r Ds,g = Dc,g + Dm,g + Dy,g Ds,b = Dc,b + Dm,b + Dy,b or Ds,r Dc,r Dm,r Dy,r 1 Ds,g = Dc,g Dm,g Dy,g 1 Ds,b Dc,b Dm,b Dy,b 1
or
Ds = DpU 1,
(15.16)
Densitometry
335
where Ds,r , Ds,g , and Ds,b are the sums of the densities of the red, green, and blue components, respectively. Equation (15.16) can also be expressed in vector-matrix notation by setting D s = [Ds,r , Ds,g , Ds,b ]T and U 1 = [1, 1, 1]T . Equation (15.16) describes an ideal case, where the additivity holds. In reality, when several inks are superimposed, the density of the mixture measured through a color-separation filter is often less than the sum for high-density color patches—the failure of the additivity rule.
15.5 Proportionality and Additivity Failures As mentioned earlier, the additivity and proportionality of the density are not strictly obeyed. Yule pointed out major reasons for the failures of both proportionality and additivity; major ones are filter bandwidth, surface reflection, internal reflection, opacity, and halftone pattern.7 15.5.1 Filter bandwidth Usually, narrowband filters give a fairly linear relationship between the measured density and dye concentration or thickness, indicating that proportionality holds. When the filter bandwidth is increased, the curve starts to bend as shown in Fig. 15.5, giving a nonlinear relationship. 15.5.2 First-surface reflection When light strikes a paper or ink surface, about 4% of the light is reflected at the surface. This is because of the difference in the refractive indices between air and an ink film. On a matte surface, this light is diffused so that it reaches the detector and limits the maximum density obtainable to about 1.4 (= − log 0.04). If the surface is glossy, a major fraction of this 4% light is reflected away from the detector of the densitometer (either 45/0 or 0/45 geometry) and will not reach the detector. The result is a higher density value than 1.4. 15.5.3 Multiple internal reflections After penetrating into the paper substrate, a considerable proportion of the light does not emerge directly, but is reflected by the substrate back into the paper. This internal reflection can happen many times. Each time the light is reflected back into the paper, it passes twice through any layer of light-absorbing material such as ink film. Consequently, more light is absorbed and the density is increased. 15.5.4 Opacity Opacity is the reciprocal of the transmittance. It is the scattering of light caused by the difference in refractive indices between the colorant and ink vehicle.
336
Computational Color Technology
Figure 15.5 Density versus thickness of the magenta dye layer, using narrow-, medium-, and wideband filters.7
15.5.5 Halftone pattern Generally, a coarse halftone screen shows more proportionality failure than a fine screen.7 To study the additivity behavior of halftone tints, one needs to print the crossed halftone step wedges with the two inks involved, then measure their densities. The problem is that it is difficult to get accurate results because of inconsistencies in the printing process; special care must be taken to minimize errors caused by printer variability. 15.5.6 Tone characteristics of commercial printers As a result of these problems, a color print measured by a reflective densitometer often exhibits varying degrees of deviation from the ideal proportionality and additivity. Figure 15.6 shows the three-component (R, G, and B) curves of HP660C ink-jet cyan ink. If the proportionality of Eq. (15.12) holds, we should get three straight lines with different slopes; we get three curves instead.
Densitometry
337
Figure 15.6 Tone curves of HP660C cyan ink exhibiting non-Beer’s behavior.
Figure 15.7 shows another representation of the failure of constant proportional ratios. The data are taken from three primary inks from an HP660C ink-jet printer.6 If the proportionality of Eq. (15.12) holds, the data of each density ratio (or proportional constant) with respect to the tone level should be constant to fit a straight horizontal line. Figure 15.7 shows linear relationships (but not horizontal lines) above a device value of 100. The data are scattered upward at low device values. The data scattering is primarily due to the large measurement uncertainty at low densities. Fortunately, the contribution to the overall density at low device values is small. For higher device values, the proportionality seems to hold quite well in most cases. Several studies indicate that additivity is followed rather closely before reaching high densities for modern-day printing devices (Canon CLC500, for example).6 Figures 15.8–15.11 show the comparisons of measured and calculated densities from various two-color and three-color mixtures printed on paper substrates using a HP660C ink-jet printer. As one can see from these figures, the additivity holds at low toner levels, but fails at high device values. These results are expected because of the non-Beer’s behavior at high colorant concentrations.
338
Computational Color Technology
Figure 15.7 Failure of the constant proportional ratio.
15.6 Empirical Proportionality Correction Like the gamma correction of the display video signal, the nonlinear density relationship with respect to the device value of a printer can be transformed in order to have a linear (or near-linear) response. An empirical equation is proposed in Eq. (15.17) to linearize the tone curve. gc = gmax {1 − [(gmax − gi )/gmax ]γ },
(15.17)
where gmax = 2N − 1 and N is the number of bits representing the integer value, gc is the corrected output value, gi is the input device value, and γ is the exponent of the power function. The optimal γ value can be determined by computing gc over a range of γ values for the best fit to the experimental data. Figure 15.12 gives the plot of the corrected device value versus density using the data given in Fig. 15.6 with an optimal γ of 2.4; the correction gives quite linear relationships for all three components of the HP660C cyan ink. If the input device value is represented inversely, where gmax is the white and 0 is the full strength, then Eq. (15.17) becomes gc = gmax {1 − (gi /gmax )γ }.
(15.18)
Densitometry
339
Figure 15.8 Additivity plots of magenta-yellow mixtures with varying yellow value mixed with magenta at full strength.
Figure 15.9 Additivity plots of cyan-yellow mixtures with varying yellow value mixed with cyan at full strength.
340
Computational Color Technology
Figure 15.10 Additivity plots of cyan-magenta mixtures with varying magenta value mixed with cyan at full strength.
Figure 15.11 Additivity plots of cyan-magenta-yellow mixtures with varying yellow values mixed with cyan and magenta at full strength.
Densitometry
341
Figure 15.12 Linearization of HP660C cyan ink curves.
Equations (15.17) and (15.18) work for a wide range of curvatures by finding an optimal γ value.
15.7 Empirical Additivity Correction The main difficulty in verifying additivity is printer variability. Often, one is not able to resolve changes in printer additivity from the high variability of the printer. Large amounts of data and clever experiment design are needed to extract statistically significant factors. This approach is expensive and time consuming. Moreover, for interlaboratory assessments of various printing devices, this problem is further compounded by differences in instrumentation, experimental procedure, and printer characteristics. Therefore, it is difficult to deduce rules for correcting complex additivity failure. An empirical method of correcting additivity failure is by using the regression technique to find the link between measured and calculated values.8 The advantage of this technique is that it takes statistical fluctuation into account. Table 15.3 lists the average errors from using polynomial regression
342
Computational Color Technology Table 15.3 Average density errors of the polynomial regression.6
Printer
Data number
3×4
3×7
3 × 11
Epson (Ink-jet) HP (Ink-jet) Xerox 5775
64 38 125
0.10 0.12 0.09
0.08 0.11 0.09
0.06 0.06 0.06
on three printers to give some idea about the accuracy of the regression method.6 The errors of all three printers using 11-term polynomials are the same at 0.06; this number is only slightly larger than the measurement uncertainty. By using the regression method, unique coefficients are derived for each printer at a given polynomial. The coefficients are used to convert the measured density of mixed colorants to the linear relationship of Eq. (15.16). Reasonable accuracies can be obtained using a high-order polynomial.
15.8 Density-Masking Equation Equation (15.16) applies to ideal block dyes. In the real world, there are no ideal block dyes; all primary colorants have some unwanted absorptions (see Fig. 15.6, for example). The effect of the unwanted absorption is that one does not get the expected colors when mixing primary colorants together. A good example is the reproduction of blue colors when cyan and magenta toners are mixed in equal amounts; one gets purple instead of blue. These unwanted absorptions are undesirable and must be corrected. The correction is called “masking,” usually performed in the density domain. Again, the fundamental assumptions of density masking are the additivity and proportionality. If the proportionality and additivity rules hold for densities of mixed colors, we can substitute Eqs. (15.13), (15.14), and (15.15) into Eq. (15.16) to give Eq. (15.19). Ds,r = Dc,r + αrg Dm,g + αrb Dy,b , Ds,g = αgr Dc,r + Dm,g + αgb Dy,b , Ds,b = αbr Dc,r + αbg Dm,g + Dy,b , or
Ds,r Ds,g Ds,b
1 = αgr αbr
αrg 1 αbg
αrb αgb 1
Dc,r Dm,g Dy,b
or Ds = M α Dh,
(15.19)
Densitometry
343
where D h = [Dc,r , Dm,g , Dy,b ]T is a vector that contains the highest density component of each primary ink. If densities of the resulting print are measured and the six proportional constants are known, then Eq. (15.19) becomes a set of three simultaneous equations with three unknowns. We can solve this set of equations to obtain the densities of individual inks, Dc,r , Dm,g , and Dy,b , by inverting Eq. (15.19), as given in Eq. (15.20). The matrix Mα is not singular, and therefore determinant d¯ is not equal to zero, because there are three independent channels: red, green, and blue. Thus, the matrix Mα has a rank of three and can be inverted. D h = M −1 α Ds = M β Ds.
(15.20)
The explicit expressions are given as follows: βrr βrg βrb Ds,r Dc,r Dm,g = βgr βgg βgb Ds,g , Dy,b βbr βbg βbb Ds,b where βrr =
1 α
gb
d-
βgr = −
βbr =
αbg 1
αgr α br
αgb 1 d 1 αbg
αgr α br d-
,
,
βrg
,
=−
βgg =
βbg
αrg α bg
1 α
br
αrb 1 d αrb 1
,
, d 1 αrg α αbg , = − br d-
βrb =
αrg 1
αrb αgb
, d 1 αrb α αgb βgb = − gr , d 1 αrg α 1 βbb = gr , d-
and 1 d = αgr αbr
αrg 1 αbg
αrb αgb . 1
Equation (15.20) states that if the densities of the RGB components of an output color are known, one can determine the amounts of cyan, magenta, and yellow primary colorants needed to give a match. In other words, the composition of primary colors can be found for a desired output color. Based on this simple theory, we develop several methods of device color correction by using density masking. Moreover, this seemingly simple theory possesses many useful properties and has many important applications, such as gray balance, gray-component replacement, maximum ink setting, and blue correction.
15.9 Device-Masking Equation Equation (15.20) is not very useful because it is in the density domain. Color imaging devices do not operate in the density domain; they are in the device intensity
344
Computational Color Technology
domain. The transformation between optical density and device intensity exists; it can be established experimentally as discussed in Section 15.6. If the relationship between intensity and density is linear, Eq. (15.20) can be directly transformed into the device intensity domain. However, as Yule pointed out long ago: in offset printing, the additivity and proportionality of the density are not strictly obeyed.2 They are met approximately.5 His observation is still valid in today’s printing environment, which uses very different technologies such as electrophotographic and ink-jet printers. As discussed in Section 15.5, additivity is followed rather closely before reaching high densities, and density ratios of primary colorants are pretty constant across a wide dynamic range. The tone curve can be linearized with respect to device value by using Eq. (15.17) or Eq. (15.18). Therefore, we can set up a forward masking equation by replacing density values in Eq. (15.20) with device values. Equation (15.21) gives the masking equation in the device intensity domain, where Gi = [Ci , Mi , Yi ]T are input device CMY values and Go = [Co , Mo , Yo ]T are corresponding output values. Gi = M σ Go = M α Λr Go . The explicit expression is Ci αrr αrg αrb Co Mi = αgr αgg αgb Mo Yi αbr αbg αbb Yo Dc,r /Dmax 1 αrg αrb = αgr 1 αgb 0 αbr αbg 1 0
0 Dm,g /Dmax 0
(15.21)
0 0 Dy,b /Dmax
Co Mo . Yo
Dmax = MAX(Dc,r , Dm,g , Dy,b ) is the highest density among all three primary colorants. With scaling by the diagonal matrix Λr , this transformation takes into account the difference of the maximum densities from the primary colorants; density ratios are scaled with respect to the highest density. For the Canon CLC500, using the density ratios given in Table 15.2, the matrix M σ is given by Eq. (15.22). 1.000 0.042 0.008 Ci Co (15.22) Mi = 0.422 0.707 0.039 Mo . Yi Yo 0.196 0.269 0.771 With the measured density ratios αij , we can compute output values by inverting the forward masking equation of Eq. (15.21). Two methods are proposed for inverting Eq. (15.21). 15.9.1 Single-step conversion of the device-masking equation Because matrix M σ is not singular, we invert Eq. (15.21) directly to obtain the output vector Go as given in Eq. (15.23). Go = M −1 σ Gi = M β Gi .
(15.23)
Densitometry
345
For the Canon CLC500, the M β is given by Eq. (15.24).
Co Mo Yo
1.0260 = −0.6098 −0.0481
−0.0580 1.4767 −0.5005
−0.0077 −0.0684 1.3228
Ci Mi . Yi
(15.24)
Note that the off-diagonal elements are all negative because they are unwanted absorption, and should be removed. One can use Eq. (15.23) directly to obtain output values. The problem is that many inputs will give out-of-range values for outputs because the diagonal elements are greater than 1. For inputs of a single ink with a high device value, for instance, the output will be greater than 1. To prevent outputs from going over the upper boundary, one can normalize Eq. (15.23) to have a value 1 for the maximum coefficient in each row.
Co Mo Yo
1 = δgr δbr
δrg 1 δbg
δrb δgb 1
Ci Mi Yi
or
Go = M δ Gi ,
(15.25)
where δrg = βrg /βrr , δgb = βgb /βgg ,
δrb = βrb /βrr ,
δgr = βgr /βgg ,
δbr = βbr /βbb ,
δbg = βbg /βbb .
This normalization step ensures that no outputs will go over the upper boundary, but it decouples the density correlation among the three components. For the Canon CLC500, matrix M δ is given by Eq. (15.26), which is the normalization of Eq. (15.24).
Co Mo Yo
1.0000 = −0.4129 −0.0364
−0.0565 1.0000 −0.3784
−0.0075 −0.0463 1.0000
Ci Mi . Yi
(15.26)
15.9.2 Multistep conversion of the device-masking equation The second method breaks the process into several steps. First, the row sums of matrix M σ are normalized to 1. This normalization totally decouples the density correlation among all three components, giving each channel an independent treatment.
Ci Mi Yi
αrr = αgr αbr
αrg αgg αbg
αrb Co αgb Mo Yo αbb
or
Gi = M α Go ,
(15.27)
346
Computational Color Technology
where αrr = αrr /(αrr + αrg + αrb );
αrg = αrg /(αrr + αrg + αrb );
= α /(α + α + α ); αgr gr gr gg gb
= α /(α + α + α ); αgg gg gr gg gb
= α /(α + α + α ); αbr br br bg bb
= α /(α + α + α ); αbg bg br bg bb
= α /(α + α + α ); αrb rb rr rg rb = α /(α + α + α ); αgb gb gr gg gb = α /(α + α + α ). αbb bb br bg bb
We then invert Eq. (15.27) to masked. β β Co rr rg βgg Mo = βgr Yo βbr βbg
get outputs in which unwanted absorptions are βrb Ci βgb Mi Yi βbb
or
Gi = M β Go ,
(15.28)
where M β = M α−1 . Finally, we normalize Eq. (15.28) to have a value 1 for the maximum coefficient in each row. 1 δ δrb Ci Co rg or Go = M δ Gi , (15.29) Mo = δgr 1 δgb Mi Yo Y δbr δbg 1 i = β /β , δ = β /β , δ = β /β , δ = β /β , δ = β /β and where δrg rg rr rb gr gg gb rb rr gr gb gg br br bb = β /β . δbg bg bb The second method is used to demonstrate the flexibility of the masking method. One can break the process apart and insert a desired processing such as scaling, normalization, or mapping in places that one sees fit. Both methods will work. The selection is dependent on the preference of the viewer and design concern of the implementer, among other things. Moreover, the difference between these two methods may be compensated to some degree by using 1D tone curves before and/or after the masking correction. The addition of 1D lookup tables makes the method very versatile; one can use it to implement tone linearization for ensuring the proportionality of the tone scale, or one can use it to realize a viewer’s preference.
15.9.3 Intuitive approach There is also a very intuitive approach for masking.
Co Mo Yo
1 = ρ12 ρ13
ρ21 1 ρ23
ρ31 ρ32 1
Ci Mi , Yi
(15.30)
Densitometry
347
where ρ21 = −Dm,r /Dc,r , ρ31 = −Dy,r /Dc,r , ρ12 = −Dc,g /Dm,g , ρ32 = Dy,g /Dm,g , ρ13 = −Dc,b /Dy,b , and ρ23 = −Dm,b /Dy,b are ratios of unwanted absorption to prime absorption. Equation (15.30) says that the correction for cyan is to subtract magenta and yellow, weighted by their absorption ratios; the correction for magenta is to subtract cyan and yellow, weighted by their absorption ratios; and the correction for yellow is to subtract cyan and magenta, weighted by their absorption ratios. This intuitive approach makes sense and may also work.
15.10 Performance of the Device-Masking Equation Several numerical examples from an experimental electrophotographic printer, G2, and a Canon CLC500 copier are given in Table 15.4 using the single-step conversion of Eq. (15.25). This table reveals several interesting points, as follows: (1) Primary colors are not affected. Therefore, primary colors are as pure as they can be and the most saturated colors are retained. This may not be the case for the 3D-LUT and regression methods. (2) The mixed colors use less colorant than inputs because of reduction by unwanted absorptions. Thus, output colors would not get too dark. It also saves colorant consumption without sacrificing saturation. (3) There is an upper limit placed on the three colorants because of the unwanted absorption (see the results in Table 15.4; when Ci = Mi = Yi = 255, the output is only 69% of the input). With gray-component replacement, the total amount of colorants can be further reduced. (4) This color correction produces correct blue hues. Multistep conversion also has these advantages. On some occasions, we obtained a negative value for one component (or more), indicating that the output gamut is not able to match the input color. These are the cases when (i) yellow is small and the other two components are large, where the relatively large negative magenta coefficient in the yellow expression overcomes the small positive contribution from the yellow component to give a negative value; and (ii) magenta is small and the other two components are large, where the relatively large negative cyan coefficient in the magenta expression overcomes the small positive contribution from the magenta component to give a negative value. We need to check every output value and set any negative value to zero.
15.11 Gray Balancing The density-masking method can be applied to gray balance in which the correct amounts of cyan, magenta, and yellow are computed to give a neutral color. This is achieved by setting Ci = Mi = Yi = gi in Eq. (15.23) to give Eq. (15.31).
348
Computational Color Technology
Table 15.4 The input values and corrected output values using the density-masking method.
Input Ci
Mi
Yi
G2 output Co Mo
Yo
CLC500 output Co Mo
Yo
255 255 255 255 255 255 255 255 255 127 127 127 127 127 127 127 127 127 0 0 0 0 0 0 0 0 0
255 255 255 127 127 127 0 0 0 255 255 255 127 127 127 0 0 0 255 255 255 127 127 127 0 0 0
255 127 0 255 127 0 255 127 0 255 127 0 255 127 0 255 127 0 255 127 0 255 127 0 255 127 0
199 205 211 221 227 233 243 249 255 71 77 83 93 99 105 115 121 127 0 0 0 0 0 0 0 0 0
128 0 0 172 44 0 215 87 0 148 20 0 192 64 0 235 107 0 168 40 0 212 84 0 255 127 0
239 240 241 246 247 248 253 254 255 111 112 113 118 119 120 125 126 127 0 0 0 0 0 0 0 0 0
149 21 0 198 70 0 246 118 0 154 26 0 202 74 0 250 122 0 159 31 0 207 79 0 255 127 0
139 151 162 11 23 34 0 0 0 186 197 209 58 69 81 0 0 0 232 244 255 104 116 127 0 0 0
138 144 148 10 16 22 0 0 0 191 197 203 63 69 75 0 0 0 243 249 255 115 121 127 0 0 0
Co = (βrr + βrg + βrb )gi , Mo = (βgr + βgg + βgb )gi , Yo = (βbr + βbg + βbb )gi .
(15.31)
With known β values, we can compute Co , Mo , and Yo to give a gray that is balanced with respect to density. Hopefully, the gray is colorimetrically balanced as well. Equation (15.31) provides a means for checking the quality of the masking equation. If the resulting CMY components give true grays, then there is no need to perform tedious experiments for obtaining gray-balance curves.9 Moreover, in reproducing blue colors, the masking equation correctly reduces the unwanted absorptions from the cyan and magenta inks in proportion to the
Densitometry
349
amounts of CMY inputs because all off-diagonal elements are negative values [see Eq. (15.24)]. The result is a correct blue color instead of purple, such that there is no need for a complex algorithm for hue rotation to achieve a blue color rendition.
15.12 Gray-Component Replacement Gray-component replacement (GCR) is defined as a technique in color printing wherein the neutral or gray component of a three-color image is replaced during reproduction with a certain level of black ink. The least predominant of the three primary inks is used to calculate a partial or total substitution by black, and the color components of that image are reduced to produce a print image of a nearly equivalent color to the original three-color print.10 Specifications Web Offset Publications (SWOP) use both GCR and UCR (under-color removal) in their publications and make the distinction between them by stating that UCR refers to the reduction of chromatic colors in the dark or near-neutral shadow areas for the purpose of reducing the total area coverage and ink-film thickness.11 Under this definition, it makes UCR a subset of GCR, which applies to all color mixtures. To my comprehension, the conventional way of performing GCR is accomplished by a sequence of operations including grayscale tone reproduction or gray balancing, color correction, UCR, black generation (BG), under-color addition (UCA), and mathematical analysis. UCR finds the minimum of three primary colors and determines the amount of each primary to be removed. BG determines the amount of the black ink to be added. UCA is used by adding color primaries to enhance the saturation and depth. In any case, GCR is a very complicated process of color reproduction; it requires many attempts by skilled colorists. The masking equation can also be used for GCR. It is the natural extension of gray balancing. To remove a given gray component gi , we can compute the CMY components via Eq. (15.23). The common component gi is determined by a predefined black-generation algorithm. Then, the common component is removed from the initial CMY values. The masking equation makes the complex GCR process simpler and easy to implement; an algorithm is given as follows: (1) Find the minimum in the Ci Mi Yi components. (2) Generate the black using a function gi = f [MIN(Ci , Mi , Yi )], where the function can be a scaling factor or a nonlinear transform. For example, the scaling factor can be varied as a function of the common component as shown in Fig. 15.13. (3) Substitute the gi value into Eq. (15.31) to obtain values of Co , Mo , and Yo for UCR. (4) Subtract under colors Co , Mo , and Yo from inputs Ci , Mi , and Yi , respectively.
350
Computational Color Technology
Figure 15.13 The strategy of gray-component replacement.
An additional benefit is that this GCR approach places a maximum value for ink loading at any given spot. Figure 15.14 depicts the maximum and minimum ink loading of mixing four CMYK inks as a function of the common component. Ink quantities are computed by using the masking Eq. (15.31) and a linear GCR, showing that the maximum ink loading cannot exceed 220%, as shown in Fig. 15.14. The beauty of this algorithm is that the maximum ink loading is built into the masking operation. There is no need for implementing a complex mechanism for ensuring that the ink loading will not exceed a certain level.
15.13 Digital Implementation Mathematical fundamentals for implementing the color-masking conversion via integer lookup tables are given in Appendix 9. The accuracy of the integer lookup is compared to the floating-point computation. The optimal pixel depth is recommended by using a simulation that computes the adjusted densities via a masking equation.
Densitometry
351
Figure 15.14 Maximum and minimum ink loading using a variable gray-component replacement.
15.13.1 Results of the integer masking equation As an exercise, we take the nine density values from Yule’s book,12 Dc,r = 1.23, Dc,g = 0.35, Dc,b = 0.11,
Dm,r = 0.11, Dy,r = 0.02, Dm,g = 1.05, Dy,g = 0.08, Dm,b = 0.53, Dy,b = 0.94,
for computing the coefficients of the matrices. Using Eqs. (15.13), (15.14), and (15.15), we compute the density ratios and build matrix M α from Eq. (15.19). Matrix M α is inverted to matrix M β using Eq. (15.20). Coefficients of the M β encoded in the floating point are used as the standard for comparison with integer implementations. The procedure for the conversion is as follows: (1) RGB inputs are converted to densities via a forward lookup table to obtain scaled integer CMY values. (2) These integers are plugged into Eq. (15.20) to compute color-corrected densities. (3) Resulting densities are used as indices to a backward lookup table for obtaining corrected RGB values.
352
Computational Color Technology
Results are compared to the floating-point computation as a means of judging the computational accuracy of the scaled approach. The error metric is the Euclidean distance between integer and floating-point values, given as follows: Error =
2 2 2 1/2 Dr,mbit − Dr,float + Dg,mbit − Dg,float + Db,mbit − Db,float . (15.32)
In this study, we use five-level RGB combinations—a total of 125 data sets. The average errors of 125 data sets are 2.8, 1.6, and 1.1 for 8-bit, 10-bit, and 12-bit representations, respectively. As expected, the average error decreases as the bit depth increases. Note that the average error of 12-bit scaling is not much bigger than the maximum round-off error of 0.87. The histograms of the error distribution are given in Fig. 15.15; the bandwidth becomes narrower and the amplitude increases as the bit depth increases. Usually, large errors occur in cases where the differences between input values are big (e.g., R = 245, G = 1, and B = 1). From this simulation, it is believed that either the 10-bit or 12-bit representation will give a good accuracy for converting reflectance to and from density.
Figure 15.15 Histograms of error distributions with respect to bit depth.
Densitometry
353
15.14 Remarks Several methods of density and device-masking are proposed. These methods are simple, yet versatile and robust. They give very good color renditions for digital images, giving vivid colors and depth in the shadow region. They can be applied to gray balance, gray-component replacement, maximum ink setting, and blue correction. Unlike colorimetric transformation, coefficients of the masking equation are adopted to the device characteristics. This transformation is already in the device intensity domain; thus, there is no need for the profile-connection space or any other conversions. The color conversion is accomplished in one transformation. Additional flexibilities can be gained by adding a set of 1D lookup tables (one for each channel) before and/or after the matrix transformation to implement the tone curves for any desired outcomes such as the linearization (proportionality), contrast enhancement, customer preference, etc. This approach provides a very simple implementation and a very low computational cost when compared to methods using regression and a 3D lookup table with interpolation. This, in turn, gives a simple color architecture and fast processing speed. There are many additional advantages, as follows: (1) The primaries are not affected; therefore, saturated colors are retained. (2) The mixed colors use less colorant than inputs because of the unwanted absorption. (3) An upper limit is placed on the three colorants at any point of the rendered image because of the unwanted absorption. (4) There is no need for color rotation to give correct blue hues. Using densitometry to reproduce an image is not a colorimetric reproduction. Even if the density is transformed or correlated to the tristimulus values, it still will not be able to handle metamers and florescence. Unlike colorimeters, a metameric pair will give different sets of density values measured by a given densitometer, and most likely will be rendered differently by a given printer. In spite of these problems, the densitometric reproduction is a good and simple color reproduction method. Giorgianni and Madden pointed out that for a reproduction system using a densitometric scanner and a printer, the densitometric reproduction that measures input dye amounts and produces those amounts on the output will be a one-to-one physical copy—what is known as a duplicate—of the input image.13 If the input and output images are viewed under identical conditions, they will visually match. For a system based on densitometric scanning of a single medium, one does not need to convert back and forth to colorimetric representations. With few transformations, the processing speed and accuracy will be high. However, relatively few systems use the same imaging medium for both input and output. Still, the densitometric input and output values of many practical systems are remarkably similar. They are at least much more similar to each other than either is to any set of CIE colorimetric values.
354
Computational Color Technology
References 1. E. J. Giorgianni and T. E. Madden, Digital Color Management, AddisonWesley, Reading, MA, pp. 447–457 (1998). 2. C. S. McCamy, Color: Theory and Imaging System, Color Densitometry, R. A. Eynard (Ed.), Soc. Photogr. Sci. Eng., Washington, D.C. (1973). 3. ANSI. 4. X-Rite densitometer. 5. M. Pearson, Modern Color-Measuring Instruments, Optical Radiation Measurements, F. Grum and C. J. Bartleson (Ed.), Vol. 2, Academic Press, New York, pp. 337–366 (1980). 6. H. R. Kang, Digital Color Halftoning, SPIE Press, Chap. 3, Densitometry, Bellingham, WA, pp. 29–41 (1999). 7. J. A. C. Yule, Principles of Color Reproduction, Wiley, New York, Chap. 8, pp. 205–232 (1967). 8. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, Chap. 3, pp. 55–63 (1997). 9. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Chap. 12, pp. 310–317 (1997). 10. H. R. Kang, Digital Color Halftoning, SPIE Press, Bellingham, WA, pp. 317– 326 (1999). 11. SWOP 1993, SWOP™ Inc., New York (1993). 12. J. A. C. Yule, Principles of Color Reproduction, Wiley, New York, p. 281 (1967). 13. E. J. Giorgianni and T. E. Madden, Digital Color Management, AddisonWesley, Reading, MA, Chap. 9, pp. 201–206 (1998).
Chapter 16
Kubelka-Munk Theory
The Kubelka-Munk (K-M) theory is based on light absorption and partial scattering. Kubelka and Munk formulated this theory to model the resultant light emerging from translucent and opaque media, assuming that there are only two light channels traveling in opposite directions. The light is being absorbed and scattered in only two directions: an upward beam J and a downward beam I , as shown in Fig. 16.1.1–3 A background is presented at the bottom of the medium to provide the upward light reflection. This chapter presents the fundamentals of the K-M theory, spectral extension, cellular extension, and a unified global theory.
Figure 16.1 Kubelka-Munk two-channel model of light absorption and scattering. 355
356
Computational Color Technology
16.1 Two-Constant Kubelka-Munk Theory The derivation of the Kubelka-Munk formula can be found in many publications.1–3 −dI (λ)/dw = −[κ(λ) ˆ + sˆ (λ)]I (λ) + sˆ (λ)J (λ),
(16.1a)
dJ (λ)/dw = −[κ(λ) ˆ + sˆ (λ)]J (λ) + sˆ (λ)I (λ),
(16.1b)
where w is the width, κ(λ) ˆ is the absorption coefficient, and sˆ (λ) is the scattering coefficient. Equation (16.1) can be expressed in matrix-vector form as
−dI (λ)/dw κ(λ) ˆ + sˆ (λ)] = dJ (λ)/dw sˆ (λ)
−ˆs (λ) −[κ(λ) ˆ + sˆ (λ)]
I (λ) . J (λ)
(16.2)
There is a general solution to this kind of matrix differential equation [Eq. (16.2)] that is given by the exponential of the matrix. Integrating Eq. (16.2) from w = 0 to w = W , we obtain the general solution as follows:
# $ κ(λ) ˆ + sˆ (λ)] −ˆs (λ) I0 (λ) I W (λ) = exp W , sˆ (λ) −[κ(λ) ˆ + sˆ (λ)] J W (λ) J0 (λ)
(16.3)
where I W (λ) and J W (λ) are the intensities of fluxes I and J at w = W , respectively, and I0 (λ) and J0 (λ) are the intensities of fluxes I and J at w = 0, respectively. The exponent of a matrix such as the one in Eq. (16.3) is defined as the sum of a power series: exp(M) =
∝
M k /k!.
(16.4)
k=0
An explicit solution can be derived by setting the body reflection P (λ) = J (λ)/I (λ), and we obtain dP (λ)/dw = d[J (λ)/I (λ)]/dw = sˆ (λ) − 2[κ(λ) ˆ + sˆ (λ)]P (λ) + sˆ (λ)P (λ)2 , dw = dP (λ)/[ˆs (λ) − 2[κ(λ) ˆ + sˆ (λ)]P (λ) + sˆ (λ)P (λ)2 ].
(16.5) (16.6)
Equation (16.6) can be integrated by setting the boundary conditions, when at background w = 0 and P (λ) = P g (λ), and at air-substrate interface w = W and p(λ) = P (λ), to give an expression of Eq. (16.7) as follows: P (λ) =
1 − P g (λ)[α(λ) − β(λ) coth(β(λ)ˆs (λ)W )] , α(λ) − P g (λ) + β(λ) coth[β(λ)ˆs (λ)W ]
(16.7)
Kubelka-Munk Theory
357
where P (λ) is the reflectance of the film and P g (λ) is the reflectance of the background. α(λ) = 1 + κ(λ)/ˆ ˆ s (λ), β(λ) = [α(λ) − 1] 2
1/2
coth[β(λ)ˆs (λ)W ] =
(16.8)
= {[κ(λ)/ˆ ˆ s (λ)] + 2[κ(λ)/ˆ ˆ s (λ)]} 2
1/2
,
(16.9)
exp[β(λ)ˆs (λ)W ] + exp[−β(λ)ˆs (λ)W ] . exp[β(λ)ˆs (λ)W ] − exp[−β(λ)ˆs (λ)W ]
(16.10)
The expression given in Eq. (16.7) is called the two-constant Kubelka-Munk equation, because the two constants, κˆ and sˆ , are determined separately. It indicates that the reflectance of a translucent film is a function of the absorption coefficient, the scattering coefficient, the film thickness, and the reflectance of the background. Equation (16.7) is the basic form of the Kubelka-Munk equation and the foundation of other variations of this basic Kubelka-Munk formula.2 To employ Eq. (16.7), one needs to know P g and W in addition to the κˆ and sˆ constants.
16.2 Single-Constant Kubelka-Munk theory One of the variations to the two-constant Kubelka-Munk equation is the singleconstant Kubelka-Munk equation. In the limiting case of an infinite thickness, the equation becomes P∝ (λ) = α(λ) − β(λ) = 1 + [κ(λ)/ˆ ˆ s (λ)] − {[κ(λ)/ˆ ˆ s (λ)]2 + 2[κ(λ)/ˆ ˆ s (λ)]}1/2 . (16.11) The single constant κ(λ)/ˆ ˆ s (λ) is the ratio of the absorption coefficient to the scattering coefficient. It can be determined by measuring ink reflectance. In practical applications, the single constant of a multicomponent system is obtained by summing ratios of all components. κ(λ)/ˆ ˆ s (λ) = κˆ w (λ)/ˆs w (λ) + cˆ1 [κˆ 1 (λ)/ˆs1 (λ)] + cˆ2 [κˆ 2 (λ)/ˆs2 (λ)] + · · · + cˆi [κˆ i (λ)/ˆsi (λ)] + · · · + cˆm [κˆ m (λ)/ˆsm (λ)],
(16.12)
where κˆ w /ˆs w = the single constant of the substrate; κˆ i /ˆsi = the single constant of the component i. cˆi = fi (ci /˚ci ),
(16.13)
where ci is the concentration of the component i in the mixture, c˚ i is the concentration of the primary colorant i at full strength without mixing with other colorants, and cˆi is the concentration ratio of the component i. Usually, a correction factor fi is included for each colorant to account for variability in the mixing and formulation processes.
358
Computational Color Technology
If we set Φ(λ) = κ(λ)/ˆ ˆ s (λ),
(16.14)
ϕ w (λ) = κˆ w (λ)/ˆs w (λ),
(16.15)
ϕi (λ) = κˆ i (λ)/ˆsi (λ).
(16.16)
then
and
We then have Φ(λ) = [ϕ w (λ) ϕ1 (λ) ϕ2 (λ) ϕ3 (λ) · · · ϕm (λ)][1 cˆ1 cˆ2 cˆ3 · · · cˆm ]T . If we sample the visible spectrum in a vector-matrix form. Φ(λ1 ) ϕ w (λ1 ) ϕ1 (λ1 ) Φ(λ2 ) ϕ w (λ2 ) ϕ1 (λ2 ) Φ(λ3 ) ϕ w (λ3 ) ϕ1 (λ3 ) Φ(λ4 ) = ϕ w (λ4 ) ϕ1 (λ4 ) ... ... ... ... ... ... Φ(λn ) ϕ w (λn ) ϕ1 (λn )
(16.17)
at a fixed interval, we can put Eq. (16.17) ϕ2 (λ1 ) ϕ2 (λ2 ) ϕ2 (λ3 ) ϕ2 (λ4 ) ... ... ϕ2 (λn )
ϕ3 (λ1 ) . . . ϕm (λ1 ) 1 ϕ3 (λ2 ) . . . ϕm (λ2 ) cˆ1 ϕ3 (λ3 ) . . . ϕm (λ3 ) cˆ2 ϕ3 (λ4 ) . . . ϕm (λ4 ) cˆ3 ... ... ... ... ... ... ... cˆm ϕ3 (λn ) . . . ϕm (λn ) (16.18a)
or
Φ1 ϕ w1 Φ2 ϕ w2 Φ3 ϕ w3 Φ4 = ϕ w4 ... ... ... ... Φn ϕwn
ϕ11 ϕ12 ϕ13 ϕ14 ... ... ϕ1n
ϕ21 ϕ22 ϕ23 ϕ24 ... ... ϕ2n
ϕ31 ϕ32 ϕ33 ϕ34 ... ... ϕ3n
. . . ϕ m1 1 . . . ϕm2 cˆ1 . . . ϕm3 cˆ2 . . . ϕm4 cˆ3 ... ... ... ... ... cˆm . . . ϕmn
(16.18b)
or Φ = ϕC,
(16.18c)
where n is the number of the sample points. For example, if the spectral range is 400–700 nm and the sampling interval is 10 nm, we have n = 31. The value m is the number of primary inks, or the number of independent columns in matrix ϕ. In practical applications, the number of primary inks m is usually three or
Kubelka-Munk Theory
359
four. In such cases, it is unlikely to satisfy all the simultaneous equations given in Eq. (16.18); some of the equations have nonzero residuals because of the limitation of the K-M theory and experimental errors. Therefore, the best way to a close approximation is the least-squares fit that minimizes the sum of the squares of the residues Φ for each equation in Eq. (16.18).4 Φ =
2 Φi − ϕwi + cˆ1 ϕ1j + cˆ2 ϕ2j + cˆ3 ϕ3j + · · · + cˆm ϕmj .
(16.19)
The summation carries from j = 1, . . . , n. Equation (16.18) can be expressed in the matrix form. Φ = (Φ − ϕC)T (Φ − ϕC).
(16.20)
This means that the partial derivatives with respect to cˆi (i = 1, . . . , n) are set to zero, resulting a new set of equations. (ϕ T ϕ)C = ϕ T Φ.
(16.21)
The explicit expressions of (ϕ T ϕ) and (ϕ T Φ) are 2 ϕwj ϕ ϕ wj 1j ϕwj ϕ2j ϕTϕ = ϕwj ϕ3j ... ... ϕwj ϕmj
ϕwj ϕ1j 2 ϕ 1j ϕ1j ϕ2j ϕ1j ϕ3j ... ... ϕ1j ϕmj
ϕwj ϕ2j
ϕ1j ϕ2j 2 ϕ 2j ϕ2j ϕ3j ... ... ϕ2j ϕmj
ϕwj ϕ3i
...
ϕ1j ϕ3i
...
ϕ2j ϕ3i 2 ϕ3j ... ... ϕ3j ϕmi
...
... ... ... ...
ϕwj ϕmj
ϕ1j ϕmj ϕ2j ϕmj , ϕ3j ϕmj ... ... 2 ϕmj (16.22)
ϕ Φ wj j ϕ1j Φj ϕ2j Φj ϕTΦ = Φ ϕ 3j j . ... ... ϕmj Φj
(16.23)
Again, the summations in Eqs. (16.22) and (16.23) carry from j = 1, . . . , n. The resulting matrix (ϕ T ϕ) has a size of (m + 1) × (m + 1) and (ϕ T Φ) is a vector of (m + 1) elements. In all cases, we can make n > m, which means that the matrix (ϕ T ϕ) is invertible. C = (ϕ T ϕ)−1 ϕ T Φ.
(16.24)
360
Computational Color Technology
16.3 Determination of the Single Constant The single constant in Eq. (16.16), ϕi (λ) = κˆ i (λ)/ˆsi (λ), is calculated from the measured reflection spectrum of a primary ink. ϕi (λ) = [1 − Pi (λ)]2 /[2Pi (λ)] i = 1, 2, 3, . . . , m.
(16.25)
In this single-constant Kubelka-Munk model, the correction for the refractive index that changes at the interface of air and a colored layer is included. A simple correction is to subtract the surface reflectance r s from the measured reflectance, Pi (λ). P∝,i (λ) = Pi (λ) − r s .
(16.26)
The first surface reflectance is a physical phenomenon of the change in the reflection index between the media; it is not dependent on the colorant absorption characteristics. Therefore, it is not a colorant-dependent parameter. Another frequently used approach is Saunderson’s correction, as follows:5 P∝,i (λ) = [Pi (λ) − f s ]/[1 − f s − f r + f r Pi (λ)],
(16.27)
where f s = a constant representing the surface reflection. f r = a fraction representing internal reflections. For perfectly diffuse light, the theoretical value of f r is 0.6.6 In practice, it is constrained from 0.45 to 0.6. However, in many applications, f r is treated as a variable to fit the data.
16.4 Derivation of Saunderson’s Correction Emmel and Hersch provide an interesting derivation of Saunderson’s correction using the Kubelka-Munk two-flux model.7,8 The incident flux on the external surface is partially reflected at the surface and is added to the emerging flux, where a fraction of the emerging flux is reflected back and is added to the incident flux as shown in Fig. 16.2. This model leads to the following equations: I W (λ) = (1 − f s )I (λ) + f r J W (λ),
(16.28)
J (λ) = f s I (λ) + (1 − f r )J W (λ).
(16.29)
The fluxes I W (λ) and J W (λ) are the intensities at w = W . Rearranging Eq. (16.28), we obtain I (λ) = [1/(1 − f s )]I W (λ) − [f r /(1 − f s )]J W (λ).
(16.30)
Kubelka-Munk Theory
361
Figure 16.2 Kubelka-Munk four-channel model of external and internal reflections with upward and downward fluxes on the air-ink interface. (Reprinted with permission of IS&T.)7
Substituting Eq. (16.30) into Eq. (16.29), we have J (λ) = [f s /(1 − f s )]J W (λ) + [(1 − f s − f r )/(1 − f s )]J W (λ).
(16.31)
Equations (16.30) and (16.31) are combined to give the vector-matrix form of Eq. (16.32) as
I (λ) 1/(1 − f s ) = J (λ) f s /(1 − f s )
−f r /(1 − f s ) (1 − f s − f r )/(1 − f s )
I W (λ) . J W (λ)
(16.32)
Reflectance P (λ) is the ratio of the emerging flux J (λ) to the incident flux I (λ); therefore, we derive the expression for reflectance P by using Eqs. (16.30) and (16.31). P (λ) = J (λ)/I (λ) = {[f s /(1 − f s )]I W (λ) + [(1 − f s − f r )/(1 − f s )]J W (λ)}/ {[1/(1 − f s )]I W (λ) − [f r /(1 − f s )]J W (λ)} = [f s + (1 − f s − f r )P W (λ)]/[1 − f r P W (λ)],
(16.33)
362
Computational Color Technology
where P w (λ) = J w (λ)/I w (λ) is the body reflectance at w = W ; if W →∝, then P W (λ) → P∝ (λ). P (λ) = [f s + (1 − f s − f r )P∝ (λ)]/[1 − f r P∝ (λ)].
(16.34)
By rearranging Eq. (16.34), we derive the expression for the reflectance at infinite thickness. P∝ (λ) = [P (λ) − f s ]/[1 − f s − f r + f r P (λ)].
(16.35)
Equation (16.35) is identical to Eq. (16.27) of Saunderson’s correction. The general Kubelka-Munk model with Saunderson’s correction is given by combining Eq. (16.3) with Eq. (16.32). I (λ) −f r /(1 − f s ) 1/(1 − f s ) = J (λ) f s /(1 − f s ) (1 − f s − f r )/(1 − f s ) # $ [κ(λ) ˆ + sˆ (λ)] −ˆs (λ) I0 (λ) . (16.36) × exp W J0 (λ) sˆ (λ) −[κ(λ) ˆ + sˆ (λ)] The matrices in Eq. (16.36) can be combined together to give a compact expression of Eq. (16.37). α´ ε´ I (λ) I0 (λ) = . (16.37) J (λ) J0 (λ) o´ υ´ Equation (16.37), together with the boundary condition of J0 (λ) = P g I0 (λ), can be used to calculate the reflectance. P (λ) = J (λ)/I (λ) = (α´ + ε´ P g )/(o´ + υP ´ g ).
(16.38)
Equation (16.38) is used to compute the reflection spectrum of a translucent medium with light-absorbing and light-scattering properties.
16.5 Generalized Kubelka-Munk Model Emmel and Hersch developed a generalized model based on the Kubelka-Munk theory.7,8 They consider two types of regions: inked and noninked, and assume that the exchange of photons between surface elements takes place only in the substrate because the ink layer is very thin (about 10 µm). The model uses two levels of ink intensities, where each ink level consists of two light fluxes of the Kubelka-Munk up-and-down type. Expanding Eq. (16.2) to two ink levels, we have I0 (w) −ˆs0 0 0 κˆ 0 + sˆ0 I0 (w) d J0 (w) sˆ0 −(κˆ 0 + sˆ0 ) 0 0 J0 (w) = sˆ1 0 0 κˆ 1 + sˆ1 I1 (w) dw I1 (w) 0 0 sˆ1 −(κˆ 1 + sˆ1 ) J1 (w) J1 (w)
Kubelka-Munk Theory
363
I0 (w) J (w) = M KS 0 . I1 (w) J1 (w)
(16.39)
The parameters κˆ 0 , sˆ0 , κˆ 1 , and sˆ1 are the absorption and scattering constants of the noninked and inked substrates, respectively. By integrating Eq. (16.39) from w = 0 to w = W , we obtain
I 0,W I 0,0 J 0,W J 0,0 = exp(M KS W ) . I 1,W I 1,0 J 1,W J 1,0
(16.40)
At this point, they include Saunderson’s correction to account for the multiple internal reflections. I0 J0 I1 J1 1/(1 − f s )
−f r /(1 − f s )
f /(1 − f s ) (1 − f s − f r )/(1 − f s ) = s 0 0
0
0
I 0,W I 0,W J J × 0,W = M SC 0,W . I 1,W I 1,W J 1,W J 1,W
0 0 1/(1 − f s ) f s /(1 − f s )
0 0 −f r /(1 − f s ) (1 − f s − f r )/(1 − f s )
(16.41)
Substituting Eq. (16.40) into Eq. (16.41), we obtain
I0 I 0,0 J0 J 0,0 = M SC exp(M KS W ) . I1 I 1,0 J1 J 1,0
(16.42)
This generalized Kubelka-Munk model is based on the assumption that the exchange of photons occurs only in the substrate; therefore, light-scattering occurs at the boundary of w = 0. This implies that the emerging fluxes J0 and J1 depend on the incident fluxes I0 and I1 , and the background reflection P g ; Eq. (16.43) gives the relationships for representing the emerging fluxes in terms of the incident fluxes. J 0,0 δ 0,0 δ 0,1 Pg 0 I 0,0 = . (16.43) J 1,0 δ 1,0 δ 1,1 I 1,0 0 Pg
364
Computational Color Technology
Coefficients δp,q represent the overall probability of a photon entering through a surface element with ink level q and emerging from a surface element with ink level p. The row sums of the probability coefficients are equal to 1. The expression for all four light fluxes is 1 I0 I1 0 = 0 J0 J1 0
0 1 0 0
0 0 δ 0,0 δ 1,0
0 1 0 0 P
δ 0,1 δ 1,1
g
0
0 1 I 0,0 . 0 I 1,0 Pg
(16.44)
We can substitute Eq. (16.44) into Eq. (16.42) to derive the equation for computing the emerging fluxes from the incident fluxes. However, the sequences of elements in the left-hand-side vectors of Eq. (16.42) and Eq. (16.44) do not match, so we need to rearrange the vectors to get the resulting expression of Eq. (16.45). 1 I0 I1 0 = 0 J0 0 J1
0 0 1 0 1 0 × 0 0
0 1 0 0 0 1 0 0
0 1 0 0 0 0 0 1 M SC exp(M KS W ) 0 0 1 0 1 0 0 0 1 0 0 0 1 I 0,0 0 0 0 . Pg 0 δ 0,0 δ 0,1 I 1,0 δ 1,0 δ 1,1 0 Pg
0 −1 0 0 1 (16.45)
The bi-level 4 × 4 matrix located in front of matrix M SC and its inverse are used to rearrange the row sequence of matrix M SC and M KS , respectively, for meeting the sequence of the left-hand-side vector. Equation (16.45) gives a 4 × 2 matrix for the product of the right-hand-side matrices, excluding the last vector [I 0,0 , I 1,0 ]. This matrix can be split into two 2×2 matrices; the first matrix relates the incident fluxes [I0 , I1 ] to [I 0,0 , I 1,0 ], and the second matrix relates the emerging fluxes [J0 , J1 ] to [I 0,0 , I 1,0 ]. We can multiply the second matrix by the inverse of the first matrix to obtain the relationship between the emerging fluxes and incident fluxes because the reflectance is the ratio of the emerging flux to the incident flux. Next, Emmel and Hersch apply the halftone area coverage to compute the reflectance. Let a1 be the fraction of area covered by ink; then, a0 = 1 − a1 is the fraction of the area without ink, such that the total emerging flux is the sum of each emerging flux J0 or J1 , weighted by its area coverage. Similarly, the total incident flux is the sum of each incident flux I0 or I1 , weighted by its area coverage. The resulting reflectance is the ratio of the total emerging flux to the total incident flux as given in Eq. (16.46). P = (a0 J0 + a1 J1 )/(a0 I0 + a1 I1 ).
(16.46)
Kubelka-Munk Theory
365
Because the incident light has the same intensity on the inked and noninked areas, I0 = I1 = I , Eq. (16.46) becomes P = [(1 − a0 )J0 + a1 J1 ]/I.
(16.47)
The emerging fluxes J0 and J1 and the incident flux I in Eq. (16.47) are given by Eq. (16.45). Equation (16.47) reduces to Clapper-Yule equation (see Chapter 18) by setting δ 0,0 = δ 1,0 = a0 = 1 − a1 , δ 0,1 = δ 1,1 = a1 , and sˆ0 = sˆ1 = κˆ 0 = 0. If we set δj,j = 1, δi,j = 0, and sˆ0 = sˆ1 = κˆ 0 = f s = f r = 0, Eq. (16.47) reduces to the Murray-Davies equation.7,8 It is amusing that such a simple four-flux Kubelka-Munk model has such a rich content, providing a unified global theory for interpreting various color-mixing models. Using this model together with a high-resolution halftone dot profile and a simple ink-spreading model, Emmel and Hersch obtained good results on two printers (HP and Epson) with two very different halftone dots, yet the average color difference is in the neighborhood of 2 Eab and the maximum is about 5 Eab .7
16.6 Cellular Extension of the Kubelka-Munk Model Up to now, we have discussed the Kubelka-Munk model and its spectral extension. In most cases, the parameters are derived from the solid-color patches of the primary colors. No intermediate levels are used in the model. One form of extension to the Kubelka-Munk model is to include a few intermediate levels. The addition of these intermediate samples is equivalent to partitioning the CMY space into rectangular cells and employing the Kubelka-Munk equation within each cell.9 Using only the bi-level dot area, either all or none, for a three-colorant system, we have 23 = 8 known sample points in the model. For a four-colorant system, we have 24 = 16 known points. If one intermediate point is added, we have 34 = 81 known points. In principle, the intermediate points can be increased to any number; however, there is a practical limitation in view of the complexity and storage cost. Once the number of levels in the primary axis is set, the Kubelka-Munk equation is used in a smaller subcell, rather than the entire color space. It is not required that the same cellular division occurs along each of the three colorant axes; the cellular division can lie on a noncubic (but rectangular) lattice.10
16.7 Applications There are numerous applications of the Kubelka-Munk theory. The K-M theory is widely used in the plastic,5 paint,11,12 paper, printing,13 and textile14–16 industries. McGinnis used the single-constant K-M model together with the leastsquares technique for determining color dye quantities in printing cotton textiles.4 He demonstrated that the least-squares technique is capable of selecting the original dyes used in formulating the standards and calculating the concentrations for each dye in order to give good spectral color matching. The theory has also been
366
Computational Color Technology
used for computer color matching,17 estimation of the color gamut of ink-jet inks in printing,18–22 ink formulation,22 ink-jet design modeling,23 dye-diffusion thermaltransfer printer calibration,24 and modeling the paper spread function.25 16.7.1 Applications to multispectral imaging Imai and colleagues have applied the single-constant K-M theory to reconstruct the spectra obtained from a trichromatic digital camera (IBM PRO3000 with 3072 × 4096 pixels and 12 bits per channel) that is equipped with a color-filtration mechanism to give multiple sets of biased trichromatic signals.26 They used a Kodak Wratten light-blue filter #38 for obtaining a set of biased trichromatic signals, which were coupled with the trichromatic signals without filters, to have a total of six channels. Using principal component analysis with basis vectors in the K-M space, they performed spectrum reconstruction of ColorChecker and a set of 105 painted patches. First, the device value g d (or digital count) from a digital camera was transformed to g KM in the K-M space via a simple nonlinear transformation. g KM = 1/(2g d ) + g d /2 − 1.
(16.48)
The simulation showed that this nonlinear transform improved the accuracy of the spectral estimation. Results indicated that spectral reconstruction in the K-M space was slightly worse than the reflectance space. For six-channel data, the average color differences for ColorChecker and painted color set were 0.8 Eab and 0.5 Eab , respectively, and the corresponding spectrum root-mean-square errors were 0.039 and 0.022. These results are considered very good for spectrum reconstruction. In fact, this innovative application will have a place in printing applications.
References 1. P. Kubelka, New contributions to the optics of intensely light-scattering materials, Part I, J. Opt. Soc. Am. 38, pp. 448–457 (1948). 2. D. B. Judd and G. Wyszecki, Color in Business, Science, and Industry, 3rd Edition, Wiley, New York, Chap. 3, pp. 397–461 (1975). 3. E. Allen, Colorant formulation and shading, Optical Radiation Measurements, Vol. 2, F. Grum and C. J. Bartleson (Eds.), Academic Press, New York, Chap. 7, pp. 305–315 (1980). 4. P. H. McGinnis, Jr., Spectrophotometric color matching with the least square technique, Color Eng. 5, pp. 22–27 (1967). 5. J. L. Saunderson, Calculation of the color of pigmented plastics, J. Opt. Soc. Am. 32, pp. 727–736 (1942). 6. J. A. C. Yule, Principles of Color Reproduction, Wiley, New York, Chap. 8, p. 205 (1967).
Kubelka-Munk Theory
367
7. P. Emmel and R. D. Hersch, A unified model for color prediction of halftoned prints, J. Imaging Sci. Techn. 44, pp. 351–359 (2000). 8. P. Emmel, Physical methods for color prediction, Digital Color Imaging Handbook, G. Sharma (Ed.), CRC Press, Boca Raton, FL, pp. 173–237 (2003). 9. K. J. Heuberger, Z. M. Jing, and S. Persiev, Color transformation and lookup tables, 1992 TAGA/ISCC Proc., Sewickley, PA, Vol. 2, pp. 863–881. 10. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, pp. 85–95 (1996). 11. F. W. Billmayer, Jr. and R. L. Abrams, Predicting reflectance and color of paint films by Kubelka-Munk Analysis II: Performance tests, J. Paint Tech. 45(579), pp. 31–38 (1973). 12. E. L. Cairns, D. A. Holtzen, and D. L. Spooner, Determining absorption and scattering constants for pigments, Color Res. Appl. 1, pp. 174–180 (1976). 13. E. Allen, Calculations for colorant formulations, Adv. Chem. Series 107, pp. 87–94 (1971). 14. R. E. Derby, Colorant formulation and color control in the textile industry, Adv. Chem. Series 107, p. 95 (1971). 15. D. A. Burlone, Formulation of blends of precolored nylon fiber, Color Res. Appl. 8, pp. 114–120 (1983). 16. D. A. Burlone, Theoretical and practical aspects of selected fiber-blend colorformulation functions, Color Res. Appl. 9, pp. 213–219 (1984). 17. H. R. Davidson and H. Hemendinger, Color prediction using the two-constant turbid-media theory, J. Opt. Soc. Am. 56, pp. 1102–1109 (1966). 18. P. Engeldrum and L. Carreira, Determination of the color gamut of dye coated paper layers using Kubelka-Munk theory, Soc. of Photo. Sci. and Eng. Annual Conf., pp. 3–5 (1984). 19. P. G. Engeldrum, Computing color gamuts of ink-jet printing systems, SID Int. Symp. Digest of Tech. Papers, Society for Information Display, San Jose, CA, pp. 385–388 (1985). 20. H. R. Kang, Kubelka-Munk modeling of ink jet ink mixing, J. Imaging Sci. Techn. 17, pp. 76–83 (1991). 21. H. R. Kang, Comparisons of color mixing theories for use in electronic printing, 1st IS&T/SID Color Imaging Conf.: Transforms and Transportablity of Color, pp. 78–82 (1993). 22. H. R. Kang, Applications of color mixing models to electronic printing, J. Electron. Imag. 3, pp. 276–287 (1994). 23. K. H. Parton and R. S. Berns, Color modeling of ink-jet ink on paper using Kubelka-Munk theory, Proc. of 7th Int. Congress on Advance in Nonimpact Printing Technology, IS&T, Springfield, VA, pp. 271–280 (1992). 24. R. S. Berns, Spectral modeling of a dye diffusion thermal transfer printer, J. Electron. Imag. 2, pp. 359–370 (1993). 25. P. G. Engeldrum and B. Pridham, Application of turbid medium theory to paper spread function measurements, Proc. TAGA, Sewickley, PA, pp. 339–352 (1995).
368
Computational Color Technology
26. F. H. Imai, R. S. Berns, and D.-Y. Tzeng, A comparative analysis of spectral reflectance estimated in various spaces using a trichromatic camera system, J. Imaging Sci. Techn. 44, pp. 280–287 (2000).
Chapter 17
Light-Reflection Model The Neugebauer equation is perhaps is best-known light-reflection model developed to interpret the light-reflection phenomenon of the halftone printing process. It is solely based on the light-reflection process with no concern for any absorption or transmission. Thus, it is a rather simple and incomplete description of the light and colorant interactions. However, it has been widely used in printing applications, such as color mixing and color gamut prediction, with various degrees of success.1 In mixing three subtractive primaries, Neugebauer recognized that there are eight dominant colors, namely, white, cyan, magenta, yellow, red, green, blue, and black for constituting any color halftone print. A given color is perceived as the integration of these eight Neugebauer dominant colors. The incident light reflected by one of the eight colors is equal to the reflectance of that color multiplied by its area coverage. The total reflectance is the sum of all eight colors weighted by the corresponding area coverage.2,3 Therefore, the Neugebauer equation is based on broadband additive color mixing of the reflected light.
17.1 Three-Primary Neugebauer Equations A general expression of the three-primary Neugebauer equation is P3 = Aw P w + Ac P c + Am P m + Ay P y + Acm P cm + Acy P cy + Amy P my + Acmy P cmy ,
(17.1)
where P3 represents a total reflectance from one of the broadband RGB colors by mixing three CMY primaries, and P w , P c , P m , P y , P cm , P cy , P my , and P cmy are the reflectance of paper, cyan, magenta, yellow, cyan-magenta overlap, cyanyellow overlap, magenta-yellow overlap, and three-primary overlap measured with a given additive primary light. The parameters Aw , Ac , Am , Ay , Acm , Acy , Amy , and Acmy are the area coverage by paper, cyan, magenta, yellow, cyan-magenta overlap, cyan-yellow overlap, magenta-yellow overlap, and three-primary overlap, respectively. For a complete description of the RGB outputs, we have P3 (R) = Aw P w (R) + Ac P c (R) + Am P m (R) + Ay P y (R) + Acm P cm (R) + Acy P cy (R) + Amy P my (R) + Acmy P cmy (R), 369
370
Computational Color Technology
P3 (G) = Aw P w (G) + Ac P c (G) + Am P m (G) + Ay P y (G) + Acm P cm (G) + Acy P cy (G) + Amy P my (G) + Acmy P cmy (G), P3 (B) = Aw P w (B) + Ac P c (B) + Am P m (B) + Ay P y (B) + Acm P cm (B) + Acy P cy (B) + Amy P my (B) + Acmy P cmy (B).
(17.2)
Equation (17.2) can be expressed in vector-matrix notation. P 3 = P 3N A3N .
(17.3)
Vector P 3 consists of the three elements of the RGB primary components. P 3 = [P3 (R) P3 (G) P3 (B)]T .
(17.4)
P 3N is a 3 × 8 matrix containing the RGB components of the eight Neugebauer dominant colors P 3N =
P w (R) P w (G) P w (B)
P c (R) P c (G) P c (B)
P m (R) P m (G) P m (B)
P y (R) P y (G) P y (B)
P cm (R) P cm (G) P cm (B)
P cy (R) P cy (G) P cy (B)
P my (R) P my (G) P my (B)
P cmy (R) P cmy (G) , P cmy (B)
(17.5) and A3N is a vector of the eight corresponding area coverages. A3N = [Aw Ac Am Ay Acm Acy Amy Acmy ]T .
(17.6)
17.2 Demichel Dot-Overlap Model Neugebauer employed Demichel’s dot-overlap model for the area of each dominant color.3 They are computed from the halftone dot areas of the three primaries a c , a m , and a y for cyan, magenta, and yellow, respectively.3,4 Aw = (1 − a c )(1 − a m )(1 − a y ), Ac = a c (1 − a m )(1 − a y ), Am = a m (1 − a c )(1 − a y ), Ay = a y (1 − a c )(1 − a m ), Acm = a c a m (1 − a y ), Acy = a c a y (1 − a m ), Amy = a m a y (1 − a c ), Acmy = a c a m a y .
(17.7)
Light-Reflection Model
371
By expanding each Demichel’s area coverage in terms of the primary ink coverages, we can express Demichel’s dot-overlap model in the vector-space form. Aw 1 −1 −1 Ac 0 1 0 1 Am 0 0 0 Ay 0 0 = A 0 0 0 cm 0 Acy 0 0 A 0 0 0 my Acmy 0 0 0
−1 0 0 1 0 0 0 0
1 −1 −1 0 1 0 0 0
1 −1 0 −1 0 1 0 0
1 0 −1 −1 0 0 1 0
−1 1 1 ac 1 am 1 ay , (17.8a) −1 a c a m −1 a c a y −1 a m a y acamay 1
or A3N = ζ 3N a 3N .
(17.8b)
Matrix ζ 3N is an 8 × 8 binary matrix with values of zero below the diagonal line, vector A3N is given in Eq. (17.6), and vector a 3N = [1, a c , a m , a y , a c a m , a c a y , a m a y , a c a m a y ]T . Equation (17.3) becomes P 3 = P 3N ζ 3N a 3N .
(17.9)
17.3 Simplifications Neugebauer’s model provides a general description of halftone color mixing, predicting the resulting red, green, and blue reflectances or tristimulus values from a given set of primary dot areas in the print. In practical applications, one wants the cmy (or cmyk) dot areas for producing the desired RGB or XYZ values. Dot areas of individual inks are obtained by solving the inverted Neugebauer equations. The inversion is not trivial because the Neugebauer equations are nonlinear. The exact analytical solutions to the Neugebauer equations have not yet been solved, although numerical solutions by computer have been reported.5,6 Pollak has worked out a partial solution by making assumptions and approximations.7–9 The primary assumption was that the solid densities were additive. Based on this assumption, the reflectance of a mixture is equal to the product of its components. Thus, P cmy (R) = P c (R)P m (R)P y (R), P cmy (G) = P c (G)P m (G)P y (G), P cmy (B) = P c (B)P m (B)P y (B).
(17.10)
By substituting Eq. (17.10) into Eq. (17.5) and by taking the reflectance of the white area as 1, such that P w (R) = P w (G) = P w (B) = 1, Eq. (17.5) becomes
372
Computational Color Technology
P 3N = 1 1 1
P c (R) P m (R) P y (R) P c (R)P m (R) P c (R)P y (R) P m (R)P y (R) P c (R)P m (R)P y (R) P c (G) P m (G) P y (G) P c (G)P m (G) P c (G)P y (G) P m (G)P y (G) P c (G)P m (G)P y (G) P c (B) P m (B) P y (B) P c (B)P m (B) P c (B)P y (B) P m (B)P y (B) P c (B)P m (B)P y (B)
,
(17.11) and the Neugebauer equation of (17.9) becomes P 3 = P 3N ζ 3N a 3N .
(17.12)
Pollak then made further approximations that magenta ink is completely transparent to red light and that yellow ink is transparent to red and green light, such that P m (R) = P y (R) = P y (G) = 1. In the real world, the yellow approximation is almost true because many yellow dyes exhibit a near-ideal spectrum with a sharp transition around 500 nm. The magenta approximation, however, is questionable because most magenta colorants have substantial absorption in the red and blue regions. Nonetheless, these approximations simplify the Neugebauer equations and make them analytically solvable. Equation (17.11) becomes P 3N =
1 P c (R) 1 1 P c (G) P m (G) 1 P c (B) P m (B)
1 1 P y (B)
P c (R) P c (G)P m (G) P c (B)P m (B)
P c (R) P c (G) P c (B)P y (B)
1 P c (R) P m (G) P c (G)P m (G) P m (B)P y (B) P c (B)P m (B)P y (B)
,
(17.13) and P 3 = P 3N ζ 3N a 3N .
(17.14)
The matrices and vector on the right-hand side of Eq. (17.14) are multiplied to give the following simplified expressions: P3 (R) = [1 − a c + a c P c (R)],
(17.15a)
P3 (G) = [1 − a c + a c P c (G)][1 − a m + a m P m (G)],
(17.15b)
P3 (B) = [1 − a c + a c P c (B)] × [1 − a m + a m P m (B)][1 − a y + a y P y (B)].
(17.15c)
Equation (17.15) can be solved for a c , a m , and a y to give a rather involved masking procedure.10
Light-Reflection Model
373
17.4 Four-Primary Neugebauer Equation The three-primary expression of Eq. (17.1) can readily be expanded to four primaries by employing the four-primary fractional-area expressions given by Hardy and Wurzburg.11 P4 = A´ w P w + A´ c P c + A´ m P m + A´ y P y + A´ cm P cm + A´ cy P cy + A´ my P my + A´ cmy P cmy + A´ k P k + A´ ck P ck + A´ mk P mk + A´ yk P yk + A´ cmk P cmk + A´ cyk P cyk + A´ myk P myk + A´ cmyk P cmyk .
(17.16)
Like the three-primary Neugebauer equations of (17.3), Eq. (17.16) can be expressed in vector-matrix notation. P 4 = P 4N A4N .
(17.17)
Vector P 4 consists of the three elements of the broadband RGB components from mixing four CMYK primaries. P 4 = [P4 (R) P4 (G) P4 (B)]T .
(17.18)
P 4N is a 3 × 16 matrix containing RGB components of 16 Neugebauer dominant colors. P 4N =
P w (R) P c (R) P m (R) P y (R) P k (R) P cm (R) P cy (R) P w (G) P c (G) P m (G) P y (G) P k (G) P cm (G) P cy (G) P w (B) P c (B) P m (B) P y (B) P k (B) P cm (B) P cy (B) P my (R) P mk (R) P yk (R) P cmy (R) P cmk (R) P cyk (R) P my (G) P mk (G) P yk (G) P cmy (G) P cmk (G) P cyk (G) P my (B) P mk (B) P yk (B) P cmy (B) P cmk (B) P cyk (B)
P ck (R) P ck (G) P ck (B) P myk (R) P cmyk (R) P myk (G) P cmyk (G) P myk (B) P cmyk (B)
.
(17.19) A4N is a vector of sixteen area coverages.
A4N = A´ w A´ c A´ m A´ y A´ k A´ cm A´ cy A´ ck A´ my A´ mk A´ yk A´ cmy A´ cmk A´ cyk A´ myk A´ cmyk T , (17.20) where A´ w = (1 − a c )(1 − a m )(1 − a y )(1 − a k ) = 1 − ac − am − ay − ak + acam + acay + acak + amay + amak + ayak − acamay − acamak − acayak − amayak + acamayak, A´ c = a c (1 − a m )(1 − a y )(1 − a k ) = ac − acam − acay − acak + acamay + acamak + acayak − acamayak,
374
Computational Color Technology
A´ m = a m (1 − a c )(1 − a y )(1 − a k ) = am − acam − amay − amak + acamay + acamak + amayak − acamayak, A´ y = a y (1 − a c )(1 − a m )(1 − a k ) = ay − acay − amay − ayak + acamay + acayak + amayak − acamayak, A´ k = a k (1 − a c )(1 − a m )(1 − a y ) = ak − acak − amak − ayak + acamak + acayak + amayak − acamayak, A´ cm = a c a m (1 − a y )(1 − a k ) = a c a m − a c a m a y − a c a m a k + a c a m a y a k , A´ cy = a c a y (1 − a m )(1 − a k ) = a c a y − a c a m a y − a c a y a k + a c a m a y a k , A´ ck = a c a k (1 − a m )(1 − a y ) = a c a k − a c a m a k − a c a y a k + a c a m a y a k , A´ my = a m a y (1 − a c )(1 − a k ) = a m a y − a c a m a y − a m a y a k + a c a m a y a k , A´ mk = a m a k (1 − a c )(1 − a y ) = a m a k − a c a m a k − a m a y a k + a c a m a y a k , A´ yk = a y a k (1 − a c )(1 − a m ) = a y a k − a c a y a k − a m a y a k + a c a m a y a k , A´ cmy = a c a m a y (1 − a k ) = a c a m a y − a c a m a y a k , A´ cmk = a c a m a k (1 − a y ) = a c a m a k − a c a m a y a k , A´ cyk = a c a y a k (1 − a m ) = a c a y a k − a c a m a y a k , A´ myk = a m a y a k (1 − a c ) = a m a y a k − a c a m a y a k , A´ cmyk = a c a m a y a k .
(17.21)
Again, the four-color area coverages can be expressed in matrix form.
A´ w A´ c A´ m A´ y
A´ k ´ Acm A´ cy A´ ck ´ Amy ´ Amk A´ yk A´ cmy A´ cmk ´ Acyk ´
Amyk A´ cmyk
1 0 0 0 0 0 0 0 = 0 0 0 0 0 0 0 0
−1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
−1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
−1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
−1 1 0 −1 0 −1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 −1 −1 0 0 0 −1 −1 0 −1 0 −1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 0 0 −1 0 0 −1 −1 −1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0
−1 −1 −1 −1 1 1 1 1 0 −1 1 1 0 1 −1 1 0 1 1 −1 0 1 1 1 −1 −1 −1 0 0 1 −1 0 −1 0 1 0 −1 −1 0 1 −1 0 0 −1 1 0 −1 0 −1 1 0 0 −1 −1 1 1 0 0 0 −1 0 1 0 0 −1 0 0 1 0 −1 0 0 0 1 −1 0 0 0 0 1
Light-Reflection Model
375
1 ac am ay ak aa c m ac ay aa × a c ak , m y am ak aa y k ac am ay ac am ak ac ay ak am ay ak ac am ay ak
(17.22a)
or A4N = ζ 4N a 4N ,
(17.22b)
where ζ 4N is a 16 × 16 binary matrix with values of zero below the diagonal line, and a 4N is a vector of 16 elements given in the last column of Eq. (17.22a). Substituting Eq. (17.22b) into Eq. (17.17), we have P 4 = P 4N ζ 4N a 4N .
(17.23)
For four-primary systems, the analytic inversion is even more formidable because there are four unknowns (a c , a m , a y , and a k ) and only three measurable quantities (either RGB or XYZ). The practical approach is to put a constraint on the black ink, then seek solutions in cmy that combine with the black to produce a target color. Because of this approach, the Neugebauer equations are closely related to gray-component replacement.12 There were other attempts to modify the Neugebauer equation, such as the spectral extension13 and the use of the geometric dot-overlap model,14,15 instead of Demichel’s probability overlap model.
17.5 Cellular Extension of the Neugebauer Equations Neugebauer equations use a set of eight dominant colors obtained from all combinations of 0% and 100% primary colorants to cover the whole color space. For a four-colorant system, we have 24 = 16 known sample points in the model. To improve the accuracy of the model, we can add intermediate levels to increase the number of sample points. If one intermediate point, say 50%, is added, we will have 34 = 81 known sample points. The addition of these intermediate samples is equivalent to partitioning the cmy space into rectangular cells and employing the Neugebauer equations within each smaller cell instead of the entire CMY color space. Hence, this model is referred to as the cellular Neugebauer model.16 It is
376
Computational Color Technology
not required that the same cellular division occurs along each of the three colorant axes; the cellular division can lie on a noncubic (but rectangular) lattice.
17.6 Spectral Extension of the Neugebauer Equations Unlike ideal colorants, real color inks do not have constant reflectance values across two-thirds of the whole visible spectrum; therefore, it has been argued that the broadband reflectance measurements are inappropriate for a Neugebauer model of a color printer. If one replaces the broadband light of each Neugebauer dominant color with its narrow spectral reflectance P (λ), centered at a wavelength λ, one obtains the spectral Neugebauer equation.15,17,18 An example of the three-primary spectral Neugebauer equations is given in Eq. (17.24); a similar equation can be obtained for the four-primary equation by converting Eq. (17.16) as a function of wavelength. P (λ) = Aw P w (λ) + Ac P c (λ) + Am P m (λ) + Ay P y (λ) + Acm P cm (λ) + Acy P cy (λ) + Amy P my (λ) + Acmy P cmy (λ).
(17.24)
When expressed in the vector-space form, we have p(λ )
pw (λ
1
p(λ ) p(λ23 ) p(λ4 ) p(λ5 ) p(λ6 ) p(λ7 ) p(λ ) 8 p(λ9 ) ... ... ... p(λn )
=
1) p w (λ2 ) pw (λ3 ) pw (λ4 ) pw (λ5 ) pw (λ6 ) pw (λ7 ) p (λ ) w 8 pw (λ9 ) ... ... ... pw (λn )
pc (λ1 ) pc (λ2 ) pc (λ3 ) pc (λ4 ) pc (λ5 ) pc (λ6 ) pc (λ7 ) pc (λ8 ) pc (λ9 ) ... ... ... P c (λn )
pm (λ1 ) pm (λ2 ) pm (λ3 ) pm (λ4 ) pm (λ5 ) pm (λ6 ) pm (λ7 ) pm (λ8 ) pm (λ9 ) ... ... ... P m (λn )
py (λ1 ) pcm (λ1 ) py (λ2 ) pcm (λ2 ) py (λ3 ) pcm (λ3 ) py (λ4 ) pcm (λ4 ) py (λ5 ) pcm (λ5 ) py (λ6 ) pcm (λ6 ) py (λ7 ) pcm (λ7 ) py (λ8 ) pcm (λ8 ) py (λ9 ) pcm (λ9 ) ... ... ... ... ... ... P y (λn ) P cm (λn )
pcy (λ1 ) pcy (λ2 ) pcy (λ3 ) pcy (λ4 ) pcy (λ5 ) pcy (λ6 ) pcy (λ7 ) pcy (λ8 ) pcy (λ9 ) ... ... ... P cy (λn )
Aw AAmc y × AAcm , Acy Amy Acmy
pmy (λ1 ) pmy (λ2 ) pmy (λ3 ) pmy (λ4 ) pmy (λ5 ) pmy (λ6 ) pmy (λ7 ) pmy (λ8 ) pmy (λ9 ) ... ... ... P my (λn )
pcmy (λ1 ) pcmy (λ2 ) pcmy (λ3 ) pcmy (λ4 ) pcmy (λ5 ) pcmy (λ6 ) pcmy (λ7 ) pcmy (λ8 ) pcmy (λ9 ) ... ... ... P cmy (λn )
(17.25a)
or P = P 3λ A3N = P 3λ ζ 3N a 3N .
(17.25b)
Vector P has n elements, where n is the number of sampled points in the visible range. The spectral extension of the Neugebauer equation is no longer restricted to three broadband RGB ranges. For the three-primary Neugebauer equation, matrix
Light-Reflection Model
377
P 3λ has a size of n × 8 with eight columns for representing the sampled spectra of eight dominant colors, vector A3N has a size of 8 × 1, matrix ζ 3N has a size of 8 × 8, and vector a 3N has 8 elements, the same as those given in Eq. (17.8a). The spectral Neugebauer equation (17.25) can be solved if matrix P 3λ is invertible. The criterion for the matrix inversion is that P 3λ is not singular, which means that the eight column vectors must be independent from one another. The component vectors of the Neugebauer dominant colors contain spectra of the two-color and three-color mixtures, which are closely related to the spectra of primaries. Thus, their independencies are in question. The additivity failure discussed in Section 15.5 may give us some comfort that the component colors do not add up to the mixture. If additivity holds, then P cmy (λ) = P c (λ)P m (λ)P y (λ).
(17.26)
Figure 17.1 shows the comparison of the measured blue spectrum (made from the overlay of the cyan and magenta colorants) with the product of the cyan and magenta spectra (computed blue spectrum). Similar comparisons for cyan-yellow, magenta-yellow, and cyan-magenta-yellow mixtures are given in Figs. 17.2, 17.3, and 17.4, respectively. As shown in these figures, the computed spectrum is smaller than the measured spectrum, but the shapes, in general, are similar.
Figure 17.1 Comparison of the measured and computed blue spectra.
378
Computational Color Technology
Figure 17.2 Comparison of the measured and computed green spectra.
If Eq. (17.26) holds, the plot of the ratios, r cm , r cy , r my , and r cmy defined in Eq. (17.28) between measured and calculated spectra should give a horizontal line as a function of wavelength. r cm = P cm (λ)/[P c (λ)P m (λ)],
(17.27a)
r cy = P cy (λ)/[P c (λ)P y (λ)],
(17.27b)
r my = P my (λ)/[P m (λ)P y (λ)],
(17.27c)
r cmy = P cmy (λ)/[P c (λ)P m (λ)P y (λ)].
(17.27d)
Figure 17.5 gives the plots of the ratios given in Eq. (17.27); they are not constant, indicating that there is no correlation between the measured and calculated spectra. These results imply that the column vectors of the Neugebauer dominant colors are indeed independent. Therefore, Eq. (17.25) can be inverted by using the pseudo-matrix transform to obtain Demichel’s area coverage A3N and primary color coverage a 3N as given in Eqs. (17.28) and (17.29), respectively. −1 A3N = P 3λ T P 3λ P 3λ T P ,
−1 a 3N = (P 3λ ζ 3N )T (P 3λ ζ 3N ) (P 3λ ζ 3N )T P .
(17.28) (17.29)
Light-Reflection Model
379
Figure 17.3 Comparison of the measured and computed red spectra.
The spatial extension can also be applied to four-primary Neugebauer equations. P = P 4λ A4N = P 4λ ζ 4N a 4N , −1 A4N = P 4λ T P 4λ P 4λ T P ,
−1 a 4N = (P 4λ ζ 4N )T (P 4λ ζ 4N ) (P 4λ ζ 3N )T P .
(17.30) (17.31) (17.32)
Matrix P 4λ has a size of n × 16 with 16 independent columns for representing the sampled spectra of 16 dominant colors, vector A4N has a size of 16 × 1, matrix ζ 4N has a size of 16 × 16, and vector a 4N has 16 elements, the same as those given in Eq. (14.22a). The spectral extension, having n data points, provides a solution to the inversion of the Neugebauer equations. It works for three- and four-primary mixing, provided that the number of elements in A3N and A4N is less than or equal to the number of samples n. This solution to the Neugebauer equation can be viewed as a variation of spectrum reconstruction. The spectra of the Neugebauer dominant colors are served as the basis vectors (or principal components), whereas the area coverage, A or a, is the weighting factor. Preliminary studies show some promising results; however, they are sensitive to experimental uncertainty. The problem is the lack of good experimental data from a stable printing device to verify this ap-
380
Computational Color Technology
Figure 17.4 Comparison of the measured and computed black spectra.
proach. Similarly, the spectral extension can also be applied to Hi-Fi color printing by considering that each Hi-Fi color is a principal component. Moreover, Eq. (17.25) can also be written as [p(λ1 ) p(λ2 ) p(λ3 ) p(λ4 ) p(λ5 ) · · · p(λn−1 ) p(λn )] = [Aw Ac Am Ay Acm Acy Amy Acmy ] pw (λ2 ) pw (λ3 ) · · · pw (λn ) pw (λ1 ) pc (λ1 ) pc (λ2 ) pc (λ3 ) ··· pc (λn ) pm (λ2 ) pm (λ3 ) · · · pm (λn ) pm (λ1 ) py (λ2 ) py (λ3 ) ··· py (λn ) p (λ ) × y 1 , (17.33a) pcm (λ3 ) · · · pcm (λn ) pcm (λ1 ) pcm (λ2 ) pcy (λ2 ) pcy (λ3 ) · · · pcy (λn ) pcy (λ1 ) p (λ ) p (λ ) p (λ ) · · · p (λ ) my 1 my 2 my 3 my n pcmy (λ1 ) P cmy (λ2 ) P cmy (λ3 ) · · · P cmy (λn ) or P T = A3N T P 3N T .
(17.33b)
Light-Reflection Model
381
Figure 17.5 Plots of the ratios of measured and calculated spectra.
Equation (17.33) can be solved to obtain the area coverage A3N by the pseudomatrix inverse. −1 A3N T = P T P 3N P 3N T P 3N .
(17.34)
For three-primary Neugebauer equations, matrix P 3N is n × 8 and the inversed product (P 3N T P 3N )−1 is 8 × 8. The result is an 8-element vector for A3N . For four-primary Neugebauer equations, we have P T = A4N T P 4N T , −1 A4N T = P T P 4N P 4N T P 4N .
(17.35) (17.36)
Matrix P 4N is n × 16 and the inverted product (P 4N T P 4N )−1 is 16 × 16. This gives a vector of 16 elements for A4N . Chen and colleagues have applied this approach on a much grander scale to the Cellular-Yule-Nielsen-Spectral-Neugebauer (CYNSN) model using a six-color (cyan, magenta, yellow, black, green, and orange) Epson Pro 5500 ink-jet printer with 64 dominant colors.19 −1 A6N T = P T P 6N P 6N T P 6N .
(17.37)
382
Computational Color Technology
First, the reflectances are modified by the Yule-Nielsen value of 1/nˇ (see Chapter 18). Second, the cellular partition expands the vector A6N of 64 elements to a matrix of 64 × m, where m is the number of color patches. For six-color printing, the number of dominant colors is 64, which is the sum of the coefficients of the (x + y)6 expansion (the first coefficient 1 indicates no color, the second coefficient 6 indicates the six individual colors, the third coefficient 15 indicates the two-color mixtures, the fourth coefficient 20 indicates the three-color mixtures, the fifth coefficient 15 indicates the four-color mixtures, the sixth coefficient 6 indicates the five-color mixtures, and the last coefficient 1 indicates the six-color mixtures). The matrix P 6N is n × 64 and P is n × m. With the optimized Yule-Nielsen value, they obtained excellent results in predicting 600 random colors. Equations (17.34), (17.36), and (17.37) can be extended to find the quantities of primary inks by substituting into Eqs. (17.8b), (17.22b), and (17.38) for threeprimary, four-primary, or six-primary Neugebauer equations, respectively. A6N = ζ 6N a 6N .
(17.38)
We obtain the following inverted Neugebauer equations: −1 a 3N T = P T (P 3N ζ 3N ) ζ 3N T P 3N T P 3N ζ 3N , −1 a 4N T = P T (P 4N ζ 4N ) ζ 4N T P 4N T P 4N ζ 4N , −1 a 6N T = P T (P 6N ζ 6N ) ζ 6N T P 6N T P 6N ζ 6N .
(17.39) (17.40) (17.41)
For three-primary Neugebauer equations, matrix ζ 3N is 8 × 8 and the product (P 3N ζ 3N ) is n × 8. The inversed matrix (ζ 3N T P 3N T P 3N ζ 3N )−1 is 8 × 8. This gives an eight-element vector for a 3N , but only the second, third, and fourth elements contain the quantities for primaries cyan, magenta, and yellow, respectively. For four-primary Neugebauer equations, matrix ζ 4N is 16 × 16 and the inverted matrix (ζ 4N T P 4N T P 4N ζ 4N )−1 is 16 × 16. This gives a 16-element vector for a 4N , but only the second, third, fourth, and fifth elements contain the quantities for primaries cyan, magenta, yellow, and black, respectively. Similarly, only the second to seventh elements in the vector a 6N of 64 elements give the amounts of cyan, magenta, yellow, black, green, and orange inks, respectively. The six-color system, in fact, is Hi-Fi printing, where the matrix P 6N contains spectra of all Hi-Fi inks— one ink spectrum per column. Giving the spectrum of the color P to be reproduced, we can determine the vector a 6N , which contains the amounts of Hi-Fi inks needed to match the input spectrum. This method is applicable to any Hi-Fi printing system with any number of Hi-Fi inks in any color combination as long as the number of spectral samples is greater than the number of inks.
References 1. Neugebauer Memorial Seminar on Color Reproduction, Proc. SPIE 1184 (1989).
Light-Reflection Model
383
2. H. E. J. Neugebauer, Die theoretischen Grundlagen des Mehrfarbendruckes, Z. wiss. Photogr. 36, pp. 73–89 (1937). 3. J. A. C. Yule, Principles of Color Reproduction, Wiley, New York, Chap. 10, p. 255 (1967). 4. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, p. 30 (1997). 5. I. Pobboravsky and M. Pearson, Computation of dot areas required to match a colorimetrically specified color using the modified, Proc. TAGA, Sewickley, PA, Vol. 24, pp. 65–77 (1972). 6. R. Holub and W. Kearsley, Color to colorant conversions in a colorimetric separation system, Proc. SPIE 1184, pp. 24–35 (1989). 7. F. Pollak, The relationship between the densities and dot size of halftone multicolor images, J. Photogr. Sci. 3, pp. 112–116 (1955). 8. F. Pollak, Masking for halftone, J. Photogr. Sci. 3, pp. 180–188 (1955). 9. F. Pollak, New thoughts on halftone color masking, Penrose Annu. 50, pp. 106–110 (1956). 10. J. A. C. Yule, Principles of Color Reproduction, Wiley, New York, pp. 371– 374 (1967). 11. A. C. Hardy and F. L. Wurzburg, Color correction in color printing, J. Opt. Soc. Am. 38, pp. 300–307 (1948). 12. C. Nakamura and K. Sayanagi, Gray component replacement by the Neugebauer equations, Proc. SPIE 1184, pp. 50–63 (1989). 13. H. R. Kang, Applications of color mixing models to electronic printing, J. Electron. Imag. 3, pp. 276–287 (1994). 14. G. L. Rogers, Neugebauer revisited: Random dots in halftone screening, Color Res. Appl. 23, pp. 104–113 (1998). 15. H. R. Kang, Digital Color Halftoning, SPIE Press, Bellingham, WA, Chap. 7, pp. 113–129 (1999). 16. K. J. Heuberger, Z. M. Jing, and S. Persiev, Color transformation and lookup table, Proc. TAGA/ISCC, Sewickley, PA, pp. 863–881 (1992). 17. J. A. Stephen Viggiano, The color of halftone tints, TAGA Proc., Sewickley, PA, pp. 647–661 (1985). 18. J. A. Stephen Viggiano, Modeling the color of multicolored halftone tints, TAGA Proc., Sewickley, PA, pp. 44–62 (1990). 19. Y. Chen, R. S. Berns, and L. A. Taplin, Six color printer characterization using an optimized cellular Yule-Nielsen spectral Neugebauer model, J. Imaging Sci. Techn. 48, pp. 519–528 (2004).
Chapter 18
Halftone Printing Models Unlike the Beer-Lambert law, which is based solely on the light-absorption process, and the Neugebauer equations, which are based solely on the lightreflection process, several models developed for halftone printing are more sophisticated because they take into consideration absorption, reflection, and transmission, as well as scattering. This chapter presents several halftone-printing models with various degrees of complexity and sophistication. Perhaps the simplest one is the Murray-Davies model, considering merely halftone dot absorptions and direct reflections. Yule and Nielsen developed a detailed model that takes the light penetration and scattering into consideration. Clapper and Yule developed a rather complete model to account for light reflection, absorption, scattering, and transmission of the halftone process. The most comprehensive model is a computer simulation model developed by Kruse and Wedin for the purpose of describing the dot gain phenomenon, which consists of the physical and optical dot gain models that consider nearly all possible light paths and interactions in order to give a thorough and accurate account of the halftone process.
18.1 Murray-Davies Equation Unlike the Neugebauer equations, which take reflectance as is, the Murray-Davies equation derives the reflectance via the absorption of halftone dots and the reflection of the substrate. Figure 18.1 depicts the Murray-Davies model of halftone printing. In a unit area, if the solid-ink reflectance is P s , then the absorption by halftone dots is (1 − P s ) weighted by the dot area coverage a. The reflectance P of a unit halftone area is the unit white reflectance subtracting the dot absorptance.1 If we take the unit white reflectance as a total reflection with a value of 1, we obtain Eq. (18.1) for the Murray-Davies equation. P = 1 − a(1 − P s ).
(18.1)
If we use the reflectance of the substrate P w as the unit white reflectance, we obtain Eq. (18.2). P = P w − a(P w − P s ). 385
(18.2)
386
Computational Color Technology
Figure 18.1 Murray-Davies model of the light and halftone dot interaction.2
Equation (18.1) is usually expressed in the density domain by using the logarithmic relationship between the density and reflectance. D = − log P .
(18.3)
Using the relationship of Eq. (18.3), the density of a solid-ink coverage is D s = − log P s
(18.4)
P s = 10−Ds .
(18.5)
or
Substituting Eq. (18.5) into Eq. (18.1), we derive an expression for the MurrayDavies equation. P = 1 − a 1 − 10−Ds .
(18.6)
By converting to density, we obtain Eq. (18.7). D = − log 1 − a 1 − 10−Ds .
(18.7)
Halftone Printing Models
387
Rearranging Eq. (18.7), we obtain yet another expression for the Murray-Davies equation. a = 1 − 10−D 1 − 10−Ds . (18.8) Equation (18.8) is a popular form of the Murray-Davies equation; it is often used to determine the area coverage of halftone prints by measuring the reflectance of halftone step wedges with respect to the solid-ink coverage. 18.1.1 Spectral extension of the Murray-Davies equation The spectral Murray-Davies equation is an extension of Eq. (18.2).2 P (λ) = P w (λ) − a[P w (λ) − P s (λ)].
(18.9)
By rearranging Eq. (18.9), we obtain P (λ) = (1 − a)P w (λ) + aP s (λ).
(18.10)
The explicit expression in the vector-matrix form is given in Eq. (18.11). P (λ1 ) P w (λ1 ) P s (λ1 )
P (λ2 ) P w (λ2 ) P s (λ2 ) ... ... (1 − a) . . . = , (18.11a) a ... ... ... P (λn ) P w (λn ) P s (λn ) or P = P 2x a 2 .
(18.11b)
P is a vector of n elements, where n represents the sampling points taken for a spectrum, P 2x is a matrix of size n×2, and a 2 is a vector of two elements. Equation (18.11b) can be inverted to obtain the area coverage a by using the pseudo-inverse transform because P 2x contains two totally independent vectors. −1 a 2 = P T2x P 2x P T2x P .
(18.12)
If we set the background reflectance of paper at 1 and the solid-ink reflectance is measured relative to the white background, Eqs. (18.10) and (18.11) become Eqs. (18.13) and (18.14), respectively. P (λ) = (1 − a) + aP s (λ), P (λ1 ) 1 P s (λ1 )
P (λ2 ) 1 P s (λ2 ) (1 − a) ... ... ... . = a ... ... ... P (λn ) 1 P s (λn )
(18.13)
(18.14)
388
Computational Color Technology
Spectral extension can also be applied to Eq. (18.8) as given in Eq. (18.15). a = 1 − 10−D(λ) 1 − 10−Ds (λ) ,
(18.15a)
10−D(λ) = 1 − a + a10−Ds (λ) .
(18.15b)
or
18.1.2 Expanded Murray-Davies model Knowing the nonlinearity between the reflectance P and area a, Arney, Engeldrum, and Zeng expanded the Murray-Davies model by considering that P s and P w are, themselves, functions of the area coverage; this was based on the observation that the histogram of reflectance values in a halftone image is dependent on the area coverage. The microdensitometric analyses of halftone prints have shown that both the paper reflectance and the dot reflectance decrease as the dot area coverage increases.3–5 They developed a model that contains two empirical parameters; one relates to the optical spread function of the paper with respect to the spatial frequency of the halftone screen, and the other relates to the distribution of the colorant within the halftone cell.6 Thus, Eq. (18.2) becomes a function that is dependent on the area coverage P = P w (a) − a[P w (a) − P s (a)],
(18.16)
where P w (a) and P s (a) are the paper and solid-ink reflectances, which are no longer constants but are functions of the area coverage. Values of P w (a) and P s (a) can be determined at the histogram peaks. This model fits well with image microstructure data from a variety of halftone printers, including offset lithography, thermal transfer, and ink-jet. Results indicate that this expanded Murray-Davies model is as good as the Yule-Nielsen model, with an adjustable exponent nˇ known as the Yule-Nielsen value (see Section 18.2 for detail).
18.2 Yule-Nielsen Model From their study of the halftone process, Yule and Nielsen pointed out that light does not emerge from the paper at the point where it entered. They estimated that between one quarter and one half of the light that enters through a white area will emerge through a colored area, and vice versa. Based on this observation, Yule and Nielsen took light penetration and scattering into consideration, and proposed a model, shown in Fig. 18.2, for deriving the halftone equation.7 Like the MurrayDavies equation, a fraction of light, a(1 − T s ), is absorbed by the ink film on its way into the substrate, where T s is the transmittance of the ink film. After passing through the ink, the remaining light, 1 − a(1 − T s ), in the substrate is scattered and reflected. It is attenuated by a factor P w when the light reaches the air-ink-paper
Halftone Printing Models
389
Figure 18.2 Yule-Nielsen model of the light, halftone dot, and substrate interactions.
interface. The light emerging from the substrate is absorbed again by the ink film; the second absorption introduces a power of two to the equation. Finally, the light is corrected by the surface reflection r s at the air-ink interface. Summing all these effects together, we obtain P = r s + P w (1 − r s )[1 − a(1 − T s )]2 .
(18.17)
Solid-ink transmittance T s can be obtained by setting a = 1 and rearranging Eq. (18.17). T s = {[P s − r s ]/[P w (1 − r s )]}1/2 ,
(18.18)
where P s is the ink reflectance of the solid-ink layer. P s and P w can be obtained experimentally. The Yule-Nielsen model is a simplified version of a complex phenomenon involving light, colorants, and substrate. For example, the model does not take into account the fact that in real systems the light is not completely diffused by the paper and is internally reflected many times within the substrate and ink film. To compensate for these deficiencies, Yule and Nielsen made the square power of the Eq. (18.17) into a variable n, ˇ known as the Yule-Nielsen value, for fitting the data. With this modification, Eq. (18.17) becomes P = r s + P w (1 − r s )[1 − a(1 − T s )]nˇ .
(18.19)
390
Computational Color Technology
The solid-ink transmittance is obtained by setting a = 1, then rearranging Eq. (18.19) to give Eq. (18.20). T s = {[P s − r s ]/[P w (1 − r s )]}1/nˇ .
(18.20)
For a paper substrate, the value of r s is usually small (<4%). Assuming that the surface reflection r s can be neglected and the reflectance is measured relative to the substrate, we can simplify Eq. (18.20) to T s = (P s /P w )1/nˇ ,
or
log T s = −D s /n, ˇ
or
T s = 10−Ds /nˇ .
(18.21)
Similarly, Eq. (18.19) is simplified to Eq. (18.22) by setting r s = 0. P /P w = [1 − a(1 − T s )]nˇ .
(18.22)
Substituting Eq. (18.21) into Eq. (18.22), we have nˇ P /P w = 1 − a 1 − 10−Ds /nˇ .
(18.23)
Converting reflectance to density, we obtain the expression in the form of the optical density D as given in Eq. (18.24). D = − log(P /P w ) = −nˇ log 1 − a 1 − 10−Ds /nˇ ,
(18.24a)
or D/nˇ = − log 1 − a 1 − 10−Ds /nˇ .
(18.24b)
Note the similarity between Eq. (18.24b) and Eq. (18.7) of the Murray-Davies equation; they only differ by a factor of 1/nˇ applied to the density values. Rearranging Eq. (18.24b), we obtain a = 1 − 10−D/nˇ 1 − 10−Ds /nˇ .
(18.25)
Like Eq. (18.8), Eq. (18.25) is often used to determine ink area coverage or dot gain. 18.2.1 Spectral extension of Yule-Nielsen model Spectral extension of the Yule-Nielsen equation is obtained by replacing the broadband color signals of the paper reflectance P w and ink transmittance T s with the corresponding spectra, P w (λ) and T s (λ), to give the resulting spectrum P (λ). With this substitution, we have P (λ) = r s + P w (λ)(1 − r s ){1 − a[1 − T s (λ)]}nˇ .
(18.26)
Halftone Printing Models
391
The surface reflectance r s at the air-ink interface may also be wavelength dependent; however, we treat it as a constant to simply the model. A simplified version is given in Eq. (18.27), which is a direct expansion of Eq. (18.24b) by neglecting the surface reflection r s and by measuring the reflectance relative to the substrate. D(λ)/nˇ = − log 1 − a 1 − 10−Ds (λ)/nˇ . (18.27) Rearranging Eq. (18.27), we have 10−D(λ)/nˇ = 1 − a + a10−Ds (λ)/nˇ .
(18.28)
By setting Pnˇ (λ) = 10−D(λ)/nˇ and Pnˇ s (λ) = 10−Ds (λ)/nˇ , Eq. (18.28) becomes Pnˇ (λ) = (1 − a) + aPnˇ s (λ). The explicit expression is given in Eq. (18.30). Pnˇ (λ1 ) 1 Pnˇ s (λ1 )
Pnˇ (λ2 ) 1 Pnˇ s (λ2 ) (1 − a) ... ... ... . = a ... ... ... Pnˇ (λn ) 1 Pnˇ s (λn )
(18.29)
(18.30)
Note the similarity between Eqs. (18.30) and (18.14); Eq. (18.30) can be inverted via a pseudo-inverse transform to obtain the area coverage a. For mixed inks, the effective transmittance T s (λ) is derived from a nonlinear combination of the primary ink transmittances measured in the solid-ink area coverage. Each solid-ink transmittance can be obtained by setting a = 1 and rearranging Eq. (18.26). T s (λ) = {[P s (λ) − r s ]/[P w (λ)(1 − r s )]}1/nˇ ,
(18.31)
where T s and P s are the ink transmittance and reflectance of the solid-ink layer, respectively. P s and P w can be obtained experimentally. Knowing r s and n, ˇ we can calculate T s using Eq. (18.31). One way of obtaining the mixed ink area coverage and the effective transmittance is by utilizing the Neugebauer equation (see Chapter 17). Berns and colleagues have combined the spectral Yule-Nielsen equation with the Neugebauer model to form a hybrid approach called the Yule-Nielsen-SpectralNeugebauer (YNSN) model.8,9 It has been applied to study the feasibility of spectral color reproduction, having very good results in end-to-end color reproduction,8 and with a six-primary (cyan, magenta, yellow, black, green, and orange) Epson Pro 5500 ink-jet printer. With an optimized Yule-Nielsen value and cellular partition, they obtained excellent results for predicting 600 random colors, having an average spectral RMS error of less than 0.5%; the average color difference is about 1.0 E00 , with a maximum of 5.9 E00 .9
392
Computational Color Technology
18.3 Area Coverage-Density Relationship Both the Murray-Davies and the Yule-Nielsen models relate the area coverage and density in the form of power functions. From Eq. (18.8) and Eq. (18.25), we can see that the Murray-Davies equation is a special case of the Yule-Nielsen equation with Yule-Nielsen value nˇ = 1. Figure 18.3 shows the area-density relationships computed from the Murray-Davies and Yule-Nielsen equations using the data from cyan wedges of the CLC500 copier. The relationships are nonlinear, where the Murray-Davies equation gives the highest curvature and the curvature decreases as the Yule-Nielsen nˇ value increases. When nˇ approaches infinity, the relationship becomes linear.10 This phenomenon can be shown mathematically using the YuleNielsen equation [Eq. (18.25)]. 1 − 10−Ds /nˇ , aj = 1 − 10−Dj /nˇ
(18.32)
where aj is the area coverage of a j th color patch, Dj is the optical density of the color patch, and D s is the optical density of the solid-ink area coverage. If nˇ = 1, Eq. (18.32) reduces to the Murray-Davies equation [Eq. (18.8)]. The Yule-Nielsen nˇ value serves as an adjustable parameter that modulates the nonlinear behavior of the area coverage and optical density.
Figure 18.3 Relationships between area coverage and density.
Halftone Printing Models
393
Using the exponential series expansion, we have the following approximation: 2 3 10−Dj /nˇ = 1 − 2.303 Dj /nˇ + 2.3032 /2! Dj /nˇ − 2.3033 /3! Dj /nˇ + · · · . (18.33) When nˇ →∝, D j /nˇ → 0; therefore, we can eliminate the high-order terms and keep only the first two terms. 1 − 10−Ds /nˇ lim 1 − 10−Dj /nˇ 1 − 1 + 2.303D s /nˇ = Dj /D s . = 1 − 1 + 2.303Dj /nˇ
(18.34)
This derivation shows that in the limiting case of when nˇ approaches infinity, the dot area coverage becomes the ratio of the halftone dot density to the solid-ink area density. This linear relationship, showing proportionality, is basically the BeerLambert-Bouguer law. The color-printing model would be greatly simplified if this relationship and additivity were true.
18.4 Clapper-Yule Model After formulating the Yule-Nielsen model, Yule then worked with Clapper to develop an accurate account of the halftone process from a theoretical analysis of multiple-scattering, internal-reflection, and ink transmissions.11,12 In this model, the light is being reflected many times from the surface, both within the ink and substrate and by the background, as shown in Fig. 18.4. The total reflected light is
Figure 18.4 Clapper-Yule model of the light, halftone dot, and substrate interactions.
394
Computational Color Technology
the sum of the light fractions that emerge after each internal reflection cycle. 2 1 − (1 − f e )f r 1 − a + aT s 2 , P = k s + f e (1 − r s )f r 1 − a + aT s (18.35) where k s is the specular component of the surface reflection, f r is a fraction of light reflected at the bottom of the substrate, and f e is a fraction of light emerged at the top of the substrate. Again, solid-ink transmittances are obtained by setting a = 1 and rearranging Eq. (18.35). T s = [(P s − k s )/{f e (1 − r s )f r + (P s − k s )(1 − f e )f r }]1/2 .
(18.36)
18.4.1 Spectral extension of the Clapper-Yule model Similar to the spectral extension of the Yule-Nielsen equation, the spectral extension of the Clapper-Yule equation is 2 P (λ) = k s + f e (1 − r s )f r 1 − a + aT s (λ) 2 1 − (1 − f e )f r 1 − a + aT s (λ) ,
(18.37)
T s (λ) = ([P s (λ) − k s ]/{f e (1 − r s )f r + [P s (λ) − k s ](1 − f e )f r })1/2 . (18.38) The halftone models of Murray-Davies, Yule-Nielsen, and Clapper-Yule show a progressively more thorough consideration of the halftone printing process with respect to light absorption, reflection, transmission, and scattering induced by the ink-paper interaction.
18.5 Hybrid Approaches It has been found that the single-constant Kubelka-Munk theory fits very well with contone printing and halftone printing with solid-ink area coverage.13 It also has been shown that the Yule-Nielsen and the Clapper-Yule models described the halftone process quite satisfactorily.14,15 The central part of Yule-Nielsen and Clapper-Yule models is the transmittance, T i , of the ink film. They employed the Neugebauer concept of eight dominant colors and Demichel’s area coverage; the total ink transmittance is the sum of the individual color transmittances weighted by their area ratios. This made their theories additive in nature. If a subtractive derivation such as the single-constant Kubelka-Munk is used for T i , the transmitted light will become the reflected light when the light reaches the background and
Halftone Printing Models
395
then reflects back; we make the following approximation: T i (λ) = P∝ (λ)1/nˇ .
(18.39)
The transmittance is taken as the 1/nˇ root of the reflectance at the infinite thickness P∝ (λ) to account for the multiple channels of the Kubelka-Munk theory. Substituting Eq. (18.39) into the Yule-Neilsen and Clapper-Yule equations, we obtain Eqs. (18.40) and (18.41) for Yule-Neilsen and Clapper-Yule models, respectively. nˇ P (λ) = r s + P w (λ)(1 − r s ) 1 − A 1 − P∝ (λ)1/nˇ ,
P (λ) = k s +
f e (1 − r s )f r [1 − A + AP∝ (λ)1/nˇ ]2 . 1 − (1 − f e )f r [1 − A + AP∝ (λ)2/nˇ ]
(18.40)
(18.41)
To obtain the reflectance P (λ), both Eqs. (18.40) and (18.41) require the input of the reflectance at the infinite thickness P∝ (λ) that can be obtained by ˆ s (λ)] − using the single-constant Kubelka-Munk equation P∝ (λ) = 1 + [κ(λ)/ˆ ˆ s (λ)]}1/2 [see Chapter 16, Eq. (16.11)]. By taking the {[κ(λ)/ˆ ˆ s (λ)]2 + 2[κ(λ)/ˆ substrate reflection as the reference point, P∝ (λ) = 1, and by approximating (1 − r s ) → 1, Eq. (18.40) reduces to the surface reflectance correction. P∝ (λ) = P (λ) − r s .
(18.42)
Similarly, Eq. (18.41) can be simplified by setting nˇ = 2 and f i = 1 − f e . P∝ (λ) = [P (λ) − k s ]/[1 − k s f i − f i + f i P (λ)].
(18.43)
For all practical purposes, this expression is equivalent to Saunderson’s correction of Eq. (16.27) because both k s and f i are small such that the denominator in Eq. (18.43) is very close to 1. These hybrid approaches are further validations to the unified global Kubelka-Munk theory developed by Emmel and Hersch (see Section 16.5).
18.6 Cellular Extension of Color-Mixing Models In most color-mixing models, their parameters are derived from the solid-color patches of the primary or dominant colors. With the addition of partial dot area coverages, these models can be modified to make use of these intermediate samples, which are equivalent to partitioning the cmy space into rectangular cells and applying the color-mixing model within each cell in a smaller subspace.16 Rolleston and Balasubramanian extend this cellular concept to the Yule-Nielsen model and
396
Computational Color Technology
spectral extension.17 Their results indicate that the cellular extension makes substantial improvement in modeling accuracy. The cellular concept can also be used in other color-mixing models such as the Murray-Davies equation and ClapperYule model.18
18.7 Dot Gain Dot gain is a phenomenon associated with halftone imaging. Halftone dots can grow from their initial size to the final output or from separation film to printed page because of the characteristics of paper, ink, and the printing process. Dot gain leads to more intense colors than intended. There are two kinds of dot gains— physical and optical. In conventional halftoning, the physical dot gain is the change in size of the printing dot from the photographic film that made the plate, to the size of the dot on the substrate.19,20 Digital imaging uses a variety of printing methods such as electrophotographic (or xerographic), ink-jet, and thermal transfer; however, dot gain persists due to the heat fusing, ink spreading, or dye diffusion. To accommodate digital imaging, the definition of the dot gain is broadened to cover the phenomenon that a printed dot size is bigger or darker than one would expect on the basis of the nominal size of the dot intended by the printing process.21 Physical reasons for dot gain are many, including ink-paper interaction, printing technology, and printing conditions. The ink-paper interaction has a major effect on physical dot gain; for example, an ink-jet ink with low surface tension will spread wider than a nonwetting ink such as a xerographic toner. And the spreading of ink is dependent on the substrate—one can expect a small dot size increase on a coated paper, a larger increase on an uncoated paper, and an even larger increase on a soft stock such as newsprint. Printing technology also plays a role in the physical dot gain; for example, ink-jet printing is different from electrophotographic printing. Ink-jet printing is expected to have higher dot gain than electrophotographic printing because of the liquid ink spreading, whereas the solid pigment used in the electrophotographic device can slightly gain size by heat fusing. Printing conditions, such as the impression pressure and ink-drop velocity, affect the toner/ink spreading. In addition, the dot gain is sensitive to the halftone technique used. Normally, a dispersed dot will give a higher dot gain than a clustered dot. To make matters even more complex, dot gain is not uniform for all dot sizes within a given halftone cell. It varies in degree over the tonal range of the reproduction. Experiments have shown that dot gain is greatest in the midtone area and about equal in the highlight and shadow areas. The net result is a distortion of the tone reproduction on the printed reproduction compared with the original. All these effects—printing conditions, nature of the substrate, ink characteristics, and halftone technique—are coupled together to give the physical dot gain. From practical experience, an experimental measurement almost always results in a reflectance significantly less than that predicted by the Murray-Davies equa-
Halftone Printing Models
397
tion. This effect, which is different from physical dot gain, is called the optical dot gain or the Yule-Nielsen effect because the Yule-Nielsen model quite successfully accounts for the nonlinear relationship between reflectance and area coverage.22 The mathematical derivation of the optical dot gain starts from the Yule-Nielsen equation. Using the solid-ink transmittance expression of Eq. (18.20) and by setting r s = 0, we obtain T s = (P s /P w )1/nˇ .
(18.44)
Substituting Eq. (18.44) into Eq. (18.19) with r s = 0, we obtain nˇ P = P w 1/nˇ − a P w 1/nˇ − P s 1/nˇ .
(18.45)
For a given nˇ value, the dot area can be determined because reflectances P , P s , and P w can be measured experimentally. Equation (18.45) is the form frequently used for modeling the optical dot gain. Generally, this Yule-Nielsen equation provides a good fit to experimental data, with nˇ values typically falling in the range between 1 and 2.23 It would be useful to derive the nˇ value from the underlying paper and ink properties, not as an adjustable parameter for fitting the data. Both theoretical and empirical attempts have been made to relate the Yule-Nielsen value to the fundamental physical and optical parameters of ink and paper.11,24–34 Arney and colleagues were able to combine theory with an empirical model to provide practical relationships between the optical dot gain and the effect of light scattering with respect to dot size and shape. They related two empirical parameters, similar to the ones used in the Murray-Davies model,35 to an a priori model using two modulation transfer functions (MTF) for edge sharpness and light scattering. The analysis suggested that one empirical parameter depends on the edge sharpness of the halftone dot and the other parameter is a function of both the edge sharpness and the lateral light scattering. Kruse and Wedin modified the Yule-Nielsen model to account for the trapping in the substrate of the internally scattered light.30–32 This model provided the explanation for the decrease in the MTF toward higher screen rulings. It also shed some light on reasons for the variation in dot gain with different screen-dot geometries. Later, Kruse and Gustavson proposed a model for the optical dot gain on scattering media that predicts color shifts in the rendering caused by different raster technologies.33,34 The model is based on a nonlinear application of a point-spread function (PSF) to the light flux falling on the medium surface. It has successfully predicted dot gains in monochromatic halftone prints. This model is perhaps the most comprehensive attempt to account for light interaction in a turbid medium, including absorption, directional transmission, surface reflection, bulk reflection, diffuse transmission, and internal surface reflection. Possible paths in a halftone print are shown in Fig. 18.5, A is the surface reflection from the paper surface, B is the ink absorption before reaching the substrate, C is the surface reflection from the ink surface, D is the bulk reflection from the paper, E is the absorbed light
398
Computational Color Technology
that enters from the uncovered substrate, F is the emerged but attenuated light that enters from the uncovered substrate, G is the absorbed light that enters from the ink film, H is the emerged but attenuated light that enters and exits from the ink film, and I is the escaped light that enters from the ink film. The paths F , G, H , and I are important for color printing, where the primary inks are quite transparent for a certain region of the visible spectrum.36 The model takes into account all events shown in Fig. 18.5 except the surface reflections, A and C. Another omission is the transmitted light path J that passes through the substrate and is lost forever. The Kruse-Wedin model also includes the physical dot gain, which is modeled on the ink density by preserving the amount of ink in the image locally. This is accomplished by the convolution of an ideal halftone image with a point-spread function. The ideal halftone image with sharp and perfect halftone dots can be described by a binary image H (x, y), where the value 0 at a particular point corresponds to no ink and the value 1 is full ink coverage. They proposed a formula given in Eq. (18.46), one for each primary color at a given wavelength λ. T c (x, y, λ) = 10 exp{−D c (λ)[H c (x, y) ⊗ Ω(x, y)]}, T m (x, y, λ) = 10 exp{−D m (λ)[H m (x, y) ⊗ Ω(x, y)]}, T y (x, y, λ) = 10 exp{−D y (λ)[H y (x, y) ⊗ Ω(x, y)]}, T k (x, y, λ) = 10 exp{−D k (λ)[H k (x, y) ⊗ Ω(x, y)]},
(18.46)
where D c , D m , D y , and D k are the solid-ink densities of the primary inks, Ω(x, y) is a point-spread function describing the blurring of the ink, Tj (x, y, λ) is the trans-
Figure 18.5 Possible light paths in a turbid medium.36
Halftone Printing Models
399
mission of the j th primary ink pattern, and the operator ⊗ denotes convolution. The convolution does not change the amount of the ink; it just redistributes the ink film locally over the surface. More specifically, it blurs the edges of halftone dots. For optical dot gain, the ink film is modeled by its transmittance T (x, y, λ), and the blurring effect of the bulk reflection is modeled by a point-spread function Λ(x, y, λ). The reflected image P (x, y, λ) is described by P (x, y, λ) = {[I (x, y, λ)T (x, y, λ)] ⊗ Λ(x, y, λ)}T (x, y, λ)
(18.47)
T (x, y, λ) = T c (x, y, λ)T m (x, y, λ)T y (x, y, λ)T k (x, y, λ),
(18.48)
and
where I (x, y, λ) is the incident light intensity. The product I (x, y, λ)T (x, y, λ) is the light incident on the substrate, where the convolution describes the diffused bulk reflection, and the second multiplication with T (x, y, λ) at the end of Eq. (18.47) is the passage of the reflected light through the ink layer on its way up. Like the model of the physical dot gain, Eq. (18.48) constitutes a nonlinear transfer function. The linear step, the convolution, describes the reflectance properties of the substrate. Xerox researchers reported a similar approach in 1978.24 The heart of the model is the two point-spread functions Ω(x, y) and Λ(x, y, λ). The PSF for the physical dot gain Ω(x, y) is a rough estimate of the real physical ink smearing and is strongly dependent on the printing situation. The PSF for optical dot gain Λ(x, y, λ) takes the multiple light scattering into account. It is obtained on a discrete approximation by a direct simulation of the light-scattering events, closely resembling a Monte Carlo simulation. The basic appearance of a reflection PSF is a sharp peak at the point of entry and an approximately exponential decay with radial distance from the center point. A typical PSF can be approximated by a simple exponential equation as Λ(x, y) ∼ = P0 [α/(2πr)] exp(−αr),
(18.49)
where r = (x 2 + y 2 )1/2 . Parameter P0 determines the total reflectance of the substrate and α controls the radial extent of the PSF. Gustavson’s simulation shows that dot gain has a significant impact on the size of the color gamut.36 Stochastic screens, having significant dot gain, give a larger color gamut by reproducing more saturated green and purple tones than clustereddot screens. This result is confirmed by the experimental work of Andersson.37 When dot gain happens, a correction is required in order to bring the tone level back to normal. The correction is made in advance to compensate for the dot gain expected in printing. Therefore, one has to determine the amount of dot gains along the whole tone reproduction curve for a particular halftone, printer, and paper combination. The correction for dot gain has been applied to both the clustered-dot and the error-diffusion algorithms. In both cases, a bitmap can be created that will print
400
Computational Color Technology
with the proper grayscale reproduction. One might therefore expect that the modified error-diffusion algorithm would be the preferred method to use because of its higher spatial frequency content and better detail rendition. On the other hand, the magnitude of the two correction effects is quite different. The correction needed for clustered dots is much smaller than that for error diffusion because of its lower spatial frequency content. As a result of this smaller correction, clustered dots tend to be more tolerant of variations in the dot gain. This can be an advantage when the dot gain of the printer is not well known, or is even unknown, or varies in time and/or space.
18.8 Comparisons of Halftone Models An electronic file of 58 colors with known printer/cmyk values is printed for testing color-mixing models. In addition, a 10- or 20-level intensity wedge, ranging from solid-ink coverage to near white, of each primary color is used to determine the parameters such as the area coverage and halftone correction factors. Halftone tints are made by using the line screen provided by the manufacturer.38 Reflection spectra and colorimetric data of prints are obtained by a Gretag SPM 100® (45/0-deg measuring geometry) spectrophotometer using 2-deg standard observer, illuminant D50 , and absolute white scale with black backing. This instrument outputs reflection spectrum in a 10-nm interval from 380 to 730 nm. All data are the average of at least three measurements at different locations of a patch. Color-mixing models are programmed into C language. The outputs are the spectrum of a mixed color in a 10-nm interval from 400 to 700 nm and its CIELAB specifications. First, the area coverage is determined by the Yule-Nielsen (Y-N) formula of Eq. (18.25). The equation can be used for a broadband density measurement as well as individual wavelength measurements. If a spectrum is used for calculating the area coverage, one will find that a i (λ) is wavelength dependent. From our experience, the deviations across the wavelengths of the absorption region are usually small. Therefore, an average across the absorption band is used. In this study, we use the spectra of 10-level primary color wedges for calculating a i (λ) of CLC500 prints. Knowing the device values for the halftone wedges, we can correlate printer/ cmy values to the area coverage. Figure 18.6 shows the relationships between the CLC500 device value and area coverage determined at nˇ = 2.0. From these curves, we can generate the area-coverage lookup tables for primary colors of all colormixing models. The lookup table implementation enables easy access and fast computation. The eight-color Y-N model fits the data in the neighborhood of six Eab units for the mean and the three-color Y-N increases the error of the corresponding run by about two Eab units. This is because of the additivity failure, as pointed out by Yule.39 These numbers are on the order of the CLC500 printer variability. Adjustable parameters in the Y-N equation are varied to get a better understanding of
Halftone Printing Models
401
Figure 18.6 Relationship between area coverage and device value of CLC500 primary toners.
the color mixing. Varying the surface reflection does not give a significant change in the average color difference; the best fit is around r s = 0.01. Generally, the Clapper-Yule (C-Y) model fits the data slightly worse than the Y-N model by about one Eab unit. Like the YN model, the eight-color C-Y is better than the three-color approach by about two Eab units. The surface reflection in the C-Y model is expressed as an offset from the total reflection of 1; because r s is small, it has a negligible effect. Instead, the parameter k s of the C-Y equation replaces the role that r s plays in the Y-N model. The modeling prefers low k s values. Decreasing k s by 0.01 shows a less than one Eab improvement. The internal reflection factor f e has a stronger influence than surface reflections; the fitting of data improves when the fraction of light emerging from the paper increases. The improvement decreases as f e increases. Histograms of the Eab distribution are depicted in Fig. 18.7; the C-Y model exhibits the narrowest Eab distribution. Individual comparisons reveal that dark colors, in general, have large discrepancies. For example, the spectral errors are 0.0224, 0.0412, and 0.0387 for a shadow, a middle-tone, and a highlight color, respectively, but the corresponding color differences are 9.92, 5.61, and 2.28. These results indicate that darker colors require a higher modeling precision than lighter colors. Further improvements can be gained by including the intermediate points along each primary color axis, using the cellular Yule-Nielsen or cellular Clapper-Yule model.17,41 One major problem in the color modeling is that the modeling errors are not uniformly distributed in the color space, requiring a higher precision for
402
Computational Color Technology
Figure 18.7 Histograms of color-difference distributions calculated by using Yule-Nielsen and Clapper-Yule models.
darker colors. The solution lies in the cellular extensions of the color-mixing models. With proper selection of the intermediate toner points, the modeling errors can be reduced and made to distribute more evenly. The trade-off is that the number of measurements and the data-storage requirements will be increased accordingly. Using the Yule-Neilsen model for four-primary mixing, we obtain the average spectral difference of 0.049 from 58 color samples. The average color difference is 10.6 Eab and root-mean-square value is 11.22 Eab . The improvements in data fitting for the Y-N model may come from using 16 dominant colors. In any case, it provides reasonable estimates to the measured values. These theoretical halftone models provide guidance in practical applications. However, they are not accurate enough for high-quality reproductions. Although some theories are better than others, the difference depends strongly on the characteristics of the printing devices and measurement conditions.
References 1. A. Murray, Monochrome reproduction in photoengraving, J. Franklin Inst. 221, pp. 721–744 (1936).
Halftone Printing Models
403
2. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, pp. 42–47 (1997). 3. P. G. Engeldrum, Color between the dots, J. Imaging Sci. Techn. 38, pp. 545– 551 (1994). 4. J. S. Arney, P. G. Engeldrum, and H. Zeng, A modified Murray-Davies model of halftone gray scales, Proc. Tech. Assn. Graphic Arts, pp. 353–363 (1995). 5. J. S. Arney and P. G. Engeldrum, An optical model of tone reproduction in hard copy halftones, Proc. IS&T 11th Int. Congress on Advances in Non-Impact Printing Technologies, Springfield, VA, pp. 497–499 (1995). 6. J. S. Arney, P. G. Engeldrum, and H. Zeng, An Expanded Murray-Davies Model of Tone Reproduction in halftone imaging, J. Imaging Sci. Techn. 39, pp. 502–508 (1995). 7. J. A. C. Yule and W. J. Nielsen, The penetration of light into paper and its effect on halftone reproduction, TAGA Proc., Sewickley, PA, Vol. 4, pp. 65–75 (1951). 8. F. H. Imai, D. R. Wyble, and R. S. Berns, A feasibility study of spectral color reproduction, J. Imaging Sci. Techn. 47, pp. 543–553 (2003). 9. Y. Chen, R. S. Berns, and L. A. Taplin, Six color printer characterization using an optimized cellular Yule-Nielsen spectral Neugebauer model, J. Imaging Sci. Techn. 48, pp. 519–528 (2004). 10. H. R. Kang, Digital Color Halftoning, SPIE Press, Bellingham, WA, Chap. 6 (1999). 11. F. R. Clapper and J. A. C. Yule, The effect of multiple internal reflections on the densities of half-tone prints on paper, J. Opt. Soc. Am. 43, pp. 600–603 (1953). 12. F. R. Clapper and J. A. C. Yule, The effect of multiple internal reflections on the densities of half-tone prints on paper, J. Opt. Soc. Am. 43, pp. 600–603 (1953). 13. H. R. Kang, Kubelka-Munk modeling of ink jet ink mixing, J. Imaging Sci. Techn. 17, pp. 76–83 (1991). 14. H. R. Kang, Comparisons of Color Mixing Theories for Use in Electronic Printing, 1st IS&T/SID Color Imaging Conf.: Transforms and Transportablity of Color, pp. 78–82 (1993). 15. H. R. Kang, Applications of color mixing models to electronic printing, J. Electron. Imaging 3, pp. 276–287 (1994). 16. K. J. Heuberger, Z. M. Jing, and S. Persiev, Color transformation and lookup tables, TAGA/ISCC Proc., Sewickley, PA, Vol. 2, pp. 863–881 (1992). 17. R. Rolleston and R. Balasubramanian, Accuracy of various types of Neugebauer model, 1st IS&T/SID’s Color Imaging Conference: Transforms and Transportablity of Color, Springfield, VA, pp. 32–37 (1993). 18. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, pp. 87–92 (1997). 19. M. Southworth, Pocket Guide to Color Reproduction, 2nd Edition, Graphic Arts Publ. Livonia, NY, p. 55 (1987).
404
Computational Color Technology
20. AGFA, Digital Color Prepress, Vol. II, Agfa Prepress Education Resources, Mt. Prospect, IL (1992). 21. J. S. Arney and C. D. Arney, Modeling the Yule-Nielsen halftone effect, J. Imaging Sci. Techn. 40, pp. 233–238 (1996). 22. J. A. S. Viggiano, The color of halftone tints, TAGA Proc., Sewickley, PA, pp. 647–661 (1985). 23. Y. Shiraiwa and T. Mizuno, Equation to predict colors of halftone prints considering the optical property of paper, J. Imaging Sci. Techn. 37, pp. 385–391 (1993). 24. F. R. Ruckdeschel and O. G. Hauser, Yule-Nielsen effect in printing: a physical analysis, Appl. Optics 17, pp. 3376–3383 (1978). 25. W. W. Pope, A practical approach to n-value, Proc. TAGA, Sewickley, PA, pp. 142–151 (1989). 26. F. P. Callahan, Light sattering in halftone prints, J. Opt. Soc. Am. 42, pp. 104– 105 (1952). 27. J. A. C. Yule, D. J. Howe, and J. H. Altman, The effect of the spread function of paper on halftone reproduction, TAPPI J. 50, pp. 337–344 (1967). 28. J. R. Huntsman, A new model of dot gain and its application to a multilayer color proof, J. Imaging Sci. Techn. 13, pp. 136–145 (1987). 29. M. Pearson, n-value for general conditions, Proc. TAGA, Sewickley, PA, pp. 415–425 (1980). 30. M. Wedin and B. Kruse, Modeling of screened color prints using singular value decomposition, Proc. SPIE 2179, pp. 318–326 (1994). 31. M. Wedin and B. Kruse, Halftone color prints: Dot gain and modeling of color distributions, Proc. SPIE 2413, pp. 344–355 (1995). 32. B. Kruse and M. Wedin, A new approach to dot gain modeling, Proc. TAGA, Sewickley, PA, pp. 329–338 (1995). 33. M. Wedin and B. Kruse, Mechanical and optical dot gain in halftone colour prints, Proc. NIP11, IS&T, Hilton Head, South Carolina, pp. 500–503 (1995). 34. B. Kruse and S. Gustavson, Rendering of color on scattering media, Proc. SPIE 2657, pp. 422–431 (1996). 35. J. S. Arney and C. D. Arney, Modeling the Yule-Nielsen halftone effect, J. Imaging Sci. Techn. 40, pp. 233–238 (1996). 36. S. Gustavson, Color Gamut of halftone reproduction, J. Imaging Sci. Techn. 41, pp. 283–290 (1997). 37. M. A. Andersson, A study in how the ink set, solid ink density and screening method influence the color gamut in four color process printing, Master Thesis, RIT School of Printing Management and Science, May (1997). 38. J. H. Riseman, J. J. Smith, A. M. d’Entremont, and C. E. Goldman, Apparatus for generating an image from a digital video signal, U.S. Patent No. 4,800,442 (1989). 39. J. A. C. Yule, Principles of Color Reproduction, Wiley, New York, Chap. 11, p. 282 (1967).
Halftone Printing Models
405
40. H. R. Kang, Color Scanner Calibration, J. Imaging Sci. Techn. 36, pp. 162–170 (1992). 41. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, pp. 129–138 (1997).
Chapter 19
Issues of Digital Color Imaging A digital color image is a multidimensional entity. It is sampled in a 2D plane with width and length, having quantized values in the third dimension to indicate the intensities of three or more channels (trichromatic or multispectral) for describing color attributes. The smallest unit in the 2D image plane is called the picture element (pixel or pel), constituted by the pixel size (width and length) and depth (the number of tone levels). However, the appearance of a color image is much more intriguing than a few physical measurements; there are psychological and psychophysical attributes that cannot be measured by any existing instruments— only by human vision. Therefore, the most important factor in color-image analysis is human vision because a human being is the ultimate judge of image quality. Human vision provides the fundamental guidance to digital-imaging design, analysis, and interpretation. Because human vision is subjective and instrumentation is objective, there is a need for establishing the correlation between them. This makes digital color imaging a very interesting and complex process, involving human vision, color appearance phenomena, imaging technology, device characteristics, and media properties.1 With rapid advances in color science and technology that resulted in a better understanding of color images in the forms of human visual system (HVS) and color appearance model (CAM) on the one hand, and the developments of various color-imaging technologies and computation approaches on the other, it is now possible to address the color-image reproduction at the system level in a quantitative manner and to produce good image quality across all media involved. To achieve these goals, cross-media color-image reproduction consists of four core elements: device characteristics and calibration, color appearance modeling, image processing, and gamut mapping. This chapter describes the scope and complexity of the digital color imaging at the system level and provides the sRGBCIELAB conversions as examples to illustrate the modular architecture and technical requirements for a successful implementation.
19.1 Human Visual Model Human visual system (HVS) models are attempts to utilize the human visual sensitivity and selectivity for modeling and improving the perceived image quality. HVS is based on the psychophysical process that relates psychological phenomena 407
408
Computational Color Technology
(color, contrast, brightness, etc.) to physical phenomena (wavelength, spatial frequency, light intensity, etc.). It determines what physical conditions give rise to a particular psychological condition (perceptual, in this case). A common approach is to study the relationship between stimulus quantities and the perception of the just-noticeable difference (JND)—a procedure in which the observer is required to discriminate between color stimuli that evoke JNDs in visual sensation. To this end, Weber’s and Fechner’s laws play key roles in the basic concepts and formulations of psychophysical measures. Weber proposed a general law of sensory thresholds that the JND of a given stimulus is proportional to the magnitude of the stimulus. This means that the JND between one stimulus and another is a constant fraction of the first and is called the “Weber fraction,” which is constant within any one-sense modality for a given set of observing conditions.2 The size of the JND, measured in physical quantities (e.g., radiance or luminance) for a given attribute, depends on the magnitude of the stimuli involved. Generally, the greater the magnitude of the stimuli, the greater the size of the JND. Fechner built on the work of Weber to derive a mathematical formula, indicating that the perceived stimulus magnitude is proportional to the logarithm of the physical stimulus intensity.2 The implication of this logarithmic relationship is that a perceptual magnitude may be determined by summing JNDs, suggesting that quantization levels should be spaced logarithmically in reflectance, i.e., uniformly in the density domain. Human vision response is not uniform with respect to spatial frequency, luminance level, object orientation, visible-spectrum wavelength, etc. Weber’s and Fechner’s laws have been used to form scales of color differences. Quantitative studies address thresholds for a single attribute of color (e.g., brightness, hue, and colorfulness). The Weber fraction is a function of the luminance, which indicates that the Weber fraction is not constant over the range of luminances studied. Because the Weber fraction is the reciprocal of sensitivity, the sensitivity drops quickly as the luminance becomes weak. Similar determinations have been made regarding the threshold difference in wavelength necessary to see a hue difference. Results indicate that sensitivity to hue is much lower at both ends of the visible spectrum. Approximately, the human visual system can distinguish between colors with dominant wavelengths differing by about 1 nm in the blue-yellow region, but near the spectrum extremes a 10-nm separation is required.3 The threshold measurements of the purity show the purity threshold varies considerably with wavelength. A very marked minimum occurs at about 570 nm; the number of JND steps increases rapidly on either side of this wavelength.4,5 Weber fractions related to luminance, wavelength, color purity, and spatial frequency are the foundations of color-difference measurement and image-texture analysis. Human vision has spatial and color components. Major spatial patterns are aliasing, moiré, and contouring. Spatial visual sensitivity is judged by the image contrast. Image contrast is the ratio of the local intensity to the average image intensity.6 Visual-contrast sensitivity describes the signal properties of the visual system near threshold contrast. For sinusoidal gratings, contrast C is defined by
Issues of Digital Color Imaging
409
the Michelson contrast as7 C = (Lmax − Lmin )/(Lmax + Lmin ) = La /L,
(19.1)
where Lmax and Lmin are the maximum and minimum luminances, respectively, La is the luminance amplitude, and L is the average luminance. Contrast sensitivity is the reciprocal of the contrast threshold. 19.1.1 Contrast sensitivity function Contrast sensitivity can be used to measure human spatial resolution by monitoring it as a function of spatial frequency. Visual-contrast sensitivity with respect to spatial frequency is known as the contrast sensitivity function (CSF). A CSF describes contrast sensitivity for sinusoidal gratings as a function of spatial frequency expressed in cycles per degree of visual angle. It dictates how humans perceive image textures. Typical human contrast sensitivity curves are given in Fig. 19.1,5,8,9 where the horizontal axis is the spatial frequency and the vertical axis is the contrast sensitivity, namely, log(1/C) = − log C, where C is the contrast of the pattern at the detection threshold. The CSF of Fig. 19.1 shows two significant features. First, there is a falloff in sensitivity as the spatial frequency
Figure 19.1 Human contrast sensitivity functions.9
410
Computational Color Technology
of the test pattern increases, indicating that the visual pathways are insensitive to high-spatial-frequency targets. In other words, human vision has a low-pass filtering characteristic. Second, there is no improvement of sensitivity at low spatial frequencies; there is even a loss of contrast sensitivity at lower spatial frequencies for the luminance CSF. This behavior is dependent on background intensity; it is more pronounced at higher background intensity. Under scotopic conditions of low illumination, the luminance CSF curve is low pass and peaks near 1 cpd. On intense photopic backgrounds, CSF curves are band pass and peak near 8 cpd.8 Chromatic CSFs show a low-pass characteristic and have much lower cutoff frequencies than the luminance channel (see Fig. 19.1), where the blue-yellow opponent-color pair has the lowest cutoff frequency. This means that the human visual system is much more sensitive to fine spatial changes in luminance than it is to fine spatial changes in chrominance. Images with spatial degradations in luminance will often be perceived as blurry or not sharp, while similar degradations in the chrominance will usually not be noticed. The high-frequency cutoff and exponential relationship with spatial frequency form the basis for various HVS models.10,11 Imaging scientists have taken advantage of this characteristic for designing compression algorithms and halftone patterns, among other things. CSF plays an important role in image resolution, image quality improvement, halftoning, and image compression. It has been used to estimate the resolution and tone level of imaging devices. An upper limit of the estimate is about 400 dpi with a tone step of 200 levels. In many situations, much lower resolutions and tone levels still give good image quality. For the effect of object orientation, the visual acuity is better for gratings oriented at 0 and 90 deg, while it is least sensitive at 45 deg (see Fig. 19.2).9 This property has been used in printing for designing halftone screens.12 19.1.2 Color visual model In general, color visual models are extensions of luminance models attained by utilizing the human visual difference in the luminance and chrominance. We can separate the luminance and chrominance channels by using the opponent color description. For the chrominance part, we use the fact that the contrast sensitivity to spatial variations in chrominance falls off faster than luminance with respect to spatial frequency (see Fig. 19.1) to find a new set of constants for the chromatic CSF. Both responses are low pass; however, the luminance response is reduced at 45, 135, 225, and 315 deg for the orientation sensitivity. This will place more luminance error along the diagonals in the frequency domain, taking advantage that these angles are the least sensitive to spatial variations. The chrominance response has a narrower bandwidth than the luminance response. Using the narrower chrominance response, as opposed to the identical responses for both luminance and chrominance, will allow a lower frequency chromatic error, which may not be perceived by human viewers. We can further allow the adjustment of the relative weight between the luminance and chrominance responses. This is
Issues of Digital Color Imaging
411
Figure 19.2 Human orientation sensitivity.9
achieved by multiplying the luminance response with a weighting factor. As the weighting factor increases, more error will be forced into the chrominance components. Many human visual models have been proposed that attempt to capture the central features of human perception. The simplest HVS includes just a visual filter that implements one of the CSFs mentioned above. Better approaches include a module in front of the filter to account for nonlinearity such as Weber’s law. The filtered signal is pooled together in a single “channel” of information. This structure is called the single channel model.13,14 Because digitalimage quality is a very complex phenomenon, it requires inputs of all types of distortions. In view of the image complexity, multiple-channel approaches are developed to include various inputs. This is achieved by putting a bank of filters before the nonlinearity in a systematic way; each filter addresses one aspect of the whole image quality. This approach is called the multichannel model.15–23 HVS has been used to design digital halftone screens; it often takes hours or days for a mainframe computer to optimize a set of stochastic halftone screens. Thus, it is seldom applied directly to real-time image processing because of the computational cost. The HVS model generates point-spread functions that are convolution operators, which require multiplications and summations in a specified neighborhood, repeatedly for each and every pixel in the image.
412
Computational Color Technology
19.2 Color Appearance Model CIE colorimetry is based on color matching; it can predict color matches for an average observer, but it is not equipped to specify color appearance. Colorimetry is extremely useful if two stimuli are viewed with identical surround, background, size, illumination, surface characteristics, etc. If any of these constraints is violated, it is likely that the color match will no longer hold. In practical applications, the constraints for colorimetry are rarely met. Color appearance models are developed to deal with various phenomena that break the constraints of the simple CIE tristimulus system such as simultaneous contrast, hue change with luminance level (Bezold-Brücke hue shift), hue change with colorimetric purity (Abney effect), colorfulness increase with luminance (Hunt effect), contrast increase with luminance (Stevens effect), chromatic adaptation, color constancy, and discounting of the illuminant.24 These phenomena cannot be measured by the existing color instruments. A color appearance model is any model that includes predictors of at least the relative color appearance attributes of lightness, chroma, and hue. To have reasonable predictors of these attributes, the model must include at least some form of a chromatic-adaptation transform. All chromatic-adaptation models have their roots in the von Kries hypothesis (see Chapter 4). This definition enables the uniform color spaces CIELAB and CIELUV to be considered as color appearance models.24 However, modern appearance models are much more sophisticated and complex, having key features of the cone-sensitivity transform, chromatic adaptation, opponent-color processing, nonlinear response functions, memory colors, and discounting the illuminant. Chromatic adaptation is achieved through the largely independent adaptive gain control on each of the long (L), medium (M), and short (S) cone responses. The gains of the three channels depend on the state of eye adaptation, which is determined by preexposed stimuli and the surround, but is independent of the test stimulus.5 An example of chromatic adaptation is viewing a piece of white paper under a fluorescent lamp, then under an incandescent lamp. The paper appears white under both lamps, despite the fact that the energy reflected from the paper has changed from blue casting to yellow casting. Chromatic adaptation is the single most important property of the human visual system with respect to understanding and modeling color appearance. Another key component of the color appearance model is opponent-color processing. Modern theory of color vision is based on the trichromatic and opponent-color theories. Three types of cones, L, M, and S, separate the incoming color signal, and the neurons of the retina then encode the color into opponent signals. The sum of the three cone types (L + M + S) produces an achromatic response, while the combinations of two types with the difference of a third type produce the red-green (L − M + S) and yellow-blue (L + M − S) opponent signals.25 In addition to the static human-vision theory, dynamic adaptation is very important in color perception. It includes dark, light, and chromatic adaptations. CIE has recommended a series of color appearance models, CIECAM97s and CIECAM02 (see Section 5.5).26–28 The development and formulation of CIECAM
Issues of Digital Color Imaging
413
builds on the works of many researchers in the field of color appearance. There are 20 or more equations in CIECAM using computations such as matrix multiplication and various power functions. CIECAM is computationally intensive and its implementation is costly: imagine a digital document of several million pixels where each and every pixel has to be manipulated by 20 or more complex computations! Therefore, there are almost no real-time applications and this situation is not likely to change in the foreseeable future. At best, some high-end imaging devices may implement a scaled-down version of CIECAM.
19.3 Integrated Spatial-Appearance Model Zhang and Wandell extended CIELAB to account for spatial as well as color errors in reproduction of the digital color image.29 They call this model Spatial-CIELAB or S-CIELAB (see Section 5.6). The design goal is to apply a spatial filtering to the color image in a small-field or fine-patterned area, but reverting to conventional CIELAB in a large uniform area. S-CIELAB reflects both spatial and color sensitivity. This model is a color-texture metric and a digital-imaging model. This measure has been applied to printed halftone images. Results indicate that S-CIELAB correlates with perceptual data better than standard CIELAB.30 This measure can also be used to improve multilevel halftone images.31 However, the addition of the 2D convolution operator makes the computation even more costly. It is questionable whether the image quality improvement is worth the cost, complexity, and speed.
19.4 Image Quality Color images have at least two components: spatial patterns and colorimetric properties. The main causes of spatial patterns are inadequate sampling in the spatial domain (aliasing, staircasing, etc.), halftone dot size and shape, the interaction of color separations (moiré and rosette), and insufficient tone levels in the intensity domain (false contouring). Colorimetric properties involve color transformation, color matching, color difference, surround, adaptation, etc. The overall image quality is the integration of these factors perceived by human eyes. Major factors affecting image quality are the color gamut mismatch, chromatic adaptation (or a full-fledged CAM), gray-component replacement (GCR), color conversion techniques, sampling, resolution conversion, spatial scaling, depth scaling, quantization, halftoning, sharpness, focus, compression, color encoding, computational error, measurement error, and device characteristics (e.g., stability and registration). Color gamut mismatch is the physical limitation imposed by color imaging devices. Out-of-gamut colors must be mapped within the destination space for rendering. This problem is difficult to resolve. It is still an actively researched area. Several reviews on color gamut mapping techniques can be found elsewhere (see
414
Computational Color Technology
Section 7.9).32 Chromatic adaptation is the viewer’s ability to adapt to object illumination. Adaptation techniques require the alteration of image data. Thus, an improper adaptation may cause adverse effects. Gray-component replacement is used in the printing industry to convert CMY to CMYK. This method is likely to introduce color errors because it changes the initial CMY compositions and adds a black component. Color-conversion technique affects color accuracy; for example, the 3D lookup table usually gives better conversion accuracy than polynomial regression (see Chapters 8 and 9).33 Resolution conversion changes the spatial composition of the image via techniques such as sampling, pixel deletion/insertion, linear interpolation, or area mapping.34 Digital halftoning trades area for depth (or intensity) by modulating the area to give a continuous-tone appearance. Both resolution conversion and halftoning have major impacts on image texture. Halftoning also affects the color appearance due to dot gain and dot overlap. Several device dot models have been proposed; however, they are either too complex or not quite successful.35 Fortunately, dot gain can be taken into account by measurement and corrected in the form of tone response curves (TRC). The dot overlap can be treated by a color-mixing model or a device characterization. This means that a new device characterization is required whenever a new halftone scheme or device resolution is used. Sharpness is affected by the spatial resolution (sampling rate), contrast, halftoning, and edges of objects, among other factors. An image looks sharp when rendered with high resolution and/or high contrast (e.g., high-key images). A fine halftone screen gives a sharper appearance than a coarse screen. A steep transition in the boundary of an object appears sharp. Edge sharpness can be enhanced by various edge-enhancement techniques. The overall sharpness of an image is the outcome of the settings of these fundamental imaging parameters and their interactions. On the other hand, defocusing changes the resolving power and blurs the image. Like sharpness enhancement, a minor defocusing can be corrected via digital image processing. Lossy compression techniques change information content that leads to color and texture errors. JPEG compression has shown that there is little or no visible image degradation on pictorial images for a compression ratio around 10.36 Therefore, the compression is not a major concern for pictorial images, unless a very high compression ratio is requested. However, lossy compression is a concern for scanned text and line art. Color encoding standards provide format and ranges for representing and manipulating color quantities. An improper encoding scheme can severely damage the color-conversion accuracy (see Section 6.5). Device instability affects color consistency and increases measurement errors. Device-registration error may produce unwanted textures, such as banding, and affect the halftone appearance.
Issues of Digital Color Imaging
415
19.5 Imaging Technology Imaging technology plays a major role in image quality; important examples are sampling, quantization, scaling, resolution conversion, color transformation, color matching, and halftoning, as given in Section 19.4. Device characteristics such as resolution, bit depth, tone response curve, and color gamut affect image quality. Generally, image quality improves as the resolution and/or bit depth increase. Resolution and bit depth are governed by the fundamental principle and limitation of the device. For example, it is difficult to pack a CCD array densely enough to reach the high resolution desired for digital cameras; therefore, some pattern (e.g., Bayer’s pattern, see Section 14.2) is employed with interpolation to achieve the desired resolution. It is also difficult to pack ink-jet nozzles closely enough to give a 300 jets/inch, so multiple columns (or lines) of jets are arranged in a stagger configuration with a fixed delay in the firing time for aligning the beginning of line positions. More importantly, ink-jet and electrophotographic technologies have a limited number of tone levels and are usually bi-level. This physical constraint dictates the quality and bit depth of these printers. To create a continuous-tone appearance, one needs to employ halftoning or dithering for spreading the tone curve beyond bi-level. The tone curve can be determined experimentally. It is preferable to have a wide dynamic range; that is, the slope in the central linear portion of the curve should not be too steep. Color gamut is governed by the selection of primary colors that, in turn, are determined by the chemical and physical properties of the colorants used. The selection of proper primary colorants is critical to any imaging device. The last issue is the media. Some imaging technologies are more sensitive to media than others; for example, ink-jet printing is much more sensitive to paper type than the electrophotographic process. The same image printed by an ink-jet printer on plain paper looks different from one printed on a photographic paper. 19.5.1 Device characteristics Color images, either printed on paper or displayed on a monitor, are formed by pixels that are confined to a digital grid. Generally, the digital grid is a square (sometimes rectangular, if the aspect ratio is not 1) ruling in accordance with the resolution of the imaging device; that is, if a printer resolution is 300 dots per inch (dpi), then the digital grid has 300 squares per inch. This discrete representation creates problems for the quality of color images in many ways. First, the quality of an image is dependent on sampling frequency, phase relationship, and threshold rule.37 Then, it is dependent on the arrangement of dots in the digital grid. There are three types of dot placement techniques: dot on dot, dot off dot, and rotated dot.38 Each technique has its own characteristics and concerns. CRT and LED displays can be considered as the dot-off-dot technique, where three RGB phosphor dots are closely spaced in a triangular pattern without overlapping.
416
Computational Color Technology
In printing, a frequently used technique is that of rotated dots, where color dots are partially overlapped. Rotated dots are produced by a halftone algorithm. Many halftone algorithms are available to create various pixel arrangements for the purpose of simulating gray sensation from bi-level imaging devices. Moreover, the image texture is also dependent on the size and shape of the pixel. Even in the ideal case of the square pixel shape that exactly matches the digital grid, there are still image-quality problems; the ideal square pixel will do well on horizontal and vertical lines, providing sharp and crisp edges, but will do poorly on angled lines and curves, showing jaggedness and discontinuity. Several dot models have been proposed to mathematically account for the dot overlapping, such as Demichel’s dot-overlap model, which is obtained from the joint probability of the overlapped area, and circular dot overlap, which assumes an ideal round shape with an equally sized dot.39 Halftone patterns for different levels of halftone dots are analyzed with the circular dot model to predict the actual reflectance of the output patterns.40 Threshold levels of the halftone dot are then adjusted so that the reflectance of the dot pattern matches the input reflectance values. This correction produces patterns with fewer isolated pixels, since the calculation gives a more accurate estimate of the actual reflectance achieved on the paper. Pappas expanded the monochromatic dot-overlap model to color.41 The color dot-overlap model accounts for overlap between neighboring dots of the same and different colors. The resulting color is the weighted average of segmented colors with the weight being the area of the segment. This approach is basically the same as the Neugebauer equations, using geometrically computed areas instead of Demichel’s dot-overlap model. 19.5.2 Measurement-based tone correction The circular dot-overlap model is an ideal case. It provides a good first-order approximation for the behavior of printers. In reality, it does not adequately account for all of the printer distortions. Significant discrepancies often exist between the predictions of the model and measured values.40 In view of this problem, a traditional approach to the correction of printer distortions is the measurement-based technique. Basically, the measurement-based technique is to obtain the relationship between the input tone level and measured output reflectance or optical density for a specific halftone algorithm, printer, and substrate combination. The experiment procedure consists of making prints having patches that are halftoned by the algorithm of interest. Each patch corresponds to an input tone level. The number of selected tone levels should be sufficient to cover the whole toner dynamic range with a fine step size, but it is not necessary to print all available input levels, such as 256 levels for an 8-bit system, because most printers and measuring instruments are not able to resolve such a fine step. The reflectance or density values of these patches are measured to give the tone-response curve of the halftone algorithm used in conjunction with the printing device. Correcting for printer distortions consists of inverting this curve to form a tone-correction curve. This tone-correction curve is applied to the image data prior to halftoning and printing, as a precompensation.
Issues of Digital Color Imaging
417
Most rendering devices, such as CRTs and dot-matrix, ink-jet, and electrophotographic printers, have a circular pixel shape (sometimes, an irregular shape because of ink spreading). A circular pixel will never be able to exactly fit the size and shape of the square √ grid. To compensate for these defects, the diameter of the round pixel is made 2 bigger than the digital grid period t such that dots will touch in diagonal positions. This condition is the minimum requirement for a total-areacoverage √ by round pixels in a square grid. Usually, the pixel size is made larger than 2 · t but less than 2t to provide a higher degree of overlapping. These larger pixels eliminate the discontinuity and reduce the jaggedness, even in the diagonal direction. However, these larger pixels cause the rendered area per pixel to be more than the area of the digital grid. When adjacent dots overlap, the interaction in the overlapped pixel area is not simply an additive one, but more resembles a logical “OR” (as if areas of the paper covered by ink are represented by a “1” and uncovered areas are represented by a “0”). That is, parts of the paper that have already been darkened are not made significantly darker by an additional section of a dot being placed on top. The correction for the overlapping of the irregularly shaped and oversized pixels is an important part of the overall color-imaging model. 19.5.3 Tone level In addition to the discrete nature of the digital grid, different imaging devices use different imaging technology. The most important rendering methods are the contone and halftone techniques. A contone device is capable of producing analog signals in both the spatial and intensity domains, having continuously changing shades. An example of a true contone imaging is the photographic print. Scanners, monitors, and dye-diffusion printers with 8-bit depth (or more) can be considered as contone devices if the spatial resolution is high enough. The halftone process is perhaps the single most important factor in image reproduction for imaging devices with a limited tone level (usually bi-level). Simply stated, halftoning is a printing and display technique that trades area for depth by partitioning an image plane into small areas containing a certain number of pixels; it then modulates the tone density by modulating the area to simulate the gray sensation for bi-level devices. This is possible because of the limited human spatial contrast sensitivity. At a normal viewing distance, persons with correct (or corrected) vision can resolve roughly 8–10 cycles/mm. The number of discernible levels decreases logarithmically as the spatial frequency increases. With a sufficiently high frequency, the gray sensation is achieved by integrating over areas at a normal viewing distance. This binary representation of a contone image is an illusion; much image information has been lost after the halftoning. Thus, there is a high probability of creating image artifacts such as moiré and contouring. Moiré is caused by the interaction among halftone screens, and contouring is due to an insufficient tone level in the halftone cell. There will be no artifacts if a continuous imaging device is used such as in photographic prints. Recently, printers that can output a limited number of tone levels have been introduced (usually, less than
418
Computational Color Technology
16 levels). The result of this capability creates the so-called multilevel halftoning that combines the halftone screen with limited tone levels to improve color image quality.42 Most color displays are based on a frame-buffer architecture, where the image is stored in video memory from which controllers constantly refresh the screen. Usually, images are recorded as full-color images, where the color of each pixel is represented by tristimulus values with respect to the display’s primaries and quantized to 8 or more bits per channel. For 3-primary and 8-bit devices, in theory, 256 × 256 × 256 = 16,777,216 colors can be generated. Often, the cost of the high-speed video memory needed to support storage of these full-color images on a high-resolution display is not justified; and, the human eye is not able to resolve 16 million colors; the most recent estimate is about 2.28 million discernible colors.43 Therefore, many color-display devices limit the number of colors that can be displayed simultaneously to 8, 12, or 16 bits of video memory, allowing 256, 4096, and 65,536 colors, respectively, due to cost considerations. A palettized image, which has only the colors contained in the palette, can be stored in video memory and be rapidly displayed using lookup tables. This color quantization is designed in two successive steps: (i) the selection of a palette and (ii) the mapping of each pixel to a color in the palette. The problem of selecting a palette is a specific instance of vector quantization. If the input color image has Q distinct colors and the palette is to have K entries (Q > K), the palette selection may be viewed as the process of dividing Q colors into K clusters in a 3D color space and selecting a representative color for each cluster. Ideally, this many-to-one mapping should minimize perceived color differences. The color quantization can also be designed as a multilevel halftoning. For example, the mapping of a full-color image to an 8-bit color palette (256 colors) is a multilevel halftoning with 8 levels of red (3 bits), 8 levels of green (3 bits), and 4 levels of blue (2 bits).
19.6 Device-Independent Color Imaging In a modern office environment, various imaging devices such as scanners, computers, workstations, copiers, and printers are connected to this open environment. For example, a system may have several color printers using different printing technologies such as dot matrix, ink-jet, and electrophotography. Moreover, it does not exclude devices of the same technology from different manufactures. In view of these differences, the complexity of an office information system can be extremely high. The main concern in the color-image analysis of the electronic information at the system level is color consistency; the appearance of a document should look the same when the image moves across various devices and goes through many color transforms. However, the degree of color consistency depends on the applications; desktop printing for casual users may differ significantly from a short-run printing of high-quality commercial brochures. Hunt pointed out that there are several levels of color matching: spectral, colorimetric, exact, equivalent, corresponding, and preferred color matching.44 Spectral
Issues of Digital Color Imaging
419
color reproduction matches the spectral reflectance curves of the original and reproduced colors. At this level, the original and reproduction look the same under any illuminant; there is no metamerism. A pair of stimuli are metamers if they match under an illuminant but mismatch under a different illuminant (see Chapter 3). Colorimetric reproduction is a metameric match that is characterized by the original and the reproduction colors having the same CIE chromaticities and relative luminances. A reproduction of a color in an image is exact if its chromaticity, relative luminance, and absolute luminance are the same as those in the original scene. Equivalent color reproduction requires that the chromaticities, relative luminance, and absolute luminances of colors have the same appearance as the colors in the original scene when seen in the image-viewing conditions. The corresponding reproduction matches the chromaticities and relative luminances of the color such that they have the same appearance as the colors in the original would have had if they had been illuminated to produce the same average absolute luminance level. Preferred color reproduction is defined as a reproduction in which the colors depart from equality of appearance to those in the original, either absolutely or relative to white, in order to give a more pleasing result to the viewer. Ideally, the appearance of a reproduction should be equal to the appearance of the original or to the customer’s preference. In many cases, however, designers and implementers of color management systems do not know what users really want. For an open environment with a diverse user demography, it is very difficult to satisfy everybody. Usually, this demand is partially met by an interactive system, adjustable knobs, or some kind of soft proofing system. This difficulty is compounded with the fact that modeling the human visual system is still an area of active research and debate. Even color consistency based on colorimetric equivalence at the system level is not a simple task because each device has its unique characteristics. They are different in their imaging technology, color encoding, color description, color gamut, stability, and applications. Because not all scanners use the same lamp and filters, and not all printers use the same inks, the same RGB image file will look differently when it is displayed on different monitors. Likewise, the same cmyk image file will look differently when it is rendered by different printers. Moreover, there are even bigger differences in color appearance when the image is moved from one medium to another, such as from monitor to print. Because of these differences, efforts have been made to establish a color management system (CMS) that will provide color consistency. An important event was the formation of the International Color Consortium (ICC) for promoting the usage of color images by increasing the interoperability among various applications (image processing, desktop publishing, etc.), different computer platforms, and different operating systems. This organization established architectures and standards for color transform via ICC profiles and color management modules (CMMs). A profile contains data for performing a color transform, and a CMM is an engine for actually processing the image through profiles. The central theme in color consistency at the system level is the requirement of a device-independent color description and properly characterized and calibrated color-imaging devices.
420
Computational Color Technology
A proper color characterization requires image test standards, techniques, tools, instruments, and controlled viewing conditions. The main features to consider for color consistency are: image structure, white-point equivalence, color gamut, color transformation, measurement geometry, media difference, printer stability, and registration.45 Image structure refers to the way an image is rendered by a given device. The primary factor affecting image texture is quantization; it is particularly apparent if the output is a bi-level device. Scanners and monitors that produce image elements in eight-bit depth can be considered as contone devices. For printers, the dye sublimation printer is capable of printing contone; other types of printers such as the electrophotographic and ink-jet printers have to rely on halftoning to simulate the contone appearance. For bi-level devices, halftoning is perhaps the single most important factor in determining the image structure. It affects the tone reproduction curves, contouring, banding, graininess, moiré, sharpness, and resolution of fine details. Because of these dependencies, color characterization has to be done for each halftone screen. A new characterization is needed whenever the halftone screen is changed. Various white points are used for different devices; the white point for a scanner is very different from the one used in a CRT monitor. Moreover, the viewing conditions of a hard copy is usually different from those used in scanning and displaying. The operator or the color management system must convert the chromaticity of the white point in the original to that of the reproduction. From the definition of tristimulus values, we know that the exact conversion requires the substitution of one illuminant spectrum for another and weightings by the color-matching function and object spectrum, then integrates the product of spectra over the whole visible range. This illuminant-replacement process is not a linear correspondence. The changing of the viewing conditions has been addressed by the chromatic-adaptation models (see Chapter 4) and white-point conversion (see Chapter 13).46 Issues concerning the color gamut are given in Chapter 5 for CIE spaces, Chapter 6 for colorimetric RGB spaces, and Chapter 7 for device spaces. Color transformation is a key part of color consistency at the system level. This is because different devices use different color descriptions. Various transformation methods such as the color-mixing model, regression, 3D interpolation, artificial neural network, and fuzzy logic, have been developed. Techniques for the color transform are given in Chapter 8 for regression and Chapter 9 for 3D lookup table approaches. Major trade-offs among these techniques are conversion accuracy, processing speed, and computational costs. Color printers are known for their instability; it is a rather common experience to find that the first print may be quite different from the one-hundredth one. A study indicates that dye sublimation, ink-jet, and thermal transfer techniques are more stable than lithography.47 The electrophotographic process, involving charging, light exposure, toner transfer, and heat fusing, is complex and inherently unstable. Part of the device stability problems such as drifting may be corrected by device calibration to bring the device back to the nominal state.
Issues of Digital Color Imaging
421
Finally, a few words about printer registration: color printing requires three (cmy) or four (cmyk) separations. They are printed by multiple passes through the printing mechanism or by multiple separate operations in one pass. These operations require mechanical control of pixel registration. Registration is very important to color-image quality. However, it is more of a mechanical problem than an image-processing problem. Thus, it is beyond the scope of this book.
19.7 Device Characterization As stated in Section 9.4, a color image has at least two components: spatial patterns and colorimetric properties. Factors affecting color matching are color transform, color gamut mapping, viewing conditions, and media. Factors affecting image structure are sampling, tone level, compression, and halftoning. Surface characteristics are primarily affected by the media; various substrates may be encountered during image transmission and reproduction. These factors are not independent; they may interact to cause an appearance change. For example, inadequate sampling and tone level not only give poor image structures but may also cause color shifts, a different halftone screen may cause tone changes and color shifts, an improper use of colors may create textures, images with sharp edges may appear to have higher saturation and more contrast than images with soft edges,48 and finer screen rulings will give higher resolution and cleaner highlight colors.49 With these complexities and difficulties, a systematically formulated color-imaging model that incorporates the human visual model, color-mixing model, color appearance model, and dot-overlap model is needed to improve and analyze color images. A requirement for color imaging at the system level is to retain color consistency and image detail when the image is moved from one device to another. Color consistency based on colorimetric equivalence requires a device-independent encoding standard, properly characterized color-imaging devices, and a colorconversion engine.50 At the system level, we will encounter all kinds of input and output color representations. If we select a device-independent color representation as the intermediate standard, we have the benefit of reducing the complexity from M × N to M + N (see Fig. 19.3). This modular implementation adds flexibility and scalability to the color-imaging architecture. We can easily add or remove system components. Various inputs are converted to an internal exchange standard. On the output side, the internal standard is converted to an output color specification. An example of using CIEXYZ as the intermediate interchange standard is given in Fig. 19.4. The conversion between color spaces requires transformation techniques. For device inputs, a device characterization is performed by experimentally determining parameters for a selected conversion technique (e.g., matrix transform or table lookup) to correlate relationships between color spaces and build a device color profile.51 For colorimetric inputs, the transformation involves computations via known equations. Transformation techniques, device parameters, device profiles, and known formulas form the basis for the color-conversion engine.
422
Computational Color Technology
Figure 19.3 System complexity with respect to device characterization, with and without an internal standard.
Figure 19.4 Possible color transformations using CIEXYZ as the internal standard.
Issues of Digital Color Imaging
423
Implementations of color-conversion engines are subjected to constraints of image quality, speed, and cost. Colorimetric properties involve color transformation, color matching, color difference, surround, adaptation, etc. Overall image quality is the integration of these factors perceived by human eyes. Various theories and models have been developed to address these problems and requirements. Sampling and quantization theories ensure proper resolution and tone level. Colorimetry provides quantitative measures to specify color stimuli. Color-mixing models and transformation techniques give the ability to move color images through various imaging devices. Color appearance models attempt to account for phenomena such as chromatic adaptation that can’t be explained by colorimetry. Device models deal with various device characteristics such as tone rendering, halftoning, color quantization, and device dot modeling for generating visually appearing color images. A thorough image color analysis should include the human visual model, color measurement, color-mixing model, color space transform, color matching, device models, device characteristics, and color appearance model as given in Fig. 19.5. In reality, this complete picture is seldom implemented because of the cost, complexity, and time required.
19.8 Color Spaces and Transforms For system-level applications, it is essential to have a device-independent color representation and means of transforming image data among color spaces. A color image is acquired, displayed, and rendered by different imaging devices. For example, an image is often acquired by a flatbed color scanner or a
Figure 19.5 System-level color-image reproduction.
424
Computational Color Technology
digital camera, displayed on a color monitor, and rendered by a color printer. Different imaging devices use different color spaces; well-known examples are the RGB space for monitors and cmy (or cmyk) space for printers. There are two main types of color space: device dependent and device independent. Color signals produced or utilized by various imaging devices are device dependent; they are device specific, depending on the characteristics of the device such as imaging technology, color description, color gamut, and stability. Thus, the same image rendered by different imaging devices may not look the same. In fact, they usually look different. These problems can be minimized by using some device-independent color spaces. CIE developed a series of color spaces using colorimetry that are not dependent on the imaging devices. CIE color spaces provide an objective color measure and are being used as interchange standards for converting between device-dependent color spaces (see Chapter 5). Because various color spaces are used in the color-image process, there is a need to convert them. Color-space transformation is essential to the transport of color information during image acquisition, display, and rendition. Converting a color specification from one space to another means finding the links for mapping. Some transforms have a well-behaved linear relationship (see Chapter 6), others have a strong nonlinear power function (see Chapter 5). Many techniques have been developed to provide sufficient accuracy for color space conversion under the constraints of cost, speed, design parameters, and implementation concerns. Generally, these techniques can be classified into four categories. The first method uses polynomial regression based on the assumption that the correlation between color spaces can be approximated by a set of simultaneous equations. Once the equations are selected, a statistical regression is performed on a set of selected points with known color specifications in both source and destination spaces for deriving the coefficients of the equations (see Chapter 8). The second approach uses a 3D lookup table with interpolation. A color space is divided into small cells, then the source and destination color specifications are experimentally determined for all lattice points. Nonlattice points are interpolated, using the nearest lattice points (see Chapter 9). The third technique is based on theoretical color-mixing models. The additive color mixing of the contone devices (e.g., monitors) can be addressed by Grassmann’s laws, where the subtractive color mixing of contone devices (e.g., printers) can be interpreted by the Beer-Lambert-Bouguer law and Kubelka-Munk theory (see Chapters 15–18). 19.8.1 Color-mixing models Roughly speaking, two types of color-mixing theories exist. The first is formulated for the halftone process and includes the Neugebauer equations, Murray-Davies equation, and Yule-Nielsen model. The other type is based on light absorption and includes the Beer-Lambert-Bouguer law and Kubelka-Munk theories, for subtractive color mixing. The Beer-Lambert-Bought law is based on light absorption; thus, it is a subtractive color-mixing theory. The Beer-Lambert-Bouguer law relates light
Issues of Digital Color Imaging
425
intensity to the quantity of the absorbent based on the proportionality and additivity of the colorant absorptivity (see Chapter 15). The Kubelka-Munk theory is based on two light channels traveling in opposite directions for modeling translucent and opaque media. The light is being absorbed and scattered in only two directions, up and down (see Chapter 16). Neugebauer’s model provides a general description of halftone color mixing; it predicts the resulting red, green, and blue reflectances or tristimulus values XYZ from given dot areas in the print. In practical applications, one wants the cmy (or cmyk) dot areas for a given color (see Chapter 17). This requires solving the inverted Neugebauer equations, which specify the dot areas of individual inks required to produce the desired RGB or XYZ values. The inversion is not trivial because the Neugebauer equations are nonlinear (see Chapter 17). The MurrayDavies equation derives the reflectance via the absorption of halftone dots (see Chapter 18). It is often used to determine the area coverage by measuring the reflectance of the solid and halftone step wedges. The Yule-Nielsen model addresses the light penetration and scattering (see Chapter 18). The Clapper-Yule model is an accurate account of the halftone process from a theoretical analysis of the multiple scattering, internal reflections, and ink transmissions (see Chapter 18). In this model, the light is being reflected many times from the surface, within the ink and substrate, and by the background. The total reflected light is the sum of light fractions that emerge after each internal reflection cycle.
19.9 Spectral Reproduction Spectral reproduction is the ultimate solution to color reproduction; it removes the metameric problem. It is also an essential part of multispectral imaging, serving as the internal representation (see Chapter 14). This approach often improves image quality or reproduction accuracy by a factor of two or three, but the computational cost, system complexity, and time required are several orders of magnitude higher than conventional trichromatic approaches. It is not known if this trade-off is cost effective.
19.10 Color Gamut Mapping The color gamut indicates the range of colors an imaging device can render; it is the volume enclosed by the most saturated primary colors and their two-color mixtures in a 3D color space. The gamut size and shape are mainly governed by the colorants, printing technology, and media. Good colorants can be found for use in a chosen technology, but they tend to vary from technology to technology. As a result, different color devices have different gamut sizes, so that a color monitor is different from a color printer and an electrophotographic printer is different from an ink-jet printer. Color gamut mismatches of input, display, and output devices are the most difficult problem in maintaining color consistency. Numerous approaches for gamut mapping have been proposed; however, it is still an active research area
426
Computational Color Technology
(see Section 7.9). The color correction for an ink-substrate combination is only a partial solution. The relationship between the original and reproduction should be taken into account. In fact, the optimal relationship is not usually known; it is suggested by Hunt to have six different color-matching levels. In most cases, the optimum relationship is a compromise. The compromise depends on the user’s preference regarding the colors in the original (e.g., monitor) and those available on the reproduction (e.g., printer). The optimum transform for photographic transparency originals that contain mainly light colors, the high-key image, is different from the optimum for an original that contains mainly dark colors, the lowkey image. Graphic images probably require a transform different from scanned photographs.48 The color gamut mapping and preferred color transform are a part of the color appearance task.
19.11 Color Measurement Most colorimeters and spectrophotometers have measuring geometries that are deliberately chosen to either eliminate or totally include the first surface reflections. Typical viewing conditions, having light reflection, transmission, and scattering, lie somewhere between these two extremes. Colors that look alike in a practical viewing condition may measure differently. This phenomenon is strongly affected by the surface characteristics of the images and are most significant for dark colors. A practical solution to this problem that is being proposed is by using telecolorimetry, which places the measuring device in the same position as the observer.52 As mentioned previously, CIE systems have limited capability to account for changes in appearance that arise from a change of the white point or substrate. On different media, the isomeric samples may look different. Even within a given medium type, such as paper substrate, the difference can come from the whiteness of the paper, fluorescence, gloss, surface smoothness, etc. The problem of the media difference is not just a measurement problem; it is also a part of the color appearance problem.
19.12 Color-Imaging Process A complete color-imaging process that incorporates various visual and physical models may be described as follows: An image, with a specific sampling rate, quantization level, and color description, is created by the input device which uses (i) the human visual model to determine the sampling and quantization, and (ii) device calibration to ensure that the gain, offset, and tone reproduction curves are properly set. The setting of the tone reproduction curves may employ the dot-overlap model, for example. This input device assigns device-dependent color coordinates (e.g., RGB) to the image elements. The image is fed to the color-transform engine for converting to colorimetric coordinates (e.g., CIELAB). This engine performs the colorimetric characterization of the input device; it implements the required
Issues of Digital Color Imaging
427
color-space transform techniques (e.g., color-mixing models, 3D lookup tables). The engine can be a part of the input device or an attachment, or it can be on the host computer. The second step is to apply a chromatic-adaptation and/or color appearance model to the colorimetric data, along with additional information on the viewing conditions of the original image (if any), in order to transform the image data into appearance attributes such as lightness, hue, and chroma. These appearance coordinates, which have accounted for the influences of the particular device and the viewing conditions, are called viewing-conditions-independent space.53 At this point, the image is represented purely by its original appearance. After this step, the image may go through various types of processing such as spatial scaling, edge enhancement, resolution conversion, editing, or compression. If the output device is selected, the image should be transformed to a format suitable for the output device. If the output is a bi-level device, the image should be halftoned. A good halftone algorithm takes the human visual model, dot-overlap model, and colormixing model into account. Then, color gamut mapping is performed to meet the output color gamut. This puts the image in its final form with respect to the appearance that is to be reproduced. Next, the process must be reversed. The viewing conditions for the output image, along with the final image-appearance data, are used in an inverted color appearance model to transform from the viewing-conditionsindependent space to a device-independent color space (e.g., CIEXYZ). These values, together with the colorimetric characterization of the output device, are used for transforming to the device coordinates (e.g., cmyk) for producing the desired output image. The main implementation issues for the color-space transform are the performance, image quality, and cost that are affected by the imaging architecture and imaging technology. Performance is judged by the processing speed. Image quality consists of color appearance and spatial patterns that are strongly dependent on the imaging technology, device characteristics, and media properties. Implementation cost is directly affected by the computational accuracy and memory requirement, and indirectly affected by the performance and quality. We briefly discuss these issues and the trade-offs among them. 19.12.1 Performance The major factors affecting speed are the image quality, color architecture, image path, bandwidth, design complexity, conversion technique, and degree of hardware assistance [e.g., an application-specific integrated circuit (ASIC) chip]. In general, high quality requires more image processing and thus reduces the speed. For example, a higher resolution gives a better image quality, but it increases data size, which leads to a longer processing time. An improperly designed image path may add unnecessary transforms that increase complexity and processing time, whereas a cleverly designed architecture may simplify computation and increase parallelism to enhance speed. The color-transformation technique makes a big difference in
428
Computational Color Technology
complexity and speed. For example, polynomial regression requires more computational steps than 3D lookup with interpolation but less memory for data storage, and table lookup is faster than arithmetic operations. The bandwidth indicates the rate of carrying bits in the office system. At 600 dpi resolution, a page-size image has 134.6 Mbytes of data. If a throughput of 10 pages per minute is requested, we need a bit rate of 179.5 Mbits/sec. This bit rate undoubtedly requires a high bandwidth (by the way, compression will help; the extent of data size reduction is dependent on the compression ratio). Moreover, to process this amount of pixels with respect to the implemented imaging techniques requires a high-speed processor. A specifically designed silicon chip is always faster than a general-purpose processor. Therefore, it is common practice to use an ASIC for the purpose of enhancing speed. 19.12.2 Cost The major factors affecting cost are image quality, design complexity, computational cost (ASIC versus software), memory requirement, and the conversion algorithm. High image quality requires more image processing, which increases computational cost. For example, edge enhancement using a convolution filter improves sharpness of the image, but it is a computationally intensive operation where the computational cost increases roughly as a square function of the filter size. The cost also increases with increasing design complexity, which requires more hardware components and software management. The conversion algorithm determines the feasibility of design simplification and the memory requirement. A thorough understanding of the algorithms allows us to concatenate several arithmetic operations into one, to use integer arithmetic instead of floating-point computation, and to determine the minimum memory requirement that still provides good accuracy and image quality.
19.13 Color Architecture To optimize the cost, quality, and performance, we proposed a modular colorarchitecture and presented several implementation schemes. The architecture is simple, yet scalable and flexible. It accommodates various color inputs and outputs. The CIELAB↔sRGB transforms were used as examples to illustrate the implementation detail. We implemented these transforms in software to demonstrate the effects of the implementation scheme with respect to performance and memory requirements. The software simulation indicated that it is feasible to implement a high-performance, high-accuracy, and cost-effective transform between CIELAB and sRGB. Quality, performance, and cost are interrelated; any optimization is a delicate trade-off among them. Optimization is best achieved via a modular architecture in which each major processing component can be individually designed, imple-
Issues of Digital Color Imaging
429
mented, tested, and improved upon. Additional benefits are (i) a reduction in system complexity and (ii) the ease of upgrading software modules to hardware ASIC chips. In view of these advantages and knowing that the example given in Fig. 19.5 is too complex in scope for this book, we narrowed our attention to colorimetric and device RGB inputs via an intermediate standard (e.g., CIE color space) to device color outputs (e.g., RGB or CMYK). At this scale, we proposed a modular architecture in Fig. 19.6 for colorimetrically converting from RGB inputs to device outputs and the reverse transformation. We selected CIEXYZ as the internal standard because it is a common thread between RGB standards (most RGB spaces have a linear transform to and from CIEXYZ) and it is convenient for performing chromatic adaptation. The CIEXYZ is transformed to CIELAB because of its visual linearity, which gives a better accuracy for device characterization. Each module in Fig. 19.6 was implemented according to its definition and formulas. Still, this architecture is quite involved because there are many RGB standards and Device/RGB inputs; each standard has its own characteristics. However, the beauty of a modular architecture is that if we change the output device, all we have to do is to change the output device profile. Similarly, if we change the RGB input, we only need to change the gamma value and matrix coefficients. The mathematical framework, data structure, and mechanism remain the same for all inputs.
Figure 19.6 Schematic diagram of color transformations from colorimetric RGB and Device/RGB to CIELAB via CIEXYZ, and the reverse transformations.
430
Computational Color Technology
19.14 Transformations between sRGB and Internet FAX Color Standard Insight into color transforms with respect to computational accuracy and performance can be gained by examining the definitions of the color-encoding standards involved. Because of numerous RGB inputs, it is not likely that we can cover them all in this chapter. Therefore, we choose the transform between the default World Wide Web color standard sRGB54,55 and Internet FAX color standard56,57 as an example because they are well documented and have high commercial value. These standards are the carriers of color information on the Internet. For the coming information age, compatibility and interoperability between these two standards are extremely important; we need to have the capability of converting them accurately and cost effectively. Other RGB standards, although different numerically, have the same formulas and structures. For system-level applications using Internet FAX, we deal with two colorencoding standards, sRGB and CIELAB, and two device-dependent color spaces, Device/RGB for scanning or display and Device/CMYK for printing. The definition and associated formulas of the sRGB→CIELAB transform are given in Eqs. (19.2)–(19.9). Equation (19.2) scales inputs to the range of [0, 1] in which the n-bit integer input is divided by the maximum integer in the n-bit representation to give a floating-point value between 0 and 1, where n is the bit depth of the input sRGB and g represents a component of the RGB triplet. gsRGB = g nbit /(2n − 1).
(19.2)
Equation (19.3) performs the gamma correction. /12.92, if g ≤ 0.03928 g sRGB = gsRGB 2.4 g sRGB = gsRGB + 0.055 /1.055 , if g > 0.03928.
(19.3)
Equation (19.4) is the linear transform from RGB to XYZ.45,46
X D65 Y D65 Z D65
0.4124 = 0.2126 0.0193
0.3576 0.7152 0.1192
0.1805 0.0722 0.9505
R sRGB GsRGB . B sRGB
(19.4)
After converting to the internal standard CIEXYZ, a chromatic adaptation is needed because sRGB is encoded under the illuminant D65 , whereas Internet FAX is under D50 . Many chromatic-adaptation models have been proposed with varying degrees of complexity; the computational cost is usually high. Even for a simple von Kries model, the computational cost is substantial; the white-point adjustment takes the form of multiplying four matrices as shown in Eq. (19.5),58 where (X D65 , Y D65 , Z D65 ) and (X D50 , Y D50 , Z D50 ) represent the tristimulus values under D65 and D50 , respectively. Parameters Lmax65 , M max65 , and S max65 are the maximum
Issues of Digital Color Imaging
431
or illuminant white of long, medium, and short cone responses, respectively, under D65 . Similarly, Lmax50 , M max50 , and S max50 are the maximum cone responses under D50 .
XD50 Y D50 Z D50
Lmax50 0 = 0 M max50 0 0 XD65 × M 1 Y D65 , Z D65 M −1 1
0 0
S max50
1/Lmax65 0 0
0 1/M max65 0
0 0 1/S max65
(19.5)
where
0.4002 M 1 = −0.2263 0
0.7076 1.1653 0
−0.0808 0.0457 . 0.9182
Knowing the source and destination white points and the matrix M 1 (see Section 4.1) of converting from XYZ to LMS, we can concatenate all four matrices into one as shown in Eq. (19.6).
XD50 Y D50 Z D50
1.0161 = 0.0061 0
0.0553 0.9955 0
−0.0524 −0.0012 0.7566
XD65 Y D65 . Z D65
(19.6)
Furthermore, Eqs. (19.4) and (19.6) can be combined to give Eq. (19.7), a one-step computation from sRGB to chromatically adapted XYZ under D50 .
X D50 Y D50 Z D50
0.4298 = 0.2141 0.0146
0.3967 0.7140 0.0902
0.1376 0.0718 0.7191
R sRGB GsRGB . B sRGB
(19.7)
The CIEXYZ→CIELAB transform is defined in Eq. (19.8), where L∗ is the lightness, a ∗ is the red-green component, and b∗ is the blue-yellow component; (X, Y, Z) and (Xn , Yn , Zn ) are the tristimulus values of the input and illuminant, respectively, and t is a component of the normalized tristimulus values.59 L∗ = 116f (Y/Yn ) − 16, a ∗ = 500 [f (X/Xn ) − f (Y /Yn )], b∗ = 200 [f (Y /Yn ) − f (Z/Zn )], and f (t) = t 1/3 = 7.787t + (16/116)
if 1 ≥ t > 0.008856, if 0 ≤ t ≤ 0.008856.
(19.8)
432
Computational Color Technology
The resulting tristimulus values are represented as floating-point values. According to the Internet FAX color standard, CIELAB is conformed to the ITULAB format and is represented as n-bit integers. This standard selects D50 (x = 0.3457, y = 0.3585) as the illuminant white. The default gamut range is L∗ = [0, 100], a ∗ = [−85, 85], and b∗ = [−75, 125]. Equation (19.9) gives the encoding formulas from the floating-point to integer representation.43,44 Lsample = (L∗ − Lmin ) × (2n − 1)/(Lmax − Lmin ), a sample = (a ∗ − a min ) × (2n − 1)/(a max − a min ), bsample = (b∗ − bmin ) × (2n − 1)/(bmax − bmin ),
(19.9)
where Lsample , a sample , and bsample are the encoded integer representations of L∗ , a ∗ , and b∗ , respectively. Parameter n is the number of bits for integer representation. The maximum and minimum values are given by the ranges: Lmax = 100, Lmin = 0, a max = 85, a min = −85, bmax = 125, and bmin = −75. Equation (19.10) gives the decoding formula from integer to floating-point representation. L∗ = Lmin + Lsample × (Lmax − Lmin )/(2n − 1), a ∗ = a min + a sample × (a max − a min )/(2n − 1), b∗ = bmin + bsample × (bmax − a min )/(2n − 1).
(19.10)
For Device/RGB inputs, there are no predefined transfer matrix and gamma functions for converting input RGB values to CIEXYZ. The link between Device/RGB and CIEXYZ must be determined via device characterization. If polynomial regression is used for characterization, the accuracy of the transformation increases as the number of polynomial terms increases.22 Because our primary interest is improving the computational accuracy by varying the bit depth of coefficients; we use a linear transform from RGB to XYZ for reasons of computational cost and to comply with the existing data structure and conversion mechanism. Therefore, in this study, Device/RGB values are gray balanced via experimentally determined gray-balance curves via 1D lookup tables, then linearly transformed to CIEXYZ using coefficients Cij derived from a device characterization.60
X C11 Y = C12 C13 Z
C21 C22 C23
C31 C32 C33
R G . B
(19.11)
For this particular exercise, Device/RGB has the following matrix coefficients for encoding from XYZ to RGB (the left-hand side matrix) and decoding from RGB to XYZ (the right-hand side matrix). These coefficients are derived from the exper-
Issues of Digital Color Imaging
433
imental data of a Sharp scanner via linear regression.61 −1.2638 −0.2579 1.6698 0.1288 −0.1080 0.8644 Encoding
2.7412 −0.8053 0.0819
0.4679 0.2269 −0.0160
0.3597 0.0860 0.7676 −0.0467 0.0618 1.1429 Decoding
The inverse transform from CIELAB to sRGB is given in Eqs. (19.12)–(19.19). Equation (19.12) gives the CIELAB→CIEXYZ transform, where T is a component of the tristimulus values. f (X/Xn ) = a ∗ /500 + (L∗ + 16)/116, f (Y /Yn ) = (L∗ + 16)/116, f (Z/Zn ) = −b∗ /200 + (L∗ + 16)/116, and T = f (T /Tn )3 × Tn
if f (T /Tn ) > 0.20689,
= {[f (T /Tn ) − 16/116]/7.787} × Tn
if f (T /Tn ) ≤ 0.20689. (19.12)
Equation (19.13) provides the chromatic adaptation from D50 to D65 .
X D65 Y D65 Z D65
= M −1 1
Lmax65 0 0
1/Lmax50 × 0 0
0 M max65 0 0 1/M max50 0
0 0 S max65
0 0
M1
1/S max50
X D50 Y D50 . (19.13) Z D50
Again, the four matrices can be concatenated into one; the result is given in Eq. (19.14).
X D65 Y D65 Z D65
0.9845 = −0.0060 0
−0.0547 1.0048 0
0.0679 0.0012 1.3208
X D50 Y D50 . Z D50
(19.14)
Equation (19.15) is the matrix transform from CIEXYZ to sRGB.
R sRGB GsRGB B sRGB
3.2410 = −0.9692 0.0556
−1.5374 1.8760 −0.2040
−0.4986 0.0416 1.0570
X D65 Y D65 . Z D65
(19.15)
434
Computational Color Technology
Substituting Eq. (19.14) into Eq. (19.15), we obtain Eq. (19.16), a one-step computation from CIEXYZ at D50 to sRGB at D65 . R sRGB 3.2000 −1.7221 −0.4403 X D50 (19.16) GsRGB = −0.9654 1.9380 −0.0086 Y D50 . B sRGB Z D50 0.0535 0.2019 1.4001 Equation (19.17) does the clipping, where g sRGB represents a component of the RGB triplet. g sRGB = 0,
if g sRGB < 0
g sRGB = 1,
if g sRGB > 1.
(19.17)
Equation (19.18) performs the gamma correction. = 12.92 × g sRGB , gsRGB
if g sRGB ≤ 0.00304
= 1.055 × AsRGB 1.0/2.4 − 0.055, if g sRGB > 0.00304. gsRGB
(19.18)
Finally, Eq. (19.19) scales the results to n-bit integers. × (2n − 1). g nbit = gsRGB
(19.19)
19.15 Modular Implementation Implementation is a delicate balance among accuracy, speed, and memory cost. From an accuracy standpoint, one would prefer floating-point computations. For the speed consideration, one would prefer the use of integer arithmetic and lookup tables wherever possible. To minimize memory cost, one would use small lookup tables or no table at all. Although memory cost is dropping and it is no longer a big concern for cost savings, the memory requirements add up quickly when we implement the various input and output transforms given in Fig. 19.5. Moreover, it increases the complexity for memory management and the number of context switches into and out of the CPU. This, in turn, lowers the processing speed. From the color architecture given in Fig. 19.6, the system consists of six color transforms: colorimetric RGB→CIEXYZ, Device/RGB→CIEXYZ, and CIEXYZ→CIELAB in the forward direction; then, CIELAB→CIEXYZ, CIEXYZ→colorimetric RGB, and CIEXYZ→Device/RGB in the reverse direction. Each of these transforms is implemented through software and tested using experimental data as well as synthetic values. 19.15.1 SRGB-to-CIEXYZ transformation The sRGB→CIEXYZ conversion is implemented in two ways, as shown in Figs. 19.7 and 19.8, depending on the need for performance or cost. The low-cost implementation uses a 1D LUT to store computed results of Eqs. (19.2) and (19.3),
Issues of Digital Color Imaging
435
Figure 19.7 Low-cost implementation of colorimetric RGB-to-XYZ transformation.
Figure 19.8 High-cost implementation of colorimetric RGB-to-XYZ transformation.
followed by a matrix-vector multiplication. The contents of the table can be integer or floating-point values. Integer representation has lower accuracy but little need for storage memory. To use integer arithmetic, outputs from Eq. (19.3) must be scaled to an integer by multiplying it with a scaling factor f s , usually (2n − 1). If possible, one would like to make the scaling factor a power of 2 because it can be implemented as a bit shifting instead of the computationally expensive multiplication. Equations (19.2) and (19.3) together with the integer scaling can be combined to give an integer LUT, in which the bit depth n determines memory requirements and computational accuracy. Only one LUT is needed because the three RGB components are treated identically. The number of LUT entries is dependent on the bit depth of the input sRGB. If input the sRGB is encoded in 8-bit depth, we have 256 entries for the LUT. The second step is to compute the scaled XYZ from the scaled RGB if integer arithmetic is used. In this case, we need to scale the coefficients in Eq. (19.4). This
436
Computational Color Technology
is achieved via Eq. (19.20). Cij,int = int[Cij × (2m − 1) + 0.5],
(19.20)
where Cij and Cij,int are the floating-point and integer expressions of the ijth coefficient, respectively, and m is the bit depth of the scaled integer coefficient. Because the multiplication is used in Eq. (19.4), the combined bit depth is (m + n) with a total scaling factor of (2m − 1) × (2n − 1). If one wants to keep the bit depth at n, then the output of Eq. (19.4) must be divided by (2m − 1). This low-cost implementation gives three table lookups, nine multiplications, six additions, and, optionally, three divisions for scaling back to n bits. For high-cost implementation, the sRGB→CIEXYZ transform is implemented in two stages of table lookups. The first stage is the same as the low-cost implementation. In the second stage, we use nine 1D LUTs to store products of the coefficients and scaled RGB values (see Fig. 19.8). In this way, the whole computation becomes 12 table lookups and 6 additions. The enhanced performance is at the expense of memory cost. The memory requirement can become quite costly. For example, an 8-bit input and a 12-bit LUT require 512 bytes (1 byte = 8 bits) for the first LUT and 73,728 (2 × 9 × 212 ) bytes for the second set of LUTs, where the bit depth of the first LUT dictates the memory size of the second LUT. 19.15.2 Device/RGB-to-CIEXYZ transformation Device/RGB is implemented in nearly the same way as sRGB. A minor difference is that input Device/RGB requires three 1D LUTs, one for each primary, for converting to gray-balanced RGB before matrix multiplication. 19.15.3 CIEXYZ-to-CIELAB transformation The cubic-root function f (t) of Eq. (19.8) is bounded in the range of [16/116, 1] because t has the range of [0, 1]. If input CIEXYZ values are scaled and represented by n-bit integers, values of the function f (t) can be precomputed and stored in lookup tables. This approach reduces computational cost and enhances performance by removing run-time computations of the cubic-root function, which are computationally intensive. The LUT element is computed as follows: (1) Each scaled integer tristimulus value in the range of [0, 2n − 1] is divided by the scaling factor and converted to a floating-point value. (2) The resulting value is divided by the corresponding tristimulus value of the white point to get t. (3) The cubic root of the value t is computed. (4) Results are stored in a 1D LUT. The parameter t is a normalized tristimulus value with respect to the white point; therefore, we need to have three LUTs, one for each component because Xn , Yn , and Zn are not the same.
Issues of Digital Color Imaging
437
There are several implementation levels. For a low-performance and highaccuracy implementation, one can use floating-point LUTs and computations. For a high-performance implementation, one can use integer LUTs and integer arithmetic. Figure 19.9 depicts a scheme using three LUTs. Elements of the LUTs can be integers or floating-point values, depending on the accuracy requirement. The Y-LUT output is used three times as follows: (1) It is multiplied by 116 and the result is subtracted from 16 to give L∗ . (2) It is subtracted from the X-LUT output and the result is multiplied by 500 to give a ∗ . (3) The Z-LUT output is substracted from it and the result is multiplied by 200 to give b∗ . If integer LUTs for f (t) are required, we must convert the floating-point values to integers. A major concern regarding integer implementation is the accuracy of the calculated CIELAB. To provide sufficient accuracy, a common approach is to scale the LUT elements with a factor f s . After performing the required integer arithmetic, the value is divided by the same scaling factor for getting back to the initial depth. The optimal scaling factor can be derived by computer simulation with respect to accuracy, cost, and performance. 19.15.4 CIELAB-to-CIEXYZ transformation The CIELAB→CIEXYZ transform is implemented in two stages of table lookups as shown in Fig. 19.10. The first stage uses three 1D lookup tables with 2n entries to convert the n-bit ITULAB values to scaled L∗ , a ∗ , and b∗ . One LUT stores
Figure 19.9 Floating-point implementation of the CIEXYZ→CIELAB transformation.
438
Computational Color Technology
Figure 19.10 Low-cost implementation of the CIELAB→CIEXYZ transformation.
the results of [(L∗ + 16)/116 × f s ], the second LUT for (a ∗ /500 × f s ), and the third LUT for (b∗ /200 × f s ), where f s is the scaling factor. The scaling factor is varied to find the optimal bit depth. The L∗ -LUT output is plugged into a 1D LUT containing the results of the cubic function in order to obtain Y . Outputs of the a ∗ LUT and L∗ LUT are added, and the sum is used to obtain X. The b∗ -LUT output is subtracted from the L∗ -LUT output, and the result is used to obtain Z. The second stage uses a 1D LUT to store the computed cubic function. The output from the 1D LUT is multiplied by the corresponding tristimulus value of the white point to give the tristimulus value. To use integer multiplication, the 1D LUT contains integer elements and the white-point tristimulus values are scaled to integers via Eq. (19.19). 19.15.5 CIEXYZ-to-colorimetric RGB transformation As shown in Fig. 19.6, CIEXYZ is converted to colorimetric RGB via a matrix transform [see Eq. (19.16)], clipping [see Eq. (19.17)], gamma correction [see Eq. (19.18)], and integer scaling [see Eq. (19.19)]. For a floating-point implementation, we perform real-time computations of Eqs. (19.16)–(19.19). For integer implementation, we can group the clipping, gamma correction, and depth scaling into one 1D LUT. The matrix multiplication is implemented by using the second half of Fig. 19.7 or 19.8. 19.15.6 CIEXYZ-to-Device/RGB transformation The implementation is similar to the CIEXYZ→colorimetric RGB transform with the exception that the clipping and gamma corrections are replaced by an inversed gray-balance module implemented as 1D LUTs.
Issues of Digital Color Imaging
439
19.16 Results and Discussion We perform software simulations by varying the bit depth of LUTs and matrix coefficients for the purpose of finding the optimal bit depth with respect to accuracy, speed, and memory cost. For colorimetric RGB, the bit depth n of the first LUT and the bit depth m of the second set of LUTs (or matrix coefficients) are varied independently. For Device/RGB, only the second set of LUTs or matrix coefficients are varied. Computational accuracy is judged by calculating the difference between integer results and floating-point computation in CIELAB space. 19.16.1 SRGB-to-CIEXYZ transformation This experiment uses 150 data points, having 125 color patches from 5-level combinations of a RGB cube and 25 three-color mixtures. This is a color test target used by Hewlett-Packard Corporation for printer evaluation. Input RGB values are converted to CIEXYZ via Fig. 19.7 or 19.8. The resulting CIEXYZ values are then converted to CIELAB using floating-point computations. This CIELAB value is compared with the computed CIELAB value using floating-point computations for all equations from RGB to CIELAB. In this way, we ensure that the second half of the computation (from XYZ to LAB) does not introduce computational error. Table 19.1 gives the average Eab of 150 data points for the two implementations shown in Figs. 19.7 and 19.8.62 For a given bit depth of the first LUT, Table 19.1 shows a substantial improvement in accuracy as the bit depth of the matrix coefficient (or second LUT) increases from 8 to 9 bits. Little improvement is gained beyond 9 bits. On the other hand, for a given bit depth of matrix coefficients (or second LUT), accuracy improves as the bit depth of the first LUT increases. The improvement levels off around 12 bits. The bit-depth increase not only improves the accuracy but also narrows the error distribution. Comparing the corresponding values of low-cost and high-cost implementations, one would notice that the accuracy is higher for the high-cost implementation. For all practical purposes, the 12-bit and 14-bit high-cost implementations, Table 19.1 Average Eab of the sRGB-to-CIEXYZ transformation.
Bit depth of first LUT 8 bits 9 bits 10 bits 12 bits 14 bits
Low-Cost Implementation
High-Cost Implementation
Bit depth of matrix coefficients
Bit depth of second LUT
8 bits
9 bits
10 bits
12 bits
8 bits
9 bits
10 bits
12 bits
1.31 0.82 0.53 0.42 0.42
1.15 0.55 0.30 0.19 0.18
1.15 0.59 0.30 0.12 0.11
1.17 0.56 0.27 0.08 0.05
1.30 0.52 0.29 0.07 0.02
1.10 0.48 0.24 0.08 0.02
1.08 0.53 0.27 0.06 0.02
1.15 0.58 0.26 0.06 0.02
440
Computational Color Technology
having errors less than 0.1 Eab units, are as good as the floating-point computation. 19.16.2 Device/RGB-to-CIEXYZ transformation This experiment uses 146 data points, including 24 Macbeth ColorChecker outputs from a Sharp scanner and 122 sets of RGB values from 5-level combinations of an RGB cube (three colors are slightly out of gamut because the matrix coefficients are obtained via linear regression).60 The first set of LUTs has the same bit depth as the input. We only varied the bit depth of the second set of LUTs or matrix coefficients. Results are summarized in Table 19.2 for both low-cost and high-cost implementations, where d xyz is the difference in CIEXYZ space and Eab,max is the maximum Eab . As expected, in both cases, the computational accuracy improves as the bit depth of the coefficients or second LUTs increases. Error histograms show the same trend as sRGB histograms in that the error bandwidth is narrowed and the band is shifted to the left as the bit depth is increased. 19.16.3 CIEXYZ-to-CIELAB transformation In this transform, we use 314 sets of scaled 8-bit CIEXYZ values, consisting of the following: (1) 5-level cubic combinations of X = Y = Z = [1, 62, 123, 184, 245] (2) 5-level cubic combinations of X = [2, 63, 124, 185, 246], Y = [5, 66, 127, 188, 249], and Z = [9, 70, 131, 192, 253] (3) 4-level cubic combinations of X = [22, 83, 144, 205], Y = [15, 76, 137, 198], and Z = [19, 80, 141, 202] Five different scaling factors with values 1 (no scaling), 2, 4, 8, and 16 are used for elements of the 1D LUTs shown in Fig. 19.9. For the case of no scaling, 98.1% of the 314 data sets give a color difference less than 1 Eab . The percentages for other cases are 99.4% for f s = 2, 88.2% for f s = 4, 74.5% for f s = 8, and 65.6% Table 19.2 Average errors in CIEXYZ and CIELAB spaces for Device/RGB-to-CIELAB conversion.
Bit depth of coefficients 8 bits 9 bits 10 bits 12 bits 14 bits
Low-cost implementation
High-cost implementation
d xyz
Eab
Eab,max
d xyz
Eab
Eab,max
1.05 0.43 0.18 0.06 0.02
3.77 1.61 0.69 0.20 0.06
38.92 18.91 8.46 1.42 0.41
0.96 0.47 0.24 0.06 0.02
2.81 1.37 0.66 0.16 0.04
38.92 18.91 8.46 1.42 0.41
Issues of Digital Color Imaging
441
for f s = 16. The scaling factor of 2 provides the most accurate result with the narrowest error distribution. Contrary to the common belief that the accuracy is improved by increasing the scaling factor, results indicate that the accuracy decreases as the scaling factor increases, with the exception of f s = 2. From this simulation, we recommend a scaling factor of 2 (this is equivalent to a 9-bit depth because the initial XYZ values are 8 bits) for use in software as well as hardware implementations. 19.16.4 CIELAB-to-CIEXYZ transformation This experiment uses 147 data points produced by an electrophotographic printer. Color patches consist of 20 levels of CMY primaries, 15 levels of the black primary, 7 levels of MY, CM, and CY two-color mixtures, and the remaining 51 three-color mixtures. Measured CIELAB values are converted to ITULAB via Eq. (19.9), and are used as inputs to the first set of LUTs shown in Fig. 19.10. Table 19.3 gives the average Eab of 147 data points for the implementation shown in Fig. 19.10.51 For a given bit depth of the second LUT, results indicate that the bit depth of the first LUT has little effect on the computational accuracy, reconfirming that 8 bits are enough for representing visually uniform color spaces such as CIELAB.63 On the other hand, for a given bit depth of the first LUT, accuracy improves as the bit depth of the second LUT, implementing the cubic function, increases. However, it levels off around 12 bits. Also, the bit-depth increase not only improves the accuracy but also narrows the error distribution. 19.16.5 CIEXYZ-to-sRGB transformation This transform gives the biggest error because clipping is used in this stage. Errors of out-of-range colors are usually big and their magnitudes show a dependence on the distance from the triangular gamut boundary; the farther away from the boundary, the higher the error. (Here, we use the term “out-of-range” to indicate color values that are mathematically clipped to a specified range, and to distinguish it from the term “out-of-gamut” that is used for the real physical gamut mismatch of imaging devices.) Table 19.3 Average Eab for low-cost implementation of the CIELAB-to-CIEXYZ transformation.
Bit depth of first LUT 8 bits 9 bits 10 bits 12 bits 14 bits
Bit depth of second LUT 7 bits
8 bits
9 bits
10 bits
12 bits
14 bits
2.17 2.09 2.06
1.40 1.37 1.27 1.32 1.30
0.83 0.83 0.76 0.79 0.84
0.74 0.72 0.67 0.62 0.63
0.68 0.62 0.53 0.53 0.55
0.68 0.61 0.51 0.53 0.52
442
Computational Color Technology
By using integer computations, the in-range colors give an average difference of 1.7 counts between 8-bit CIEXYZ inputs and 8-bit reversed CIEXYZ (obtained from an sRGB→CIEXYZ transform using floating-point computations) inputs with a maximum of three digital counts. For integer implementation without clipping, the average error is 3.5 counts for an 8-bit representation of sRGB. The error decreases as the bit depth increases. It levels off around 12 bits at 1.1 counts. 19.16.6 Combined computational error Using 150 measured CIELAB values from a printed color test target from an H-P ink-jet printer under D65 illuminant, we examine overall computational error from CIELAB via CIEXYZ to sRGB. To check computational accuracy, we convert sRGB back to CIELAB using floating-point computations to ensure that the backward transform does not introduce computational error. The difference between the initial CIELAB and inverted CIELAB is the measure of the computational accuracy. Table 19.4 summarizes the results as a function of the bit depth.62 For floatingpoint computations, we obtain average Eab values ranging form 2.39 to 2.04 (see row 1), depending on the number of bits used to represent sRGB. The average error decreases as the bit depth increases, but the improvement levels off around 12 bits. The maximum error is about 28.3 Eab units. As shown in row 2 of Table 19.4, gamma correction reduces the computational error somewhat, but maximum errors remain the same. For integer computation, we obtain average Eab values ranging form 3.73 to 2.72 (see row 3). As expected, integer computation has a higher error than the corresponding floating-point computation; however, maximum errors are about the same. By removing the 38 out-of-range colors, we get a much smaller error as shown in rows 4, 5, and 6. Comparing the corresponding values of rows 4, 5, and 6, we find that the input ITULAB bit depth does not affect the computational Table 19.4 Combined computational errors with respect to bit depth.
Average color difference Method∗ 1 2 3 4 5 6
Maximum color difference
8-bit
9-bit
10bit
12bit
14bit
8-bit
9-bit
10bit
12bit
14bit
2.39 2.22 3.73 1.93 2.00 1.95
2.20 2.12 3.06 1.12 1.12 1.14
2.12 2.08 2.84 0.85 0.88 0.83
2.05 2.04 2.74 0.74 0.64 0.66
2.04 2.04 2.72 0.74 0.66 0.67
28.36 28.26 28.74 7.18 7.98 7.84
28.34 28.33 27.95 4.17 4.37 4.24
28.35 28.37 28.74 2.41 2.14 2.20
28.34 28.35 28.74 1.34 1.22 1.37
28.35 28.35 28.74 1.63 1.15 1.26
∗ Methods 1: Floating-point computation. 2: Floating-point computation and gamma correction.
3: Integer computation using 150 data points. 4: Integer computation using 112 data points. 5: Integer computation using 112 data points with 9-bit input. 6: Integer computation using 112 data points with 10-bit input.
Issues of Digital Color Imaging
443
accuracy. Once again, the results reconfirm previous studies finding that the 8-bit depth is sufficient to represent a visually linear color space such as CIELAB.63 If we exclude the clipping problem, results indicate that it is feasible to implement a high-speed, high-accuracy, and cost-effective transform between the sRGB and Internet FAX color standards. In the sRGB→CIEXYZ transform, the complex computations using Eqs. (19.2)–(19.7) can be implemented in two sets of lookup tables (or one LUT followed by a matrix multiplication) with a total of twelve table lookups and six additions as shown in Fig. 19.8. The optimal bit depth is determined to be 10 bits for the first LUT (8 bits and 9 bits are a somewhat low in computational accuracy, see Table 19.1). This gives 1024 entries for the second set of LUTs. Elements of the second LUTs are recommended to be encoded at 12 bits (see Table 19.1). The reverse CIEXYZ→sRGB transform from Eqs. (19.16)– (19.19) can also be implemented in two sets of lookup tables (or a matrix multiplication followed by a lookup table); therefore, the computational cost and bit depth are the same as the forward transform. In the CIEXYZ→CIELAB transform, Eq. (19.8) can be implemented as a table lookup also. Using Fig. 19.9, we have three lookups, three multiplications, and three subtractions. A 9-bit depth is recommended for LUT elements in Fig. 19.9. The reverse CIELAB→CIEXYZ transform can be implemented in two sets of LUTs as shown in Fig. 19.10. The computational cost can go as low as six lookups, two additions, and three multiplications. We recommend an 8-bit depth for the first set of LUTs and a 12-bit depth for the second set of LUTs (see Tables 19.3 and 19.4). In the case of the Device/RGB→CIEXYZ transform, the bit depth of the first LUTs is the same as input Device/RGB. The bit depth of the second LUTs or matrix coefficients is recommended to have 12 bits (see Table 19.2). From the results of this simulation, it seems that the 12-bit depth is an upper bound. We need not go beyond 12 bits. There are the following additional advantages to using two bytes to store a 12-bit number: (1) It reserves room for subsequent computations, reducing the chance of overflowing. (2) One can use a value 2m for the scaling factor, instead of (2m − 1), to reduce computational costs by changing the multiplication to a bit shifting.
19.17 Remarks In this chapter, we presented a couple of color architectures and several implementation schemes for system-level applications. We demonstrated the flexibility and scalability of the modular color architecture by its ability to accommodate various RGB inputs and the ease of replacing one implementation scheme with another. We showed the effect of the implementation scheme with respect to performance and memory cost. From this study, we concluded that the accuracy improved as the bit depth of LUTs increased and the bit-depth increase narrowed the error distribution. The improvement leveled off around 12 bits. Exceptions were 9 bits for CIEXYZ
444
Computational Color Technology
inputs in the CIEXYZ→CIELAB transform and 8 bits for CIELAB inputs in the CIELAB→CIEXYZ transform. Results also suggested that it is feasible to implement a high-performance, high-accuracy, and cost-effective transform between sRGB and Internet FAX standards. Comparisons of RGB encoding standards revealed that out-of-range colors gave the biggest color errors. We showed that out-of-range colors induced by improper color encoding could be eliminated. There are numerous problems for color reproduction at the system level; the most difficult one is perhaps the color gamut mismatch. There are two kinds of color gamut mismatch: one stems from the physical limitation of imaging devices (e.g., a monitor gamut does not match a printer gamut); another one is due to the color encoding standard, such as sRGB. The difference is that one is imposed by nature and the other one is a man-made constraint to describe and manipulate color data. We may not be able to do much about the limitations imposed by nature (although we have tried and are still trying by means of color gamut mapping), but we should make every effort to eliminate color errors caused by the color-encoding standard. It is my opinion that in system-level applications, we need a wide-gamut space, such as RIMM/ROMM RGB, for preserving color information. We should not impose a small, device-specific color space for carrying color information. With a wide-gamut space, the problem is boiled down to having proper device characterizations when we move color information between devices. It is in the device color profile that color mismatch and device characteristics are taken into account. In this way, any color error is confined within the device; it does not spread to other system components.
References 1. H. R. Kang, Image Color Analysis, Wiley Encyclopedia of Electrical and Electronics Engineering, Vol. 9, J. G. Webster (Ed.), Wiley, New York, pp. 534–550 (1999). 2. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Edition, Wiley, New York, pp. 489–490 (1982). 3. D. F. Rogers, Procedural Elements for Computer Graphics, McGraw-Hill, New York, p. 389 (1985). 4. C. J. Bartleson, Colorimetry, Optical Rediation Measurements, Vol. 2, Color Measurement, F. Grum and C. J. Bartleson (Eds.), Academic Press, New York, NY, pp. 33–148 (1980). 5. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Edition, Wiley, New York, pp. 514–581 (1982). 6. B. A. Wandell, Foundations of Vision, Sinauer Assoc., Sunderland, MA, pp. 106–108 (1995). 7. A. A. Michelson, Studies in Optics, University of Chicago Press, Chicago (1927). 8. P. G. J. Barten, Contrast Sensitivity of the Human Eye and Its Effects on Image Quality, SPIE Press, Bellingham, WA, Chap. 3, pp. 27–63 (1999).
Issues of Digital Color Imaging
445
9. H. R. Kang, Digital Color Halftoning, SPIE Press, Bellingham, WA, pp. 64–68 (1999). 10. J. L. Mannos and D. J. Sakrison, The effects of a visual fidelity criterion on the encoding of images, IEEE Trans. Info. Theory IT-20, pp. 525–536 (1974). 11. H. R. Kang, Digital Color Halftoning, SPIE Press, Bellingham, WA, pp. 73–78 (1999). 12. R. Ulichney, Digital Halftoning, MIT Press, Cambridge, MA, pp. 79–84 (1987). 13. J. L. Mannos and D. J. Sakrison, The effects of a visual fidelity criterion on the encoding of images, IEEE Trans. Info. Theory IT-20, pp. 525–536 (1974). 14. A. K. Jain, Fundamentals of Digital Image Processing, Prentice-Hall, Englewood Cliffs, NJ, pp. 53–57 (1989). 15. F. W. Campbell and J. G. Robson, Application of Fourier analysis to the visibility of gratings, J. Physiology 197, pp. 551–566 (1968). 16. N. Graham and J. Nachmias, Detection of grating patterns containing two spatial frequencies: A comparison of single-channel and multiple-channels models, Vision Res. 11, pp. 252–259 (1971). 17. N. Graham, Spatial-frequency channels in human vision: Detecting edges without edge detectors, Visual Coding and Adaptivity, C. S. Harris (Ed.), Erlbaum, Hillsdale, NJ, pp. 215–262 (1980). 18. C. F. Hall and E. L. Hall, A nonlinear model for the spatial characteristics of the human visual system, IEEE Trans. Syst. Man. Cyber. SMC-7, pp. 162–170 (1977). 19. B. Julesz, Spatial-frequency channels in one-, two-, and three-dimensional vision: Variations on a theme by Bekesy, Visual Coding and Adaptivity, C. S. Harris (Ed.), Erlbaum, Hillsdale, NJ, pp. 263–316 (1980). 20. M. B. Sachs, J. Nachmias, and J. G. Robson, Spatial-frequency channels in human vision, J. Opt. Soc. Am. 61, pp. 1176–1186 (1971). 21. T. J. Stockham, Image processing in the context of a visual model, Proc. IEEE 60, pp. 828–842 (1972). 22. J. E. Farrell, X. Zhang, C. J. van den Branden Lambrecht, and D. A. Silverstein, Image quality metrics based on single and multichannel models of visual processing, IEEE Compcon., pp. 56–60 (1997). 23. T. Mitsa and J. R. Alford, Single-channel versus multiple-channel visual models for the formulation of image quality measures in digital halftoning, IS&T NIP10, pp. 385–387 (1994). 24. M. D. Fairchild, Color Appearance Models, Addison-Wesley, Reading, MA, pp. 133–151 (1998). 25. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Edition, Wiley, New York, pp. 639–641 (1982). 26. M. R. Luo and R. W. G. Hunt, The structures of the CIE 1997 color appearance model (CIECAM97s), Color Res. Appl. 23, pp. 138–146 (1998). 27. N. Moroney, M. D. Fairchild, R. W. G. Hunt, C. Li, M. R. Luo, and T. Newman, The CMCCAT02 color appearance model, 10th CIC: Color Science and Engineering Systems, Technologies, Applications, pp. 23–27 (2002).
446
Computational Color Technology
28. C. Li, M. R. Luo, R. W. G. Hunt, N. Moroney, M. D. Fairchild, and T. Newman, The performance of CMCCAT02, 10th CIC: Color Science and Engineering Systems, Technologies, Applications, pp. 28–32 (2002). 29. X. Zhang and B. A. Wandell, A spatial extension of CIELAB for digital color image reproduction, SID Int. Symp., Digest of Tech. Papers, pp. 731–734 (1996). 30. X. Zhang, D. A. Silverstein, J. E. Farrell, and B. A. Wandell, Color image quality metric S-CIELAB and its application on halftone texture visibility, IEEE Compcon., pp. 44–48 (1997). 31. X. Zhang, J. E. Farrell, and B. A. Wandell, Applications of a spatial extension to CIELAB, Proc. SPIE 3025, pp. 154–157 (1997). 32. J. Morovic and M. R. Luo, The fundamentals of gamut mapping, http://www.colour.org/tc8-03/survey (1999). 33. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, Chap. 6, pp. 128–152 (1997). 34. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, Chap. 8, pp. 177–207 (1997). 35. H. R. Kang, Digital Color Halftoning, SPIE Press, Bellingham, WA, pp. 83– 111 (1999). 36. M. Kaji, H. Furuta, and H. Kurakami, Evaluation of JPEG compression by using SCID images, TAGA, Sewickley, PA, pp. 103–116 (1994). 37. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, Chap. 10, pp. 153–156 (1997). 38. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, Chaps. 3–5, pp. 224–247 (1997). 39. H. R. Kang, Digital Color Halftoning, SPIE Press, Bellingham, WA, pp. 113– 128 (1999). 40. T. N. Pappas and D. L. Neuhoff, Model-based halftoning, Proc. SPIE 1453, pp. 244–255 (1991). 41. T. N. Pappas, Model-based halftoning of color images, IEEE Trans. Image Proc. 6, pp. 1014–1024 (1997). 42. H. R. Kang, Digital Color Halftoning, SPIE Press, Bellingham, WA, pp. 445– 470 (1999). 43. M. R. Pointer and G. G. Attridge, The number of discernible colors, Color Res. Appl. 23, pp. 52–54 (1998). 44. R. W. G. Hunt, The Reproduction of Color in Photography, Printing and Television, 4th Edition, Fountain Press, England, pp. 177–197 (1987). 45. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, Chap. 10, pp. 208–260 (1997). 46. M. D. Fairchild, Color Appearance Models, Addison-Wesley, Reading, MA, pp. 191–214 (1998). 47. S. B. Bolte, A perspective on non-impact printing in color, Proc. SPIE 1670, pp. 2–11 (1992).
Issues of Digital Color Imaging
447
48. W. L. Rhodes, Digital imaging: Problems and standards, Proc. SID, Society for Information Display, San Jose, CA, Vol. 30, pp. 191–195 (1989). 49. G. G. Field, The systems approach to color reproduction—A critique, Proc. TAGA, Sewickley, PA, pp. 1–17 (1984). 50. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, pp. 261–271 (1997). 51. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, Chaps. 3–5, pp. 53–127 (1997). 52. T. Johnson, Device independent colour—Is it real? TAGA Proc., Sewickley, PA, pp. 81–113 (1992). 53. M. D. Fairchild, Color Appearance Models, Addison-Wesley, Reading, MA, p. 346 (1998). 54. M. Stokes, M. Anderson, S. Chandrasekar, and R. Motta, A standard default color space for the Internet–sRGB, Version 1.10, Nov. 5 (1996). 55. IEC/3WD 61966-2.1: Colour measurement and management in multimedia systems and equipment—Part 2.1: Default RGB colour space–sRGB, http://www.srgb.com (1998). 56. L. McIntyre and S. Zilles, File format for internet FAX, http://www.itu.int/ itudoc/itu-t (1997). 57. ITU-T.42, Continuous tone color representation method for facsimile, http://www.itu.int/itudoc/itu-t (1996). 58. M. D. Fairchild, Color Appearance Models, Addison-Wesley, Reading, MA, Chap. 9, pp. 199–214 (1998). 59. CIE, Recommendations on uniform color spaces, color-difference equations and psychometric color terms, Supplement No. 2 to Colorimetry, publication No. 15, Bureau Central de la CIE, Paris (1978). 60. H. R. Kang, Color scanner calibration, J. Imaging Sci. Techn. 36, pp. 162–170 (1992). 61. H. R. Kang, Color Technology for Electronic Imaging Devices, SPIE Press, Bellingham, WA, pp. 284–286 (1997). 62. H. R. Kang, Color conversion between sRGB and Internet FAX standards, NIP16, pp. 665–668 (2000). 63. R. Poe and J. Gordon, Quantization effects in digital imaging systems, Proc. TAGA, Sewickley, PA, pp. 230–255 (1987).
Appendix 1
Conversion Matrices This appendix contains the conversion matrices for the RGB-to-XYZ transform and its reverse conversion for twenty primary sets under eight illuminants.
Set 1. Adobe/RGB98 RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.8957 0.1534 0.4619 0.5188 0.0420 0.0585
0.0484 0.0194 0.2551
1.3144 −1.1721 0.0523
−0.3637 2.2687 −0.4600
−0.2219 0.0503 3.9457
Under illuminant B 0.6708 0.1765 0.3459 0.5969 0.0314 0.0673
0.1431 0.0572 0.7535
1.7551 −1.0187 0.0177
−0.4857 1.9717 −0.1557
−0.2964 0.0437 1.3356
Under illuminant C 0.5934 0.1809 0.3060 0.6117 0.0278 0.0689
0.2059 0.0823 1.0843
1.9840 −0.9941 0.0123
−0.5491 1.9241 −0.1082
−0.3350 0.0426 0.9282
Under illuminant D50 0.6454 0.1810 0.3328 0.6121 0.0303 0.0690
0.1378 0.0551 0.7257
1.8243 −0.9934 0.0184
−0.5049 1.9227 −0.1617
−0.3080 0.0426 1.3868
Adobe/RGB98 under illuminant D55 0.6169 0.1832 0.1561 0.3181 0.6195 0.0624 0.0289 0.0698 0.8219
1.9084 −0.9816 0.0162
−0.5281 1.8998 −0.1428
−0.3222 0.0421 1.2245
Adobe/RGB98 under illuminant D65 0.5762 0.1856 0.1880 0.2971 0.6277 0.0752 0.0270 0.0707 0.9902
2.0431 −0.9688 0.0135
−0.5654 1.8750 −0.1185
−0.3450 0.0415 1.0164
449
450
Computational Color Technology (Continued).
Set 1. Adobe/RGB98 RGB-to-XYZ transformation Under illuminant A 0.5481 0.1868 0.2826 0.6317 0.0257 0.0712
XYZ-to-RGB transformation
0.2142 0.0857 1.1283
2.1479 −0.9626 0.0118
−0.5944 1.8632 −0.1040
−0.3627 0.0413 0.8919
Adobe/RGB98 under illuminant D93 0.5151 0.1876 0.2501 0.2656 0.6343 0.1001 0.0241 0.0715 1.3174
2.2854 −0.9586 0.0101
−0.6325 1.8554 −0.0891
−0.3859 0.0411 0.7639
Set 2. Bruse/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.8053 0.2435 0.4153 0.5652 0.0378 0.0609
0.0488 0.0195 0.2569
1.5935 −1.1721 0.0436
−0.6592 2.2687 −0.4407
−0.2525 0.0503 3.9181
Under illuminant B 0.5668 0.2802 0.2922 0.6504 0.0266 0.0700
0.1435 0.0574 0.7556
2.2642 −1.0187 0.0148
−0.9367 1.9717 −0.1498
−0.3588 0.0437 1.3320
Under illuminant C 0.4868 0.2871 0.2510 0.6665 0.0228 0.0718
0.2063 0.0825 1.0864
2.6360 −0.9941 0.0103
−1.0905 1.9241 −0.1042
−0.4177 0.0426 0.9264
Under illuminant D50 0.5387 0.2873 0.2778 0.6670 0.0253 0.0718
0.1382 0.0553 0.7278
2.3822 −0.9934 0.0154
−0.9855 1.9227 −0.1555
−0.3775 0.0426 1.3829
Under illuminant D55 0.5090 0.2908 0.2624 0.6750 0.0239 0.0727
0.1565 0.0626 0.8241
2.5213 −0.9816 0.0136
−1.0431 1.8998 −0.1374
−0.3995 0.0421 1.2214
Under illuminant D65 0.4669 0.2946 0.2407 0.6839 0.0219 0.0737
0.1884 0.0754 0.9924
2.7487 −0.9688 0.0113
−1.1371 1.8750 −0.1141
−0.4355 0.0415 1.0142
Conversion Matrices
451 (Continued).
Set 2. Bruse/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.4381 0.2965 0.2259 0.6883 0.0205 0.0741
0.2147 0.0859 1.1305
2.9295 −0.9626 0.0099
−1.2119 1.8632 −0.1001
−0.4642 0.0413 0.8903
Under illuminant D93 0.4046 0.2977 0.2086 0.6911 0.0190 0.0744
0.2506 0.1002 1.3196
3.1716 −0.9586 0.0085
−1.3121 1.8554 −0.0858
−0.5025 0.0411 0.7627
Set 3. CIE1931/RGB RGB-to-XYZ transformation Under illuminant A 0.7510 0.2766 0.2712 0.7251 0.0000 0.0090 Under illuminant B 0.5129 0.3074 0.1852 0.8057 0.0000 0.0100
XYZ-to-RGB transformation
0.0700 0.0037 0.3465
1.5427 −0.5771 0.0150
−0.5847 1.5981 −0.0414
−0.3053 0.0993 2.8833
0.1701 0.0091 0.8422
2.2587 −0.5194 0.0062
−0.8561 1.4382 −0.0170
−0.4470 0.0894 1.1863
Under illuminant C 0.4257 0.3180 0.1537 0.8336 0.0000 0.0103
0.2364 0.0126 1.1707
2.7213 −0.5019 0.0044
−1.0314 1.3900 −0.0123
−0.5385 0.0864 0.8534
Under illuminant D50 0.4889 0.3108 0.1765 0.8147 0.0000 0.0101
0.1646 0.0088 0.8148
2.3700 −0.5136 0.0064
−0.8983 1.4223 −0.0176
−0.4690 0.0884 1.2262
Under illuminant D55 0.4576 0.3147 0.1653 0.8249 0.0000 0.0102
0.1839 0.0098 0.9104
2.5316 −0.5072 0.0057
−0.9595 1.4046 −0.0158
−0.5010 0.0873 1.0975
Under illuminant D65 0.4120 0.3203 0.1488 0.8396 0.0000 0.0104
0.2176 0.0116 1.0775
2.8122 −0.4984 0.0048
−1.0659 1.3801 −0.0133
−0.5565 0.0858 0.9272
452
Computational Color Technology (Continued).
Set 3. CIE1931/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.3797 0.3242 0.1371 0.8498 0.0000 0.0105
0.2453 0.0131 1.2147
3.0513 −0.4924 0.0043
−1.1565 1.3635 −0.0118
−0.6038 0.0848 0.8225
Under illuminant D93 0.3409 0.3287 0.1231 0.8618 0.0000 0.0107
0.2832 0.0151 1.4023
3.3983 −0.4855 0.0037
−1.2880 1.3446 −0.0102
−0.6725 0.0836 0.7125
Set 4. CIE1964/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.9396 0.0965 0.3597 0.6352 0.0000 0.0414
0.0615 0.0051 0.3141
1.1242 −0.6372 0.0839
−0.1566 1.6647 −0.2195
−0.2176 0.0977 3.1713
Under illuminant B 0.7248 0.1078 0.2775 0.7095 0.0000 0.0463
0.1578 0.0131 0.8059
1.4574 −0.5706 0.0327
−0.2030 1.4905 −0.0855
−0.2821 0.0875 1.2358
Under illuminant C 0.6468 0.1115 0.2476 0.7340 0.0000 0.0479
0.2219 0.0184 1.1331
1.6331 −0.5515 0.0233
−0.2275 1.4407 −0.0608
−0.3161 0.0846 0.8789
Under illuminant D50 0.7027 0.1091 0.2690 0.7184 0.0000 0.0468
0.1523 0.0126 0.7780
1.5032 −0.5635 0.0339
−0.2094 1.4720 −0.0886
−0.2909 0.0864 1.2801
Under illuminant D55 0.6747 0.1105 0.2583 0.7275 0.0000 0.0474
0.1710 0.0142 0.8731
1.5656 −0.5564 0.0302
−0.2181 1.4534 −0.0790
−0.3030 0.0853 1.1407
Under illuminant D65 0.6339 0.1125 0.2426 0.7405 0.0000 0.0483
0.2036 0.0169 1.0396
1.6665 −0.5466 0.0254
−0.2321 1.4280 −0.0663
−0.3225 0.0838 0.9580
Conversion Matrices
453 (Continued).
Set 4. CIE1964/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.6050 0.1138 0.2316 0.7493 0.0000 0.0489
0.2303 0.0191 1.1763
1.7459 −0.5402 0.0224
−0.2432 1.4113 −0.0586
−0.3379 0.0829 0.8467
Under illuminant D93 0.5706 0.1154 0.2184 0.7594 0.0000 0.0495
0.2670 0.0221 1.3635
1.8514 −0.5330 0.0193
−0.2579 1.3924 −0.0506
−0.3583 0.0817 0.7305
Set 5. EBU/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.7749 0.2824 0.3996 0.5843 0.0363 0.1071
0.0403 0.0161 0.2120
1.7021 −1.1721 0.3006
−0.7742 2.2687 −1.0135
−0.2644 0.0503 4.7358
Under illuminant B 0.5318 0.3250 0.2742 0.6723 0.0249 0.1233
0.1337 0.0535 0.7040
2.4803 −1.0187 0.0905
−1.1282 1.9717 −0.3053
−0.3853 0.0437 1.4264
Under illuminant C 0.4509 0.3330 0.2325 0.6890 0.0211 0.1263
0.1962 0.0785 1.0335
2.9248 −0.9941 0.0617
−1.3304 1.9241 −0.2079
−0.4543 0.0426 0.9716
Under illuminant D50 0.5028 0.3333 0.2593 0.6895 0.0236 0.1264
0.1282 0.0513 0.6749
2.6232 −0.9934 0.0944
−1.1932 1.9227 −0.3184
−0.4075 0.0426 1.4879
Under illuminant D55 0.4726 0.3373 0.2437 0.6978 0.0222 0.1279
0.1463 0.0585 0.7705
2.7906 −0.9816 0.0827
−1.2693 1.8998 −0.2789
−0.4335 0.0421 1.3033
Under illuminant D65 0.4310 0.3420 0.2220 0.7070 0.0200 0.1300
0.1780 0.0710 0.9390
3.0669 −0.9688 0.0679
−1.3950 1.8750 −0.2291
−0.4764 0.0415 1.0705
454
Computational Color Technology (Continued).
Set 5. EBU/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.4010 0.3439 0.2068 0.7115 0.0188 0.1304
0.2043 0.0817 1.0760
3.2891 −0.9626 0.0592
−1.4961 1.8632 −0.1997
−0.5109 0.0413 0.9333
Under illuminant D93 0.3674 0.3453 0.1894 0.7145 0.0172 0.1310
0.2401 0.0961 1.2648
3.5898 −0.9586 0.0504
−1.6329 1.8554 −0.1699
−0.5576 0.0411 0.7940
Set 6. Extended/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.9191 0.1259 0.3920 0.5895 0.0000 0.0252
0.0526 0.0185 0.3303
1.1935 −0.7956 0.0606
−0.2474 1.8653 −0.1422
−0.1761 0.0224 3.0257
Under illuminant B 0.7211 0.1380 0.3076 0.6463 0.0000 0.0276
0.1313 0.0461 0.8246
1.5212 −0.7257 0.0243
−0.3153 1.7013 −0.0570
−0.2245 0.0204 1.2120
Under illuminant C 0.6567 0.1400 0.2801 0.6555 0.0000 0.0280
0.1835 0.0644 1.1530
1.6705 −0.7156 0.0174
−0.3462 1.6776 −0.0407
−0.2465 0.0201 0.8668
Under illuminant D50 0.6968 0.1406 0.2972 0.6583 0.0000 0.0281
0.1268 0.0445 0.7968
1.5743 −0.7125 0.0251
−0.3263 1.6705 −0.0589
−0.2324 0.0200 1.2543
Under illuminant D55 0.6725 0.1417 0.2869 0.6633 0.0000 0.0283
0.1420 0.0499 0.8923
1.6311 −0.7071 0.0225
−0.3381 1.6578 −0.0526
−0.2407 0.0199 1.1201
Under illuminant D65 0.6385 0.1428 0.2724 0.6684 0.0000 0.0286
0.1686 0.0592 1.0593
1.7180 −0.7017 0.0189
−0.3561 1.6450 −0.0443
−0.2536 0.0197 0.9434
Conversion Matrices
455 (Continued).
Set 6. Extended/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.6155 0.1432 0.2625 0.6706 0.0000 0.0286
0.1905 0.0669 1.1966
1.7822 −0.6994 0.0167
−0.3694 1.6398 −0.0393
−0.2630 0.0197 0.8353
Under illuminant D93 0.5892 0.1434 0.2513 0.6713 0.0000 0.0287
0.2203 0.0774 1.3843
1.8619 −0.6986 0.0145
−0.3859 1.6380 −0.0339
−0.2748 0.0197 0.7220
Set 7. Guild/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.8114 0.2236 0.3478 0.6314 0.0000 0.0219
0.0625 0.0208 0.3336
1.4487 −0.7997 0.0526
−0.5047 1.8659 −0.1226
−0.2401 0.0333 2.9956
Under illuminant B 0.5887 0.2465 0.2523 0.6960 0.0000 0.0242
0.1553 0.0518 0.8280
1.9970 −0.7255 0.0212
−0.6958 1.6927 −0.0494
−0.3309 0.0302 1.2068
Under illuminant C 0.5126 0.2508 0.2197 0.7080 0.0000 0.0246
0.2168 0.0723 1.1564
2.2932 −0.7131 0.0152
−0.7990 1.6639 −0.0354
−0.3800 0.0297 0.8641
Under illuminant D50 0.5632 0.2510 0.2414 0.7086 0.0000 0.0246
0.1501 0.0500 0.8003
2.0873 −0.7125 0.0219
−0.7273 1.6625 −0.0511
−0.3459 0.0297 1.2486
Under illuminant D55 0.5351 0.2531 0.2293 0.7147 0.0000 0.0248
0.1680 0.0560 0.8958
2.1967 −0.7065 0.0196
−0.7654 1.6484 −0.0457
−0.3641 0.0294 1.1155
Under illuminant D65 0.4951 0.2555 0.2122 0.7214 0.0000 0.0250
0.1993 0.0664 1.0629
2.3742 −0.6999 0.0165
−0.8272 1.6331 −0.0385
−0.3935 0.0292 0.9402
456
Computational Color Technology (Continued).
Set 7. Guild/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.4676 0.2566 0.2004 0.7246 0.0000 0.0252
0.2250 0.0750 1.2000
2.5142 −0.6968 0.0146
−0.8760 1.6258 −0.0341
−0.4167 0.0290 0.8327
Under illuminant D93 0.4353 0.2574 0.1866 0.7267 0.0000 0.0252
0.2602 0.0867 1.3878
2.7004 −0.6948 0.0126
−0.9408 1.6211 −0.0295
−0.4475 0.0289 0.7201
Set 8. Ink-jet/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.8284 0.2170 0.3550 0.6249 0.0000 0.0260
0.0522 0.0201 0.3295
1.4141 −0.8055 0.0637
−0.4829 1.8794 −0.1485
−0.1947 0.0131 3.0342
Under illuminant B 0.6227 0.2371 0.2669 0.6829 0.0000 0.0285
0.1306 0.0502 0.8237
1.8813 −0.7370 0.0255
−0.6424 1.7197 −0.0594
−0.2591 0.0120 1.2136
Under illuminant C 0.5577 0.2398 0.2390 0.6907 0.0000 0.0288
0.1827 0.0703 1.1522
2.1005 −0.7287 0.0182
−0.7173 1.7003 −0.0425
−0.2893 0.0118 0.8676
Under illuminant D50 0.5964 0.2416 0.2556 0.6959 0.0000 0.0290
0.1262 0.0485 0.7959
1.9642 −0.7233 0.0263
−0.6707 1.6877 −0.0615
−0.2705 0.0118 1.2560
Under illuminant D55 0.5716 0.2433 0.2450 0.7007 0.0000 0.0292
0.1413 0.0544 0.8914
2.0494 −0.7183 0.0235
−0.6999 1.6761 −0.0549
−0.2822 0.0117 1.1214
Under illuminant D65 0.5372 0.2449 0.2302 0.7052 0.0000 0.0294
0.1678 0.0645 1.0585
2.1806 −0.7137 0.0198
−0.7446 1.6653 −0.0462
−0.3003 0.0116 0.9444
Conversion Matrices
457 (Continued).
Set 8. Ink-jet/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.5142 0.2454 0.2204 0.7067 0.0000 0.0294
0.1896 0.0729 1.1958
2.2780 −0.7122 0.0175
−0.7779 1.6619 −0.0409
−0.3137 0.0116 0.8360
Under illuminant D93 0.4883 0.2453 0.2093 0.7064 0.0000 0.0294
0.2193 0.0844 1.3836
2.3991 −0.7126 0.0152
−0.8192 1.6626 −0.0354
−0.3304 0.0116 0.7225
Set 9. ITU–R.BT.709/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.7599 0.2957 0.3918 0.5914 0.0356 0.0986
0.0420 0.0168 0.2213
1.7589 −1.1721 0.2389
−0.8343 2.2687 −0.8761
−0.2706 0.0503 4.5396
Under illuminant B 0.5145 0.3402 0.2653 0.6804 0.0241 0.1134
0.1357 0.0543 0.7147
2.5979 −1.0187 0.0740
−1.2323 1.9717 −0.2713
−0.3997 0.0437 1.4058
Under illuminant C 0.4332 0.3486 0.2234 0.6973 0.0203 0.1162
0.1983 0.0793 1.0445
3.0850 −0.9941 0.0506
−1.4634 1.9241 −0.1856
−0.4746 0.0426 0.9619
Under illuminant D50 0.4851 0.3489 0.2501 0.6978 0.0227 0.1163
0.1302 0.0521 0.6859
2.7553 −0.9934 0.0771
−1.3070 1.9227 −0.2827
−0.4239 0.0426 1.4648
Under illuminant D55 0.4547 0.3531 0.2345 0.7062 0.0213 0.1177
0.1484 0.0594 0.7816
2.9394 −0.9816 0.0677
−1.3943 1.8998 −0.2481
−0.4522 0.0421 1.2854
Under illuminant D65 0.4119 0.3578 0.2124 0.7155 0.0193 0.1193
0.1803 0.0721 0.9493
3.2410 −0.9692 0.0556
−1.5374 1.8760 −0.2040
−0.4986 0.0416 1.0570
458
Computational Color Technology (Continued).
Set 9. ITU–R.BT.709/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.3827 0.3600 0.1973 0.7201 0.0179 0.1200
0.2064 0.0826 1.0872
3.4922 −0.9626 0.0486
−1.6566 1.8632 −0.1783
−0.5373 0.0413 0.9241
Under illuminant D93 0.3490 0.3616 0.1800 0.7231 0.0164 0.1205
0.2423 0.0969 1.2761
3.8291 −0.9586 0.0414
−1.8164 1.8554 −0.1519
−0.5891 0.0411 0.7873
Set 10. Judd-Wyszecki/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.9798 0.0574 0.3538 0.6444 0.0000 0.0710
0.0603 0.0017 0.2845
1.0454 −0.5743 0.1434
−0.0688 1.5905 −0.3971
−0.2213 0.1121 3.4873
Under illuminant B 0.7623 0.0642 0.2753 0.7200 0.0000 0.0794
0.1639 0.0047 0.7728
1.3437 −0.5141 0.0528
−0.0884 1.4236 −0.1462
−0.2844 0.1004 1.2836
Under illuminant C 0.6806 0.0666 0.2458 0.7475 0.0000 0.0824
0.2330 0.0067 1.0986
1.5051 −0.4951 0.0371
−0.0990 1.3712 −0.1028
−0.3186 0.0967 0.9030
Under illuminant D50 0.7414 0.0648 0.2677 0.7277 0.0000 0.0802
0.1579 0.0045 0.7447
1.3816 −0.5086 0.0548
−0.0909 1.4085 −0.1517
−0.2925 0.0993 1.3321
Under illuminant D55 0.7125 0.0657 0.2573 0.7376 0.0000 0.0813
0.1780 0.0051 0.8393
1.4377 −0.5018 0.0486
−0.0946 1.3896 −0.1346
−0.3043 0.0980 1.1820
Under illuminant D65 0.6697 0.0670 0.2418 0.7520 0.0000 0.0829
0.2131 0.0061 1.0050
1.5294 −0.4922 0.0406
−0.1006 1.3630 −0.1124
−0.3238 0.0961 0.9871
Conversion Matrices
459 (Continued).
Set 10. Judd-Wyszecki/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.6393 0.0679 0.2308 0.7622 0.0000 0.0840
0.2420 0.0070 1.1412
1.6024 −0.4856 0.0357
−0.1054 1.3448 −0.0990
−0.3392 0.0948 0.8693
Under illuminant D93 0.6023 0.0690 0.2175 0.7744 0.0000 0.0854
0.2816 0.0081 1.3276
1.7006 −0.4780 0.0307
−0.1119 1.3236 −0.0851
−0.3600 0.0933 0.7472
Set 11. Kress Default/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.9305 0.1101 0.4149 0.5734 0.0003 0.0280
0.0570 0.0118 0.3272
1.1706 −0.8485 0.0717
−0.2151 1.9030 −0.1629
−0.1963 0.0795 3.0496
Under illuminant B 0.7230 0.1244 0.3224 0.6482 0.0002 0.0317
0.1430 0.0295 0.8203
1.5066 −0.7506 0.0286
−0.2769 1.6835 −0.0650
−0.2526 0.0703 1.2164
Under illuminant C 0.6519 0.1282 0.2906 0.6681 0.0002 0.0327
0.2001 0.0413 1.1481
1.6711 −0.7282 0.0204
−0.3071 1.6332 −0.0464
−0.2802 0.0682 0.8691
Under illuminant D50 0.6995 0.1266 0.3119 0.6597 0.0002 0.0323
0.1381 0.0285 0.7924
1.5573 −0.7375 0.0296
−0.2862 1.6541 −0.0672
−0.2611 0.0691 1.2592
Under illuminant D55 0.6733 0.1282 0.3002 0.6679 0.0002 0.0327
0.1547 0.0319 0.8878
1.6179 −0.7284 0.0264
−0.2973 1.6337 −0.0600
−0.2713 0.0682 1.1240
Under illuminant D65 0.6359 0.1303 0.2835 0.6786 0.0002 0.0332
0.1838 0.0379 1.0545
1.7131 −0.7169 0.0223
−0.3148 1.6080 −0.0505
−0.2872 0.0671 0.9462
460
Computational Color Technology (Continued).
Set 11. Kress Default/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.6100 0.1315 0.2720 0.6852 0.0002 0.0335
0.2076 0.0428 1.1915
1.7857 −0.7100 0.0197
−0.3281 1.5925 −0.0447
−0.2994 0.0665 0.8374
Under illuminant D93 0.5798 0.1328 0.2585 0.6920 0.0002 0.0338
0.2403 0.0496 1.3790
1.8789 −0.7031 0.0170
−0.3453 1.5769 −0.0386
−0.3150 0.0658 0.7236
Set 12. Laser/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 1.0270 0.0237 0.4159 0.5807 0.0001 0.1188
0.0468 0.0034 0.2367
0.9738 −0.6996 0.3509
−0.0004 1.7276 −0.8671
−0.1927 0.1134 4.1686
Under illuminant B 0.8215 0.0269 0.3327 0.6569 0.0000 0.1344
0.1420 0.0104 0.7178
1.2175 −0.6184 0.1157
−0.0005 1.5270 −0.2859
−0.2409 0.1003 1.3744
Under illuminant C 0.7463 0.0279 0.3022 0.6827 0.0000 0.1397
0.2060 0.0151 1.0413
1.3403 −0.5950 0.0798
−0.0005 1.4693 −0.1971
−0.2652 0.0965 0.9474
Under illuminant D50 0.8007 0.0272 0.3243 0.6658 0.0000 0.1362
0.1363 0.0100 0.6887
1.2491 −0.6102 0.1206
−0.0005 1.5067 −0.2980
−0.2471 0.0989 1.4325
Under illuminant D55 0.7738 0.0276 0.3134 0.6753 0.0000 0.1381
0.1548 0.0113 0.7824
1.2926 −0.6016 0.1061
−0.0005 1.4854 −0.2623
−0.2557 0.0975 1.2609
Under illuminant D65 0.7344 0.0282 0.2974 0.6889 0.0000 0.1409
0.1874 0.0137 0.9469
1.3619 −0.5897 0.0877
−0.0005 1.4562 −0.2167
−0.2695 0.0956 1.0418
Conversion Matrices
461 (Continued).
Set 12. Laser/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.7065 0.0285 0.2861 0.6982 0.0000 0.1428
0.2142 0.0157 1.0823
1.4157 −0.5818 0.0767
−0.0006 1.4367 −0.1896
−0.2801 0.0943 0.9115
Under illuminant D93 0.6730 0.0290 0.2726 0.7091 0.0000 0.1451
0.2509 0.0184 1.2679
1.4861 −0.5729 0.0655
−0.0006 1.4147 −0.1618
−0.2940 0.0929 0.7781
Set 13. NTSC/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.8870 0.1576 0.4369 0.5328 0.0000 0.0600
0.0530 0.0303 0.2955
1.3069 −1.0840 0.2203
−0.3643 2.2009 −0.4472
−0.1972 −0.0312 3.3909
Under illuminant B 0.6758 0.1735 0.3329 0.5865 0.0000 0.0661
0.1411 0.0806 0.7861
1.7152 −0.9848 0.0828
−0.4781 1.9995 −0.1681
−0.2588 −0.0283 1.2745
Under illuminant C 0.6065 0.1736 0.2987 0.5869 0.0000 0.0661
0.2001 0.1143 1.1149
1.9112 −0.9841 0.0584
−0.5328 1.9980 −0.1185
−0.2884 −0.0283 0.8986
Under illuminant D50 0.6502 0.1781 0.3203 0.6021 0.0000 0.0678
0.1359 0.0776 0.7571
1.7827 −0.9593 0.0860
−0.4970 1.9477 −0.1745
−0.2690 −0.0276 1.3234
Under illuminant D55 0.6242 0.1790 0.3075 0.6051 0.0000 0.0682
0.1530 0.0874 0.8524
1.8570 −0.9545 0.0764
−0.5177 1.9380 −0.1550
−0.2802 −0.0274 1.1753
Under illuminant D65 0.5877 0.1792 0.2894 0.6060 0.0000 0.0683
0.1830 0.1046 1.0196
1.9725 −0.9532 0.0638
−0.5499 1.9352 −0.1296
−0.2976 −0.0274 0.9826
462
Computational Color Technology (Continued).
Set 13. NTSC/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.5628 0.1787 0.2772 0.6041 0.0000 0.0681
0.2077 0.1187 1.1571
2.0595 −0.9561 0.0562
−0.5741 1.9412 −0.1142
−0.3108 −0.0275 0.8658
Under illuminant D93 0.5343 0.1771 0.2631 0.5988 0.0000 0.0675
0.2415 0.1380 1.3455
2.1696 −0.9645 0.0484
−0.6048 1.9583 −0.0982
−0.3274 −0.0277 0.7446
Set 14. ROM/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.8933 0.1610 0.1473 0.8526 −0.0174 −0.0938
0.0434 0.0001 0.4667
1.1553 −0.1997 0.0029
−0.2299 1.2126 0.2352
−0.1073 0.0184 2.1424
Under illuminant B 0.7350 0.1659 0.1212 0.8787 −0.0143 −0.0967
0.0895 0.0001 0.9632
1.4040 −0.1937 0.0014
−0.2794 1.1766 0.1140
−0.1304 0.0179 1.0381
Under illuminant C 0.6930 0.1672 0.1143 0.8856 −0.0135 −0.0974
0.1200 0.0001 1.2919
1.4892 −0.1922 0.0011
−0.2964 1.1675 0.0850
−0.1383 0.0177 0.7739
Under illuminant D50 0.7106 0.1666 0.1172 0.8827 −0.0138 −0.0971
0.0869 0.0001 0.9359
1.4523 −0.1929 0.0015
−0.2890 1.1713 0.1173
−0.1349 0.0178 1.0684
Under illuminant D55 0.6932 0.1672 0.1143 0.8855 −0.0135 −0.0974
0.0958 0.0001 1.0315
1.4888 −0.1922 0.0013
−0.2963 1.1675 0.1064
−0.1383 0.0177 0.9693
Under illuminant D65 0.6707 0.1679 0.1106 0.8892 −0.0131 −0.0978
0.1114 0.0001 1.1988
1.5388 −0.1914 0.0011
−0.3062 1.1626 0.0916
−0.1429 0.0177 0.8340
Conversion Matrices
463 (Continued).
Set 14. ROM/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.6568 0.1683 0.1083 0.8915 −0.0128 −0.0981
0.1241 0.0001 1.3361
1.5713 −0.1909 0.0010
−0.3127 1.1597 0.0821
−0.1460 0.0176 0.7484
Under illuminant D93 0.6426 0.1687 0.1060 0.8938 −0.0125 −0.0984
0.1416 0.0002 1.5239
1.6060 −0.1904 0.0009
−0.3196 1.1567 0.0720
−0.1492 0.0176 0.6561
Set 15. ROMM/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.9600 0.1241 0.3467 0.6533 0.0000 0.0000
0.0135 0.0000 0.3555
1.1183 −0.5934 0.0000
−0.2124 1.6434 0.0000
−0.0425 0.0224 2.8129
Under illuminant B 0.8247 0.1333 0.2978 0.7021 0.0000 0.0000
0.0324 0.0001 0.8522
1.3019 −0.5522 0.0000
−0.2472 1.5291 0.0000
−0.0494 0.0208 1.1734
Under illuminant C 0.8003 0.1350 0.2890 0.7109 0.0000 0.0000
0.0449 0.0001 1.1810
1.3415 −0.5454 0.0000
−0.2548 1.5103 0.0000
−0.0509 0.0206 0.8467
Under illuminant D50 0.7977 0.1352 0.2880 0.7119 0.0000 0.0000
0.0313 0.0001 0.8249
1.3460 −0.5446 0.0000
−0.2556 1.5082 0.0000
−0.0511 0.0205 1.2123
Under illuminant D55 0.7852 0.1360 0.2835 0.7164 0.0000 0.0000
0.0350 0.0001 0.9206
1.3674 −0.5412 0.0000
−0.2597 1.4987 0.0000
−0.0519 0.0204 1.0862
Under illuminant D65 0.7716 0.1370 0.2786 0.7213 0.0000 0.0000
0.0413 0.0001 1.0879
1.3914 −0.5375 0.0000
−0.2642 1.4885 0.0000
−0.0528 0.0203 0.9192
464
Computational Color Technology (Continued).
Set 15. ROMM/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.7652 0.1374 0.2763 0.7235 0.0000 0.0000
0.0466 0.0001 1.2252
1.4030 −0.5358 0.0000
−0.2664 1.4838 0.0000
−0.0533 0.0202 0.8162
Under illuminant D93 0.7616 0.1377 0.2750 0.7249 0.0000 0.0000
0.0537 0.0001 1.4130
1.4098 −0.5348 0.0000
−0.2677 1.4812 0.0000
−0.0535 0.0202 0.7077
Set 16. SMPTE-C/RGB (Xerox/RGB) RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.7536 0.2984 0.4067 0.5727 0.0359 0.0914
0.0456 0.0206 0.2282
1.8308 −1.3087 0.2365
−0.9085 2.4211 −0.8273
−0.2841 0.0431 4.4100
Under illuminant B 0.4993 0.3466 0.2695 0.6653 0.0238 0.1062
0.1444 0.0652 0.7222
2.7630 −1.1265 0.0747
−1.3711 2.0841 −0.2614
−0.4288 0.0371 1.3933
Under illuminant C 0.4149 0.3548 0.2239 0.6810 0.0198 0.1087
0.2105 0.0951 1.0525
3.3256 −1.1005 0.0513
−1.6502 2.0359 −0.1794
−0.5161 0.0362 0.9561
Under illuminant D50 0.4690 0.3565 0.2531 0.6842 0.0223 0.1092
0.1387 0.0626 0.6933
2.9415 −1.0953 0.0778
−1.4597 2.0264 −0.2723
−0.4565 0.0360 1.4514
Under illuminant D55 0.4375 0.3609 0.2361 0.6926 0.0208 0.1106
0.1578 0.0713 0.7892
3.1535 −1.0821 0.0684
−1.5649 2.0019 −0.2392
−0.4894 0.0356 1.2751
Under illuminant D65 0.3930 0.3655 0.2121 0.7014 0.0187 0.1120
0.1914 0.0865 0.9572
3.5106 −1.0685 0.0564
−1.7421 1.9767 −0.1972
−0.5448 0.0352 1.0513
Conversion Matrices
465 (Continued).
Set 16. SMPTE-C/RGB (Xerox/RGB) RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.3626 0.3675 0.1957 0.7054 0.0173 0.1126
0.2191 0.0989 1.0953
3.8046 −1.0625 0.0493
−1.8879 1.9657 −0.1724
−0.5904 0.0350 0.9187
Under illuminant D93 0.3275 0.3685 0.1768 0.7072 0.0156 0.1129
0.2569 0.1160 1.2845
4.2123 −1.0597 0.0420
−2.0903 1.9606 −0.1470
−0.6537 0.0349 0.7834
Set 17. SMPTE-240M/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.8809 0.1608 0.4339 0.5438 0.0000 0.0613
0.0559 0.0223 0.2942
1.3144 −1.0578 0.2203
−0.3637 2.1476 −0.4472
−0.2219 0.0377 3.3909
Under illuminant B 0.6597 0.1821 0.3249 0.6156 0.0000 0.0694
0.1486 0.0595 0.7828
1.7551 −0.9343 0.0828
−0.4857 1.8969 −0.1681
−0.2964 0.0333 1.2745
Under illuminant C 0.5836 0.1858 0.2874 0.6282 0.0000 0.0708
0.2108 0.0843 1.1102
1.9840 −0.9156 0.0584
−0.5491 1.8589 −0.1185
−0.3350 0.0327 0.8986
Under illuminant D50 0.6347 0.1864 0.3126 0.6301 0.0000 0.0710
0.1431 0.0573 0.7539
1.8243 −0.9128 0.0860
−0.5049 1.8533 −0.1745
−0.3080 0.0326 1.3234
Under illuminant D55 0.6067 0.1883 0.2988 0.6367 0.0000 0.0717
0.1612 0.0645 0.8489
1.9084 −0.9034 0.0764
−0.5281 1.8342 −0.1550
−0.3222 0.0322 1.1753
Under illuminant D65 0.5667 0.1904 0.2791 0.6438 0.0000 0.0725
0.1928 0.0771 1.0154
2.0431 −0.8935 0.0638
−0.5654 1.8140 −0.1296
−0.3450 0.0319 0.9826
466
Computational Color Technology (Continued).
Set 17. SMPTE-240M/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.5390 0.1914 0.2655 0.6470
0.2188 0.0875
2.1479 −0.8890
−0.5944 1.8050
−0.3627 0.0317
Under illuminant D93 0.5066 0.1919 0.2495 0.6487 0.0000 0.0731
0.2544 0.1018 1.3399
2.2854 −0.8867 0.0484
−0.6325 1.8002 −0.0982
−0.3859 0.0316 0.7446
Set 18. Sony-P22/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.8013 0.2571 0.4359 0.5464 0.0449 0.1148
0.0392 0.0177 0.1958
1.6565 −1.3346 0.4027
−0.7237 2.4486 −1.2694
−0.2659 0.0458 5.1404
Under illuminant B 0.5532 0.2998 0.3009 0.6370 0.0310 0.1338
0.1375 0.0621 0.6874
2.3997 −1.1448 0.1147
−1.0483 2.1004 −0.3617
−0.3852 0.0392 1.4645
Under illuminant C 0.4696 0.3071 0.2554 0.6527 0.0263 0.1371
0.2035 0.0919 1.0176
2.8269 −1.1173 0.0775
−1.2350 2.0500 −0.2443
−0.4538 0.0383 0.9893
Under illuminant D50 0.5242 0.3084 0.2852 0.6554 0.0294 0.1377
0.1316 0.0594 0.6579
2.5322 −1.1126 0.1199
−1.1062 2.0413 −0.3779
−0.4065 0.0381 1.5303
Under illuminant D55 0.4932 0.3123 0.2683 0.6636 0.0276 0.1394
0.1507 0.0681 0.7536
2.6915 −1.0988 0.1047
−1.1758 2.0160 −0.3299
−0.4321 0.0377 1.3359
Under illuminant D65 0.4492 0.3164 0.2443 0.6724 0.0252 0.1413
0.1843 0.0832 0.9215
2.9552 −1.0845 0.0856
−1.2910 1.9897 −0.2698
−0.4744 0.0372 1.0925
Conversion Matrices
467 (Continued).
Set 18. Sony-P22/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.4190 0.3183 0.2279 0.6764 0.0235 0.1421
0.2119 0.0957 1.0596
3.1681 −1.0782 0.0744
−1.3840 1.9781 −0.2346
−0.5086 0.0370 0.9500
Under illuminant D93 0.3839 0.3192 0.2088 0.6784 0.0215 0.1425
0.2498 0.1128 1.2490
3.4579 −1.0750 0.0631
−1.5106 1.9723 −0.1990
−0.5551 0.0369 0.8060
Set 19. Wide-Gamut/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.9482 0.0907 0.3424 0.6510 0.0000 0.0460
0.0587 0.0066 0.3095
1.1050 −0.5821 0.0865
−0.1394 1.6119 −0.2396
−0.2066 0.0758 3.2198
Under illuminant B 0.7385 0.0998 0.2667 0.7161 0.0000 0.0506
0.1520 0.0172 0.8016
1.4187 −0.5291 0.0334
−0.1790 1.4653 −0.0925
−0.2652 0.0689 1.2432
Under illuminant C 0.6635 0.1026 0.2396 0.7362 0.0000 0.0520
0.2141 0.0242 1.1290
1.5792 −0.5147 0.0237
−0.1993 1.4253 −0.0657
−0.2952 0.0671 0.8827
Under illuminant D50 0.7164 0.1010 0.2587 0.7247 0.0000 0.0512
0.1467 0.0166 0.7737
1.4624 −0.5228 0.0346
−0.1845 1.4479 −0.0958
−0.2734 0.0681 1.2880
Under illuminant D55 0.6893 0.1021 0.2489 0.7325 0.0000 0.0518
0.1648 0.0186 0.8688
1.5200 −0.5173 0.0308
−0.1918 1.4326 −0.0853
−0.2842 0.0674 1.1469
Under illuminant D65 0.6499 0.1036 0.2347 0.7431 0.0000 0.0525
0.1964 0.0222 1.0354
1.6121 −0.5099 0.0259
−0.2034 1.4121 −0.0716
−0.3014 0.0664 0.9625
468
Computational Color Technology (Continued).
Set 19. Wide-Gamut/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.6223 0.1046 0.2247 0.7502 0.0000 0.0530
0.2223 0.0251 1.1722
1.6836 −0.5051 0.0228
−0.2125 1.3988 −0.0633
−0.3148 0.0658 0.8501
Under illuminant D93 0.5894 0.1057 0.2128 0.7580 0.0000 0.0536
0.2578 0.0291 1.3594
1.7776 −0.4999 0.0197
−0.2243 1.3843 −0.0545
−0.3323 0.0651 0.7330
Set 20. Wright/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant A 0.9179 0.1232 0.3464 0.6419 0.0000 0.0314
0.0565 0.0116 0.3241
1.1706 −0.6329 0.0613
−0.2151 1.6768 −0.1624
−0.1963 0.0500 3.0805
Under illuminant B 0.7132 0.1346 0.2692 0.7014 0.0000 0.0343
0.1425 0.0294 0.8179
1.5066 −0.5792 0.0243
−0.2769 1.5346 −0.0643
−0.2526 0.0458 1.2207
Under illuminant C 0.6430 0.1375 0.2427 0.7161 0.0000 0.0350
0.1997 0.0412 1.1460
1.6711 −0.5673 0.0173
−0.3071 1.5031 −0.0459
−0.2802 0.0448 0.8712
Under illuminant D50 0.6900 0.1365 0.2604 0.7112 0.0000 0.0348
0.1377 0.0284 0.7901
1.5573 −0.5712 0.0251
−0.2862 1.5135 −0.0666
−0.2611 0.0451 1.2636
Under illuminant D55 0.6641 0.1377 0.2507 0.7175 0.0000 0.0351
0.1543 0.0318 0.8855
1.6179 −0.5662 0.0224
−0.2973 1.5002 −0.0594
−0.2713 0.0447 1.1275
Under illuminant D65 0.6272 0.1393 0.2367 0.7254 0.0000 0.0355
0.1834 0.0378 1.0524
1.7131 −0.5600 0.0189
−0.3148 1.4838 −0.0500
−0.2872 0.0443 0.9487
Conversion Matrices
469 (Continued).
Set 20. Wright/RGB RGB-to-XYZ transformation
XYZ-to-RGB transformation
Under illuminant D75 0.6017 0.1402 0.2271 0.7301 0.0000 0.0357
0.2073 0.0428 1.1895
1.7857 −0.5564 0.0167
−0.3281 1.4743 −0.0442
−0.2994 0.0440 0.8394
Under illuminant D93 0.5719 0.1410 0.2158 0.7347 0.0000 0.0359
0.2400 0.0495 1.3771
1.8789 −0.5530 0.0144
−0.3453 1.4652 −0.0382
−0.3150 0.0437 0.7250
Appendix 2
Conversion Matrices from RGB to ITU-R.BT.709/RGB This appendix contains the conversion matrices for various RGB primary sets to ITU-R.BT.709/RGB under illuminant D65 as follows: (1) Adobe/RGB98 to ITU-R.BT.709/RGB under D65 1.3972 0.0000 −0.0000
−0.3987 1.0006 −0.0430
−0.0000 0.0001 1.0418
(2) Bruse/RGB to ITU-R.BT.709/RGB under D65 1.1323 −0.0001 0.0000
−0.1334 1.0005 −0.0452
−0.0001 0.0001 1.0441
(3) CIE1931/RGB to ITU-R.BT.709/RGB under D65 1.1065 −0.1202 −0.0074
−0.2579 1.2651 −0.1425
0.1502 −0.1443 1.1486
(4) CIE1964/RGB to ITU-R.BT.709/RGB under D65 1.6815 −0.1593 −0.0142
−0.7979 1.2822 −0.0938
0.1155 −0.1224 1.1067
(5) EBU/RGB to ITU-R.BT.709/RGB under D65 1.0456 −0.0004 −0.0002
−0.0433 1.0003 0.0122
−0.0004 −0.0003 0.9879
(6) Extended/RGB to ITU-R.BT.709/RGB under D65 1.6506 −0.1078 −0.0201
−0.5790 1.1167 −0.0982 471
−0.0727 −0.0083 1.1170
472
Computational Color Technology
(7) Guild/RGB to ITU-R.BT.709/RGB under D65 1.2784 −0.0818 −0.0158
−0.2935 1.1068 −0.1065
0.0139 −0.0244 1.1210
(8) Ink-jet/RGB to ITU-R.BT.709/RGB under D65 1.3872 −0.0888 −0.0171
−0.3051 1.0868 −0.0992
−0.0831 0.0024 1.1150
(9) Judd-Wyszecki/RGB to ITU-R.BT.709/RGB under D65 1.7988 −0.1955 −0.0121
−0.9803 1.3493 −0.0621
0.1802 −0.1533 1.0729
(10) Kress/RGB to ITU-R.BT.709/RGB under D65 1.6250 −0.0845 −0.0223
−0.6375 1.1481 −0.0961
0.0117 −0.0632 1.1171
(11) Laser/RGB to ITU-R.BT.709/RGB under D65 1.9230 −0.1539 −0.0198
−1.0380 1.2709 0.0100
0.1142 −0.1165 1.0085
(12) NTSC/RGB to ITU-R.BT.709/RGB under D65 1.4598 −0.0267 −0.0264
−0.3849 0.9660 −0.0415
−0.0761 0.0613 1.0666
(13) ROM/RGB to ITU-R.BT.709/RGB under D65 2.0102 −0.4431 0.0009
−0.7741 1.5013 −0.2754
−0.2368 −0.0579 1.2733
(14) ROMM/RGB to ITU-R.BT.709/RGB under D65 2.0724 −0.2252 −0.0139
−0.6649 1.2204 −0.1395
−0.4087 0.0054 1.1522
Conversion Matrices from RGB to ITU-R.BT.709/RGB
473
(15) SMPTE-C/RGB to ITU-R.BT.709/RGB under D65 0.9383 0.0178 −0.0017
0.0504 0.9662 −0.0044
0.0101 0.0166 1.0048
(16) SMPTE-240M/RGB to ITU-R.BT.709/RGB under D65 1.4076 −0.0257 −0.0254
−0.4088 1.0262 −0.0441
0.0001 0.0000 1.0683
(17) Sony-P22/RGB to ITU-R.BT.709/RGB under D65 1.0677 0.0240 0.0018
−0.0787 0.9606 0.0298
0.0099 0.0158 0.9673
(18) Wide-Gamut/RGB to ITU-R.BT.709/RGB under D65 1.7455 −0.1896 −0.0117
−0.8329 1.2958 −0.0903
0.0862 −0.1056 1.1008
(19) Wright/RGB to ITU-R.BT.709/RGB under D65 1.6689 −0.1638 −0.0134
−0.6815 1.2273 −0.1027
0.0116 −0.0631 1.1149
Appendix 3
Conversion Matrices from RGB to ROMM/RGB This appendix contains the conversion matrices for various RGB primary sets to ROMM/RGB under illuminant D50 as follows: (1) Adobe/RGB98 to ROMM/RGB under D50 0.7821 0.1511 0.0367
0.0836 0.8260 0.0836
0.1343 0.0229 0.8798
(2) Bruse/RGB to ROMM/RGB under D50 0.6528 0.1261 0.0307
0.2126 0.8510 0.0870
0.1347 0.0231 0.8823
(3) CIE1931/RGB to ROMM/RGB under D50 0.6129 −0.0001 0.0000
0.2096 1.0597 0.0122
0.1777 −0.0597 0.9878
(4) CIE1964/RGB to ROMM/RGB under D50 −0.0392 1.0250 0.0567
0.8771 0.0230 0.0000
0.1620 −0.0480 0.9432
(5) EBU/RGB to ROMM/RGB under D50 0.6093 0.1177 0.0286
0.2659 0.8610 0.1532
0.1250 0.0214 0.8182
(6) Extended/RGB to ROMM/RGB under D50 0.8619 0.0688 0.0000
0.0196 0.9169 0.0341
475
0.1186 0.0144 0.9660
476
Computational Color Technology
(7) Guild/RGB to ROMM/RGB under D50 0.6964 0.0574 0.0000
0.1555 0.9325 0.0298
0.1484 0.0101 0.9702
(8) Ink-jet/RGB to ROMM/RGB under D50 0.7374 0.0607 0.0000
0.1458 0.9186 0.0352
0.1168 0.0207 0.9649
(9) ITU-R.BT.709/RGB to ROMM/RGB under D50 0.5879 0.1135 0.0275
0.2853 0.8648 0.1410
0.1269 0.0217 0.8315
(10) Judd-Wyszecki/RGB to ROMM/RGB under D50 0.9295 −0.0000 0.0000
−0.1029 1.0639 0.0972
0.1733 −0.0639 0.9028
(11) Kress/RGB to ROMM/RGB under D50 0.8618 0.0895 0.0002
0.0001 0.9267 0.0392
0.1381 −0.0160 0.9606
(12) Laser/RGB to ROMM/RGB under D50 0.9949 0.0530 0.0000
−0.1405 0.9921 0.1651
0.1457 −0.0450 0.8349
(13) NTSC/RGB to ROMM/RGB under D50 0.7933 0.1290 0.0000
0.0824 0.8125 0.0822
0.1244 0.0585 0.9178
(14) ROM/RGB to ROMM/RGB under D50 0.9272 −0.2105 −0.0167
0.0036 1.2386 −0.1177
0.0691 −0.0280 1.1346
Conversion Matrices from RGB to ROMM/RGB
477
(15) SMPTE-C/RGB to ROMM/RGB under D50 0.5654 0.1268 0.0270
0.2994 0.8400 0.1324
0.1353 0.0331 0.8405
(16) SMPTE-240M/RGB to ROMM/RGB under D50 0.7744 0.1258 0.0000
0.0862 0.8503 0.0861
0.1394 0.0239 0.9140
(17) Sony-P22/RGB to ROMM/RGB under D50 0.6312 0.1453 0.0356
0.2405 0.8233 0.1669
0.1283 0.0314 0.7976
(18) Wide-Gamut/RGB to ROMM/RGB under D50 0.8982 0.0000 0.0000
−0.0519 1.0390 0.0621
0.1537 −0.0390 0.9380
(19) Wright/RGB to ROMM/RGB under D50 0.8622 0.0170 0.0000
0.0002 0.9990 0.0422
0.1377 −0.0160 0.9578
Appendix 4
RGB Color-Encoding Standards A4.1 SMPTE-C/RGB SMPTE-C is the color-encoding standard for broadcasting in America. It uses the following primaries with D65 as the white point.1 Red: x = 0.630, Green: x = 0.310, Blue: x = 0.155,
y = 0.340 y = 0.595 y = 0.070.
The encoding formula to SMPTE-C/RGB is 3.5058 −1.7397 −0.5440 XD65 RSMPTE GSMPTE = −1.069 1.9778 0.0352 YD65 . BSMPTE ZD65 0.0563 −0.1970 1.0501
(A4.1)
The encoded SMPTE-C/RGB is transferred to give a linear response2 as 0.45 = 1.099PSMPTE − 0.099 PSMPTE
if 1 ≥ PSMPTE ≥ 0.018,
(A4.2a)
PSMPTE
if 0 < PSMPTE < 0.018,
(A4.2b)
= 4.5PSMPTE
where P represents one of the RGB primaries. After all three components are transformed, they are further converted to the luminance and chrominance channels of Y , I , and Q , using Eq. (A4.3), in order to take advantage of the different information content in the chrominance and luminance channels with respect to the information compression.3 RSMPTE Y 0.299 0.587 0.114 row sum = 1 I = 0.596 −0.274 −0.322 G row sum = 0 (A4.3) SMPTE Q 0.212 −0.523 0.311 row sum = 0. B SMPTE
The inverse transform from YIQ via SMPTE-C/RGB to CIEXYZ follows the following path: RSMPTE 1.0 0.956 0.621 Y G = 1.0 −0.272 −0.647 I . (A4.4) SMPTE 1.0 −1.105 1.702 Q BSMPTE 479
480
Computational Color Technology
After converting to SMPTE-C/RGB, each component is gamma-corrected using a gamma of 2.22 and an offset of 0.099 as given in Eq. (A4.5). PSMPTE =
2.22 PSMPTE + 0.099 /(1.099)
PSMPTE = (1/4.5)PSMPTE
if PSMPTE ≥ 0.081,
(A4.5a)
if PSMPTE < 0.081.
(A4.5b)
Finally, the gamma-corrected RGB are converted back to XYZ using the decoding matrix of Eq. (A4.6). 0.3935 XD65 YD65 = 0.2124 ZD65 0.0187
0.3653 0.7011 0.1119
0.1916 RSMPTE 0.0866 GSMPTE . BSMPTE 0.9582
(A4.6)
The Xerox color-encoding standard employs SMPTE-C/RGB, but uses D50 as the white point for printing and copying. Because of the white-point difference, the Xerox RGB standard gives the following matrices for coding and decoding:4 2.944 −1.095 0.078
−1.461 −0.457 2.026 0.036 −0.272 1.452 Encoding
0.469 0.253 0.022
0.357 0.139 0.684 0.063 0.109 0.693 Decoding
A4.2 European TV Standard (EBU) The European TV standard uses EBU/RGB primaries and D65 as the white point. The chromaticity coordinates of the primaries are given as follows: Red: x = 0.640, Green: x = 0.290, Blue: x = 0.150,
y = 0.330 y = 0.600 y = 0.060.
The encoding formula to EBU/RGB is 3.063 REBU GEBU = −0.969 BEBU 0.068
−1.393 1.876 −0.229
−0.476 XD65 0.042 YD65 . ZD65 1.069
(A4.7)
For EBU/RGB, the gamma correction is given in Eq. (A4.8) with a gamma of 0.45, an offset of 0.099, and a gain of 4.5 if PEBU is smaller than 0.018.3 0.45 PEBU = 1.099PEBU − 0.099
if PEBU > 0.018,
= 4.5PEBU PEBU
if PEBU ≤ 0.018.
(A4.8)
RGB Color-Encoding Standards
481
Encoded RGB is further converted to luminance and chrominance channels of Y , U , and V to take advantages of the different information content in the chrominance and luminance channels.3 REBU Y 0.299 0.587 0.114 row sum = 1 U = −0.147 −0.289 0.436 G row sum = 0 (A4.9) EBU V 0.615 −0.515 −0.100 row sum = 0. BEBU The inverse transform from YUV via EBU/RGB to CIEXYZ is given as follows: REBU 1.0 0 0.114 Y G = 1.0 −0.396 0.581 U . (A4.10) EBU V 1.0 2.029 0 BEBU Resulting EBU/RGB values are inversely gamma corrected as PEBU =
2.22 PEBU + 0.099 /(1 + 0.099)
PEBU = (1/4.5)PEBU
if PEBU ≥ 0.081, (A4.11a) if PEBU < 0.081. (A4.11b)
Finally, they are transformed to CIEXYZ using the decoding matrix of Eq. (A4.12) as 0.431 0.342 0.178 REBU XD65 YD65 = 0.222 0.707 0.071 GEBU . (A4.12) ZD65 BEBU 0.020 0.130 0.939
A4.3 American TV YIQ Standard The American TV YIQ standard uses NTSC/RGB with the following chromaticity coordinates and illuminant C as the white point:3 Red: x = 0.670, Green: x = 0.210, Blue: x = 0.140,
y = 0.330 y = 0.710 y = 0.080.
The gamma for NTSC/RGB is 2.2. The encoding formula to NTSC/RGB is RNTSC 1.910 −0.532 −0.288 XC GNTSC = −0.985 1.999 −0.028 YC , (A4.13) BNTSC ZC 0.058 −0.118 0.898 and the decoding matrix to XYZ is3 XC 0.607 0.174 YC = 0.299 0.587 ZC 0.0 0.066
0.200 RNTSC 0.114 GNTSC . BNTSC 1.116
(A4.14)
482
Computational Color Technology
The encoded NTSC/RGB is further converted to the luminance and chrominance channels of Y , I , and Q using Eq. (A4.3).3
A4.4 PhotoYCC PhotoYCC is designed for encoding outdoor scenes. It is based on ITU-R BT.7093/RGB and the adaptive white point is D65 . Red: x = 0.640, Green: x = 0.300, Blue: x = 0.150,
y = 0.330 y = 0.600 y = 0.060.
The viewing conditions are (i) no viewing flare because any flare in the original scene is a part of the scene itself; (ii) “average” surround, meaning that scene objects are surrounded by other similarly illuminated objects; and (iii) under typical daylight luminance levels (>5000 lux).5 The encoding equation is given in Eq. (A4.15). 3.2410 RYCC GYCC = −0.9692 BYCC 0.0556
−1.5374 1.8760 −0.2040
−0.4986 Xscene 0.0416 Yscene . Zscene 1.0570
(A4.15)
There is no limitation for ranges of converted RGB tristimulus values. All values greater than 1 and less than 0 are retained; thus, the color gamut defined by PhotoYCC is unlimited. Because there are no constraints on the ranges, the gamma correction is slightly more complicated than previous RGB standards for taking care of negative values. 0.45 = 1.099 × PYCC − 0.099 PYCC
if PYCC ≥ 0.018,
PYCC
if − 0.018 < PYCC < 0.018, (A4.16b)
= 4.5 × PYCC
= −1.099 × |PYCC |0.45 + 0.099 PYCC
(A4.16a)
if PYCC ≤ −0.018,
(A4.16c)
where P represents one of the RGB primaries. The resulting RGB are rotated to Luma and Chromas as given in Eq. (A4.17). 0.299 Luma Chroma1 = −0.299 0.701 Chroma2
0.587 −0.587 −0.587
RYCC 0.114 0.886 GYCC . −0.114 B
(A4.17)
YCC
The last step converts the Luma and Chromas to digital values Y , C1 , and C2 . For 8 bits/channel, we have Y = (255/1.402) × Luma,
(A4.18a)
RGB Color-Encoding Standards
483
C1 = 111.40 × Chroma1 + 156,
(A4.18b)
C2 = 135.64 × Chroma2 + 137.
(A4.18c)
A4.5 SRGB Encoding Standards SRGB Has been adopted as the default color space for the Internet. It is intended for CRT output encoding and, like PhotoYCC, is based on the ITU-R BT.7093/RGB. The encoding and media white-point luminance are the same at 80 cd/m2 and both encoding and media white points are D65 . The viewing conditions are the following: (i) the background is 20% of display white-point luminance (16 cd/m2 ), (ii) the surround is 20% reflectance of the ambient illuminance (4.1 cd/m2 ), (iii) the flare is 1% (0.8 cd/m2 ), (iv) the glare is 0.2 cd/m2 , and (v) the observed black point is 1.0 cd/m2 .6,7 There are several versions of sRGB. The encoding formula is given in Eq. (A4.19). RsRGB 3.2410 −1.5374 −0.4986 XD65 GsRGB = −0.9692 1.8760 0.0416 YD65 . (A4.19) BsRGB ZD65 0.0556 −0.2040 1.0570 Encoded RGB values are constrained within a range of [0, 1], which means that any out-of-range value is clipped by using Eq. (A4.20), where P denotes a component of the RGB triplet. PsRGB = 0 if PsRGB < 0,
(A4.20a)
PsRGB = 1 if PsRGB > 1.
(A4.20b)
Resulting sRGB values are transformed to nonlinear sR G B via the gamma correction of Eq. (A4.21), having a gamma of 0.42 (2.4−1 ), an offset of 0.55, and a slope of 12.92 if PsRGB is smaller than 0.00304.6,7 PsRGB = 1.055 × PsRGB − 0.055
if PsRGB > 0.00304,
(A4.21a)
PsRGB
if PsRGB ≤ 0.00304.
(A4.21b)
1.0/2.4
= 12.92 × PsRGB
Finally, the sR G B values are scaled to 8-bit integers as shown in Eq. (A4.22). × 255. Pnbit = PsRGB
(A4.22)
The initial version of sRGB was encoded to 8 bits per channel. The later version of sRGB64 has been extended to 16 bits by scaling with a factor of 8192 (this is actually 13 bits). For the reverse transform from sRGB to CIEXYZ, the process starts by scaling digital sRGB to the range [0, 1] as given in Eq. (A4.23), in which the n-bit integer
484
Computational Color Technology
input is divided by the maximum value of the n-bit representation to give a floatingpoint value between 0 and 1. = Pnbit /(2n − 1). PsRGB
(A4.23)
The gamma correction is followed with a gamma of 2.4, an offset of 0.55, and a is smaller than 0.03928. slope of 1/12.92 if PsRGB PsRGB =
2.4 PsRGB + 0.055 /1.055
/12.92 PsRGB = PsRGB
if PsRGB > 0.03928,
(A4.24a)
if PsRGB ≤ 0.03928.
(A4.24b)
Resulting sRGB values are linearly transformed to CIEXYZ under the white point of D65 . 0.4124 XD65 YD65 = 0.2126 0.0193 ZD65
0.3576 0.7152 0.1192
0.1805 RsRGB 0.0722 GsRGB . 0.9505 BsRGB
(A4.25)
It has been claimed that the reverse transform closely fits a simple power function with an exponent of 2.2, thus maintaining color consistency of desktop and video images.7
A4.6 E-sRGB Encoding Standard The e-sRGB is the latest extension of sRGB. It provides a way of encoding outputreferred images by removing the constraint of ranges, allowing encoded RGB values to go above and below the range of [0, 1]. The encoding transform is8
ResRGB 3.2406 GesRGB = −0.9689 BesRGB 0.0557
−1.5372 1.8758 −0.2040
−0.4986 XD65 0.0415 YD65 . ZD65 1.0570
(A4.26)
Note that the matrix coefficients are slightly changed. The difference is not significant enough to cause an accuracy problem. Because of the change in ranges, the gamma correction of Eq. (A4.21) becomes Eq. (A4.27) PesRGB = 1.055 × PesRGB − 0.055
if PesRGB > 0.0031308
(A4.27a)
PesRGB = 12.92 × PesRGB
if − 0.0031308 ≤ PesRGB ≤ 0.0031308
(A4.27b)
1.0/2.4
PesRGB
= −1.055× | PesRGB
|1.0/2.4
+ 0.055 if PesRGB < −0.0031308.
(A4.27c)
Note that the numerical accuracy of the constant is also improved. It has three levels of precision: 10 bits per channel for general applications, and 12 and 16 bits
RGB Color-Encoding Standards
485
per channel for photography and graphic-art applications. Therefore, the digital representation is given in Eq. (A4.28). = 255.0 × 2n−9 × PesRGB + offset, PesRGBnbit
(A4.28)
where offset = 2n−2 + 2n−3 , and n = 10, 12, or 16. The inverse transform is given as follows: First, digital to floating-point conversion of Eq. (A4.29). = PesRGBnbit − offset / 255.0 × 2n−9 . (A4.29) PesRGB The gamma correction of Eq. (A4.24) becomes PesRGB = [(PesRGB + 0.055)/1.055]2.4
if PesRGB > 0.04045
(A4.30a)
PesRGB = PesRGB /12.92
if − 0.04045 ≤ PesRGB ≤ 0.04045
(A4.30b)
PesRGB = −[(|PesRGB | + 0.055)/1.055]2.4
if PesRGB < −0.04045.
(A4.30c)
Note that the constant has changed. Finally, the conversion to CIEXYZ is the same as Eq. (A4.25).
A4.7 Kodak ROMM/RGB Encoding Standard Kodak ROMM/RGB uses the following RGB primaries:9–11 Red (λ = 700 nm): x = 0.7347, Green: x = 0.1596, Blue: x = 0.0366,
y = 0.2653, y = 0.8404, y = 0.0001.
The encoding and media white-point luminance are the same at 142 cd/m2 , where the adapted white-point luminance is 160 cd/m2 . Both encoding and media white points are D50 in accordance with the Graphic Art standard for viewing prints. The viewing surround is average (20% of the adapted white-point luminance), the flare and glare are included in colorimetric measurements based on the CIE1931 observer, and the observed black point is 0.5 cd/m2 . The encoding formula is given in Eq. (A4.31). 1.3460 −0.2556 −0.0511 XD50 RROMM GROMM = −0.5446 1.5082 0.0205 YD50 , (A4.31) BROMM ZD50 0.0 0.0 1.2123 and RGB has a range of [0, 1] when YD50 of the ideal reference white is normalized to 1.0; therefore, the clipping of out-of-range values is still needed. Equation (A4.32) gives the gamma correction. = 16 × PROMM , PROMM
if PROMM < 0.001953, and
(A4.32a)
486
Computational Color Technology PROMM = PROMM
1.0/1.8
if PROMM ≥ 0.001953.
(A4.32b)
Finally, Eq. (A4.33) scales results to n-bit integers. × (2n − 1), PROMMnbit = PROMM
(A4.33)
where n can be 8, 12, or 16. For the reverse transform from ROMM/RGB to CIELAB, the mathematical formulas are given in Eqs. (A4.34)–(A4.36). Equation (A4.34) does the scaling to [0, 1], in which the n-bit integer input is divided by the maximum value of the n-bit representation to give a floating-point value between 0 and 1. PROMM = PROMMnbit /(2n − 1).
(A4.34)
Equation (A4.35) performs the gamma correction. /16 PROMM = PROMM
if PROMM < 0.031248,
(A4.35a)
and 1.8 PROMM = PROMM
if PROMM ≥ 0.031248.
(A4.35b)
Equation (A4.36) is the linear transform from RGB to XYZ.
XD50 0.7977 YD50 = 0.2880 ZD50 0.0
0.1352 0.7119 0.0
0.0313 RROMM 0.0001 GROMM . BROMM 0.8249
(A4.36)
A4.8 Kodak RIMM/RGB RIMM/RGB is a companion color-encoding standard to ROMM/RGB. It uses the same RGB primaries and D50 white point as ROMM/RGB. It is intended to encode outdoor scenes; thus, it has a high luminance level of 1500 cd/m2 . There is no viewing flare for the scene. The gamma correction is similar to sRGB with a scaling factor of 1/1.402.9–11 0.45 PROMM = 1.099PROMM − 0.099 /1.402
if PROMM ≥ 0.018,
(A4.37a)
PROMM = (4.5PROMM )/1.402
if PROMM < 0.018.
(A4.37b)
and
The reverse encoding is the inverse of Eq. (A4.37). PROMM =
1/0.45 1.402PROMM + 0.099 /1.099
if PROMM ≥ 0.01284, (A4.38a)
RGB Color-Encoding Standards
487
and )/4.5 PROMM = (1.402PROMM
if PROMM < 0.01284. (A4.38b)
Similar to ROMM/RGB, it can be encoded in 8, 12, and 16 bits.
References 1. SMPTE RP 145-1999, SMPTE C color monitor colorimetry, Society of Motion Picture and Television Engineers, White Plains, NY (1999). 2. SMPTE RP 176-1997, Derivation of reference signals for television camera color evaluation, Society of Motion Picture and Television Engineers, White Plains, NY (1997). 3. A. Ford and A. Roberts, Colour space conversions, http://www.inforamp.net/ ∼poynton/PDFs/colourreq.pdf 4. Color Encoding Standard, Xerox Corp., Xerox Systems Institute Sunnyvale, CA, p. C-3 (1989). 5. E. J. Giorgianni and T. E. Madden, Digital Color Management, AddisonWesley, Reading, MA, pp. 489–497 (1998). 6. M. Stokes, M. Anderson, S. Chandrasekar, and R. Motta, A standard default color space for the Internet–sRGB, Version 1.10, Nov. 5 (1996). 7. IEC/3WD 61966-2.1: Colour measurement and management in multimedia systems and equipment—Part 2.1: Default RGB colour space–sRGB, http://www.srgb.com (1998). 8. PIMA 7667: Photography—Electronic still picture imaging—Extended sRGB color encoding–e-sRGB, (2001). 9. Eastman Kodak Company, Reference output medium metric RGB color space (ROMM RGB) white paper, http://www.colour.org/tc8-05. 10. Eastman Kodak Company, Reference input medium metric RGB color space (RIMM RGB) white paper, http://www.pima.net/standards/iso/tc42/wq18. 11. K. E. Spaulding, G. J. Woolfe, and E. J. Giorgianni, Reference input/output medium metric RGB color encodings (RIMM/ROMM RGB), PICS 2000 Conf., Portland, OR, March (2000).
Appendix 5
Matrix Inversion There are several ways to invert a matrix; here, we describe Gaussian elimination for the purpose of decreasing computational costs. Gaussian elimination is the combination of triangularization and back substitution. The triangularization will make all matrix elements in the lower-left part of the diagonal line zero. Consequently, the last row in the matrix will contain only one element, which is the solution for the last coefficient. This solution is substituted back into the front rows to calculate the other coefficients.
A5.1 Triangularization For convenience of explanation, let us rewrite the matrix as a set of simultaneous equations and substitute the matrix elements with kij as follows: k11 a1 + k12 a2 + k13 a3 + k14 a4 + k15 a5 + k16 a6 = q1 ,
(A5.1a)
k21 a1 + k22 a2 + k23 a3 + k24 a4 + k25 a5 + k26 a6 = q2 ,
(A5.1b)
k31 a1 + k32 a2 + k33 a3 + k34 a4 + k35 a5 + k36 a6 = q3 ,
(A5.1c)
k41 a1 + k42 a2 + k43 a3 + k44 a4 + k45 a5 + k46 a6 = q4 ,
(A5.1d)
k51 a1 + k52 a2 + k53 a3 + k54 a4 + k55 a5 + k56 a6 = q5 ,
(A5.1e)
k61 a1 + k62 a2 + k63 a3 + k64 a4 + k65 a5 + k66 a6 = q6 ,
(A5.1f)
where k11 = x2i , k12 = xi yi , k13 = xi zi , k14 = x2i yi , k15 = xi yi zi , 2 xi zi , and q1 = xi pi . Similar substitutions are performed for Eqs. k16 = (A5.1b–A5.1f). 489
490
Computational Color Technology
First iteration: Eq. (A5.1b)–(k21 /k11 ) Eq. (A5.1a) 1 k22 a2
+ 1 k23 a3 + 1 k24 a4 + 1 k25 a5 + 1 k26 a6 = 1 q2 ,
(A5.2a)
Eq. (A5.1c)–(k31 /k11 ) Eq. (A5.1a) 1 k32 a2
+ 1 k33 a3 + 1 k34 a4 + 1 k35 a5 + 1 k36 a6 = 1 q3 ,
(A5.2b)
Eq. (A5.1d)–(k41 /k11 ) Eq. (A5.1a) 1 k42 a2
+ 1 k43 a3 + 1 k44 a4 + 1 k45 a5 + 1 k46 a6 = 1 q4 ,
(A5.2c)
Eq. (A5.1e)–(k51 /k11 ) Eq. (A5.1a) 1 k52 a2
+ 1 k53 a3 + 1 k54 a4 + 1 k55 a5 + 1 k56 a6 = 1 q5 ,
(A5.2d)
Eq. (A5.1f)–(k61 /k11 ) Eq. (A5.1a) 1 k62 a2
+ 1 k63 a3 + 1 k64 a4 + 1 k65 a5 + 1 k66 a6 = 1 q6 .
(A5.2e)
After the first iteration, the matrix elements k21 , k31 , k41 , k51 , and k61 are eliminated. Second iteration: Eq. (A5.2b)–(1 k32 /1 k22 ) Eq. (A5.2a) 2 k33 a3
+ 2 k34 a4 + 2 k35 a5 + 2 k36 a6 = 2 q3 ,
(A5.3a)
Eq. (A5.2c)–(1 k42 /1 k22 ) Eq. (A5.2a) 2 k43 a3
+ 2 k44 a4 + 2 k45 a5 + 2 k46 a6 = 2 q4 ,
(A5.3b)
Eq. (A5.2d)–(1 k52 /1 k22 ) Eq. (A5.2a) 2 k53 a3
+ 2 k54 a4 + 2 k55 a5 + 2 k56 a6 = 2 q5 ,
(A5.3c)
Eq. (A5.2e)–(1 k62 /1 k22 ) Eq. (A5.2a) 2 k63 a3
+ 2 k64 a4 + 2 k65 a5 + 2 k66 a6 = 2 q6 .
(A5.3d)
After the second iteration, the elements 1 k32 , 1 k42 , 1 k52 , and 1 k62 are eliminated.
Matrix Inversion
491
Third iteration: Eq. (A5.3b)–(2 k43 /2 k33 ) Eq. (A5.3a) 3 k44 a4
+ 3 k45 a5 + 3 k46 a6 = 3 q4 ,
(A5.4a)
Eq. (A5.3c)–(2 k53 /2 k33 ) Eq. (A5.3a) 3 k54 a4
+ 3 k55 a5 + 3 k56 a6 = 3 q5 ,
(A5.4b)
Eq. (A5.3d)–(2 k63 /2 k33 ) Eq. (A5.3a) 3 k64 a4
+ 3 k65 a5 + 3 k66 a6 = 3 q6 .
(A5.4c)
After the third iteration, the elements 2 k43 , 2 k53 , and 2 k63 are eliminated. Fourth iteration: Eq. (A5.4b)–(3 k54 /3 k44 ) Eq. (A5.4a) 4 k55 a5
+ 4 k56 a6 = 4 q5 ,
(A5.5a)
Eq. (A5.4c)–(3 k64 /3 k44 ) Eq. (A5.4a) 4 k65 a5
+ 4 k66 a6 = 4 q6 .
(A5.5b)
After the fourth iteration, the elements 3 k54 and 3 k64 are eliminated. Fifth iteration: Eq. (A5.5b)–(4 k65 /4 k55 ) Eq. (A5.5a) 5 k66 a6
= 5 q6 .
(A5.6a)
After the fifth iteration, the element 4 k65 is eliminated. Now, all elements in the bottom-right triangle of the matrix are zero.
A5.2 Back Substitution The ai value is obtained by back substituting ai+1 sequentially via Eqs. (A5.5a), (A5.4a), (A5.3a), (A5.2a), and (A5.1a). 5 k66 a6
= 5 q6 ,
(A5.6a)
4 k55 a5
+ 4 k56 a6 = 4 q5 ,
(A5.5a)
3 k44 a4
+ 3 k45 a5 + 3 k46 a6 = 3 q4 ,
(A5.4a)
492
Computational Color Technology 2 k33 a3
+ 2 k34 a4 + 2 k35 a5 + 2 k36 a6 = 2 q3 ,
(A5.3a)
1 k22 a2
+ 1 k23 a3 + 1 k24 a4 + 1 k25 a5 + 1 k26 a6 = 1 q2 ,
(A5.2a)
k11 a1 + k12 a2 + k13 a3 + k14 a4 + k15 a5 + k16 a6 = q1 .
(A5.1a)
From Eq. (A5.6a), we obtain a6 = 5 q6 /5 k66 .
(A5.6a)
Substituting a6 into Eq. (A5.5a), we obtain a5 as a5 = [4 q5 − 4 k56 (5 q6 /5 k66 )]/4 k55 .
(A5.6b)
We then substitute a5 and a6 into Eq. (A5.4a) to compute a4 . Continuing these back substitutions, we can determine all ai . The coefficients are stored for use in computing pi via the selected polynomial.
Appendix 6
Color Errors of Reconstructed CRI Spectra with Respect to Measured Values
Sample 1: Measured 1: Cohen 1: Cohen 1: Cohen 1: Eem 1: Eem 1: Eem 1: Eem 1: Eem 2: Measured 2: Cohen 2: Cohen 2: Cohen 2: Eem 2: Eem 2: Eem 2: Eem 2: Eem 3: Measured 3: Cohen 3: Cohen 3: Cohen 3: Eem 3: Eem 3: Eem 3: Eem 3: Eem 4: Measured 4: Cohen 4: Cohen
Basis vectors 2 3 4 2 3 4 5 8 2 3 4 2 3 4 5 8 2 3 4 2 3 4 5 8 2 3
X
Y
Z
L*
A*
34.57 33.89 33.36 34.42 34.78 33.83 34.83 34.84 34.47 28.97 26.26 28.81 29.08 27.22 29.21 29.05 29.08 28.97 25.05 22.65 27.06 24.45 23.58 27.56 24.95 24.88 24.73 20.67 19.14 23.14
30.42 31.37 30.29 30.42 32.18 30.30 30.42 30.41 30.41 29.33 24.28 29.45 29.48 25.51 29.42 29.40 29.36 29.33 30.59 21.46 30.41 30.09 22.90 30.74 30.42 30.53 30.52 29.00 21.70 29.81
18.53 18.00 18.57 18.93 18.03 19.43 19.81 19.77 18.43 11.46 13.86 11.10 11.19 14.85 11.93 11.87 11.75 11.37 7.73 13.42 8.65 7.75 14.71 8.86 7.88 8.21 7.66 16.56 21.38 17.06
62.01 62.82 61.91 62.02 63.49 61.91 62.02 62.01 62.00 61.07 56.36 61.17 61.20 57.57 61.15 61.13 61.10 61.07 62.16 53.45 62.00 61.73 54.97 62.29 62.01 62.11 62.10 60.78 53.71 61.49
18.94 12.93 13.13 15.50 15.22 12.65 18.42 12.05 13.30 16.59 16.82 10.81 19.82 10.20 19.90 10.26 18.64 13.13 2.68 29.30 12.20 14.42 1.63 30.57 2.55 30.33 10.90 13.92 3.26 28.03 2.74 28.18 2.99 28.48 2.68 29.59 −17.85 43.92 9.17 10.57 −8.85 40.18 −18.59 43.10 6.74 9.79 −8.09 39.91 −17.66 43.09 −18.35 41.98 −18.94 44.07 −31.71 15.28 −8.78 −7.32 −23.28 15.33
493
B*
s
s std
6.37 3.69 0.98 6.86 2.96 2.86 2.83 0.34
0.016 0.013 0.007 0.022 0.020 0.016 0.016 0.007
0.020 0.017 0.008 0.039 0.035 0.032 0.032 0.010
18.27 1.66 1.07 17.78 1.38 1.11 0.86 0.31
0.042 0.007 0.006 0.034 0.008 0.008 0.006 0.003
0.048 0.009 0.008 0.039 0.011 0.011 0.008 0.004
43.84 9.80 1.15 42.71 10.61 0.88 2.00 1.04
0.079 0.032 0.018 0.073 0.033 0.023 0.017 0.014
0.093 0.044 0.023 0.087 0.045 0.028 0.021 0.019
32.99 8.49
0.066 0.031
0.082 0.035
Eab
494
Computational Color Technology (Continued)
Sample 4: Cohen 4: Eem 4: Eem 4: Eem 4: Eem 4: Eem 5: Measured 5: Cohen 5: Cohen 5: Cohen 5: Eem 5: Eem 5: Eem 5: Eem 5: Eem 6: Measured 6: Cohen 6: Cohen 6: Cohen 6: Eem 6: Eem 6: Eem 6: Eem 6: Eem 7: Measured 7: Cohen 7: Cohen 7: Cohen 7: Eem 7: Eem 7: Eem 7: Eem 7: Eem 8: Measured 8: Cohen 8: Cohen 8: Cohen 8: Eem 8: Eem 8: Eem 8: Eem 8: Eem
Basis vectors 4 2 3 4 5 8 2 3 4 2 3 4 5 8 2 3 4 2 3 4 5 8 2 3 4 2 3 4 5 8 2 3 4 2 3 4 5 8
X
Y
Z
L*
A*
B*
Eab
s
s std
21.52 20.39 23.18 20.75 20.82 20.70 24.46 24.11 24.83 24.64 25.46 24.92 24.78 24.78 24.43 27.09 29.87 26.90 27.00 31.50 26.83 27.27 27.23 27.02 33.11 37.80 32.24 32.89 38.85 32.56 33.96 33.85 33.01 38.68 45.79 40.61 39.59 47.09 40.80 39.09 39.03 38.86
29.61 24.01 29.51 29.21 29.10 29.02 30.24 28.94 30.40 30.37 31.37 30.30 30.29 30.28 30.26 29.15 35.47 29.45 29.47 38.20 29.00 29.06 29.13 29.15 29.39 40.00 28.71 28.78 41.24 28.85 29.02 29.20 29.41 31.85 43.02 32.50 32.38 44.24 31.85 31.64 31.74 31.92
16.50 22.31 18.20 17.29 16.95 16.61 30.75 31.45 30.67 30.61 31.02 31.82 31.76 31.73 30.54 43.68 37.90 41.11 41.14 36.97 43.83 44.00 44.24 43.52 39.76 34.17 40.19 40.41 32.20 41.45 41.98 42.52 39.29 34.01 26.11 31.72 31.37 25.93 35.18 34.53 34.83 33.97
61.32 56.10 61.23 60.97 60.87 60.80 61.86 60.73 61.99 61.98 62.82 61.92 61.90 61.89 61.88 60.91 66.12 61.18 61.19 68.16 60.78 60.83 60.90 60.92 61.12 69.47 60.52 60.59 70.34 60.65 60.80 60.96 61.14 63.22 71.57 63.75 63.65 72.39 63.22 63.04 63.12 63.28
−29.99 −12.90 −21.99 −32.13 −31.38 −31.61 −19.09 −15.73 −18.10 −18.83 −18.96 −17.36 −17.91 −17.85 −19.30 −4.05 −15.63 −5.95 −5.58 −18.42 −4.55 −2.95 −3.43 −4.34 17.70 −2.44 17.20 19.21 −2.86 17.78 22.06 21.01 17.28 27.30 12.65 31.02 28.30 12.79 33.92 29.35 28.81 27.62
16.34 −5.03 12.30 13.91 14.52 15.19 −9.70 −12.74 −9.35 −9.28 −8.46 −11.24 −11.19 −11.16 −9.33 −29.19 −12.74 −25.49 −25.52 −7.94 −29.61 −29.73 −29.90 −28.99 −23.84 −1.73 −25.44 −25.61 2.69 −26.85 −27.26 −27.66 −23.18 −12.27 14.69 −7.93 −7.57 16.41 −13.96 −13.34 −13.62 −12.11
2.12 28.10 10.21 1.43 0.84 0.16
0.023 0.049 0.033 0.019 0.009 0.004
0.026 0.065 0.039 0.022 0.012 0.004
4.70 1.09 0.53 1.58 2.34 1.92 1.94 0.41
0.012 0.007 0.006 0.019 0.016 0.015 0.016 0.009
0.016 0.008 0.007 0.041 0.039 0.039 0.039 0.013
20.74 4.14 3.97 26.62 0.61 1.29 0.99 0.30
0.059 0.020 0.020 0.080 0.018 0.018 0.012 0.005
0.069 0.041 0.041 0.092 0.028 0.027 0.024 0.006
31.02 1.76 2.42 34.78 3.04 5.59 5.09 0.76
0.094 0.023 0.021 0.117 0.048 0.049 0.038 0.011
0.107 0.029 0.027 0.144 0.083 0.081 0.075 0.019
31.76 5.80 4.85 33.39 6.91 2.39 2.09 0.44
0.104 0.043 0.041 0.110 0.031 0.026 0.022 0.011
0.115 0.064 0.063 0.124 0.038 0.031 0.026 0.014
Color Errors of Reconstructed CRI Spectra with Respect to Measured Values
495
(Continued)
Sample 9: Measured 9: Cohen 9: Cohen 9: Cohen 9: Eem 9: Eem 9: Eem 9: Eem 9: Eem 10: Measured 10: Cohen 10: Cohen 10: Cohen 10: Eem 10: Eem 10: Eem 10: Eem 10: Eem 11: Measured 11: Cohen 11: Cohen 11: Cohen 11: Eem 11: Eem 11: Eem 11: Eem 11: Eem 12: Measured 12: Cohen 12: Cohen 12: Cohen 12: Eem 12: Eem 12: Eem 12: Eem 12: Eem 13: Measured 13: Cohen 13: Cohen 13: Cohen 13: Eem 13: Eem
Basis vectors X 2 3 4 2 3 4 5 8 2 3 4 2 3 4 5 8 2 3 4 2 3 4 5 8 2 3 4 2 3 4 5 8 2 3 4 2 3
23.30 36.40 30.70 25.94 36.27 31.02 23.60 23.64 23.73 58.82 52.44 60.04 58.81 54.12 61.12 58.75 58.74 58.81 12.10 13.47 15.86 12.91 14.25 15.76 12.26 12.32 11.91 5.26 7.39 5.52 4.62 8.05 5.23 4.62 4.73 5.24 61.68 57.54 60.00 61.54 59.65 60.72
Y
Z
L*
12.42 26.08 16.46 14.43 24.70 16.18 12.53 12.46 12.63 60.24 44.80 60.22 60.07 46.71 60.48 60.19 60.20 60.25 19.81 15.89 20.74 20.38 17.45 20.42 19.99 19.89 19.76 5.92 10.71 6.90 6.85 11.86 6.31 6.38 6.44 6.09 58.09 53.51 58.49 58.67 56.06 58.16
3.24 0.33 4.58 3.01 0.18 6.32 3.21 2.98 3.05 9.50 17.32 9.10 8.68 20.40 10.12 9.23 9.26 9.47 11.95 16.78 14.20 13.18 17.12 14.91 13.59 13.28 11.82 21.27 14.80 16.83 16.48 14.23 18.37 18.05 17.93 20.55 31.44 31.26 28.61 29.14 32.90 31.33
41.88 58.11 47.57 44.84 56.78 47.22 42.05 41.94 42.19 81.97 72.76 81.96 81.88 74.01 82.10 81.94 81.95 81.97 51.62 46.83 52.66 52.27 48.82 52.31 51.83 51.71 51.56 29.21 39.08 31.59 31.46 40.99 30.19 30.35 30.50 29.65 80.79 78.18 81.01 81.11 79.65 80.83
A* 61.97 41.94 67.42 60.51 47.24 70.13 62.52 63.22 62.50 1.78 25.54 4.73 2.16 24.49 6.67 1.73 1.69 1.74 −41.14 −11.37 −22.00 −38.44 −15.08 −21.08 −40.95 −40.04 −42.24 −5.24 −25.01 −12.43 −23.02 −27.12 −9.82 −18.18 −17.34 −7.32 13.63 15.03 8.72 11.92 13.77 11.20
B* 31.80 94.02 33.32 38.53 94.56 24.04 32.35 33.76 33.72 71.61 34.15 72.96 74.32 29.65 69.76 72.50 72.40 71.70 11.55 −9.31 7.13 9.16 −6.65 4.70 7.31 7.93 11.83 −49.35 −17.84 −35.70 −35.09 −13.08 −41.58 −40.61 −40.08 −47.14 21.87 17.64 26.73 26.05 17.68 22.11
Eab
s
s std
67.34 8.09 7.51 66.16 12.51 0.86 2.36 2.05
0.106 0.072 0.054 0.102 0.069 0.026 0.023 0.023
0.138 0.088 0.066 0.136 0.087 0.034 0.032 0.030
45.33 3.30 2.75 48.39 5.28 0.90 0.80 0.11
0.120 0.021 0.016 0.112 0.027 0.006 0.006 0.004
0.143 0.026 0.020 0.134 0.032 0.008 0.007 0.005
36.71 19.74 3.71 31.96 21.27 4.24 3.79 1.08
0.055 0.042 0.023 0.052 0.048 0.028 0.023 0.010
0.068 0.052 0.030 0.064 0.057 0.034 0.029 0.013
38.44 15.58 22.82 43.93 9.03 15.57 15.22 3.00
0.059 0.046 0.045 0.062 0.040 0.042 0.042 0.021
0.074 0.065 0.064 0.079 0.058 0.057 0.056 0.025
5.16 6.90 4.53 4.32 2.40
0.046 0.035 0.024 0.023 0.016
0.065 0.046 0.041 0.028 0.020
496
Computational Color Technology (Continued)
Sample 13: Eem 13: Eem 13: Eem 14: Measured 14: Cohen 14: Cohen 14: Cohen 14: Eem 14: Eem 14: Eem 14: Eem 14: Eem
Basis vectors 4 5 8 2 3 4 2 3 4 5 8
X
Y
Z
L*
A*
B*
61.68 61.71 61.66 9.70 9.27 10.63 9.28 9.63 10.82 9.62 9.58 9.52
58.28 58.22 58.09 11.75 8.91 11.67 11.51 9.47 11.81 11.66 11.73 11.71
31.69 31.52 31.43 4.15 5.86 4.39 3.93 6.26 4.52 4.07 4.28 4.10
80.89 80.86 80.79 40.82 35.82 40.69 40.42 36.87 40.91 40.67 40.78 40.75
13.17 13.39 13.58 −12.35 5.70 −4.61 −14.03 4.09 −4.14 −12.36 −13.18 −13.48
21.66 21.88 21.89 24.13 6.50 22.49 24.77 6.46 22.17 24.37 23.33 24.32
s
s std
0.47 0.21 0.04
0.011 0.010 0.004
0.016 0.012 0.005
25.76 7.98 1.78 24.49 8.51 0.32 1.07 1.07
0.029 0.016 0.010 0.027 0.016 0.013 0.008 0.007
0.034 0.023 0.012 0.032 0.023 0.017 0.012 0.011
Eab
Appendix 7
Color Errors of Reconstructed CRI Spectra with Respect to Measured Values Using Tristimulus Inputs
Sample
X
Y
Z
L∗
A∗
B∗
1: Measured 1: Cohen 1: Eem 2: Measured 2: Cohen 2: Eem 3: Measured 3: Cohen 3: Eem 4: Measured 4: Cohen 4: Eem 5: Measured 5: Cohen 5: Eem 6: Measured 6: Cohen 6: Eem 7: Measured 7: Cohen 7: Eem 8: Measured 8: Cohen 8: Eem 9: Measured 9: Cohen 9: Eem 10: Measured 10: Cohen
34.57 34.57 34.57 28.97 28.97 28.97 25.05 25.05 25.05 20.67 20.67 20.67 24.46 24.46 24.46 27.09 27.09 27.09 33.11 33.11 33.11 38.68 38.68 38.68 23.30 23.37 23.39 58.82 58.82
30.42 30.42 30.42 29.33 29.33 29.33 30.59 30.59 30.59 29.00 29.00 29.00 30.24 30.24 30.24 29.15 29.15 29.15 29.39 29.39 29.39 31.85 31.85 31.85 12.42 13.14 13.16 60.24 60.24
18.53 18.53 18.53 11.46 11.46 11.46 7.73 7.73 7.73 16.56 16.56 16.56 30.75 30.75 30.75 43.68 43.68 43.68 39.76 39.76 39.76 34.01 34.01 34.01 3.24 3.71 3.49 9.50 9.50
62.01 62.01 62.01 61.07 61.07 61.07 62.16 62.16 62.16 60.78 60.78 60.78 61.86 61.86 61.86 60.91 60.91 60.91 61.12 61.12 61.12 63.22 63.22 63.22 41.88 42.97 43.01 81.97 81.97
18.94 18.94 18.94 2.68 2.68 2.68 −17.85 −17.85 −17.85 −31.71 −31.71 −31.71 −19.09 −19.09 −19.09 −4.05 −4.05 −4.05 17.70 17.70 17.70 27.30 27.30 27.30 61.97 57.55 57.47 1.78 1.78
12.93 12.93 12.93 29.30 29.30 29.30 43.92 43.92 43.92 15.28 15.28 15.28 −9.70 −9.70 −9.70 −29.19 −29.19 −29.19 −23.84 −23.84 −23.84 −12.27 −12.27 −12.27 31.80 30.58 32.03 71.61 71.61
497
Eab
s
sstd
0.0 0.0
0.019 0.022
0.028 0.037
0.0 0.0
0.007 0.008
0.011 0.012
0.0 0.0
0.041 0.040
0.061 0.064
0.0 0.0
0.041 0.048
0.052 0.058
0.0 0.0
0.008 0.018
0.009 0.041
0.0 0.0
0.018 0.019
0.046 0.028
0.0 0.0
0.026 0.049
0.030 0.084
0.00 0.00
0.047 0.046
0.073 0.056
4.71 4.65
0.107 0.107
0.148 0.156
0.0
0.028
0.036
498
Computational Color Technology (Continued)
Sample
X
Y
Z
L∗
A∗
B∗
10: Eem 11: Measured 11: Cohen 11: Eem 12: Measured 12: Cohen 12: Eem 13: Measured 13: Cohen 13: Eem 14: Measured 14: Cohen 14: Eem
58.82 12.10 12.22 12.24 5.26 5.32 5.36 61.68 61.68 61.68 9.70 9.70 9.70
60.24 19.81 19.86 19.86 5.92 5.96 6.01 58.09 58.09 58.09 11.75 11.75 11.75
9.50 11.95 11.95 11.95 21.27 21.27 21.27 31.44 31.44 31.44 4.15 4.15 4.15
81.97 51.62 51.67 51.68 29.21 29.32 29.44 80.79 80.79 80.79 40.82 40.82 40.82
1.78 71.61 −41.14 11.55 −40.53 11.64 −40.46 11.65 −5.24 −49.35 −5.02 −49.17 −5.07 −48.95 13.63 21.87 13.63 21.87 13.63 21.87 −12.35 24.13 −12.35 24.13 −12.35 24.13
Eab
s
sstd
0.0
0.035
0.052
0.62 0.70
0.057 0.061
0.072 0.077
0.30 0.49
0.046 0.042
0.074 0.062
0.0 0.0
0.046 0.022
0.064 0.028
0.0 0.0
0.018 0.018
0.030 0.031
Appendix 8
White-Point Conversion Accuracies Using Polynomial Regression
Difference Maximum Difference Maximum Source Destination Number Polynomial in in in in illuminant illuminant of data terms CIEXYZ CIEXYZ CIELAB CIELAB A
B
64
134
200
A
C
64
134
200
3×3 3×4 3×7 3 × 10 3 × 14 3 × 20 3×3 3×4 3×7 3 × 10 3 × 14 3 × 20 3×3 3×4 3×7 3×3 3×4 3×7 3 × 10 3 × 14 3 × 20 3×3 3×4 3×7 3 × 10 3 × 14 3 × 20 3×3 3×4 3×7
0.52 0.36 0.30 0.13 0.11 0.07 0.56 0.44 0.36 0.26 0.23 0.17 0.55 0.50 0.40 0.88 0.63 0.53 0.22 0.20 0.12 0.94 0.77 0.63 0.44 0.38 0.27 0.93 0.85 0.69 499
1.32 1.06 0.74 0.45 0.33 0.20 1.83 1.40 1.06 0.90 0.88 0.55
2.24 1.77 1.28 0.78 0.61 0.38 3.12 2.52 1.96 1.57 1.50 0.95
2.58 2.10 1.34 0.50 0.28 0.12 2.54 2.28 1.47 1.05 0.88 0.69 2.84 2.67 1.66 3.72 3.05 1.96 0.67 0.38 0.17 3.66 3.32 2.23 1.49 1.28 0.99 4.09 3.87 2.45
7.47 7.03 4.67 1.59 0.73 0.34 9.11 8.66 4.87 3.76 3.66 3.25 10.70
10.16 9.85 6.76 2.13 1.22 0.41 12.36 11.75 7.25 5.37 5.41 4.69
500
Computational Color Technology
Difference Maximum Difference Maximum Source Destination Number Polynomial in in in in illuminant illuminant of data terms CIEXYZ CIEXYZ CIELAB CIELAB A
D50
64
134
200
A
D55
64
134
200
A
D65
64
134
3×3 3×4 3×7 3 × 10 3 × 14 3 × 20 3×3 3×4 3×7 3 × 10 3 × 14 3 × 20 3×3 3×4 3×7 3×3 3×4 3×7 3 × 10 3 × 14 3 × 20 3×3 3×4 3×7 3 × 10 3 × 14 3 × 20 3×3 3×4 3×7 3×3 3×4 3×7 3 × 10 3 × 14 3 × 20 3×3 3×4 3×7 3 × 10 3 × 14 3 × 20
0.48 0.32 0.26 0.11 0.09 0.06 0.50 0.39 0.31 0.23 0.20 0.16 0.50 0.44 0.35 0.59 0.40 0.33 0.14 0.12 0.07 0.61 0.48 0.39 0.28 0.25 0.18 0.61 0.54 0.44 0.78 0.54 0.45 0.19 0.16 0.10 0.81 0.65 0.53 0.37 0.33 0.23
1.24 0.99 0.66 0.40 0.26 0.17 1.62 1.14 0.84 0.78 0.79 0.51
1.50 1.20 0.82 0.50 0.35 0.22 2.00 1.46 0.94 0.96 0.96 0.61
1.96 1.57 1.11 0.67 0.49 0.31 2.68 2.06 1.58 1.29 1.28 0.82
2.49 2.06 1.32 0.50 0.28 0.12 2.44 2.22 1.48 1.08 0.91 0.73 2.76 2.71 1.66 2.89 2.39 1.53 0.56 0.31 0.14 2.83 2.58 1.72 1.23 1.05 0.83 3.20 3.03 1.92 3.49 2.89 1.85 0.66 0.37 0.16 3.41 3.12 2.12 1.48 1.27 1.00
7.28 6.96 4.46 1.56 0.86 0.33 8.80 8.44 4.92 3.83 3.83 3.36
8.21 7.83 5.19 1.74 0.94 0.35 9.95 9.53 5.74 4.43 4.43 3.88
9.53 9.23 6.26 2.06 1.16 0.40 11.55 11.07 7.01 5.35 5.40 4.70
White-Point Conversion Accuracies Using Polynomial Regression
501
Difference Maximum Difference Maximum Source Destination Number Polynomial in in in in illuminant illuminant of data terms CIEXYZ CIEXYZ CIELAB CIELAB 200
A
D75
64
134
200 200 200
3×3 3×4 3×7 3×3 3×4 3×7 3 × 10 3 × 14 3 × 20 3×3 3×4 3×7 3 × 10 3 × 14 3 × 20 3×3 3×4 3×7
0.81 0.73 0.59 0.94 0.66 0.56 0.23 0.21 0.12 0.98 0.79 0.65 0.45 0.40 0.27 0.97 0.88 0.71
2.37 1.88 1.34 0.82 0.62 0.39 3.26 2.56 1.98 1.56 1.55 1.00
3.85 3.65 2.34 3.90 3.24 2.09 0.72 0.41 0.18 3.82 3.51 2.43 1.65 1.43 1.13 4.32 4.09 2.65
10.34 10.38 6.98 2.30 1.36 0.44 12.55 12.04 7.95 6.00 6.14 5.30
Appendix 9
Digital Implementation of the Masking Equation This appendix provides mathematical fundamentals for implementing the colormasking conversion via integer lookup tables. For integer inputs such as RGB, the reflectance is computed using Eq. (A9.1). Pr = Irgb /Imax ,
(A9.1)
where Imax is the maximum digital count of the device. For an 8-bit device, Imax = 255. The density is Dr = − log(Irgb /Imax ).
(A9.2)
The density value is always positive because Irgb ≤ Imax for all Irgb . However, there is one problem when Irgb = 0—the density is undefined. In this case, the implementer must set the maximum density value for Irgb = 0. We choose to set Dr = 4.0 when Irgb = 0; this value is much higher than most density values of real colors printed by ink-jet and electrophotographic printers. For CMY inputs, a simple relationship of inverse polarity, Icmy = Imax − Irgb , is assumed. Under this assumption, the reflectance and density are given in Eq. (A9.3) and Eq. (A9.4), respectively. Pr = (Imax − Icmy )/Imax ,
(A9.3)
Dr = − log[(Imax − Icmy )/Imax ].
(A9.4)
A9.1 Integer Implementation of Forward Conversion Density is represented in floating-point format. Compared to integer arithmetic, floating-point arithmetic is computationally intensive and slow. It is desirable, sometimes necessary, to compute density by using integer arithmetic. The major concern is the accuracy of integer representation and computation. This concern 503
504
Computational Color Technology
can be addressed by using a scaling method, where the floating-point representation is multiplied by a constant, then converted to integer form as expressed in Eq. (A9.5). Dmbit = int(Ks × Dr + 0.5),
(A9.5)
where Dmbit is a scaled density value and Ks is a scaling factor. The scaling factor is dependent on the bit depth mbit. For a given bit depth, the highest density Dmax is Dmax = − log[1/(2mbit − 1)].
(A9.6)
This Dmax is scaled to the maximum value, 2mbit − 1. Therefore, the scaling factor is Ks = (2mbit − 1)/Dmax = (2mbit − 1)/ log(2mbit − 1).
(A9.7)
Table A9.1 gives the scaling factors for 8-bit, 10-bit, and 12-bit scaling. The general density expression in digital form is given in Eq. (A9.8), where we substitute Eqs. (A9.4) and (A9.7) into Eq. (A9.5). Dmbit = int [(2mbit −1)/ log(2mbit −1)]×log[Imax /(Imax −Icmy )]+0.5 , (A9.8) where mbit = 0 and (Imax − Icmy ) = 0. For 8-bit input system and 8-bit output scaling, Eq. (A9.8) becomes D8bit = int{255/ log(255) × log[255/(255 − Icmy )] + 0.5} = int{105.96 × log[255/(255 − Icmy )] + 0.5}.
(A9.9)
Similarly, Eqs. (A9.10) and (A9.11) give 10-bit and 12-bit scaling, respectively. D10bit = int{1023/ log(1023) × log[255/(255 − Icmy )] + 0.5} = int{339.88 × log[255/(255 − Icmy )] + 0.5},
(A9.10)
D12bit = int{4095/ log(4095) × log[255/(255 − Icmy )] + 0.5} = int{1133.64 × log[255/(255 − Icmy )] + 0.5}. Table A9.1 Scaling factors for various bit depths.
Bit depth 8 10 12
Dmax
Scaling factor
2.4065 3.0099 3.6123
105.96 339.88 1133.64
(A9.11)
Digital Implementation of the Masking Equation
505
A few selected values of Irgb , Icmy , Dr , D8bit , D10bit , and D12bit are given in Table A9.2. Note that the polarity of scaled densities is inverted with respect to Irgb . To avoid the denominator becoming 0, which would not have a unique solution for Eq. (A9.8), the Icmy values cannot be 255 (or Irgb cannot be zero). However, the input data will certainly contain values of 255 for Icmy (or 0 for Irgb ). In this case, how are we going to get the scaled density value for Icmy = 255 (or Irgb = 0)? There are several ways to get around this problem. These methods are illustrated by using D10bit scaling as an example. First, let us rearrange Eq. (A9.10) by multiplying the Table A9.2 Selected values of density expressed in floating-point 8-bit, 10-bit, and 12-bit form.
Irgb 0 1 2 3 4 5 10 20 30 40 50 60 70 80 100 120 121 122 123 124 125 140 160 180 200 220 240 250 251 252 253 254 255
Icmy
Dr
D8bit
D10bit
D12bit
255 254 253 252 251 250 245 235 225 215 205 195 185 175 155 135 134 133 132 131 130 115 95 75 55 35 15 5 4 3 2 1 0
4.0 2.40654 2.10551 1.92942 1.80448 1.70757 1.40654 1.10551 0.92942 0.80448 0.70757 0.62839 0.56144 0.50345 0.40654 0.32736 0.32375 0.32018 0.31664 0.31312 0.30963 0.26041 0.20242 0.15127 0.10551 0.06412 0.02633 0.00860 0.00687 0.00514 0.00342 0.00171 0
255 255 223 204 191 181 149 117 98 85 75 67 59 53 43 35 34 34 34 33 33 28 21 16 11 7 3 1 1 1 0 0 0
1023 818 716 656 613 580 478 376 316 273 240 214 191 171 138 111 110 109 108 106 105 89 69 51 36 22 9 3 2 2 1 1 0
4095 2728 2387 2187 2046 1936 1595 1253 1054 912 802 712 636 571 461 371 367 363 359 355 351 295 229 171 120 73 30 10 8 6 4 2 0
506
Computational Color Technology
numerator and denominator of the logarithmic term by a constant, 1023/255. D10bit = int{339.88 × log[1023/(1023 − 1023Pcmy /255)] + 0.5} = int{339.88 × log[1023/(1023 − 4.01176Pcmy )] + 0.5}.
(A9.12)
The highest value for Icmy is 255, which gives a value of 0 for the denominator. To avoid this problem, one can add 1 to the value 1023 in the denominator [see Eq. (A9.13)] or change both 1023 values to 1024 [see Eq. (A9.14)]. D10bit = int{339.88 × log[1023/(1024 − 4.01176Pcmy )] + 0.5},
(A9.13)
D10bit = int{339.88 × log[1024/(1024 − 4.01176Pcmy )] + 0.5}.
(A9.14)
or
Equation (A9.14) guarantees that the denominator will not become 0; however, errors are introduced into the computation. Compared with the integer round-off error, the error by this adjustment may be small and negligible. Nonetheless, this approach is mathematically incorrect. The correct way of computing D10bit is by using Eq. (A9.12) for all values from 0 to 254. At 255, the maximum value 1023 is assigned to D10bit as shown in Table A9.2. Because of the nonlinear logarithmic transform from Icmy to Dr , the scaled density values drop rapidly from the maximum values at the top of the table and reach an asymptotic level at the bottom of the table. It is obvious that the D8bit scaling does not have enough bit depth to resolve density values when Dr < 0.5; D10bit scaling is marginal at intermediate values and not adequate at lower values. From a purely computational point of view, it is suggested that the density be scaled to a 12-bit value. In practice, a 12-bit scaling may be overkill. In the real world, the uncertainty of the density measurement is at least ±0.01, considering the measurement errors, substrate variations, and statistical fluctuations. Therefore, the difference between adjunct densities in some regions of the table may be smaller than the measurement uncertainty (see the density values from 250 to 255 of Irgb ). In this case, it is not necessary to resolve them, and 10-bit representation is enough. Note that the density values given in Table A9.2 have five significant figures after the decimal point; this high accuracy is not necessary, and three significant figures are sufficient.
A9.2 Integer Implementation of Inverse Conversion Inverse conversion from Dmbit to input digital count is derived from Eq. (A9.5). Rearranging Eq. (A9.5), we have Dr = Dmbit /Ks .
(A9.15)
Digital Implementation of the Masking Equation
507
Substituting Eq. (A9.7) for Ks into Eq. (A9.15), we obtain Dr = Dmbit × log(2mbit − 1)/(2mbit − 1).
(A9.16)
Substituting Eq. (A9.16) into Eq. (A9.2) and rearranging, we have Irgb = Imax × 10−Dr = Imax × 10 exp[−Dmbit × log(2mbit − 1)/(2mbit − 1)]. (A9.17) Taking the integer round-off into consideration, we obtain the final expression of Eq. (A9.18). Irgb = int{Imax × 10 exp[−Dmbit × log(2mbit − 1)/(2mbit − 1)] + 0.5}. (A9.18) For 8-bit scaling, Eq. (A9.18) becomes Irgb = int{255 × 10 exp[−Dmbit × log(255)/255] + 0.5} = int[255 × 10 exp(−0.0094374Dmbit ) + 0.5].
(A9.19)
Equations (A9.20) and (A9.21) give the 10-bit and 12-bit formulas, respectively. Irgb = int{255 × 10 exp[−Dmbit × log(1023)/1023] + 0.5} = int[255 × 10 exp(−0.0029422Dmbit ) + 0.5],
(A9.20)
Irgb = int{255 × 10 exp[−Dmbit × log(4095)/4095] + 0.5} = int[255 × 10 exp(−0.00088211Dmbit ) + 0.5].
(A9.21)
The backward lookup tables are computed using Eq. (A9.18). The size of the lookup table is dependent on the scaling factor. A 10-bit scaling needs a size of 1024 entries, and a 12-bit scaling needs a size of 4096 entries for the backward lookup table. The contents in these lookup tables are in the range of [0, 255]; thus, many different entries will have the same value, resulting in a many-to-one mapping.
Index Color Mondrian, 53 color purity, 58 color transform, 23 color appearance model (CAM), 72, 407, 412, 421, 423, 427 color-encoding standards, 84, 430 color filter array (CFA), 306 color-matching functions (CMFs), 2, 5–9, 15, 19, 22, 30, 33, 36, 37, 53, 57 color-matching matrix, 5, 15, 19, 21, 29, 34, 36, 81 color-mixing function, 30 color-mixing model, 17, 103, 107, 108, 420, 421, 423, 427 complementary color, 58 cone response functions, 234 cone responsivities, 44–46, 49, 52, 53 cone sensitivities, 49 contouring, 420 contrast sensitivity function (CSF), 409, 411 correlated color temperature, 286 cyan-magenta-yellow (CMY) color space, 107
2-3 world, 264–266, 268, 312 3-2 world, 266, 312 3-2 world assumption, 240 3D interpolation, 420 3D lookup table (LUT), 151
A Abney effect, 412 additivity, 2, 334, 341 additivity law, 2, 21, 22
B banding, 420 Bartleson transform, 48 Beer-Lambert-Bouguer law, 331, 332, 393, 424 Bezold-Brücke hue shift, 412 BFD transform, 52, 53 bilinear interpolation, 154 black generation (BG), 349 block-dye model, 108 brightness, 5, 6
D
C
Demichel’s dot-overlap model, 370, 371 densitometer, 326 densitometry, 325, 353 density-masking equation, 342 device-masking equation, 343–345, 347 dichromatic reflection model, 244–246 dominant wavelength, 58, 59, 408 dot gain, 390, 396, 400 dot-overlap model, 421, 426, 427
cellular regression, 164 chroma, 60, 67–69 chromatic adaptation, 24, 43, 51, 64, 69, 81, 259, 412, 414, 427, 430 chromaticity coordinate, 3, 6, 7, 57, 59, 77, 80, 82, 83 chromaticity diagram, 58, 91, 117 CIELAB, 60 CIELUV, 59 CIEXYZ, 57 Clapper-Yule model, 393–395, 425 clustered-dot screens, 399 color appearance model, 69 color constancy, 233, 244, 245, 251, 253, 255, 256, 259, 261, 265, 266, 268, 312, 412 color difference, 3 color gamut, 117 color gamut boundary, 57, 60, 62, 111, 120 color gamut mapping, 103, 120, 121, 124, 129, 413, 427 color management modules (CMMs), 419 color management system (CMS), 419
E edge enhancement, 414, 427 edge sharpness, 414 error diffusion, 399, 400
F Fairchild’s model, 49 Fechner’s law, 408 finite-dimensional linear approximation, 253 finite-dimensional linear model, 236, 312 first-surface reflection, 335 509
510 fundamental color stimulus function, 27, 29, 31, 35 fundamental metamer, 31, 32, 39
G gamma correction, 86, 338 gamut boundary, 57 gamut mapping, 122, 129, 130 Gaussian elimination, 139 graininess, 420 Grassmann’s additivity law, 1, 2, 17, 27, 33, 59, 64, 77, 115, 118 gray balancing, 144, 347 gray (or white) world assumption, 243, 244 gray-balance curves, 432 gray-balanced, 82, 275 gray-component replacement (GCR), 349, 375, 414 Guth’s model, 53
H Helson-Judd effect, 48, 51 Helson-Judd-Warren transform, 46 hue, 5, 6, 67–69 hue-lightness-saturation (HLS) space, 105 hue-saturation-value (HSV) space, 104 human visual model, 421, 427 human visual system (HVS), 407, 411 Hunt effect, 48, 49, 412 Hunt model, 51 Hunt-Pointer-Estevez cone responses, 70
I ICC profiles, 419 image irradiance model, 233 internal reflection, 335, 393 International Color Consortium (ICC), 419
J JPEG compression, 414 just noticeable difference (JND), 67, 408
K Karhunen-Loeve transform, 313, 317 König-Dieterici fundamentals, 48 Kubelka-Munk equation, 365, 395 Kubelka-Munk (K-M) theory, 355–357, 362, 394, 395, 425 Kubelka-Munk model, 360, 362, 365
L Lambertian surface, 235 lighting matrix, 238, 242, 246, 251, 265, 268 lightness, 67–69
Computational Color Technology lightness-saturation-hue (LEF) space, 106 lightness/retinex algorithm, 257, 259
M MacAdam ellipses, 66, 68 matrix A, 31 matrix R, 27, 29, 31, 32, 37 metamer, 1, 27, 29, 31 metameric black, 27, 29, 31, 34, 35, 39 metameric color matching, 27 metameric correction, 39 metameric indices, 27 metameric match, 21, 27, 28 metameric spectrum reconstruction, 189 metamerism, 2, 27 metamerism index, 40 modulation transfer functions (MTF), 397 moiré, 420 Moore-Penrose pseudo-inverse, 205, 314 multispectral imaging, 301, 303, 425 multispectral irradiance model, 303 Munsell colors, 67 Munsell system, 65 Murray-Davies, 394 Murray-Davies equation, 385, 392, 397, 425 Murray-Davies model, 388
N Nayatani model, 47, 53 NCS, 51 Neugebauer equations, 369, 371–373, 375, 376, 379, 381, 382 Neugebauer’s model, 425 neutral interface reflection (NIR) model, 235
O opacity, 335 optical density, 325 optical dot gain, 399 optimal color stimuli, 62 optimal filters, 309, 311 orthogonal projection, 205 orthonormal functions, 256
P physical dot gain, 399 Planck’s radiation law, 10 point-spread function, 397–399, 411 polynomial regression, 135, 295, 297, 314 principal component analysis (PCA), 203, 212, 213, 265, 311, 313, 314, 317, 318 prism interpolation, 157 proportionality law, 2, 21, 332 pseudo-inverse estimation, 315 pyramid interpolation, 159
Index
R R-matrix, 268 regression, 420 resolution conversion, 414, 427 retinex theory, 53, 256, 257 RGB color space, 103 RGB primary, 77
S Sällströn-Buchsbaum model, 244 saturation, 5, 6 Saunderson’s correction, 360, 362, 395 sequential linear interpolation, 168 simultaneous color contrast, 243 simultaneous contrast, 256, 412 singular-value decomposition (SVD), 247, 248, 310 smoothing inverse, 203, 205, 314, 316 Spatial-CIELAB, 73, 413 spectral sharpening, 259 standard I filters, 327 status A filters, 326 status E filters, 326 status M filters, 327 status T filters, 326 Stevens effect, 48, 412 stochastic screens, 399 symmetry law, 2
T tetrahedral interpolation, 161 three-three (3-3) world, 243 three-three (3-3) constraint, 240, 242 tone reproduction curves, 420, 426
511 tone response curves (TRC), 414, 416 transitivity law, 2, 21 triangularization, 139 trichromacy, 1 trilinear interpolation, 155 tristimulus values, 1, 3, 5, 8, 28–32, 57
U UCR (under-color removal), 349 under-color addition (UCA), 349
V virtual multispectral camera (VMSC), 317, 318 volumetric model, 253, 255 volumetric theory, 268 von Kries adaptation, 70, 259, 267 von Kries hypothesis, 43, 48, 49, 69, 266, 268 von Kries model, 44, 49, 69, 430 von Kries transform, 47, 49, 52, 53, 268 von Kries type, 276 Vos-Walraven fundamentals, 261, 264, 265
W Weber fraction, 408 Weber’s law, 408 white-point conversion, 23, 81, 273 Wiener estimation, 314, 316 Wiener inverse, 203, 209
Y Yule-Nielsen model, 388, 389, 394, 395, 397, 400, 402, 425 Yule-Nielsen value, 382, 388, 389, 391, 392
Henry R. Kang received his Ph.D. degree in physical chemistry from Indiana University and M.S. degree in computer science from Rochester Institute of Technology. He has taught chemistry courses and researched gas-phase chemical kinetics at the University of Texas at Arlington. His industry experiences include ink-jet ink analysis and testing at Mead Office Systems, and color technology development with the Xerox Corporation, Peerless System Corporation, and Aetas Technology Inc. Currently, he is a part-time chemistry instructor and an independent color-imaging consultant in the areas of color technology development and color system architecture. Henry is the author of Color Technology for Electronic Imaging Devices by SPIE Press (1997) and Digital Color Halftoning by SPIE Press (1999), and more than 30 papers in the areas of color-device calibration, color-mixing models, colorimage processing, and digital halftone processing.