Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!suntc!jh34607 From: jh34607@suntc.UUCP (john howell) Newsgroups: comp.graphics Subject: Re: How to map 24-bit RGB to 256 color palette? Summary: Probably best to use a quantization scheme with a mixture of evenly distributed colors and high frequency colors. Keywords: RGB EGA VGA color requantization Message-ID: <117@suntc.UUCP> Date: 28 Aug 89 16:14:14 GMT References: <3129@cbnewsm.ATT.COM> <7743@cbmvax.UUCP> <2009@uceng.UC.EDU> Distribution: na Organization: Deere & Co. Technical Center, Moline,IL Lines: 36 In article <2009@uceng.UC.EDU>, mfinegan@uceng.UC.EDU (michael k finegan) writes: > Problem 1: the histogram will be large (up to 262144 'bins') Sure, I have used an array of 2 million bins (2^(7*3)) since the computer I used at the time (PR1ME) didn't like an array with 16 million bins (2^(8*3)). > Problem 2: is Euclidian distance (at least in RGB color space) a good > measure of closeness of color ? Good question! Perhaps a gamma factor should be thrown in. > Problem 3: are the highest frequency colors in the histogram necessarily > the best to use? (Maybe there should be a minimum distance between > bins used - (dithering?) image dependent ...) The way I did this was to make sure I had a "smattering" of evenly distributed colors in the final look up table. For example, I would have a 256 color look up table with 27 evenly distributed colors (each corner (8), midpoint of each edge (12), center of each fave (6), center of cube (1), of the color cube) and 229 quantitized colors. This allows good dithering to take place for all cases (I used Floyd-Steinberg techniques). > > > - Mike Finegan > mfinegan@uceng.UC.EDU ======================================================================== John Howell uucp: uunet!suntc!jrh Deere & Company MCImail: 360-4047 Technical Center CompuServe: [76666,2505] 3300 River Drive FAX: (309)765-3807 Moline, IL 61265 Voice: (309)765-3784 ========================================================================