Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcdc!hpfcdq!benji From: benji@hpfcdq.HP.COM (Jeff Benjamin) Newsgroups: comp.graphics Subject: Re: Mapping Color to Black and White Message-ID: <390027@hpfcdq.HP.COM> Date: 1 Apr 89 01:29:49 GMT References: <2148@viscous.sco.COM> Organization: Hewlett-Packard - Fort Collins, CO Lines: 20 > I am trying to take a color image with know RGB values > and translate it to a black and white image. > > Could anyone give me some help on this? Do you take the normalized > vector for a particular color and this is your percentage > in the shade of grey? (r * 0.??? + g * 0.??? + b * 0.???) = grey. > I get the impression that the various percentages for r, g, and b > should be about .300, .450, and .250 respectively. You're close...the equation you want turns out to be: I = 0.30 * r + 0.59 * g + 0.11 * b This takes eye sensitivity to different colors into account. I don't know much about the derivation of this; maybe someone else can elaborate. ----- Jeff Benjamin {ucbvax,hplabs}!hpfcla!benji Graphics Technology Division benji%hpfcla@hplabs.HP.COM Hewlett Packard Co. Fort Collins, Colorado