标准化图像内的颜色
我有一个 .net 应用程序,我需要在其中浏览图像,我想将图像中的颜色标准化为仅 6 种颜色?
是否有库或进程来执行这种图像处理?
任何帮助将不胜感激...
谢谢, 麦克风
I have a .net application where I need to browse for an image, I would like to standardize the colors in the image to just 6 colors?
Is there a library or process to perform this kind of image manipulation?
Any help would be appreciated...
Thanks,
Mike
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要执行一个名为颜色量化的过程。这本质上是一个为调色板选择一组“适当”颜色的过程,然后找出图像中每个像素与每种颜色的距离有多远,以便您可以选择最接近的匹配来替换它。
Microsoft 在此处提供了有关该过程的一些详细信息:
http://msdn.microsoft.com/en-us/library/aa479306。 aspx
也就是说,仅仅使用 6 种颜色似乎有点意思!
You need to perform a process called Color Quantization. This is essentially a process of picking a set of "appropriate" colors for your palette and then finding how far away from each of those colors each pixel in the image is so you can select the closest match to replace it with.
Microsoft have some details on the process here:
http://msdn.microsoft.com/en-us/library/aa479306.aspx
That said, just using 6 colors does seem a little mean!
我认为这个术语是用特定的调色板保存图像。 (不是100%确定)
搜索这个狂欢:http://support.microsoft.com/kb/ 319061
HTH
I think the term is saving an image with a specific Colour Pallete. (not 100% sure)
Seaching for this revels this: http://support.microsoft.com/kb/319061
HTH