From: Robert L K. <rl...@al...> - 2000-04-26 12:39:23
|
Date: Wed, 26 Apr 2000 13:50:51 +0200 From: Hrafnkell Eiriksson <he...@kv...> I would like to point you to an interesting article on using a Least Mean Square algorithm to choose the coefficients for the error diffusion filter kernel: Lale Akarun, Yasemin Yardimci and A. Enis Cetin: "Adaptive Methods for Dithering Color Images" IEEE Transactions on Image Processing, vol 6, no 7, july 1997. That sounds very interesting. We just have to make sure there's no patent on it. "The scaling of the error diffusion filter coefficients is an important step in the performance of the algorithm. This scaling coefficient controls the balance of false edges and color impulses; it can, therefore be varied in different regions of an image to achive different goals." That's very interesting. That's one of the few things I haven't seriously tried. I've found that adaptive filter coefficients are helpful. What I do now is use a wider spread for pale colors than for dark colors, and have different combinations for different kinds of images (photos use wider spread than line art, for example). The main point with that is that the coefficient of the Floyd Steinberg (and other) filter kernels sum up to one. By making the sum up to f.x. 0.9 the effects of quantization error accumulation that leads to a disturbing color impulse in pale areas can be reduced. A first thing to try might be to use some heuristics to change a scale factor. I have a feeling that rlk has developed some heuristics he uses, at least in his head when playing with the dithering algorithms, that might be used. It's mostly all cut and try. I should probably stop coding for a while and actually write some documentation on what's going on. -- Robert Krawitz <rl...@al...> http://www.tiac.net/users/rlk/ Tall Clubs International -- http://www.tall.org/ or 1-888-IM-TALL-2 Member of the League for Programming Freedom -- mail lp...@uu... Project lead for The Gimp Print -- http://gimp-print.sourceforge.net "Linux doesn't dictate how I work, I dictate how Linux works." --Eric Crampton |