Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!uw-beaver!ssc-vax!coy From: coy@ssc-vax (Stephen B Coy) Newsgroups: comp.graphics Subject: Re: Color quantization ideas: To histogram or not to histogram, comments? Keywords: graphics quantization Message-ID: <3931@ssc-bee.ssc-vax.UUCP> Date: 1 May 91 19:32:33 GMT References: <606@lysator.liu.se> Sender: news@ssc-vax.UUCP Reply-To: coy@ssc-vax.UUCP (Stephen B Coy) Distribution: comp Organization: Boeing Aerospace & Electronics Lines: 36 In article <606@lysator.liu.se> zap@lysator.liu.se (Zap Andersson) writes: >* Is there ANY sane reason whatsoever, when trying to quantize a 24 bit > image to an 8 bit image, to make a histogram? Yes, sometimes it looks better when the popularity of the colors is taken into account. Sometimes it also looks worse. So allow the user to experiment and decide for each image. >However, the RESULT of my renderer is MUCH better 8 bit images than using >any 'standard' algorithm. Rendering and color quantization are two seperate processes. Are you saying that your renderer is better than others you've seen or that your quantization is better? >To create one, you need to pre-quantize to a >manageable number of colors, most often 5 bits per channel, yielding >15 bits (32768 colors). BUT 5 BITS PER COLOR IS NOT ENOUGH! You're right. For most images 5 bits is not enough. I've found for converting to VGA that 6 bits works best. Since VGA cards have 6-bit DACs this should be no surprise. Keeping track of 18bit color running under MSDOS is challenging but not impossible. BTW I've seen some of the anims from RayTracker. Looks like a nice program. If you'd like to see what I consider fairly good quantization get a copy of my ray tracer, Vivid. It's somewhere out there... The quantization program I include does do a histogram but allows you to limit the max count for a color. Stephen Coy coy@ssc-vax.UUCP