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

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

问题描述

我在一个网站上,用户可以使用(在许多其他事物中)rgb 0-255范围内的任何颜色描述一个物理对象。



在幕后,其中一个进程会比较对象的两个用户描述,并对它们进行评分对于相似性。



我想要做的是获得一个分数,在人类感知方面,这两种颜色是如何相似的。基本上,算法需要确定是否2个人选择2种不同的颜色可以描述相同的对象。因此,浅红色 - >红色应该是100%,大多数灰色阴影将是100%彼此等,但红色 - 绿色绝对不是匹配。



为了看看算法如何工作,我绘制灰度和每种色调的3种强度与集合中的每个其他颜色,并指示与黑色,视觉上相同(100%)与白色和黑色的无匹配(0%)灰度表示中间值。



我的第一个(非常简单的方法)是简单地将RGB值视为颜色立方体中的坐标,并计算距离



这抛出了一些关于Black-> 50%灰色的问题是比较大的距离比如说Black-> 50%蓝色。已经运行了数百个比较并要求反馈,这似乎不符合人类的感觉(如下所示)





方法2将RGB值转换为有一个专门的页面。在列出的那些中,DeltaE 2000可能与人类感知具有最佳相关性,并且计算也非常复杂。 Delta CMC对于类似代码的一半(虽然计算还不是很简单)来说几乎是


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.

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.

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.

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.

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)

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

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.

So, my question is:

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.

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...

解决方案

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天全站免登陆