Method and apparatus for reproducing blended colorants on an electronic display

An apparatus and method for reproducing the color of blended colorants on an electronic display such as a cathode ray tube, liquid crystal display or other type of electronic device that utilizes RGB values. Predictions of blended colorants on or in substrates can be made from XYZ measurements of samples prepared with no colorants, one colorant, and pairs of colorants. The calculation method uses light absorption, light scattering, and light absorption blend coefficients. An image digitizer can be used to obtain XYZ values from samples. Furthermore, image digitizer RGB values are converted into XYZ values with a non-linear model using a simple method. Furthermore, the above process to generate XYZ values from image digitizer RGB values can be used to generate RGB values from XYZ values for electronic display.

BACKGROUND OF THE INVENTION 
This invention relates to a method and apparatus for reproducing the color 
of blended colorants on an electronic display. 
The most accurate ways of computing color formulation are either very 
difficult to use, or computationally impractical. The most successful 
simple mathematical theory for predicting the color of mixtures is the 
Kubelka-Munk Model. For some applications, the model is overly simplistic. 
The Kubelka-Munk Model assumes light falls exactly perpendicular onto a 
perfectly flat media containing the colorants. The colorants must be 
perfectly mixed into the substrate media, and the resulting colored 
substrate must be isotropic. The index of refraction of the media and 
colorants is assumed to be the same as air, so internal and external 
specular reflection and refraction are ignored. 
Assume these conditions are met, and the substrate is optically thick. In 
this case, Kubelka-Munk Theory predicts the following simple relationship: 
K/S=(1-R).sup.2 /2R. K and S are physical properties of the colored media. 
R is the measured color. The relationship expressed by the equation holds 
at each wavelength of light in the visible spectral band. R denotes the 
fraction of light reflected by the sample. K and S are light absorption 
and light scattering coefficients of the colorant mixture, respectively. 
It is more convenient to deal with K/S rather than R. This is because the 
physical properties of a mixture (K and S) are, to a good approximation, 
proportional to the physical properties of each colorant in the mixture, 
namely the corresponding coefficients K.sub.i and S.sub.i of colorant i. 
The proportionality constants are component concentrations C.sub.i. 
Therefore, for simple colorant formulation calculations, one assumes for N 
colorants that K=K.sub.1 C.sub.1 +K.sub.2 C.sub.2 +. . . K.sub.N C.sub.N 
and S=S.sub.1 C.sub.1 +S.sub.2 C.sub.2 +. . . S.sub.N C.sub.N. As before, 
these equations hold at each wavelength of light. By inverting the earlier 
formula (K/S=(1-R).sup.2 /2R) that connects K/S to R, and by using the 
above equations connecting K and S to K.sub.i and S.sub.i, a connection is 
obtained between colorant concentrations C.sub.i and measured color R. 
Values of absorption and scattering coefficients of colorants are 
typically extracted from least squares calculations involving sample color 
measurements. 
For applications requiring a high degree of accuracy, this simple 
Kubelka-Munk Theory must be modified. Corrections for substrate surface 
reflection, internal refraction, and colorant interactions are necessary. 
Sometimes it is necessary to extend spectral measurements into the 
ultraviolet to deal with colorant fluorescence. The texture of some 
targets (e.g., textiles) have a gloss that cannot be easily subtracted by 
measurement or compensated for by mathematical modeling. This means 
computed values for K.sub.i and S.sub.i must be cautiously interpreted, 
and perhaps further modified, before subsequent colorant formulation 
predictions are accurate. 
In computer aided design (CAD), visual feedback is desirable during color 
formulation. One way to do this is to simulate a product on an electronic 
display. Performing Kubelka-Munk calculations, with the corrections noted 
above, involves a great deal of computation. Spectral data at many 
wavelengths must be stored on computer. Color measurements are 
traditionally made with spectrophotometers. These devices are relatively 
expensive and require uncommon technical expertise to operate. The usual 
way of converting spectral data into color coordinates appropriate for 
electronic display involves complex nonlinear equations. Computer aided 
design is one example of an application where color precision requirements 
are less demanding than, say, textile dye formulation. The present 
invention solves these problems, in a manner not disclosed in the known 
prior art, for less demanding applications. 
SUMMARY OF THE INVENTION 
This Application discloses an apparatus and method for reproducing blended 
coloration of samples on an electronic display. The electronic display can 
be a cathode ray tube, liquid crystal display, or other type of electronic 
display utilizing red, green, and blue (RGB) color coordinates. We usually 
assume colorants are blended and not merely placed on the substrate in 
side-by-side relation. Colorants can be applied in layers, if the 
colorants are mostly transparent, not very opaque. Color image digitizers 
are commonly used during some kinds of computer aided design. We show how 
color image digitizers, less expensive than traditional color measurement 
equipment, can be used to obtain color measurements. This invention is for 
simulation work only and cannot be used for critical colorant formulation 
work. 
We choose CIE XYZ tristimulus color coordinates for color analysis. Instead 
of measurements over many different wavelengths, tristimulus color 
measurements X, Y, and Z, are averages over red, green, and blue spectral 
bands, respectively. This is the minimum spectral information required to 
quantify color, since color vision provides the brain with red, green and 
blue spectral band averages via retina cone cells. And, this is why 
electronic displays use three-color light emission systems; e.g., CRT 
color monitors use red, green, and blue phosphors. Devices that measure 
color at many wavelengths (such as spectrophotometers and radiometers) 
compute XYZ values from appropriate weighted averages in the red, green, 
and blue spectral bands. Devices such as colorimeters, color luminance 
meters, and desktop image digitizers are less expensive because XYZ values 
are directly measured using three color optical filters. Each filter 
performs the appropriate spectral band averages directly. That is, color 
is measured essentially at only three or four wavelengths for these latter 
devices. 
Whenever possible, a color image digitizer is preferable to a colorimeter 
because it is less expensive and requires less technical expertise to 
operate. Color image digitizer operation can be more easily incorporated 
into an application than devices like spectrophotometers. A color image 
digitizer is also more likely to be considered necessary for other 
activities, such as image acquisition. 
Color image digitizers are less accurate than full spectrum measurement 
devices, but we are only considering applications where high accuracy is 
unnecessary. For example, visual feedback for CRT color monitor imagery 
requires less accuracy than, say, product color quality control in a 
manufacturing operation. Human color vision is very accommodating to 
systematic deviations from color accuracy. 
The use of XYZ values violates Kubelka-Munk Model assumptions because the 
derivation treats radiation scattering at each wavelength. Weighted 
averages of wavelengths have no physical meaning in the model. Using XYZ 
values in the Kubelka-Munk Model leads to incorrect predictions for 
colorant mixtures. It is necessary to add additional terms to the model to 
achieve satisfactory predictions. The previously stated equations for K 
and S contain terms of the form K.sub.i C.sub.i and S.sub.i C.sub.i. We 
discovered that it is sufficient to add terms of the form K.sub.ij C.sub.i 
C.sub.j to the equation for K. We refer to the coefficients K.sub.ij as 
light absorption blend coefficients for colorants i and j. It is not 
necessary to add similar terms to S. These new coefficients are generally 
not related to molecular interactions between colorants in the mixing 
media, although the addition of these terms might better accommodate such 
interactions when present. In this invention, least squares fitting to our 
modified Kubelka-Munk equations partially compensates for factors such as 
specular reflection, non-smooth surfaces (e.g., textiles), the use of 
tristimulus color measurements, and other factors not included in simple 
Kubelka-Munk Theory. 
If colorants are applied in thin layers on a substrate, rather than well 
mixed into a substrate, our technique can also successfully predict 
colors. If colorants are mostly transparent, and not very opaque, then one 
can use the term K.sub.ij C.sub.i C.sub.j in calculations when colorant j 
is applied to colorant i, and use the term K.sub.ji C.sub.i C.sub.j when 
colorant i is applied to colorant j. K.sub.ij and K.sub.ji will differ in 
value to a degree that correlates with colorant opacity. Clearly, a light 
colorant applied to a dark colorant will appear lighter than a dark 
colorant applied to a light colorant, in general. For the remainder of 
this Application, we assume this distinction is not necessary to simplify 
the Application. When colorants well mixed, then K.sub.ij equals K.sub.ji, 
whether or not colorants are opaque. 
The first step necessary to compute absorption and scattering coefficients 
is to gather sample measurements. We measure X, Y, Z tristimulus color 
measurements from an uncolored substrate. (All of the samples discussed 
below must be prepared using the same type of substrate. In applications 
where substrates are different, each substrate must be treated as a 
separate case). Then X, Y, Z tristimulus color measurements are made from 
samples with different concentrations of one colorant. This is done for 
all colorants to be blended, and concentrations must span the practical 
limit of concentrations. Finally, X, Y, Z tristimulus color measurements 
are made from samples utilizing pairs of colorants at several 
concentrations so that the sum of the blend concentrations is some fixed 
limit, stated in relative terms as 100%. All concentrations in this 
Application are expressed as a percentage. This relative scale must be 
based on some absolute physical measurement, such as colorant weight or 
volume. 
The total concentration limit is usually due to some physical constraint on 
the colorant application process. For example, the amount of a colorant 
that can diffuse into a textile polymer has an upper limit. Small 
extrapolations beyond 100% are predicted satisfactorily in instances where 
the practical limit chosen for manufacturing purposes is less than the 
actual physical limit. 
Now we begin to utilize the measurements obtained in the first step. The 
second step is to compute the light absorption coefficient K.sub.o for the 
uncolored substrate using measurements from the uncolored substrate. The 
third step is to utilize the measurements from the substrate colored by a 
single colorant to compute the light absorption coefficients K.sub.i and 
light scattering coefficients S.sub.i for colorant i. The final step 
utilizes the two-colorant blend measurements to compute the light 
absorption blend coefficient K.sub.ij for each pair of colorants i and j. 
All of these coefficients are computed for the X, Y, and Z (red, green, 
and blue) spectral bands. We have discovered that it is not necessary to 
extend the model to higher order terms. There is no S.sub.o term for the 
colorant substrate, because in our procedure this substrate light 
scattering term is factored into the other coefficients. 
K.sub.o, K.sub.i, S.sub.i, and K.sub.ij represent coded summaries of all 
the sample measurements. Less computer resources are necessary to store 
these coefficients than is necessary to store the measurements used to 
obtain the coefficients. These stored coefficients comprise a compact 
database for color prediction. Least squares fitting eliminates sample 
measurement variability from future calculations. This means using the 
coefficients to compute a color gradient always produces a visually 
uniform color series. These are important advantages over interpolation 
schemes based on many color measurements, when such a method is 
unwarranted. 
Once the coefficients are used to compute K/S values for arbitrary blends, 
which in turn is converted into color as XYZ values, these XYZ values can 
be used to compute RGB color coordinates used to show the blends on an 
electronic display. 
It is an advantage of this invention to predict the color of a blend of 
colorants on substrates without having to actually manufacture a sample 
with this blend of colorants. 
Still another advantage of this invention is that an image digitizer can be 
used to convert data into standard XYZ color measurements. 
Another advantage of this invention is that predicting the blend of more 
than two colorants does not require the manufacturing of samples with more 
than two colorants. 
A further advantage of this invention is that specular reflection, 
nonsmooth surfaces (e.g., textiles), layers of mostly transparent 
colorants (e.g., computer hardcopy colorants), and tristimulus color 
measurements can be accommodated, even though these conditions are not 
appropriate in the traditional Kubelka-Munk model. 
Yet another advantage is a unique method of converting X, Y, Z values into 
R, G, B values and visa versa without having to linearize their nonlinear 
relationship. This advantage applies to RGB values for CRT color display, 
and RGB values obtained from an image digitizer. 
These and other advantages will be in part apparent and in part pointed out 
below.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
Refer now to the accompanying flowcharts and graphs. FIG. 1 shows a 
schematic diagram of the basic elements for reproducing blended coloration 
on an electronic display using computer technology. Boxes in the diagram 
either represent computer information modules (algorithms, databases) or 
external measurement devices (colorimeters, spectrophotometers). Labeled 
arrows represent the flow of specified information between computer 
modules or external measurement devices. 
One color measurement standard for computer aided design or manufacturing 
systems is the CIE XYZ tristimulus color coordinates. It is used for both 
color input (image digitizers, on-line colorimeters, colorant formulation 
databases), and color output (color monitors, color printers, colorant 
formulation databases). This standardized color coordinate system has been 
an international standard for seventy years. The use of XYZ values is 
increasingly being used as the basis for computerized processes involving 
color. Even companies with proprietary color coordinate systems that offer 
advantages for specific applications can usually convert their color 
coordinates into XYZ color coordinates. One reason for preferring XYZ 
values over other standard color coordinates is that they directly 
correspond to RGB color systems used by devices such as image digitizers 
and electronic displays. 
XYZ values measured with a colorimeter are dimensionless, and are usually 
expressed as a percentage. The percent sign is customarily omitted. XYZ 
measurements are made with respect to some illuminant standard, such as 
D65 (day light at a black body temperature of 65,000.degree. K.). These 
relative color values are used to quantify the color of objects that do 
not emit light. Percentages indicate the fraction of white light that is 
reflected from a target in the red, green, and blue spectral bands. Some 
objects emit light, such as the phosphors of a CRT color monitor. Then 
absolute XYZ values are measured in dimensions such as candelas per square 
meter or foot-Lamberts. Absolute XYZ values can be converted into relative 
XYZ values by scaling them with respect to some standard emitter of white 
light. 
It is common for measurements to be expressed in terms of chromaticity x 
and y, and "luminance" Y. Conversion between XYZ values to xyY values is 
given by x=X/(X+Y+Z), and y=Y/(X+Y+Z). Y is the same in both coordinate 
systems. Chromaticity coordinates x and y are dimensionless and express 
the relative proportion of red and green in a color. The relative amount 
of blue is z=1-x-y. A color with equal amounts of red and green have 
x=y=z=1/3. Y is sometimes chosen as a measure of luminance (intensity, 
brightness) because human vision is more sensitive to green than red or 
blue. Chromaticities of common colors are shown in FIG. 3. Also shown is 
the chromaticity range of a typical CRT color monitor used for computer 
aided design. 
Although color measurements are traditionally obtained from colorimeters 2 
or spectrophotometers 3, or chroma meters (not shown) the preferred method 
in this Invention involves the use of an image digitizer 1, as shown in 
FIG. 1. Image digitizers like those manufactured by Sharp Electronics 
Corporation located at Mahwah, N.J., also have red, green, and blue 
receptors, or flash red, green, and blue light on samples. However, 
current image digitizers typically do not return XYZ values, or any other 
standard color coordinate system. Such devices commonly return a set of 
RGB values, indicating the strength of red, green, and blue. Red, green, 
and blue image digitizer color components are denoted as R, G, and B 
respectively. RGB values commonly range from 0 through 255. This 
Application discloses how to convert from scanner RGB values to relative 
XYZ values. 
The image digitizer, 1 in FIG. 1, scans a sample and provides image 
digitizer RGB values for each measurement area in the sample. Computations 
upon this RGB data is performed by the Image Digitizer Model Algorithm 5. 
Before RGB values can be converted into XYZ values in 5, certain 
prerequisite measurements and calculations must be performed. In phase one 
of the prerequisite work, color target shades of gray having identical 
chromaticity xy are scanned by the image digitizer. These measurements are 
used to compute model parameters that are characteristic of the red, 
green, and blue image digitizer light measurement channels. In phase two, 
all of the target colors are used to compute a mixing matrix. The mixing 
matrix is used to convert all image digitizer RGB values into XYZ values. 
A color target must be chosen for the image digitizer, to be used as 
described in the previous paragraph. The target must have several shades 
of gray with identical chromaticities. It must also have several colors 
that span the major color chromaticities. Very elaborate color targets are 
under development for color critical industries. One such color target 
standard is offered by the American National Standards Institute (ANSI) 
IT8 committee for graphic arts. Both transparent (ANSI IT8.7-1) and 
reflectance (ANSI IT8.7-2) targets will be offered by the major 
photographic film manufacturers by mid-1992. For our purposes, it is 
sufficient to use Macbeth.RTM. ColorChecker.RTM. Color Rendition Chart. 
The Macbeth.RTM. ColorChecker.RTM. Color Rendition Chart has been a 
reliable color standard for photographic and video work for the last 15 
years. The Macbeth.RTM. chart has 24 colors, as shown in TABLE 1, with 
chromaticity coordinates based on CIE illuminant C. Colors include six 
shades of gray, three additive primaries (red, green, blue), three 
subtractive primaries (yellow, magenta, cyan), two skin colors, and ten 
miscellaneous colors. Chromaticities of chart colors span most of color 
space, as shown in FIG. 3. FIG. 3 also shows the gamut of chromaticities 
available on a typical CRT color monitor. 
CIE color measurements are provided by Macbeth.RTM. for each color in the 
Macbeth.RTM. chart, and reproduced in TABLE 1. Alternatively, a 
colorimeter of choice can be used to measure the Macbeth.RTM. colors. 
While using the measurements supplied by Macbeth.RTM. for calculations is 
convenient, this is not the preferred method. A standard colorimeter 
should be chosen for all measurements made for a computer aided design 
process. For example, if a HunterLab.RTM. LabScan, manufactured by Hunter 
Lab of Reston, Va., is used to measure all product samples, then it is 
preferable to measure the Macbeth.RTM. chart colors with the 
HunterLab.RTM. LabScan. Then the correspondence between future sample 
measurements and image digitizer measurements would be as close as 
possible. This is because different models of colorimeters, even when 
manufactured by the same company, often give different CIE color 
measurements. For example, colorimeters treat specular reflection 
differently. Colorimeters use different sample illumination geometries. 
This step of collecting RGB and XYZ values of target colors is designated 
as numeral 20 in FIG. 2. In this document, RGB and XYZ values are 
normalized so values fall between 0 and 1. This step is denoted in FIG. 2 
by numeral 30. 
Tristimulus values for red, green, and blue image digitizer channels are 
denoted X.sub.r, Y.sub.g, and Z.sub.b, respectively, and we refer to them 
generically as X.sub.r Y.sub.g Z.sub.b values. They are defined only for 
gray shades having the same neutral chromaticity. They are computed from 
the gray shade light measurements, and are used in subsequent calculations 
to characterize the performance of the image digitizer light sensors. Gray 
shades can be provided by the Macbeth.RTM. ColorChecker.RTM.. These shades 
of gray all have chromaticity x=0.310 and y=0.316, and are colors 19 
through 24 shown in TABLE 1. 
Image digitizer parameters characterizing the non-linearity between image 
digitizer RGB values and XYZ values are denoted as g.sub.r, g.sub.g, and 
g.sub.b, respectively. These are generically referred to as "gamma" or g. 
Image digitizer parameters characterizing red, green and blue channel 
contrast are denoted as G.sub.r, G.sub.g, and G.sub.b, respectively. These 
are generically referred to as "gain" or G. 
Image digitizer parameters characterizing red, green and blue channel 
brightness are denoted as O.sub.r, O.sub.g, and O.sub.b, respectively. 
These are generically referred to as "offset" or O. 
Our choice of notation, and the terms "gamma", "gain", and "offset" derive 
from their original use for mathematically modeling cathode ray tube 
display devices. 
Gain, offset and gamma parameters in the image digitizer model establish a 
quantitative relationship between measured color (XYZ tristimulus values) 
and image digitizer color components (RGB values) for the red, green, and 
blue image digitizer channels, as shown in the following equations: 
EQU X.sub.r =(G.sub.r +O.sub.r *R).sup.gr Eq. 1.0 
EQU Y.sub.g =(G.sub.g +O.sub.g *G).sup.gg Eq. 1.1 
EQU Z.sub.b =(G.sub.b +O.sub.b *B).sup.gb Eq. 1.2 
We now explain how to compute the image digitizer model parameters from the 
Macbeth.RTM. ColorChecker.RTM. color measurements. XYZ measurements values 
are selected for shades of gray having the same chromaticity, xy. Colors 
19 through 24 (TABLE 1) are shades of gray with identical chromaticities. 
These are identified as the X.sub.r Y.sub.g Z.sub.b values. Each gray 
shade has corresponding image digitizer RGB values. This step is 
designated as numeral 40 in FIG. 2. The next step is designated as numeral 
50 in FIG. 2, which is to chose whether to treat the X, Y, or Z data. 
Usually, one proceeds in the order X component, then Y component, and then 
Z component. The order is unimportant. TABLE 2 shows an example of image 
digitizer RGB values for Macbeth.RTM. colors. Equations 1.0, 1.1 and 1.2 
are in the following form (x and y are not chromaticity variables here): 
EQU y=(G+O*x).sup.g Eq. 2.0 
Equation 2.0 can be rewritten as an equation that is linear in y.sup.1/g. 
That is, a graph of x as a function of y.sup.1/g is a straight line. 
EQU y.sup.1/g =G+O*x Eq. 2.1 
For specific values of g, G, and O, we define a least squares error E. A 
subscript m denotes individual gray shade measurements x.sub.m 
(representing R.sub.m or G.sub.m or B.sub.m), and y.sub.m.sup.1/g 
(representing X.sub.rm.sup.1/gr or Y.sub.gm.sup.1/gg or 
Z.sub.bm.sup.1/gb). There is a total of N gray shade measurements, so m 
ranges from 1 to N. 
##EQU1## 
For computational purposes, an expanded form of Equation 2.2 is preferred. 
Equation 2.3 is expressed in terms of summations that will already exist 
in prior computational steps in the final algorithm. 
EQU E.sup.2 =S.sub.yy -2GS.sub.y -2OS.sub.xy +O.sup.2 S.sub.xx +2GOS.sub.x 
+G.sup.2 S Eq. 2.3 
The following summation equations determine the "S" variable values. 
##EQU2## 
Note the variable S found in Equation 2.4, is equal to the number of 
shades of gray. 
Equation 2.1 is nonlinear in g. Because of this nonlinearity, our approach 
is not to minimize the least squares error found in Equation 2.3 for g, G, 
and O simultaneously. Instead, we pick a reasonable value for g, and find 
G and O that minimize the least squares error. The step of choosing g is 
designated by numeral 60 in FIG. 2. For this g, G and O are computed from 
by Equations 3.0, 3.1 and 3.2. This is designated by numeral 70 in FIG. 2. 
These equations are solutions to the least squares fit for a given value 
of g. 
EQU D=S.sub.xx S-S.sub.x.sup.2 Eq. 3.0 
EQU G=(S.sub.xx S.sub.y =S.sub.x S.sub.xy)/D Eq. 3.1 
EQU O=(-S.sub.x S.sub.y +S S.sub.xy)/D Eq. 3.2 
Our chosen g and the computed optimal values for G and O can be put into 
Equation 2.3 to compute the least squares error E (or E.sup.2) as 
designated by numeral 80 in FIG. 2. We then can pick another value of g, 
which allows us to compute another set of optimal values of G and O, that 
in turn gives a new least squares error. This decision to select another g 
is designated by numeral 90 in FIG. 2. For two choices of g, the better 
value is the one giving the smaller least squares error E (or E.sup.2). 
The least squares error is not very sensitive to changes in g by 
differences of 0.25. The algorithm chooses values of g from 1 through 5 in 
increments of 0.25. As outlined above, for each g, compute G and O from 
Equations 2.4 through 2.9, and 3.0 through 3.2, and least squares error 
E.sup.2 from Equation 2.3. The best value of g is the one minimizing 
E.sup.2. This final selection of g is designated by numeral 100 in FIG. 2. 
As previously stated with regard to numeral 50 of the flowchart in FIG. 2, 
this calculation is repeated separately for the red, green, and blue 
components of the gray shades. This decision step is designated by numeral 
110 in FIG. 2, which will lead to repeating steps 60, 70, 80, 90 and 100 
in FIG. 2 for each spectral band. 
Once gamma, gain, and offset parameters are computed, Equations 1.0, 1.1, 
and 1.2 predict X.sub.r, Y.sub.g, and Z.sub.b for gray shades with 
chromaticities matching the original gray shades. For the Macbeth.RTM. 
chart, Equations 1.0, 1.1 and 1.2 then accurately predict all shades of 
gray with a chromaticity equal to x=0.310, y=0.316. Equations 1.0, 1.1 and 
1.2 do not by themselves accurately predict arbitrary colors. 
The next step is to use measurements of arbitrary colors so we can convert 
image digitizer RGB values of arbitrary colors into XYZ values (or vice 
versa). One of Grassman's Laws provides an approximate way to calculate 
tristimulus values for arbitrary colors. It is applicable because image 
digitizer channels are largely independent (i.e., the channels measure 
primary colors). Therefore, additive color mixing is appropriate. A mixing 
matrix M produces a linear combination of the gray shade tristimulus 
values. Define the column matrix of measured XYZ values for any color as: 
##EQU3## 
and the column matrix of predicted XYZ values computed from Equations 1.0, 
1.1 and 1.2, as: 
##EQU4## 
Then X and X.sub.rgb are connected by the linear relationship 
EQU X=MX.sub.rgb Eq. 4.2 
where M is a 3.times.3 matrix. M is computed from all target colors, 
including shades of gray, in a least squares (pseudo-inverse) fashion, as 
follows. Define a 3.times.N matrix Q whose columns are N color target 
measurements X.sub.m of the type shown in Equation 4.0 as follows: 
EQU Q=.vertline.X.sub.1 X.sub.2 X.sub.3 . . . X.sub.N .vertline.Eq. 4.3 
Also define a 3.times.N matrix Q.sub.rgb containing the corresponding image 
digitizer channel tristimulus predictions obtained from Equations 1.0, 1.1 
and 1.2 for the same N measurements as follows: 
EQU Q.sub.rgb =.vertline.X.sub.rgb1 X.sub.rgb2 X.sub.rgb3 . . . X.sub.rgbN 
.vertline. Eq. 4.4 
The computation of Q and Q.sub.rgb from XYZ measurements and estimates of 
all target colors is designated as numeral 120 in FIG. 2. The columns of Q 
and Q.sub.rgb are connected by matrix M from Equation 4.2, so therefore: 
EQU Q=MQ.sub.rgb Eq. 4.5 
This holds true if the image digitizer model (Equations 1.0, 1.1 and 1.2) 
is exactly true and color measurements are without error. The model and 
data are not exact, so the "best" (least squares) solution is obtained by 
solving Equation 4.5 using a pseudo-inverse as follows: 
EQU M=Q(Q.sub.rgb Q.sub.rgb.sup.T).sup.-1 Eq. 4.6 
Superscript T denotes matrix transpose, and superscript -1 denotes matrix 
inverse. The computation of M is designated by numeral 130 in FIG. 2. The 
inverse is computed for a 3.times.3 matrix. Once the gain, offset, gamma, 
and mixing matrix M are known, Equations 1.0, 1.1, 1.2 and 4.2 are used to 
convert image digitizer R, G, and B into X, Y, and Z for any color. This 
step is designated by numeral 140 in FIG. 2. This conversion constitutes 
the image digitizer model algorithm denoted by numeral 5 in FIG. 1. In an 
application, such a conversion might be used to obtain XYZ values for the 
color database denoted by numeral 7 in FIG. 1. 
The inverse transformation, converting X, Y, and Z into R, G, and B, is 
computed as follows: 
EQU X.sub.rgb =M.sup.-1 X Eq. 5.0 
EQU R=(X.sub.r.sup.1/gr -G.sub.r)/O.sub.r Eq. 5.1 
EQU G=(Y.sub.g.sup.1/gg -G.sub.g)/O.sub.g Eq. 5.2 
EQU B=(Z.sub.b.sup.1/gb -G.sub.b)/O.sub.b Eq. 5.3 
Once gamma, gain, and offset are computed for a device, they can be saved 
in a computer data structure for all future color conversions. That is, 
only the step labeled 140 in FIG. 2 is necessary for subsequent color 
conversions. These image digitizer parameters are independent of the types 
of target measured by the image digitizer. XYZ values for textiles, paper 
products, photographs, and so on, can be computed from RGB values using 
the same parameter values. 
TABLE 2 shows an example of image digitizer RGB values, and TABLE 3 and 
TABLE 4 show the corresponding computed image digitizer model parameters. 
More specifically, TABLE 3 shows gamma, gain and offset values for the R, 
G, and B image digitizer channels, and TABLE 4 shows the 3.times.3 mixing 
matrix M. Data was obtained from a Sharp.RTM. JX-450 image digitizer. FIG. 
4 shows a graph of measured and predicted XYZ tristimulus values for 
Macbeth.RTM. gray shades, plotted against image digitizer RGB values. 
Predictions were computed from least squares values of gamma, gain, and 
offset values. FIG. 5 shows image digitizer XYZ measurements versus XYZ 
predictions for all Macbeth.RTM. colors. Predictions were computed from 
least squares values of gamma, gain, offset, and the mixing matrix M. 
A second aspect of this invention, of primary importance, is the ability to 
predict the color of colorants blended into an optically thick substrate. 
If colorants are mostly transparent, not very opaque, then they can be 
applied in layers and this invention still applies. An illustrative 
non-limiting example of this latter case is the spraying of textile dyes 
onto a carpet substrate. Layered colorants sometimes produce colors that 
depend on the order of colorant application, but this effect can be 
accommodated by this invention, and is described later in this 
Application. 
In Kubelka-Munk Theory, the symbol R represents the fraction of light 
reflected by a sample at a specific wavelength of light. In this 
Application, R generically denotes scaled versions of one of the 
tristimulus values, X, Y, or Z. As previously discussed, the tristimulus 
coordinates X, Y, or Z represent averages over the red, green, and blue 
spectral bands, respectively. Therefore, our use of XYZ values for R 
differs from Kubelka-Munk Theory. The chosen scaling of XYZ values must 
produce R values that are less than 1. 
The ratio of light absorption and light scattering coefficients of a 
colorant mixture is denoted by K/S. K/S is dimensionless, and has three 
components that correspond to the red, green, and blue spectral bands. K/S 
is related to R (the scaled XYZ values) by Equation 6.0. Equation 6.0 
comes from Kubelka-Munk Theory for an optically thick substrate. Equation 
6.1 is the mathematical inverse of Equation 6.0. Equation 6.0 is used for 
computing K/S when R is known by measurement. Equation 6.1 is used for 
predicting R when K/S is known. 
EQU K/S=(1-R).sup.2 /2R Eq. 6.0 
EQU R=(1+K/S)-[(1+K/S).sup.2 -1].sup.1/2 Eq. 6.1 
Equation 7.0 shows how absorption and scattering coefficients of individual 
colorants are combined in a mixture to produce K/S in this Application. 
The numerator of Equation 7.0 is a sum of light absorption terms for each 
colorant in the mixture. The denominator is a sum of light scattering 
terms for each colorant. N is the number of colorants. 
##EQU5## 
K.sub.o is the light absorption coefficient for a substrate without 
colorants. The zero subscript denotes zero colorant concentration. 
Equation 8.0 below establishes the connection between R.sub.o and K.sub.o. 
The reflectance of uncolored substrate is denoted by R.sub.o. This 
relationship comes from Equation 7.0 when relative colorant concentrations 
C.sub.i and C.sub.j are set to zero. This notation differs somewhat from 
standard colorimetric notation in that the substrate light scattering 
coefficient S.sub.o does not appear in Equation 7.0. The substrate light 
scattering coefficient is factored into the other coefficients in this 
Application, and explains why the dimensionless term "1" arises in the 
denominator of Equation 7.0. All light absorption and scattering 
coefficients in this document are dimensionless because of this 
normalization. 
The light absorption and light scattering coefficients K.sub.i and S.sub.i 
correspond to similar terms in the Kubelka-Munk Model. The light 
absorption blend coefficients for colorants i and j are denoted as 
K.sub.ij. We add these latter coefficients to the Kubelka-Munk Model in 
this Invention to compensate for the fact that XYZ values are used in 
place of spectral reflectivities at specific wavelengths. These 
coefficients are generally not related to molecular interactions between 
colorants in the mixing media, although the coefficients might compensate 
for such interactions when they exist. If colorants are applied in layers, 
then the ordering of the subscripts is important. For example, if colorant 
i is first applied to the substrate, followed by colorant j, we use 
K.sub.ij. If colorant j is applied first, we use K.sub.ji. K.sub.ij and 
K.sub.ji are not generally equal. 
Equation 7.1 comes from rearranging Equation 7.0. It is linear with respect 
to colorant concentrations C.sub.i, and constitutes the basis for the 
linear least squares fit calculations. Note K/S appears on both sides of 
the equation. During the fit process, K/S is computed from Equation 6.0. 
In all calculations, concentrations are expressed as fractions, not 
percentages. 
##EQU6## 
We now review the way that sample measurements are used to compute the 
light absorption, scattering, and absorption blending coefficients. The 
first step is to measure X, Y, Z values for uncolored substrate, denoted 
by numeral 170 in FIG. 6. See Step 1 in FIG. 7. When colorant is absent 
from the substrate, all colorant concentrations are zero, and we compute 
K.sub.o from Equation 8.0. R.sub.o represents scaled XYZ measurements of 
the substrate. 
EQU (K/S).sub.o =K.sub.o =(1=R.sub.o).sup.2 /2R.sub.o Eq. 8.0 
When all colorants in a mixture are at very small concentrations, this 
constraint guarantees the predicted color of the substrate approaches the 
color of uncolored substrate. This calculation is labeled 200 in FIG. 6. 
See STEP 2 in FIG. 7. Once calculated, K.sub.o is used to compute the 
color of the substrate when colorant concentrations are exactly zero. 
The second step in this process is to obtain color measurements from 
samples made when one colorant is present at several concentrations. This 
is labeled 180 in FIG. 6. Because only one colorant is used, all of the 
K.sub.ij C.sub.i C.sub.j terms in Equations 7.0 and 7.1 are zero. Let 
K.sub.1 and S.sub.1 denote the light absorption and scattering 
coefficients for colorant 1 at concentration C.sub.1. K/S is calculated 
using Equations 6.0, and K.sub.o is already known. We compute K.sub.1 and 
S.sub.1 using a least squares fit as shown in Equations 9.0 through 9.5 
EQU y=K/S-Ko Eq. 9.0 
EQU x.sub.1 =C.sub.1 Eq. 9.1 
EQU x.sub.2 =(K/S)C.sub.1 Eq. 9.2 
EQU w=[R/(R.sub.o -R).sup.2 ].sup.2 Eq. 9.3 
##EQU7## 
Variable y denotes the dependent variable, and x.sub.1 and x.sub.2 denote 
independent variables. Variable w is a least squares weight forcing 
relative errors to be uniform for XYZ predictions. Index q refers to 
different colorant concentrations, and P designates the total number of 
different colorant concentrations (the total number of samples). This 
calculation is labeled 210 in FIG. 6. See STEP 3 in FIG. 7. Once 
calculated, K.sub.1 and S.sub.1 are used to predict color produced by 
different concentrations of colorant 1. 
The third step of this process is to obtain color measurements of samples 
made with two colorants present at different concentrations. Let two 
colorants be labeled by subscripts 1 and 2. Both colorant concentrations, 
C.sub.1 are C.sub.2, must be non-zero in the data set used for the least 
squares fit. Total concentration, C.sub.1 +C.sub.2, must not exceed 100%. 
It is best for these concentrations to span as wide a range as possible, 
and convenient (although not necessary) to choose C.sub.1 +C.sub.2 =100%. 
K.sub.o, K.sub.1, S.sub.1, K.sub.2, and S.sub.2 must already be known for 
colorants 1 and 2. As usual, K/S is calculated using Equation 6.0. 
K.sub.12 is to be determined. The step of measuring X, Y, Z values for 
substrates having pairs of colorants applied at several concentrations is 
denoted by numeral 190 in FIG. 6. 
##EQU8## 
Index q refers to different colorant concentrations, and P designates the 
total number of pairs of blends (the total number of samples). This 
calculation is labeled 220 in FIG. 6. See STEP 4 in FIG. 7. Once 
calculated, K.sub.12 (along with K.sub.o, K.sub.1, S.sub.1, K.sub.2, and 
S.sub.2) is used to predict color produced by different blends of 
colorants 1 and 2. 
The same procedure is used to determine parameters for other colorants. 
Once obtained, K.sub.o, K.sub.i, S.sub.i, and K.sub.ij can be used to 
compute XYZ values for any colorant blend by utilizing equations 7.0 and 
6.1. This is the final step designated as 230 in FIG. 6. 
The color of one colorant on a given substrate is defined by nine numbers: 
K.sub.o, K.sub.1, S.sub.1. Two colorants on a given substrate have color 
defined by eighteen numbers: K.sub.o, K.sub.1, S.sub.1, K.sub.2, S.sub.2, 
K.sub.12. (We exclude the case where K.sub.21 is necessary as discussed 
earlier in this Application.) The color of three colorants on a given 
substrate is defined by thirty numbers: K.sub.o, K.sub.1, S.sub.1, 
K.sub.2, S.sub.2, K.sub.3, S.sub.3, K.sub.12, K.sub.13, K.sub.23. These 
coefficients summarize all sample measurements, and would normally be 
saved in a computer database for subsequent blend calculations; e.g., 7 in 
FIG. 1. 
One application for this type of colorant blending analysis is the 
application of dyes to a carpet substrate using computer controlled dye 
jet technology. This is not to be construed as limiting in any way, since 
any optically thick substrate can be utilized with this process. 
Measurements must be made after the carpet is in final product form; e.g., 
after the carpet dye (if any) is fixed, after shearing, after topical 
treatments are applied, and so on. This requirement includes measurements 
made of undyed samples used to compute K.sub.o for the carpet substrate. 
If a colorimeter is used instead of an image digitizer, it is preferable 
to limit measurements to one colorimeter. If the colorimeter provides CIE 
L*a*b measurements, these color coordinates must be converted into XYZ 
tristimulus values using the appropriate colorimetric equations. The 
colorimeter must be calibrated using the largest possible aperture, 
preferably at least 2" in diameter. Glass is not used on the colorimeter 
aperture because crushing the carpet pile against glass adds a gloss that 
is not observed on carpet during normal use. Carpet pile on samples is 
manually set before measurement so it lies in its preferred direction. 
FIG. 7 consists of four graphical embodiments entitled STAGED REGRESSION 
STEPS FOR DYE BLEND CALCULATIONS. It is a graphic representation of the 
calculations required to obtain colorant light absorption, scattering, and 
blending coefficients. The example assumes that the blended colorants 
consist of two dyes applied to a textile substrate. Dyes 1 and 2 are 
blended at relative concentrations C.sub.1 and C.sub.2, respectively. 
C.sub.1, C.sub.2 and R are depicted by coordinate axes at right angles. 
Refer to STEP 1 of FIG. 7. As stated earlier, it is computationally simpler 
to use the ratio K/S rather than R. The mathematical connection between 
K/S and R is shown in Step 1 of FIG. 7. All calculated predictions are 
obtained from measurements of undyed or dyed samples. One sample must have 
no colorant applied (C.sub.1 =C.sub.2 =0), and is the point labeled "No 
Dye". This point has the lightest measured color, so the measurement is 
shown as the data point highest in the R direction. 
Several samples must have different amounts of Dye 1. These are the points 
labeled "33% Dye 1", "66% Dye 1", and "100% Dye 1", and all lie in the 
plane formed by the C.sub.1 and R axes. These points are lower (darker) 
then the "No Dye" measurement. The greater the amount of Dye 1, the closer 
(darker) the measurements move towards the C.sub.1 axis. Similar 
statements can be made for the samples with different amounts of Dye 2. In 
this example, measurements of R for Dye 2 are smaller than for Dye 1. This 
means Dye 1 is lighter in color than Dye 2 for color component R. 
STEP 1 also shows three measurements with different blends of Dyes 1 and 2. 
Only one measurement is labeled, "50% Dye 1+50% Dye 2". A dashed line lies 
in the plane formed by the C.sub.1 and C.sub.2 axes. The points on this 
line satisfy the equation C.sub.1 +C.sub.2 =100%. It is convenient to 
prepare blend samples so this equation is satisfied. The three two-dye 
blend colors shown in the drawing satisfy this relationship, and therefore 
lie above the dashed line in this three dimensional space. For example, 
the other two points can be "33% Dye 1+67% Dye 2" and "67% Dye 1+33% Dye 
2". The sum of the blend concentrations is then 100% for both dye blends. 
In summary, if we viewed the coordinate system in the drawing down along 
the R axis, then the one-dye measurements would be projected onto the 
C.sub.1 or C.sub.2 axes, and the two-dye blend measurements would be 
projected onto the dashed line crossing the C.sub.1 and C.sub.2 axes. 
Arbitrary blends satisfying the constraint C.sub.1 +C.sub.2 .ltoreq.100% 
would fall inside the triangle formed by these three lines. 
Refer to STEP 2 of FIG. 7. The first stage in the series of regressions 
uses samples without colorants to compute K.sub.o. A 100% wet out solution 
without colorant must sometimes be applied to uncolored substrates (such 
as greige textile fabric), and be processed as pare of mix blanket 
samples, if it imparts any color or otherwise alters appearance. This 
"clear" solution is sometimes used to blend colorants on a substrate. It 
would therefore be used during the creation of the colorant dilution and 
binary colorant blend samples. 
Zero colorant sample measurements are used to compute the light absorption 
coefficient for the substrate, K.sub.o. If we stop our calculations at 
this point, and use K/S=K.sub.o to predict colors for blends of Dye 1 and 
2, the predictions would only match the measurement when C.sub.1 =C.sub.2 
=0. Predictions are denoted in Step 2 of FIG. 7 by the triangular plane of 
predictions intersecting the "No Dye" point. In this first stage of the 
regression, only the "No Dye" prediction matches the measurements. 
Refer to STEP 3 in FIG. 7. This step uses colored samples to compute 
K.sub.1, S.sub.1, K.sub.2, and S.sub.2. It is recommended that each 
colorant have at least five different concentrations, although only three 
are shown in FIG. 7. 0% concentration is not used in this step, but it 
should include 100% concentration. One possible set is 15%, 20%, 30%, 50%, 
and 100%. The choice of uneven concentration increments is more likely to 
produce a visually uniform color gradient. Small amounts of colorant have 
a strong impact on final color. If ten different concentrations can be 
accommodated, a possible set is 15%, 20%, 25%, 30%, 35%, 40%, 50%, 60%, 
80%, and 100%. 
Single colorant dilution measurements are used to compute light absorption 
and scattering coefficients. These new terms are added to the formula for 
K/S, as shown in STEP 3. Also shown as solid lines is the new prediction 
surface. The new predictions lie close to the single dye measurements. 
They do not match perfectly because the calculation is a least squares 
fit. Goodness of fit are limited by measurement precision, and by degrees 
of freedom in our mathematical model. Note the prediction still matches 
the "No Dye" measurement. The second stage of regression does not disturb 
the first stage of regression. However, the prediction surface still does 
not match the dye blend measurements satisfactorily. 
Refer to STEP 4 of FIG. 7. The final step uses pairs of colorants to 
establish K.sub.ij. It is recommended that each colorant have at least 
five different concentrations, although only three are shown in FIG. 7. 0% 
and 100% concentrations must not be used. One possible set is 15%/85%, 
33%/67%, 50%/50%, 67%/33%, and 85%/15%. If ten different concentrations 
can be accommodated, one possible set is 15%/85%, 20%/80%, 25%/25%, 
30%/70%, 40%/60%, 60%/40%, 70%/30%, 75%/25%, 80%/20%, and 85%/15%. The 
choice of uneven concentration increment is more likely to produce a 
visually uniform color gradient. Small amounts of colorant have a strong 
impact on final color. 
Colorant pair blending measurements are used to compute light absorption 
blending coefficients. This adds one more term to the formula for K/S, as 
shown in STEP 4. Now the prediction curve satisfactorily predicts all of 
the dye measurements. Again, the final predictions do not match perfectly 
because the calculation is a least squares fit. This third regression 
stage has no effect on no-dye or dye pair blending predictions. 
In summary, the modified Kubelka-Munk Model is fit to measurements in 
stages, each successive stage including more measurement data, and further 
reducing the total least squares error. The accuracy of prior predictions 
are not affected. The algebraic reason for this decoupling is that each 
expression for the numerator K and denominator S in the equation for K/S 
contains increasingly higher ordered products of colorant concentrations. 
If both colorant concentrations are zero, all terms with C.sub.1, C.sub.2, 
and C.sub.1 *C.sub.2 vanish. The only term left is the one shown in STEP 
2. If one colorant concentration is zero, terms with C.sub.1 *C.sub.2 
vanish. The only terms left are ones shown in STEP 3. Only when both 
concentrations are non-zero, so that the C.sub.1 *C.sub.2 term is present, 
does all of the terms shown in STEP 4 apply. 
Predictions of colorant blends fall on the curved surface shown in STEP 4 
of the drawing. Predictions are satisfactory for our specified 
applications over the entire surface. Arbitrary predictions are 
interpolations based on the K/S model, made with the shown formula (the 
same as Equation 7.0 ). When three colorants are involved, the 
interpolation region is a volume, and so on. While this mathematical 
process can be extended to higher order terms (e.g., S.sub.12, K.sub.123, 
S.sub.123, and so on), we find this is unnecessary for tristimulus 
coordinate prediction. 
The addition of a third colorant does not affect the values of K.sub.0, 
K.sub.1, S.sub.1, K.sub.2, S.sub.2, or K.sub.12. But we must compute 
coefficients K.sub.3, S.sub.3, K.sub.13, and K.sub.23, if predictions are 
desired for blends involving the third colorant. Again, all of the prior 
predictions for blends of Dye 1 and Dye 2 remain unaffected, even though 
extra terms are added to the K/S equation. 
TABLE 5 through TABLE 7 show a lists of light absorption, light scattering, 
and light absorption blend coefficients for seven textile dyes. These dyes 
were applied to carpet substrates by spraying the dyes under computer 
control. There are three dark dyes ("deep"), three medium dyes ("pale"), 
and one light dye (yellow). Blend predictions for a subset of four dyes 
(pale red, pale green, pale blue and yellow), are shown in TABLE 8 through 
TABLE 11. 
The third and final aspect of this Invention is to display the calculated 
blend colors on an RGB based electronic display. It is common for 
computerized design systems to display colors on cathode ray tubes (CRTs). 
Any electronic display using RGB values, such as liquid crystal displays, 
among others, can be employed for the purposes of this Application. 
Cathode ray tubes (CRTs) emit light in three primary colors. This excites 
the red, green and blue receptors in the human retina. For convenience, we 
refer to CRT displays in this Application, although any RGB based 
electronic display can be used such as an electroluminiscent display or a 
plasma display. Colors emitted by electronic displays are measured by a 
radiometers or chroma meters (e.g., Minolta.RTM. TV-Color Analyzer II, 
Minolta.RTM. CRT Color Analyzer CA-100, Minolta.RTM. Chroma Meter CS-100). 
Of the various color coordinates available from color measurement devices, 
as previously stated, XYZ tristimulus values are chosen in this 
Application. 
XYZ values measured from devices that emit light have dimensions; e.g., 
candelas per square meter. These measurements are said to be absolute. 
Relative XYZ values will now be denoted X'Y'Z'. These values are 
dimensionless, and usually expressed as a percentage. Different absolute 
measurements for the same white media (having the same chromaticity) are 
usually scaled to the same relative values for electronic visual display 
or computer imaging hardcopy applications. The maximum Y value possible 
for a display device is sometimes chosen to convert absolute XYZ 
measurements into relative X'Y'Z' values. For example, if the maximum Y 
value possible for a CRT is 80 cd/m.sup.2, and one displayed color 
measures X=60 cd/m.sup.2, Y=70 cd/m.sup.2, Z=75 cd/m.sup.2, then the 
corresponding relative X'Y'Z' values are X'=75.00, Y'=87.50, and Z'=93.75. 
Although these are percentages, the percent sign is customarily omitted. 
As discussed earlier in this Application, it is common for color 
measurements to be expressed in terms of chromaticity x and y, and 
"luminance" Y. Conversion between XYZ values to xyY values is accomplished 
as described earlier in this Application. Note that the dimensioned values 
of X and Y are thereby converted into dimensionless values of x and y. The 
chromaticity range of a typical CRT color monitor used for computer aided 
design is shown in FIG. 3, and compared with chromaticities of 
Macbeth.RTM. ColorChecker.RTM. colors. 
Current electronic color displays do not use XYZ values directly to display 
colors. Such devices commonly use RGB values, indicating the strength of 
red, green, and blue phosphor light emission. Red, green, and blue color 
components are denoted as R, G, and B, respectively. RGB values commonly 
range from 0 through 255. We show how to convert from absolute XYZ 
tristimulus values to RGB electronic display values. FIG. 1 shows a CRT 
display as 4, that accepts and returns a color as RGB values. Conversion 
between XYZ and RGB values is performed by 6 in FIG. 1, a CRT Model 
Algorithm. 
In phase one of the computations, separate measurements are made of the 
red, green, and blue CRT phosphors at different brightnesses. This must be 
done for several levels of RGB values. A typical set of RGB values for the 
phosphor measurements are 50, 100, 150, 200, 225, and 255. It is 
preferable to include the smallest RGB value that provides a dependable 
measurement. This is about Y=0.6 cd/m.sup.2 for the Minolta.RTM. TV-Color 
Analyzer II, and about Y=0.3 cd/m.sup.2 for the Minolta.RTM. CRT Color 
Analyzer CA-100. This data collection step is numeral 260 in FIG. 8. In 
this document, RGB and XYZ values are normalized so values fall mostly 
between 0 and 1. This step is denoted in FIG. 8 by numeral 270. These 
measurements are used to compute model parameters that are characteristic 
of the red, green, and phosphors. In phase two of the computations, a 
mixing matrix is computed so any color can be converted, not just colors 
produced when one phosphor is on. 
Earlier in this Application the Image Digitizer Model Algorithm (5 in FIG. 
1) was described. The CRT Model Algorithm (6 in FIG. 1) for electronic 
color display is very similar. In fact, the CRT Model Algorithm came first 
and was adapted for digitizer color measurement to create the Digitizer 
Model Algorithm for this Invention. The terminology used in the CRT Model 
Algorithm (e.g., gamma, gain, offset) are associated with the internal 
electronics of a CRT; e.g., electron beam intensity and amplifier 
voltages. As this Application demonstrates, the mathematical aspects of 
the model can be adapted to RGB based devices such as image digitizers and 
other kinds of electronic color display devices. 
Tristimulus values for red, green, and blue CRT phosphors are denoted by 
X.sub.r, Y.sub.g, and Z.sub.b, respectively, and are generically referred 
to as X.sub.r Y.sub.g Z.sub.b values. X.sub.r is the X value measured when 
only the red phosphor is turned on (G and B are zero), Y.sub.g is the Y 
value measured when only the green phosphor is turned on (R and B are 
zero), and Z.sub.b is the Z value measured when only the blue phosphor is 
turned on (R and G are zero). 
For a CRT, gamma is the parameter that characterizes the nonlinear 
relationship between the electron beam acceleration voltage and the 
resulting color brightness. Gamma values for the red, green and blue 
phosphors are denoted as g.sub.r, g.sub.g, and g.sub.b, respectively. 
These are collectively referred to as "gamma" or g. 
For a CRT, gain is the parameter that characterizes the perceived contrast 
level of resulting colors. Gain values for the red, green and blue 
phosphors are denoted as G.sub.r, G.sub.g, and G.sub.b, respectively. 
These are collectively referred to as "gain" or G. 
For a CRT, offset if the parameter that characterizes the perceived 
brightness of resulting colors. Offset values for the red, green and blue 
phosphors are denoted as O.sub.r, O.sub.g, and O.sub.b, respectively. 
These are collectively referred to as "offset" or O. 
Gain, offset and gamma parameters in the CRT Model Algorithm define a 
quantitative relationship between measured color (absolute XYZ tristimulus 
values) and CRT color coordinates color components (RGB values) for each 
CRT phosphor. This is shown in the following equations. You will notice 
these equations are identical to those presented earlier in this 
Application for the Image Digitizer Model Algorithm. 
EQU X.sub.r =(G.sub.r +O.sub.r *R).sup.gr Eq. 1.0 
EQU Y.sub.g =(G.sub.g +O.sub.g *G).sup.gg Eq. 1.1 
EQU Z.sub.b =(G.sub.b +O.sub.b *B).sup.gb Eq. 1.2 
We now explain how to compute the CRT model parameters from the color 
phosphor measurements. X.sub.r is measured when only the red phosphor is 
turned on (G and B are zero), Y.sub.g is measured when only the green 
phosphor is turned on (R and B are zero), and Z.sub.b is measured when 
only the blue phosphor is turned on (R and G are zero). The first step is 
to chose either the red, green or blue phosphor for further computation as 
designated by numeral 280 in FIG. 8. Equations 1.0, 1.1 and 1.2 are in the 
following form (x and y are not chromaticity variables): 
EQU y=(G+O*x).sup.g Eq. 2.0 
Equation 2.0 can be rewritten as an equation linear in y.sup.1/g. That is, 
a graph of x as a function of y.sup.1/g is a straight line. 
EQU y.sup.1/g =G+O*x Eq. 2.1 
For specific values of g, G, and O, we define a least squares error E. A 
subscript m denotes individual measurements x.sub.m (representing R.sub.m 
or G.sub.m or B.sub.m) and y.sub.m.sup.1/g (representing X.sub.rm.sup.1/gr 
or Y.sub.gm.sup.1/g or Z.sub.bm.sup.1/gb). There is a total of N 
measurements for a phosphor, so m ranges from 1 to N. The number of 
measurements per phosphor need not be the same. 
##EQU9## 
For computational purposes, an expanded form of Equation 2.2 is preferred. 
Equation 2.3 is expressed in terms of summations that will already exist 
in prior computational steps in the final algorithm. 
EQU E.sup.2 =S.sub.yy =2GS.sub.y =2OS.sub.xy +O.sup.2 S.sub.xx +2GOS.sub.x 
+G.sup.2 S Eq. 2.3 
The following summation equations determine the "S" variable values: 
##EQU10## 
The variable S in Equation 2.4 is equal to the number of phosphor 
measurements. Equation 2.1 is nonlinear in g. Because of this 
nonlinearity, our approach is not to minimize the least squares error 
found in Equation 2.3 for g, G, and O simultaneously. Instead, we pick a 
reasonable value for g (290 in FIG. 8) and find G and O that minimize the 
least squares error (300 in FIG. 8). For this g, G and O are given by 
Equations 3.0, 3.1, and 3.2. These Equations are solutions to the least 
squares fit for a given value of g. 
EQU D=S.sub.xx S-S.sub.x.sup.2 Eq. 3.0 
EQU G=(S.sub.xx S.sub.y -S.sub.x S.sub.xy)/D Eq. 3.1 
EQU O=(-S.sub.x S.sub.y +S S.sub.xy)/D Eq. 3.2 
Our chosen g and the computed optimal values for G and O can be put into 
Equation 2.3 to compute the least squares error E (or E.sup.2) as 
designated by numeral 310 in FIG. 8. We then can pick another value of g, 
which allows us to compute another set of optimal values of G and O, that 
in turn gives a new least squares error. This step is designated by 
numeral 320 in FIG. 8. For two estimates of g, the better value is the one 
giving the smaller least squares error E (or E.sup.2). The least squares 
error E is not sensitive to changes in gamma g by differences of 0.25 The 
algorithm chooses values of g from 1 through 5 in increments of 0.25. As 
outlined above, for each g, compute G and O from Equations 2.4 through 
2.9, and 3.0 through 3.2, and least squares error E.sup.2 from Equation 
2.3. The best value of g is the one minimizing E.sup.2. This final 
selection of g is designated by numeral 330 in FIG. 8. 
As previously stated with regard to numeral 280 of the flowchart in FIG. 8, 
this calculation is repeated separately for the red, green, and blue 
components of the corresponding measured phosphor colors. This step is 
designated by numeral 340 in FIG. 8, which will repeat steps 290, 300, 
310, 320, and 330 in FIG. 8 for each CRT phosphor. 
Once gamma, gain, and offset parameters are computed, Equation 1.0 predicts 
X.sub.r, from R, when G and B are zero, with minimized error. And so on 
for the green and blue phosphors (only one phosphor on, the other two 
off). Equations 1.0, 1.1, and 1.2 do not by themselves accurately predict 
arbitrary colors. 
The next step is to use all of the phosphor measurements to convert RGB 
values of arbitrary colors into XYZ values (or vice versa). One of 
Grassman's Laws provides an approximate way to calculate tristimulus 
values for arbitrary colors. It is applicable because CRT monitors creates 
colors by additive color mixing. A mixing matrix M produces a linear 
combination of the phosphor tristimulus values. Define the column matrix 
of measured tristimulus coordinates for any color as: 
##EQU11## 
and the column matrix of predicted XYZ values computed from Equations 1.0, 
1.1 and 1.2, as: 
##EQU12## 
Then X and X.sub.rgb are connected by the linear relationship 
EQU X=MX.sub.rgb Eq. 4.2 
where M is a 3.times.3 matrix. M is computed from all of the measurements 
used to compute the gain, offset and gamma parameters, in a least squares 
(pseudo-inverse) fashion, as follows. Define a 3.times.3N matrix Q whose 
columns are the 3N phosphor measurements X.sub.m of the kind defined in 
Equation 4.0. Recall there are N measurements each for red, green, and 
blue phosphors, hence there are 3N columns to the matrix. 
EQU Q=.vertline.X.sub.1 X.sub.2 X.sub.3 . . . X.sub.N .vertline.Eq. 4.3 
Also define a 3.times.3N matrix Q.sub.rgb containing the corresponding 
predictions obtained from Equations 1.0, 1.1 and 1.2 for the same 3N 
measurements. 
EQU Q.sub.rgb =.vertline.X.sub.rgb1 X.sub.rgb2 X.sub.rgb3 . . . X.sub.rgbN 
.vertline. Eq. 4.4 
The computation of Q and Q.sub.rgb from XYZ measurements and predictions of 
all phosphor color measurements is designated as numeral 350 in FIG. 8. 
The columns of Q and Q.sub.rgb are connected by matrix M in Equation 4.2, 
so therefore: 
EQU Q=MQ.sub.rgb Eq. 4.5 
This holds true if the CRT model (Equations 1.0, 1.1, and 1.2) is exactly 
true and color measurements are without error. The model and data are not 
exact, so the "best" (least squares) solution is obtained by solving 
Equation 4.5 using a pseudo-inverse as follows: 
EQU M=Q(Q.sub.rgb Q.sub.rgb.sup.T).sup.-1 Eq. 4.6 
Superscript T denotes matrix transpose, and superscript -1 denotes matrix 
inverse. This step is designated by numeral 360 in FIG. 8. The inverse is 
performed on a 3.times.3 matrix. Once the gain, offset, gamma, and mixing 
matrix M are known, Equations 1.0, 1.1, 1.2 and 4.2 are used to convert 
CRT R, G, and B into X, Y, and Z for any color. The inverse 
transformation, converting X, Y, and Z into R, G, and B, is computed as 
follows: 
EQU X.sub.rgb =M.sup.-1 X Eq. 5.0 
EQU R=(X.sub.r.sup.1/gr =G.sub.r)/O.sub.r Eq. 5.1 
EQU G=(Y.sub.g.sup.1/gg =G.sub.g)/O.sub.g Eq. 5.2 
EQU B=(Z.sub.b.sup.1/gb =G.sub.b)/O.sub.b Eq. 5.3 
FIG. 9 shows a graph of CRT model calculations for red, green and blue 
phosphors for a typical CRT used for computer aided design. XYZ 
tristimulus values are plotted against RGB values. FIG. 10 shows CRT 
measurements versus predictions for all phosphor colors. XYZ predictions 
are plotted against XYZ measurements. 
We now have the means to convert between absolute color measurements (XYZ 
tristimulus values), and electronic color display components (RGB values). 
A conversion between absolute color measurements (XYZ tristimulus values), 
and relative color measurements (X'Y'Z' tristimulus values), is also 
necessary. There are subtle issues in reproducing colors on an electronic 
display involving human color vision that are not addressed here. And, to 
avoid discussing these issues we adopt a linear relationship between XYZ 
and X'Y'Z'. In matrix notation 
EQU X=W(X'-B) Eq. 11.0 
EQU X'=(X/W)+B Eq. 11.1 
where W and B are scalars. Scalars are used so the red, green, and blue 
color components are identically weighted. W and B adjust levels of light 
and dark colors, respectively. X and X' are three component column 
matrices representing XYZ and X'Y'Z', respectively. 
When B=0%, colors are usually perceived to be washed out on typical CRT 
color displays, and black is not dark enough. Increasing B improves color 
contrast. We find B=2% gives best results. If necessary, B can be a 
negative number, and W can be greater than one. W can be calculated so 
computed RGB values never exceed their limit, usually values of 255. By 
choosing a suitable white standard (for example, white in the Macbeth.RTM. 
ColorChecker.RTM. color set), and comparing these relative X'Y'Z values to 
the absolute XYZ values obtained with a CRT when RGB values are at their 
maximum level, Equation 11.0 can be use to compute W. (Explicit formulas 
can be derived for this purpose.) This allows the full range of CRT 
luminance to be used for displaying colors. W is responsible for 
converting absolute color measurements XYZ to relative color measurements 
X'Y'Z', and is therefore not dimensionless. The selection or computation 
of brightness W and contrast B is designated by numeral 370 in FIG. 8. 
We now have the means to convert between relative color measurements 
(X'Y'Z' tristimulus values) obtained from color measurement equipment, and 
computer color components (RGB values). This step is designated by numeral 
380 in FIG. 8. This is also shown in FIG. 1 as the retrieval of XYZ data 
from the XYZ COLOR DATABASE 7, performing the above operations using the 
CRT MODEL ALGORITHM 6, and then displaying the RGB values on the CRT 
DISPLAY 4. Furthermore, RGB values obtained from the CRT DISPLAY 4, can be 
transformed into XYZ coordinates by the CRT MODEL ALGORITHM 6, and then 
sent back to the XYZ COLOR DATABASE 7. 
It is not intended that the scope of the invention be limited to the 
specific embodiments illustrated and described. Rather, it is intended 
that the scope of the invention be defined by the appended claims and 
their equivalents. 
TABLE 1 
______________________________________ 
NO. NAME x y Y X Y Z 
______________________________________ 
1 Dark Skin 0.400 0.350 
10.1 11.54 
10.10 
7.21 
2 Light Skin 0.377 0.345 
35.8 39.12 
35.80 
28.85 
3 Blue Sky 0.247 0.251 
19.3 18.99 
19.30 
38.60 
4 Foliage 0.337 0.422 
13.3 10.62 
13.30 
7.60 
5 Blue Flower 0.265 0.240 
24.3 26.83 
24.30 
50.12 
6 Bluish Green 
0.261 0.343 
43.1 32.80 
43.10 
49.76 
7 Orange 0.506 0.407 
30.1 37.42 
30.10 
6.43 
8 Purplish Blue 
0.211 0.175 
12.0 14.47 
12.00 
42.10 
9 Moderate Red 
0.453 0.306 
19.8 29.31 
19.80 
15.59 
10 Purple 0.285 0.202 
6.6 9.31 6.60 16.76 
11 Yellow Green 
0.380 0.489 
44.3 34.43 
44.30 
11.87 
12 Orange Yellow 
0.473 0.438 
43.1 46.54 
43.10 
8.76 
13 Blue 0.187 0.129 
6.1 8.84 6.10 32.34 
14 Green 0.305 0.478 
23.4 14.93 
23.40 
10.62 
15 Red 0.539 0.313 
12.0 20.66 
12.00 
5.67 
16 Yellow 0.448 0.470 
59.1 56.33 
59.10 
10.31 
17 Magenta 0.364 0.233 
19.8 30.93 
19.80 
34.25 
18 Cyan 0.196 0.252 
19.8 15.40 
19.80 
43.37 
19 White 0.310 0.316 
90.0 88.29 
90.00 
106.52 
20 Neutral 8.0 0.310 0.316 
59.1 57.98 
59.10 
69.95 
21 Neutral 6.5 0.310 0.316 
36.2 35.51 
36.20 
42.84 
22 Neutral 5.0 0.310 0.316 
19.8 19.42 
19.80 
23.43 
23 Neutral 3.5 0.310 0.316 
9.0 8.83 9.00 10.65 
24 Black 0.310 0.316 
3.1 3.04 3.10 3.67 
______________________________________ 
TABLE 2 
______________________________________ 
NO. NAME X Y Z R G B 
______________________________________ 
1 Dark Skin 11.54 10.10 
7.21 110 70 62 
2 Light Skin 39.12 35.80 
28.85 190 142 135 
3 Blue Sky 18.99 19.30 
38.60 99 119 158 
4 Foliage 10.62 13.30 
7.60 84 91 64 
5 Blue Flower 26.83 24.30 
50.12 133 128 179 
6 Bluish Green 
32.80 43.10 
49.76 128 181 174 
7 Orange 37.42 30.10 
6.43 192 110 69 
8 Purplish Blue 
14.47 12.00 
42.10 86 92 168 
9 Moderate Red 
29.31 19.80 
15.59 181 88 105 
10 Purple 9.31 6.60 16.76 90 64 106 
11 Yellow Green 
34.43 44.30 
11.87 150 170 88 
12 Orange Yellow 
46.54 43.10 
8.76 203 146 80 
13 Blue 8.84 6.10 32.34 63 64 157 
14 Green 14.93 23.40 
10.62 87 135 88 
15 Red 20.66 12.00 
5.67 173 63 64 
16 Yellow 56.33 59.10 
10.31 221 186 82 
17 Magenta 30.93 19.80 
34.25 183 96 151 
18 Cyan 15.40 19.80 
43.37 80 126 165 
19 White 88.29 90.00 
106.52 
250 249 253 
20 Neutral 8.0 57.98 59.10 
69.95 197 199 215 
21 Neutral 6.5 35.51 36.20 
42.84 154 153 169 
22 Neutral 5.0 19.42 19.80 
23.43 116 114 127 
23 Neutral 3.5 8.83 9.00 10.65 80 70 88 
24 Black 3.04 3.10 3.67 39 34 43 
______________________________________ 
TABLE 3 
______________________________________ 
COMPUTED IMAGE DIGITIZER 
MODEL AMETERS 
gamma gain offset 
______________________________________ 
R 2.00 0.0169 0.9480 
G 2.25 0.0985 0.8825 
B 2.75 0.1492 0.8760 
______________________________________ 
TABLE 4 
______________________________________ 
COMPUTED IMAGE DIGITIZER MODEL AMETERS 
______________________________________ 
##STR1## 
______________________________________ 
TABLE 5 
______________________________________ 
K.sub.ox K.sub.oy 
K.sub.oz 
______________________________________ 
0.09328 0.06876 0.06218 
______________________________________ 
TABLE 6 
__________________________________________________________________________ 
DYE NO. 
DYE NAME 
K.sub.x 
K.sub.y 
K.sub.z 
S.sub.x 
S.sub.y 
S.sub.z 
__________________________________________________________________________ 
1 Deep 16.2549 
32.8022 
74.9094 
2.5897 
2.2356 
0.0515 
Red 
2 Deep 14.7451 
9.7676 
10.2859 
0.3686 
0.4831 
0.3583 
Green 
3 Deep 12.7319 
10.4875 
3.0545 
0.8023 
0.6334 
0.7765 
Blue 
4 Pale 1.8067 
2.0707 
3.1958 
1.6599 
1.4389 
1.2618 
Red 
5 Pale 2.3385 
1.9950 
4.1897 
0.9957 
0.9260 
1.0124 
Green 
6 Pale 3.0687 
2.4645 
1.7175 
0.6789 
0.6329 
0.6966 
Blue 
7 Yellow 0.8954 
0.7291 
3.2458 
1.9394 
1.3345 
0.8841 
__________________________________________________________________________ 
TABLE 7 
______________________________________ 
Dye 
No. Dye No. 
i j Dye Blend K.sub.ijx 
K.sub.ijy 
K.sub.ijz 
______________________________________ 
1 2 Deep Red + 142.4729 
199.4130 
63.1336 
Deep Green 
1 3 Deep Red + 189.8662 
252.6969 
133.5376 
Deep Blue 
2 3 Deep Green + 
21.6591 
13.2452 
9.8802 
Deep Blue 
4 5 Pale Red + 3.1668 2.6439 4.5439 
Pale Green 
4 6 Pale Red + 7.2048 5.1524 2.1763 
Pale Blue 
5 6 Pale Green + 
4.3949 3.2950 1.5603 
Pale Blue 
4 7 Pale Red + 2.1295 2.0346 6.9012 
Yellow 
5 7 Pale Green + 
2.8697 1.7687 4.4579 
Yellow 
6 7 Pale Blue + 3.9054 1.6108 1.4522 
Yellow 
4 3 Pale Red + 13.7953 
7.9671 1.5650 
Deep Blue 
7 3 Yellow + 21.3027 
8.4927 3.4470 
Deep Blue 
______________________________________ 
TABLE 8 
______________________________________ 
GREIGE DATA: White 
X.sub.o 
Y.sub.o Z.sub.o 
K.sub.ox K.sub.oy 
K.sub.oz 
______________________________________ 
65.14 69.16 70.41 0.0933 0.0688 
0.0622 
______________________________________ 
TABLE 9 
______________________________________ 
DYES TO BLEND: Pale Red + Pale Green + 
Pale Blue + Yellow 
Dye 
No. K.sub.x K.sub.y K.sub.z 
S.sub.x 
S.sub.y 
S.sub.z 
______________________________________ 
4 1.8067 2.0707 3.1958 
1.6599 1.4389 
1.2618 
5 2.3385 1.9950 4.1897 
0.9957 0.9260 
1.0124 
6 3.0687 2.4645 1.7175 
0.6789 0.6329 
0.6966 
7 0.8954 0.7291 3.2458 
1.9394 1.3345 
0.8841 
______________________________________ 
TABLE 10 
______________________________________ 
DYE 
NUMBERS K.sub.IJX K.sub.IJY 
K.sub.IJZ 
______________________________________ 
4 + 5 3.1668 2.6439 4.5439 
4 + 6 7.2048 5.1524 2.1763 
5 + 6 4.3949 3.2950 1.5603 
4 + 7 2.1295 2.0346 6.9012 
5 + 7 2.8697 1.7687 4.4579 
6 + 7 3.9054 1.6108 1.4522 
______________________________________ 
TABLE 11 
______________________________________ 
BLEND COLOR 
C.sub.1 
C.sub.2 
C.sub.3 
C.sub.4 
(K/S).sub.x 
(K/S).sub.y 
(K/S).sub.z 
X Y Z 
______________________________________ 
0.0 0.0 0.0 0.0 0.0933 
0.0688 
0.0622 
65.14 
69.16 
70.41 
0.0 0.0 0.0 0.1 0.1531 
0.1250 
0.3553 
57.89 
60.96 
44.05 
0.0 0.0 0.1 0.2 0.4515 
0.3708 
0.7318 
39.94 
43.32 
31.79 
0.0 0.1 0.2 0.3 0.8903 
0.7382 
1.3617 
28.62 
31.65 
22.22 
0.1 0.2 0.3 0.4 1.4276 
1.2311 
2.1626 
21.55 
23.67 
16.23 
0.2 0.3 0.4 0.3 1.9326 
1.6794 
2.4965 
17.58 
19.36 
14.61 
0.3 0.4 0.3 0.2 1.9366 
1.7309 
2.6033 
17.55 
18.97 
14.15 
0.4 0.3 0.2 0.1 1.6098 
1.4929 
2.2185 
19.92 
20.94 
15.93 
0.3 0.2 0.1 0.0 1.0787 
1.0205 
1.4538 
25.63 
26.48 
21.30 
0.2 0.1 0.0 0.0 0.5252 
0.5327 
0.8948 
37.36 
37.12 
28.54 
0.1 0.0 0.0 0.0 0.2349 
0.2411 
0.3390 
51.03 
50.60 
44.85 
______________________________________ 
TABLE 12 
______________________________________ 
CRT MEASUREMENTS 
R G B Y x y 
______________________________________ 
255 0 0 23.30 0.630 
0.336 
225 0 0 17.30 0.630 
0.336 
200 0 0 13.00 0.630 
0.336 
150 0 0 6.35 0.630 
0.336 
100 0 0 2.28 0.628 
0.336 
50 0 0 0.36 0.611 
0.335 
0 255 0 75.50 0.270 
0.608 
0 225 0 56.00 0.270 
0.609 
0 200 0 42.50 0.271 
0.609 
0 150 0 21.30 0.272 
0.609 
0 100 0 7.88 0.272 
0.609 
0 50 0 1.30 0.273 
0.602 
0 40 0 0.71 0.273 
0.596 
0 30 0 0.32 0.273 
0.578 
0 0 255 9.50 0.143 
0.057 
0 0 225 7.10 0.143 
0.057 
0 0 200 5.35 0.143 
0.057 
0 0 150 2.67 0.143 
0.057 
0 0 100 0.97 0.143 
0.058 
0 0 80 0.55 0.143 
0.058 
0 0 60 0.26 0.144 
0.060 
______________________________________ 
High Resolution Sony .RTM. Monitor using a Minolta .RTM. CA100 
TABLE 13 
______________________________________ 
COMPUTED CRT MODEL AMETERS 
gamma gain offset 
______________________________________ 
R 2.25 -0.0384 0.7297 
G 2.25 -0.0327 0.9134 
B 2.25 -0.0579 1.1958 
______________________________________ 
TABLE 14 
______________________________________ 
COMPUTED CRT MODEL AMETERS 
______________________________________ 
##STR2## 
______________________________________