最好的算法,匹配颜色。 [英] Best algorithm for matching colours.

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

问题描述

我有大约200颜色RGB格式的数组。我想编写一个程序,它的任何RGB颜色,并试图从阵列的颜色,是最相似相匹配。

I have an array of around 200 colours in RGB format. I want to write a program that takes any RGB colour and tries to match a colour from the array that is most "similar".

我需要的相似,这是尽可能接近人类感知一个很好的定义。

I need a good definition for "similar", which is as close as possible to human perception.

我也想表现出约匹配精度的一些信息。例如黑白:100%,而相近的颜色略有不同的色调:-4%。

I also want to show some information about matching accuracy. For example black-white: 100% and for a similar colour with a slightly different hue: -4%.

我需要使用神经网络?是否有更简单的方法吗?

Do I need to use neural networks? Is there an easier alternative?

推荐答案

将所有的颜色到 CIE实验室色彩空间并计算距离的空间

Convert all of the colors to the CIE Lab color space and compute the distance in that space

deltaE = sqrt(deltaL^2 + deltaA^2 + deltaB^2)

具有最低的DeltaE颜色最听觉彼此相似。

Colors with the lowest deltaE are the most perceptually similar to each other.

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

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