颜色重映射 - 使用3D网格匹配目标调色板? [英] Color Remapping - Matching target palette using a 3D grid?

查看:281
本文介绍了颜色重映射 - 使用3D网格匹配目标调色板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有颜色'FOO',它以RGB格式存储。我需要重新着色'FOO',因此它匹配颜色列表中最接近的颜色。这样做的时候,我不能查看每个颜色的RGB值作为3D网格上的点(r = x,g = y,b = z),并计算点'FOO'之间的距离,颜色在列表中?

Let's say I have color 'FOO', and it is stored in RGB format. I need to recolor 'FOO' so it matches the closest color in a list of colors. Doing this on the fly, couldn't I view the RGB values from each color as points on a 3D grid (r=x, g=y, b=z) and compute the distance between point 'FOO' vs the points from each color in the list?

最接近FOO的点是替换颜色吗?

The closest point to 'FOO' would be the replacement color?

推荐答案

理论上,是的。在现实中,计算最接近的颜色是不平凡的,如果你想做得很好。例如,人们的眼睛对于亮度的变化比色彩变化更敏感,特别是朝向色彩范围的末端(即,朝向极端的红色或蓝色)。

In theory, yes. In reality, computing the closest color is non-trivial if you want to do it well. Just for example, people's eyes are much more sensitive to changes in brightness than color shifts, especially toward the ends of the color range (i.e., toward extreme reds or blues).

至少如果你不介意在计算中的一些额外的工作,你会想使用标准delta E计算(在您的情况下,您需要最小化ΔE)。请注意,这些所有(我所有已经工作)在CIE L a b *颜色空间。在典型情况下,您将从RGB开始,您需要转换为L a b *

At least if you don't mind some extra work in the computation, you'll want to use one of the standard "delta E" computations (in your case, you'll want to minimize delta E). Note that these all (all I've worked with anyway) work in the CIE Lab* color space. In a typical case, you'll start with RGB, which you'll need to convert to Lab* first.

这篇关于颜色重映射 - 使用3D网格匹配目标调色板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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