The essential goal of adjusting temperature and hue is to adjust the white balance of the captured image: to take into account the ambient lighting of the scene and adjust the colors so that the image looks more like it was shot in white light (about 6500K).
Temperature refers to the warmth or coolness of the image and is usually characterized qualitatively as orange or bluish.
Hue refers to a deviation from green or purple colors at the same temperature. Note that the hue (defined as such) is mostly independent of color temperature. (Take a look at the CIE diagram with the Planck locus and the isotherms drawn on it to develop your intuition about it. Here is one: http://en.wikipedia.org/wiki/File:Planckian-locus.png ).
So, when you are interested in adjusting the white balance (so that the image looks more realistic or for artistic purposes), you need to specify four different parameters: the temperature of the original image, the hue of the white dot as it appears in the initial image, the desired color temperature of the output image, and how shades of “neutral” tones should be displayed on the output image. The combination of temperature / hue of the image is a function of the ambient light in the scene and the response of the material that is displayed, and both temperature and hue are needed to meaningfully characterize the white balance of the captured image.
This is why CITemperatureAndTint accepts two vectors: it wants two pairs (temperature, hue) to be described only.
Now, if you want to create a user interface for controlling white balance, you actually do not need to give the user control over all four of these values. Instead, hold the second vector ( TargetNeutral ) constant (6500, 0) and allow the user to adjust another vector ( Neutral ). With this arrangement, the user will select the perceived color temperature and hue shift of the original image. (Instead, you can save the Neutral vector constant and let the user customize the Target Neutral vector, which may be more appropriate in the context where the user wants to artistically adjust the white balance, but the correlation between the selected values and the resulting image is not so obvious).
warrenm
source share