Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!seismo!esosun!cogen!celerity!celit!billd From: billd@celerity.UUCP (Bill Davidson) Newsgroups: comp.graphics Subject: Re: Color Quantization Message-ID: <314@celit.UUCP> Date: 25 May 89 01:50:43 GMT References: <4706@uoregon.uoregon.edu> <310@celit.UUCP> <311@celit.UUCP> <23862@pprg.unm.edu> Sender: news@celerity Reply-To: billd@celerity (Bill Davidson) Organization: FPS Computing Inc., San Diego CA Lines: 26 In article <23862@pprg.unm.edu> swilson@pprg.unm.edu (Scott Wilson [CHTM]) writes: >Here is a little modification that is similar to yours, and seems to be >giving nice results for many types of images (including sunsets): > 1. Choose about 50% of the desired number of colors by finding that > "color box" with the largest number of occupants (actual colors), > and splitting it in along its longest side. > 2. Choose the remaining 50% of the desired number of colors by splitting > that "color box" with the largest *diagonal* distance (i.e. 2-norm). > Split along the longest side, as usual. >The end result is that you preserve lots of detail in areas that have >large color spans but not many pixels, but you also get smoothly >varying changes in objects that have large spatial extent but not much >color span (i.e. you get no "color contours"). This is an interesting idea (it took me a couple of seconds to figure out why it's so neat though :-). I forgot to mention that in my quantizer, I chose the box with the greatest number of colors and cut it along it's longest dimension for my regular median cut algorithm. This strategy was meant to cause an approximately equal number of colors in each box at the end. For my "mass" based method, I chose the box with the greatest weight which had more than one color in it (also along it's longest dimension). This strategy was meant to give each box approximately equal mass. Now I have yet another thing to try :-). --Bill Davidson (wannabegraphicsguru) Bill Davidson ...!{ucsd,sdsu,fpssun,cogen,chip,photon}!celerity!billd