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

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

问题描述

好的,所以核心图像过滤器温度和色调有两个输入,中性和目标中性.然而,我最大的问题是它们都是双分量向量,这意味着每个向量都有两个数字输入.我希望第一个是从 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,您实际上不必让用户控制所有这四个值.相反,将第二个向量 (TargetNeutral) 保持在常数 (6500, 0) 上,并允许用户调整另一个向量 (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天全站免登陆