Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!ptsfa!lll-lcc!seismo!cmcl2!yale!husc6!panda!genrad!decvax!decwrl!pyramid!oliveb!intelca!mipos3!omepd!uoregon!gary From: gary@uoregon.UUCP Newsgroups: comp.graphics Subject: Re: Simple RGB to Gray scale question Message-ID: <454@uoregon.UUCP> Date: Fri, 27-Feb-87 16:02:07 EST Article-I.D.: uoregon.454 Posted: Fri Feb 27 16:02:07 1987 Date-Received: Sun, 1-Mar-87 15:43:36 EST References: <718@hp-sdd.HP.COM> Reply-To: gary@fog.UUCP (Gary Meyer) Organization: University of Oregon, Computer Science, Eugene OR Lines: 28 In article <718@hp-sdd.HP.COM> nick@hp-sdd.HP.COM (Nick Flor) writes: > >How does one convert a pixel defined by an R, G, B value into >a single Gray level? > What you want to compute here is the luminance of the light that is being emitted from your color television monitor. This will depend on the chromaticities of the monitor phosphors, the chromaticities of the white point that the monitor has been balanced to, and the non-linear relationship between voltage applied to the CRT guns and light emitted from the display (gamma correction). Using the colorimetric properties of the NTSC color television system with an assumed gamma of 2.2, this works out to Y = 0.30 ( R ** 2.2 ) + 0.59 ( G ** 2.2 ) + 0.11 ( B ** 2.2 ) where R, G, and B correspond to the values stored in image memory and are assumed to lie on the range 0.0 to 1.0. If you are content to map this back onto the neutral axis of the monitor gamut, then the values to be reloaded into image memory are R = G = B = Y ** ( 1 / 2.2 ) It is easy to work this out for the colorimetric properties of your own system, but the above expressions are fine for most practical applications.