User:PAR/Work3
From Wikipedia, the free encyclopedia
-
-
- RESTORE CATEGORIES ***
-
An RGB color space is any additive color space based on the RGB color model.
RGB is shorthand for Red, Green, Blue.
RGB is a convenient color model for computer graphics because the human visual system works in a way that is similar - though not quite identical - to an RGB color space. The most commonly used RGB color spaces are sRGB and Adobe RGB, which has a significantly larger gamut than sRGB. Adobe has recently developed another color space called Adobe Wide Gamut RGB, which is even larger, in detriment of gamut density.
As of 2004, sRGB is by far the most commonly used RGB color space, particularly in consumer grade digital cameras, because it is considered adequate for most consumer applications, and its design simplifies previewing on the typical computer display. Adobe RGB is also being built into more medium-range digital cameras, and is favored by many professional graphic artists.
RGB spaces are generally specified by defining three primary colors and a white point. In the table below the three primary colors and white points for various RGB spaces are given. The primary colors are specified in terms of their CIE chromaticity coordinates (x,y).
Color space | Gamut | White point | Primaries | |||||
---|---|---|---|---|---|---|---|---|
xR | yR | xG | yG | xB | yB | |||
ISO RGB | Limited | floating | floating | |||||
Extended ISO RGB | Unlimited (signed) | floating | floating | |||||
sRGB | CRT | D65 | 0.64 | 0.33 | 0.30 | 0.60 | 0.15 | 0.06 |
ROMM RGB | Wide | D50 | 0.7347 | 0.2653 | 0.1596 | 0.8404 | 0.0366 | 0.0001 |
Adobe RGB 98 | CRT | D65 | 0.64 | 0.34 | 0.21 | 0.71 | 0.15 | 0.06 |
Apple RGB | CRT | D65 | 0.625 | 0.34 | 0.28 | 0.595 | 0.155 | 0.070 |
NTSC RGB | CRT | Ill. C | 0.67 | 0.33 | 0.21 | 0.71 | 0.14 | 0.08 |
EBU RGB (CCIR 601) | CRT | D65 | 0.64 | 0.33 | 0.29 | 0.60 | 0.15 | 0.06 |
ITU-R BT.709 | CRT | D65 | 0.64 | 0.33 | 0.30 | 0.60 | 0.15 | 0.06 |
CIE RGB (1931) | Wide | E | 0.7347 | 0.2653 | 0.2738 | 0.7174 | 0.1666 | 0.0089 |
Contents |
[edit] Mathematics
An RGB color space may be defined by specifying the color and strength of three primary colors from which all other colors are constructed. These three primary colors will be called "Red", "Green" and "Blue" and can be specified by their CIE XYZ tristimulus values:
- - Red primary
- - Green primary
- - Blue primary
The RGB coordinates of any color are then the amount of each primary needed to match that color. If we can transform from any RGB system to the XYZ system, then we can transform from any system to any other system by transforming from one system, to the XYZ system, and then to the other system. If [X,Y,Z] are the XYZ coordinates of any color, then [R,G,B] are the RGB coordinates of that color. By Grassman's laws this transformation will be linear, so we are looking for a matrix bij such that
We can apply this to the primaries:
It can be seen that there are 9 equations and 9 unknowns (the bij) so that we could solve for the tranformation matrix. Another method, which is much more common, is to specify the xy chromaticity of the primaries and to specify the xy chromaticity of a standard white point of the system. For example we would now be given for the red primary xR, yR and zR = 1 − xR − xR where e.g. xR = XR / (XR + YR + ZR). We would also be given these numbers for the green and blue primaries, as well as the coordinates of the white point [XW,YW,ZW] in XYZ space as well as [RXW,GW,BW] in RGB space. We now have the following equations:
It is seen that we now have 12 equations and 12 unknowns, the unknowns being the 9 elements of the b matrix, and the 3 unknown strengths of the primaries TR, TG and TB. The table in the first section above thus provides all the information necessary to transform from one system to the other.???
[edit] OLD Mathematics
A general RGB color space may be defined by specifying the spectral power distributions (SPD's) of three "primary" light sources which usually are roughly red, green and blue in appearance. These SPD's will be denoted P r(λ), Pg(λ), and Pb(λ) where λ is the wavelength and the subscripts specify red, green and blue respectively. As long as these primaries do not lie in a straight line in the CIE xy chromaticity space, but rather form a triangle instead, then every test color which lies inside the triangle can be matched by some combination of these primaries. This triangle is the gamut of colors availiable in the RGB space. For example, the diagram on the right shows the gamut of the sRGB color space in CIE xy chrmaticity space. If we allow for the addition of the primaries to the test color to count as negative values of the primaries, then every color visible by the average human can be specified by three values associated with each primary. Suppose we have a test color which is monochromatic with wavelength λ0. It will be matched by some linear combination of the three primaries. The tristimulus values associated with a particular monochromatic test color will be functions of the wavelength of the test color, and are called the "color matching functions" for the RGB space. These color matching functions are denoted by r(λ), g(λ) and b(λ). In other words, if I(λ) is the test color:
(above few sentences are bad - show steps from color matching to integrals for RGB.
- I(λ) = δ(λ − λ0)
where &delta(λ) is the Dirac delta function which is the spectral power distribution for a monochromatic source, then I(λ) can be matched by a combination of the primaries with spectral power distribution J(λ):
- J(λ) = r(λ0)Pr(λ) + g(λ0)Pg(λ) + b(λ0)Pb(λ)
The CIE XYZ color space matching functions are generally used as the standard by which a color match is defined. To say that I(λ) and J(λ) are matched in color, is then to say that the XYZ color coordinates of I(λ) are equal to those of J(λ). The XYZ coordinates of I(λ) are:
where , , and are the CIE XYZ color matching functions. These values must match the XYZ coordinates of J(λ):
where the Sij are calculated by substituting the expression for J(λ) into the integrals. For example:
If we know the SPD's of the primaries, the S matrix can be calculated. The converse is not true, however. If we know the color matching functions for the RGB space, we cannot, in general deduce the SPD's of the primaries, although we will know their CIE XYZ color coordinates. The relationship between the CIE XYZ color matching functions and the RGB color matching functions can now be written as a matrix equation.
(Note that the subscript on λ0 has been dropped.) The XYZ color matching equations on the left are known, so the color matching functions for the RGB space are found by multiplying both sides of the above equation by the inverse of S. The RGB tristimulus values of a general light source I(λ) (not necessarily monochromatic!) are now given by:
The above discussion assumed that the primary SPD's are completely specified. Usually what is done is to specify their SPD's to within a multiplicative constant, and then use the specification of a white point to determine those constants. The white point of an RGB space is usually taken to be [R,G,B]=[k,k,k] where k is a constant. The white point will have CIE XYZ coordinates [Xw,Yw,Zw] which are known. Requiring that these two sets of tristimulus values correspond will specify the relative strengths of the primaries.
[edit] See also
[edit] External links
- Susstrunk, Buckley and Swen, "Standard RGB Color Spaces" (PDF)
- sRGB vs Adobe RGB: The Truth - a summary of the practical aspects of using the two spaces
<! from color matchin to integrals for RGB.
- I(λ) = δ(λ − λ0)
where &delta(λ) is the Dirac delta function which is the spectral power distribution for a monochromatic source, then I(λ) can be matched by a combination of the primaries with spectral power distribution J(λ):
- J(λ) = r(λ0)Pr(λ) + g(λ0)Pg(λ) + b(λ0)Pb(λ)
The CIE XYZ color space matching functions are generally used as the standard by which a color match is defined. To say that I(λ) and J(λ) are matched in color, is the