怎么了CITemperatureAndTint有矢量输入? [英] What's up with CITemperatureAndTint having vector inputs?

查看:664
本文介绍了怎么了CITemperatureAndTint有矢量输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OK,因此Core Image过滤器Temperature和Tint有两个输入,中性和targetNeutral。但是,我最大的问题是它们都是双分量向量,意思是每个都有两个数字输入。我希望第一个是从2500到10000.向量是什么?

OK, so the Core Image filter Temperature and Tint has two inputs, neutral and targetNeutral. However, my biggest issue is the fact that they're both two-component vectors, meaning each has two numeric inputs. I would expect the first to be from say 2500 to 10000. What would the vector be for?

推荐答案

温度和色调调整是为了校正捕获的图像的白平衡:考虑场景的环境照明并调整颜色,使得图像看起来更像是在白光(大约6500K)中拍摄。

The essential purpose of performing temperature and tint adjustment is to correct the white balance of a captured image: to account for the ambient illumination of the scene and adjust colors so that the image appears more like it was shot in "white" light (roughly 6500K).

温度与图像的温暖或凉爽有关,通常被定性为橙色或蓝色。

Temperature relates to the warmth or coolness of an image, and is normally characterized qualitatively as orange-ish or bluish.

色泽指在相同温度下绿色或品红色的偏差。注意,色调(如此定义)大多与色温无关。 (看一看带有普朗克轨迹的CIE图和绘制在其上的等温线,以发展你的直觉。这里有一个: http://en.wikipedia.org/wiki/File:Planckian-locus.png )。

Tint refers to the deviation toward green or magenta of colors at the same temperature. Note that tint (defined as such) is mostly independent of color temperature. (Take a look at a CIE diagram with the Planck locus and isotherms drawn on it to develop your intuition about this. Here's one: http://en.wikipedia.org/wiki/File:Planckian-locus.png).

当您有兴趣进行白平衡调整(无论是使图像看起来更逼真,还是为艺术目的),您必须提供四个不同的参数:初始图像的温度,白点的色调在初始图像中,输出图像的期望色温,以及中性色调应如何在输出图像中出现色调偏移。图像的温度/色调组合是场景中的环境光和正被成像的材料的响应的函数,并且温度和色调都是有意义地表征捕获的图像的白平衡所必需的。

So, when you are interested in performing white balance adjustment (whether to make an image appear more realistic, or for artistic purposes), there are four different parameters you must supply: the temperature of the initial image, the tint of the white point as it appears in the initial image, the desired color temperature of the output image, and how tint-shifted the "neutral" tones should appear in the output image. The temperature/tint combination of an image is a function of the ambient light in the scene and the response of the material being imaged, and both temperature and tint are necessary to meaningfully characterize the white balance of a captured image.

这是为什么 CITemperatureAndTint 需要两个向量:它需要刚才描述的两对(温度,色调)。

This is why CITemperatureAndTint takes two vectors: it wants the two pairs of (temperature, tint) just described.

现在,如果你想创建一个用于控制白平衡的UI,你实际上不必给用户控制这四个值。而是,在常量(6500,0)处保存第二个向量( TargetNeutral ),并允许用户调整另一个向量( Neutral )。利用这种布置,用户将选择感知的原始图像的色温和色调偏移。 (您可以选择保存 Neutral 向量常量,并允许用户调整 Target Neutral 向量;在用户想要以艺术方式调整白平衡的上下文中更合适,但是所选择的值与所得到的图像之间的相关性不那么明显)。

Now, if you want to create a UI for controlling white balance, you don't actually have to give the user control of all four of these values. Instead, hold the second vector (TargetNeutral) at a constant (6500, 0) and allow the user to adjust the other vector (Neutral). With this arrangement, the user will be selecting the perceived color temperature and tint shift of the original image. (You might choose instead to hold the Neutral vector constant and allow the user to tweak the Target Neutral vector; this may be more appropriate in contexts where the user wants to adjust the white balance artistically, but the correlation between the selected values and the resulting image is not as obvious).

这篇关于怎么了CITemperatureAndTint有矢量输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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