亮度匹配两种颜色 [英] Luminance Matching Two Colors

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

问题描述

这可能看起来像一个非常简单的事情,我想做,但Google搜索没有找到我所寻找的,我想这样做正确。



基本上我需要亮度匹配两个bmps。它们是简单的圆圈(125x125像素),它们的原始颜色只有他们(0-255范围内)的RGB值为255,0,0才知道。我需要找到一个与这些圆的亮度相同的灰度值。



我看过的所有其他亮度/亮度匹配教程,各种色调,亮度等,我不知道这些技术是否会在这个(诚然更简单)的情况下。



我希望能够只是找出RGB值,所以我可以将它们输入到一个实验构建器程序,但我可以访问GIMP,如果其工具是需要或将有所帮助。



我很抱歉这个可能容易的问题,但我知道很少的图形,亮度措施等。我欣赏任何可以提供的帮助。



附录:我实际上认为这将是一个好地方,问一个额外的问题。是否有一个公式用于将candela转换为(可能近似?)RGB值?我将这些颜色值从坎德拉值中松散掉,并希望知道是否存在等同于这两种猜测的方程式/方式。

解决方案

我相信已经给出的答案是误导性的(SO不让我评论)。如上所述,公式适用于强度,你应该注意伽马,参见例如。这里:



http: //www.poynton.com/notes/colour_and_gamma/GammaFAQ.html#luminance



因此,应用示例应使用计算伽玛的系数,或用手补偿它不会的伽马。是的,图像可以是线性的(所以你有实际的强度),但从描述中判断,机会接近于零。



这些系数产生'luma ,不是亮度,但这是你所要求的反正。请参阅:



http: //www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC11



总结:



p luma = 0.299 R + 0.587 G + 0.114 B

p(r,g,b)=(luma,luma,luma)
$ b

材料也应该帮助你的补充问题。我发现它非常可靠,这显然是在这一领域的例外。


This will likely seem like a very easy thing I'm trying to do but Google search has not turned up exactly what I'm looking for and I'd like to do this correctly.

Essentially I need to luminance match two bmps. They are simple circles (125x125 pixels) and their original color is only know to me by their (0-255 ranged) RGB value of 255,0,0. I need to find an RGB value of gray that is the same luminance of these circles.

All other luminance/brightness matching tutorials I have seen have been for pictures that have included, a variety of hues, brightnesses, etc. and I am not sure if those techniques will work in this (admittedly more simple) case.

I am hoping to be able to just figure out the RGB values so I can input them into an experiment builder program but I do have access to GIMP if any of its tools are needed or will help.

I apologize for this likely easy question but I know little of graphics, brightness measures, etc. I appreciate any help that can be provided.

ADDENDUM: I actually think this would be a good place to ask one additional question. Is there a formula for conversion of candela to (perhaps approximate?) RGB values? I'm basing these color values loosely off of candela values and would love to know if an equation/way of equating the two beyond guesswork exists.

解决方案

I believe the answer already given is misleading (SO doesn't let me comment). As mentioned the formula given applies to intensities and you should watch out for gamma, see e.g. here:

http://www.poynton.com/notes/colour_and_gamma/GammaFAQ.html#luminance

Thus, the application example should use coefficients that account for gamma, or compensate the gamma by hand which it doesn't. Yes, the image could be linear (so you have actual intensities), but judging from the description the chance is close to zero that it is.

These coefficients yield 'luma', not luminance, but that is what you have asked for anyway. See:

http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC11

To summarize:

luma = 0.299 R + 0.587 G + 0.114 B

(r,g,b) = (luma, luma, luma)

The material should also help with your addendum question. I've found it to be very reliable, which is clearly an exception in this field.

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

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