在像素网格中找到最具代表性的颜色 [英] Find the most representative color in a grid of pixels

查看:202
本文介绍了在像素网格中找到最具代表性的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找在像素网格中获得最具代表性的颜色的想法。有什么算法吗?我不确定最有代表性的是网格中出现的颜色之一是所有像素的平均值更好吗?

I'm looking for an idea for getting the most representative color in a grid of pixels. There is any algorithm for this? I'm not sure if the most representative is one of the colors appearing in the grid of is the average af all the pixels better?

推荐答案

一些颜色量化算法。我发现他们是从照片生成调色板的最有效的方法。此外,大多数图像处理/处理库应该内置一些快速量化。

Have a look at some color quantization algorithms. I found them to be the most effective method to generate palettes from photographs. Also, most image manipulation/processing libraries should have some fast quantization built in.

这篇关于在像素网格中找到最具代表性的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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