HOME

TheInfoList



OR:

In
photography Photography is the art, application, and practice of creating durable images by recording light, either electronically by means of an image sensor, or chemically by means of a light-sensitive material such as photographic film. It is emplo ...
and image processing, color balance is the global adjustment of the intensities of the colors (typically red, green, and blue
primary colors A set of primary colors or primary colours (see spelling differences) consists of colorants or colored lights that can be mixed in varying amounts to produce a gamut of colors. This is the essential method used to create the perception of a b ...
). An important goal of this adjustment is to render specific colors – particularly neutral colors like white or grey – correctly. Hence, the general method is sometimes called gray balance, neutral balance, or white balance. Color balance changes the overall mixture of colors in an image and is used for color correction. Generalized versions of color balance are used to correct colors other than neutrals or to deliberately change them for effect. White balance is one of the most common kinds of balancing, and is when colors are adjusted to make a white object (such as a piece of paper or a wall) appear white and not a shade of any other colour. Image data acquired by sensors – either
film A film also called a movie, motion picture, moving picture, picture, photoplay or (slang) flick is a work of visual art that simulates experiences and otherwise communicates ideas, stories, perceptions, feelings, beauty, or atmospher ...
or electronic image sensors – must be transformed from the acquired values to new values that are appropriate for color reproduction or display. Several aspects of the acquisition and display process make such color correction essential – including that the acquisition sensors do not match the sensors in the human eye, that the properties of the display medium must be accounted for, and that the ambient viewing conditions of the acquisition differ from the display viewing conditions. The color balance operations in popular image editing applications usually operate directly on the red, green, and blue channel pixel values, without respect to any color sensing or reproduction model. In film photography, color balance is typically achieved by using color correction filters over the lights or on the camera lens.


Generalized color balance

Sometimes the adjustment to keep neutrals neutral is called ''white balance'', and the phrase ''color balance'' refers to the adjustment that in addition makes other colors in a displayed image appear to have the same general appearance as the colors in an original scene. It is particularly important that neutral (gray, neutral, white) colors in a scene appear neutral in the reproduction.


Psychological color balance

Humans relate to flesh tones more critically than other colors. Trees, grass and sky can all be off without concern, but if human flesh tones are 'off' then the human subject can look sick or dead. To address this critical color balance issue, the tri-color primaries themselves are formulated to ''not'' balance as a true neutral color. The purpose of this color primary imbalance is to more faithfully reproduce the flesh tones through the entire brightness range.


Illuminant estimation and adaptation

Most digital cameras have means to select color correction based on the type of scene lighting, using either manual lighting selection, automatic white balance, or custom white balance. The algorithms for these processes perform generalized chromatic adaptation. Many methods exist for color balancing. Setting a button on a camera is a way for the user to indicate to the processor the nature of the scene lighting. Another option on some cameras is a button which one may press when the camera is pointed at a
gray card A gray card is a middle gray reference, typically used together with a reflective light meter, as a way to produce consistent image exposure and/or color in video production, film and photography. A gray card is a flat object of a neutral g ...
or other neutral colored object. This captures an image of the ambient light, which enables a digital camera to set the correct color balance for that light. There is a large literature on how one might estimate the ambient lighting from the camera data and then use this information to transform the image data. A variety of algorithms have been proposed, and the quality of these has been debated. A few examples and examination of the references therein will lead the reader to many others. Examples are
Retinex Color constancy is an example of subjective constancy and a feature of the human color perception system which ensures that the perceived color of objects remains relatively constant under varying illumination conditions. A green apple ...
, an
artificial neural network Artificial neural networks (ANNs), usually simply called neural networks (NNs) or neural nets, are computing systems inspired by the biological neural networks that constitute animal brains. An ANN is based on a collection of connected unit ...
Brian Funt, Vlad Cardei, and Kobus Barnard,
Learning color constancy
" in ''Proceedings of the Fourth IS&T/SID Color Imaging Conference,'' pp. 58–60 (1996).
or a Bayesian method.


Chromatic colors

Color balancing an image affects not only the neutrals, but other colors as well. An image that is not color balanced is said to have a color cast, as everything in the image appears to have been shifted towards one color.John A C Yule, ''Principles of Color Reproduction.'' New York: Wiley, 1967. Color balancing may be thought in terms of removing this color cast. Color balance is also related to color constancy. Algorithms and techniques used to attain color constancy are frequently used for color balancing, as well. Color constancy is, in turn, related to chromatic adaptation. Conceptually, color balancing consists of two steps: first, determining the illuminant under which an image was captured; and second, scaling the components (e.g., R, G, and B) of the image or otherwise transforming the components so they conform to the viewing illuminant. Viggiano found that white balancing in the camera's native RGB color model tended to produce less color inconstancy (i.e., less distortion of the colors) than in monitor RGB for over 4000 hypothetical sets of camera sensitivities. This difference typically amounted to a factor of more than two in favor of camera RGB. This means that it is advantageous to get color balance right at the time an image is captured, rather than edit later on a monitor. If one must color balance later, balancing the raw image data will tend to produce less distortion of chromatic colors than balancing in monitor RGB.


Mathematics of color balance

Color balancing is sometimes performed on a three-component image (e.g., RGB) using a 3x3
matrix Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** '' The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchi ...
. This type of transformation is appropriate if the image was captured using the wrong white balance setting on a digital camera, or through a color filter.


Scaling monitor R, G, and B

In principle, one wants to scale all relative luminances in an image so that objects which are believed to be neutral appear so. If, say, a surface with R=240 was believed to be a white object, and if 255 is the count which corresponds to white, one could multiply all red values by 255/240. Doing analogously for
green Green is the color between cyan and yellow on the visible spectrum. It is evoked by light which has a dominant wavelength of roughly 495570 nm. In subtractive color systems, used in painting and color printing, it is created by a combin ...
and
blue Blue is one of the three primary colours in the RYB colour model (traditional colour theory), as well as in the RGB (additive) colour model. It lies between violet and cyan on the spectrum of visible light. The eye perceives blue when ...
would result, at least in theory, in a color balanced image. In this type of transformation the 3x3 matrix is a diagonal matrix. : \left begin R \\ G \\ B \end\right\left begin255/R'_w & 0 & 0 \\ 0 & 255/G'_w & 0 \\ 0 & 0 & 255/B'_w\end\rightleft beginR' \\ G' \\ B' \end\right/math> where R, G, and B are the color balanced red, green, and blue components of a pixel in the image; R', G', and B' are the red, green, and blue components of the image before color balancing, and R'_w, G'_w, and B'_w are the red, green, and blue components of a pixel which is believed to be a white surface in the image before color balancing. This is a simple scaling of the red, green, and blue channels, and is why color balance tools in Photoshop have a white eyedropper tool. It has been demonstrated that performing the white balancing in the phosphor set assumed by sRGB tends to produce large errors in chromatic colors, even though it can render the neutral surfaces perfectly neutral.


Scaling X, Y, Z

If the image may be transformed into CIE XYZ tristimulus values, the color balancing may be performed there. This has been termed a “wrong von Kries” transformation.Mark D Fairchild, ''Color Appearance Models.'' Reading, MA: Addison-Wesley, 1998. Although it has been demonstrated to offer usually poorer results than balancing in monitor RGB, it is mentioned here as a bridge to other things. Mathematically, one computes: :\left begin X \\ Y \\ Z \end\right\left beginX_w/X'_w & 0 & 0 \\ 0 & Y_w/Y'_w & 0 \\ 0 & 0 & Z_w/Z'_w\end\rightleft beginX' \\ Y' \\ Z' \end\right/math> where X, Y, and Z are the color-balanced tristimulus values; X_w, Y_w, and Z_w are the tristimulus values of the viewing illuminant (the white point to which the image is being transformed to conform to); X'_w, Y'_w, and Z'_w are the tristimulus values of an object believed to be white in the un-color-balanced image, and X', Y', and Z' are the tristimulus values of a pixel in the un-color-balanced image. If the tristimulus values of the monitor primaries are in a matrix \mathbf so that: :\left begin X \\ Y \\ Z \end\right\mathbf\left beginL_R \\ L_G \\ L_B \end\right/math> where L_R, L_G, and L_B are the un- gamma corrected monitor RGB, one may use: :\left begin L_R \\ L_G \\ L_B \end\right\mathbf\left beginX_w/X'_w & 0 & 0 \\ 0 & Y_w/Y'_w & 0 \\ 0 & 0 & Z_w/Z'_w\end\rightmathbf\left beginL_ \\ L_ \\ L_ \end\right/math>


Von Kries's method

Johannes von Kries, whose theory of rods and three color-sensitive cone types in the
retina The retina (from la, rete "net") is the innermost, light-sensitive layer of tissue of the eye of most vertebrates and some molluscs. The optics of the eye create a focused two-dimensional image of the visual world on the retina, which the ...
has survived as the dominant explanation of color sensation for over 100 years, motivated the method of converting color to the LMS color space, representing the effective stimuli for the Long-, Medium-, and Short-wavelength cone types that are modeled as adapting independently. A 3x3 matrix converts RGB or XYZ to LMS, and then the three LMS primary values are scaled to balance the neutral; the color can then be converted back to the desired final
color space A color space is a specific organization of colors. In combination with color profiling supported by various physical devices, it supports reproducible representations of colorwhether such representation entails an analog or a digital represen ...
: :\left begin L \\ M \\ S \end\right\left begin1/L'_w & 0 & 0 \\ 0 & 1/M'_w & 0 \\ 0 & 0 & 1/S'_w\end\rightleft beginL' \\ M' \\ S' \end\right/math> where L, M, and S are the color-balanced LMS cone tristimulus values; L'_w, M'_w, and S'_w are the tristimulus values of an object believed to be white in the un-color-balanced image, and L', M', and S' are the tristimulus values of a pixel in the un-color-balanced image. Matrices to convert to LMS space were not specified by von Kries, but can be derived from CIE color matching functions and LMS color matching functions when the latter are specified; matrices can also be found in reference books.


Scaling camera RGB

By Viggiano's measure, and using his model of gaussian camera spectral sensitivities, most camera RGB spaces performed better than either monitor RGB or XYZ. If the camera's raw RGB values are known, one may use the 3x3 diagonal matrix: : \left begin R \\ G \\ B \end\right\left begin255/R'_w & 0 & 0 \\ 0 & 255/G'_w & 0 \\ 0 & 0 & 255/B'_w\end\rightleft beginR' \\ G' \\ B' \end\right/math> and then convert to a working RGB space such as sRGB or
Adobe RGB The Adobe RGB (1998) color space or opRGB is a color space developed by Adobe Systems, Inc. in 1998. It was designed to encompass most of the colors achievable on CMYK color printers, but by using RGB primary colors on a device such as a comp ...
after balancing.


Preferred chromatic adaptation spaces

Comparisons of images balanced by diagonal transforms in a number of different RGB spaces have identified several such spaces that work better than others, and better than camera or monitor spaces, for chromatic adaptation, as measured by several color appearance models; the systems that performed statistically as well as the best on the majority of the image test sets used were the "Sharp", "Bradford", "CMCCAT", and "ROMM" spaces.


General illuminant adaptation

The best color matrix for adapting to a change in illuminant is not necessarily a diagonal matrix in a fixed color space. It has long been known that if the space of illuminants can be described as a linear model with ''N'' basis terms, the proper color transformation will be the weighted sum of ''N'' fixed linear transformations, not necessarily consistently diagonalizable.


Examples


See also

*
Color cast A colour cast is a tint of a particular colour, usually unwanted, that evenly affects a photographic image in whole or in part. Certain types of light can cause film and digital cameras to render a colour cast. Illuminating a subject with light s ...
* Color temperature * Gamma correction * White point


References


External links


White Balance
- Intro at nikondigital.org

- Interactive White Balance

- Tutorial
Affine color balance with saturation, with code and on-line demonstration


- Photography Tutorial {{DEFAULTSORT:Color Balance Color Image processing