Path: utzoo!attcan!uunet!mcsun!unido!mpirbn!p554mve From: p554mve@mpirbn.mpifr-bonn.mpg.de (Michael van Elst) Newsgroups: comp.graphics Subject: Re: Nearest Neighbor Keywords: search color Message-ID: <1329@mpirbn.mpifr-bonn.mpg.de> Date: 21 Oct 90 23:32:19 GMT References: <2866@unccvax.uncc.edu> Reply-To: p554mve@mpirbn.UUCP (Michael van Elst) Organization: Max-Planck-Institut fuer Radioastronomie, Bonn Lines: 23 In article <2866@unccvax.uncc.edu> aec@unccvax.uncc.edu (Eddie Crocker) writes: >I have 256 already quantized color registers. Now I need to map each image >color (pixel) to the nearest existing color register. The most >straightforward way is to compare the distance from the pixel color to each >color register and save the minimum. Hello, I'd like to know sth about a related topic. I have a set of (RGB) colors that I want to approximate through a smaller color lookup table. Currently, I use a variation of a 2D closest pair algorithm to find the color pair with the smallest distance. I average this pair, thereby eliminating one color, and loop until the set fits into the lookup table. Is there anything better (maybe a true 3D closest pair algorithm) ? I'm using color distances in RGB space which isn't a good model for visual differences. I'd appreciate any hints for a better model too. Thanx in advance, -- Michael van Elst UUCP: universe!local-cluster!milky-way!sol!earth!uunet!unido!mpirbn!p554mve Internet: p554mve@mpirbn.mpifr-bonn.mpg.de "A potential Snark may lurk in every tree."