RGB颜色相近的近似算法 [英] RGB Similar Color Approximation Algorithm

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

问题描述

鉴于在RGB我们可以重新present 256 ^ 3的组合= 16,777,216种颜色,并且由于人的眼睛只能区分大致千万,有明显的6777216 RGB组合即色是从对应的颜色区分的盈余。

Given that in RGB we can represent 256^3 combinations = 16,777,216 colors, and since the human eye can only distinguish roughly 10,000,000, there is obviously a surplus of 6,777,216 RGB combinations that chromatically are indistinguishable from counterpart colors.

的COM pression算法工作。考虑到这一点,怎么能可靠地计算出一个给定的颜色是否为范围相似性到另一个之内?

Compression algorithms work on this basis when approximating out spacial difference in color ranges across a frame I believe. With that in mind, how can one reliably compute whether a given color is within a range of 'similarity' to another?

当然,相似性将是某种可以调整任意波形/可调参数,但是这是一个近似反正。因此,任何指针,伪code,直观code样品,资源在那里帮助我的模型这样的功能?

Of course, 'similarity' will be some kind of arbitrary/tunable parameter that can be tweaked, but this is an approximation anyway. So any pointers, pseudocode, intuitive code samples, resources out there to help me model such a function?

非常感谢您的帮助

推荐答案

感知色差可以使用的的 CIEDE2000色差公式。该 CIEDE2000公式是根据LCH色彩空间(亮度,色度和色相)。 LCH色彩空间是再presented为一筒(见图片这里)。

Perceptual color difference can be calculated using the The CIEDE2000 Color-Difference Formula. The CIEDE2000 formula is based on the LCH color space (Luminosity, Chroma, and Hue). LCH color space is represented as a cylinder (see image here).

这是不准确的(但更容易管理)模式,是 CIE76 色差式,这是基于在 Lab色空间(L * A * B *)。有没有简单的公式为RGB或CMYK值和L * a * b *表之间的转换,因为RGB和CMYK颜色模型依赖于设备。的RGB或CMYK值首先需要被转化到特定的绝对颜色空间,诸如sRGB或Adobe RGB。这种调整将是设备相关的,但是从变换所得到的数据将是与设备无关的,允许将数据应变换为CIE 1931颜色空间,然后转化到的L * a * b *表。 文章解释程序和公式

A less accurate (but more manageable) model, is the CIE76 Color-Difference formula, which is based on the Lab color space ( L*a*b*). There are no simple formulas for conversion between RGB or CMYK values and L*a*b*, because the RGB and CMYK color models are device dependent. The RGB or CMYK values first need to be transformed to a specific absolute color space, such as sRGB or Adobe RGB. This adjustment will be device dependent, but the resulting data from the transform will be device independent, allowing data to be transformed to the CIE 1931 color space and then transformed into L*a*b*. This article explains the procedure and the formulas.

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

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