Xref: utzoo comp.graphics:3569 comp.windows.x:6015 Path: utzoo!attcan!utgpu!watmath!watcgl!awpaeth From: awpaeth@watcgl.waterloo.edu (Alan Wm Paeth) Newsgroups: comp.graphics,comp.windows.x Subject: Re: Luminance from RGB Message-ID: <6698@watcgl.waterloo.edu> Date: 9 Nov 88 23:31:14 GMT References: <8811042303.AA21505@dawn.steinmetz.GE.COM> <8811070533.AA08904@vector.sun.com> <8811080030.AA14681@EXPO.LCS.MIT.EDU> <76649@sun.uucp> Reply-To: awpaeth@watcgl.waterloo.edu (Alan Wm Paeth) Organization: U. of Waterloo, Ontario Lines: 104 In article <76649@sun.uucp> poynton%vector@Sun.COM (Charles Poynton) writes: >This follows Dick St Peters' comment <8811080030.AA14681@EXPO.LCS.MIT.EDU> >of Comp.windows.x that (R+G+B)/3 is an appropriate weighting function for >luminance. Thank you, Charles for a very informative article. I (for one) I'm getting tired of hearing misinformation such the above comment or related statements such as "[CMY] = 1-[RGB]". It's nice to see the record being set straight. (This is not a criticism on the original poster). These color "facts" have a feeling of common sense (as 0th order approximations to reality) which explains why they are deduced from first principles and then readily requoted. A bit like teaching Newtonian physics without being reminded that Relativity exists. Fortunately, the latest Computer Graphics texts are beginning to give color the more precise treatment it deserves. Some additional fine points which might be of interest to people: >White > >To achieve accurate colour reproduction requires specification of >reference white. This is a lurking problem for accurate colour >reproduction in computer graphics, because most workstation monitors are >adjusted for a white point (of about 9300 K) that's quite a bit more blue >than the television standard. Software people tend to say >"R=G=B=1=white. Simple." But it's not that simple. When people say "RGB color" my first impressions are (1) color used in the context of a digital computer and (2) (all to often) an associated sense vagueness about the exactness of the specification ("well, it's 24 bit RGB?!"). For instance, R might relate to the phosphor chromaticity of a specific monitor, a spectral line, or the NTSC defined value (I've yet to see an NTSC monitor that reproduces this). In our lab I've encountered many "R"'s: Chromaticity Coords Comments ------------------------------------------------- x' = .62, y' = .21 Electrohome monitor red phosphor x' = .65, y' = .30 Aydin monitor red phosphor x' = .63, y' = .30 Spectral line at 600 Angstroms (CIE tables) x' = .67, y' = .21 NTSC defined "Red" The use of the NTSC standard (with which the CIE tables for Y and a matrix inversion give the familiar Y = .299B + .587G + .114B) is far better than using Y = 1/3(R+G+B), but even then, I've yet to see an NTSC monitor. The first color TV's tried to live up to the standard, but the required red spectral purity is so high (that's the x' = .67 in the table) that luminance suffers. So the industry pushes brighter, less pure red phosphors (remember the "rare earth phosphor" ads of the early 70's?) and it's anyone's guess where the R coordinates are. Unless you have a lot of money, studio monitors tend to migrate in the direction of their commercial counterparts (lower spectral purity in the phosphors). > >Orthogonality > >Luminance is luminance; chrominance is chrominance; and NTSC can be >thought of as conveying Y, U, and V independently. This is true >regardless of your interpretation of what these quantities represent. >They're "orthogonal" provided that one can't be derived from the other >two. Although there are some subtle signal-to-noise ratio considerations >in television coding, this issue is independent of (or should I say >orthogonal to) the choice of luminance coefficients. Well, that's really a definition for independence, not complete orthogonality. The YIQ television signal is similar to the CIE defined YUV (or XYZ) color spaces in that the Y's (luminance) are the same. The I and Q chromanence signals pick up the remaining two degrees of freedom. The matrix that defines the coordinate change was chosen out of bandwidth considerations. In fact, I and Q stand for "In phase" and "Quadrature" signal. They are encoded for broadcast on color subcarriers that are 90 degrees out of phase. It is these signals that are orthogonal (in the sin(x), cos(x) sense), but not the independent values which they encode. >NTSC RF Modulation > >I stand corrected by Mr St Peters on an RF modulation point: there IS one >compromise made in NTSC transmission via RF...When NTSC modulates >an RF carrier, chroma excursions near highly saturated yellow and near >highly saturated cyan are clipped to 120 IEEE units prior to the >modulator, to avoid UNDER-modulating the transmitter. Two small regions >of colour space are lost in this case. No practical television camera has >sufficient colour separation capability to generate signals in these >regions, but electronically-synthesized colour bars have perfect colour >saturation and would undermodulate the transmitter if left alone. Almost. There are stories of independent stations with substandard power supplies that got fratzed when trying to run _Sesame Street_ clips -- Big Bird is both big and yellow (the AM video signal draws power as a function of the modulation). As for the generation of "synthetic" colors as with color bar tests, one has to be careful. I worked on Shoup's "Superpaint" system when with Xerox (one of the first color "paint" systems. It provided NTSC output). It featured a menu item to test for "hot" broadcast colors such as yellow to avoid modulation problems -- it would blink the colors. In that case one had either to reduce the intensity or desaturate. A tool like this is useful and necessary for readying computer graphics images for commercial broadcast. Those images *invariably* have highly saturated colors (a generation raised on Big Bird?). If there is enough interest I can post a production tuned C program which flags "hot" colors. /Alan Paeth Computer Graphics Laboratory University of Waterloo