量化算法 [英] Quantizer algorithm

查看:184
本文介绍了量化算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大多数量化算法会减少图像中的颜色数量,但是颜色在整个图像中都显示为点.当量化已知数量固定的颜色(例如徽标)的图像时,希望将颜色相似的像素聚在一起.

Most quantizer algorithms reduce the number of colors in an image, but the colors appear as dots throughout the image. When quantizing images which we know have a fixed number of colors, say, logos, it is desirable that similarly colored pixels are clustered together. Is there a quantizing algorithm that is suitable for this purpose?

推荐答案

许多量化功能将使您可以控制一旦确定了输出调色板后发生的抖动量.抖动是为您提供点"的原因-尝试将两种颜色混合以更好地代表原始图像.

如果您可以关闭抖动功能,则将在纯色区域之间获得漂亮的干净边缘.
many quantization functions will allow you to control the amount of dithering that occurs once the output palette has been determined. dithering is what gives you the ''dots'' - it''s an attempt to blend two colors in order to better represent to original image.

if you can turn off dithering, you''ll get nice clean edges between areas of solid color.


Threshold is the obvious dithering technique (or "quantization algorithm") that makes similar sections appear as a solid. If you want to perform a statistical analysis to decided which colors to use beforehand, you could then adjust each pixel according to which of those chosen colors it is closest to. This would give a cartoon look (i.e., looks like cell shading rather than interspersed dots), which I believe is what you are after. Not sure if there is a name for the algorithm which combines closest match and statistical analysis, but if not then just create it and give it any name you like (e.g., Smart Threshold). :)


这篇关于量化算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆