计算人类如何感知不同的颜色之间的相似性 [英] Calculate how humans perceive similarity between different colours

查看:184
本文介绍了计算人类如何感知不同的颜色之间的相似性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个网站,用户可以使用描述物理对象(以及许多其他的东西)的任何颜色的RGB 0-255范围内。我们提供方便点击,但一个完整的色轮是必需的。

I'm working on a site where users can describe a physical object using (amongst many other things) any color in the rgb 0-255 range. We offer some simplified palettes for easy clicking but a full color wheel is a requirement.

在幕后,其中一个进程比较对象的两个用户的描述和分数它们的相似性。

Behind the scenes, one of the processes compares two user descriptions of the object and scores them for similarity.

我想要做的就是一个比分为2种颜色的相似程度的在人类感知方面的。基本上,该算法需要确定一个2人类拾取2不同的颜色可描述相同的对象。因此光红 - >红应该是100%,大多数灰的色调将是100%给对方,等,但红 - >绿是绝对不匹配。

What I'm trying to do is get a score for how similar the 2 colors are in terms of human perception . Basically, the algorithm needs to determine if a 2 humans picking 2 different colors could be describing the same object. Thus Light Red->Red should be 100%, Most of the shades of grey will be 100% to each other, etc but red-> green is definitely not a match.

要得到一个体面看看如何算法进行了工作,我暗算了集中的每个其他颜色的每个色调的灰度和3强度,并表示不匹配(0%),黑色,视觉上相同(100%)与白和灰度来表示中间值。

To get a decent look at how the algorithms were working, I plotted grayscale and 3 intensities of each hue against every other color in the set and indicated no match (0%) with black, visually identical (100%) with white and grayscale to indicate the intermediate values.

我的第一个(非常简单的方法)是简单地将RGB值作为坐标的颜色立方体以及它们之间制定的距离(矢量幅度)。

My first (very simplistic approach) was to simply treat the RGB values as co-ordinates in the colour cube and work out the distance (magnitude of the vector) between them.

这抛出了许多问题与问候黑色 - > 50%灰比(比如说)黑色 - > 50%蓝较大的距离。已经运行数百个比较,并要求反馈,这似乎并不符合人类的感知(如下图所示)

This threw out a number of problems with regards to Black->50% Grey being a larger distance than (say) Black->50% Blue. having run hundreds of comparisons and asked for feedback, this doesn't seem to match human perception (shown below)

方法2转换的RGB值到 HSV 。然后我生成一个基于分数80%的色调与饱和/绥另外的20%。这似乎是最好的方法,到目前为止,但仍引发一些奇怪的比赛

Method 2 converted the RGB values into HSV. I then generated a score based 80% on hue with the other 20% on Sat/Lum. This seems to be the best method so far but still throws some odd matches

方法3是在一个混合的尝试 - 分别计算HSL值但最终得分是基于所述2颜色的HSL颜色筒空间之间的距离(如在三维极坐标)

Method 3 was an attempt at a hybrid - HSL Values were calculated but the final score was based upon the distance between the 2 colors in the HSL color cylinder space (as in 3D polar co-ordinates).

我觉得我必须重新发明轮子 - 当然这之前已经做了什么?我找不到对谷歌的任何像样的例子,你可以看到我的做法令人不满意之处。

I feel like I must be re-inventing the wheel - surely this has been done before? I can't find any decent examples on Google and as you can see my approach leaves something to be desired.

所以,我的问题是:

有没有一种标准的方式来做到这一点?如果是这样,怎么样?如果没有,任何人都可以提出一个方法来提高我的做法?如果需要,我可以提供code段,但被警告它目前的地狱,由于调整了3天乱了。

Is there a standard way to do this? If so, how? If not, can anyone suggest a way to improve my approach? I can provide code snippets if required but be warned it's currently messy as hell due to 3 days of tweaking.

解决方案(的ΔE2000): 使用下面提供的建议,我已经实现了一个的ΔE2000 比较器。我不得不调整的加权值是相当大的 - 我不是在寻找的颜色这是潜移默化的不同,但它们是不是巨大的差别。如果任何人的兴趣,由此产生的积低于...

Solution (Delta E 2000): Using the suggestions provided below, I've implemented a Delta E 2000 comparer. I've had to tweak the weighting values to be quite large - I'm not looking for colors which are imperceptibly different but which are not hugely different. In case anyone's interested, the resulting plot is below...

推荐答案

有半打左右的可能性。 EasyRGB 有专门为他们准备的页面。那些上市,2000的DeltaE可能与人类感知相关性最好 - 也是极其复杂的计算。三角洲CMC是的几乎的,好,像半个code(虽然计算仍然是不完全微不足道的)。

There are a half dozen or so possibilities. EasyRGB has a page devoted to them. Of those listed, DeltaE 2000 probably has the best correlation with human perception -- and is also extremely complex to compute. Delta CMC is almost as good for something like half the code (though the computation still isn't entirely trivial).

这篇关于计算人类如何感知不同的颜色之间的相似性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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